@yext/pages-components 1.0.0-rc.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,103 +0,0 @@
1
- "use strict";var B_=Object.defineProperty;var H_=(t,e,n)=>e in t?B_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var $n=(t,e,n)=>(H_(t,typeof e!="symbol"?e+"":e,n),n);const rt=require("react"),ld=require("react-dom");function W_(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const K_=W_(rt);var Wu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ku={exports:{}},Bl={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var uf;function U_(){if(uf)return Bl;uf=1;var t=rt,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function f(p,C,x){var T,O={},M=null,A=null;x!==void 0&&(M=""+x),C.key!==void 0&&(M=""+C.key),C.ref!==void 0&&(A=C.ref);for(T in C)r.call(C,T)&&!d.hasOwnProperty(T)&&(O[T]=C[T]);if(p&&p.defaultProps)for(T in C=p.defaultProps,C)O[T]===void 0&&(O[T]=C[T]);return{$$typeof:e,type:p,key:M,ref:A,props:O,_owner:c.current}}return Bl.Fragment=n,Bl.jsx=f,Bl.jsxs=f,Bl}var Hl={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var df;function z_(){return df||(df=1,process.env.NODE_ENV!=="production"&&function(){var t=rt,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),v=Symbol.iterator,w="@@iterator";function P(ye){if(ye===null||typeof ye!="object")return null;var Ge=v&&ye[v]||ye[w];return typeof Ge=="function"?Ge:null}var K=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function $(ye){{for(var Ge=arguments.length,et=new Array(Ge>1?Ge-1:0),Ct=1;Ct<Ge;Ct++)et[Ct-1]=arguments[Ct];W("error",ye,et)}}function W(ye,Ge,et){{var Ct=K.ReactDebugCurrentFrame,Bt=Ct.getStackAddendum();Bt!==""&&(Ge+="%s",et=et.concat([Bt]));var Kt=et.map(function($t){return String($t)});Kt.unshift("Warning: "+Ge),Function.prototype.apply.call(console[ye],console,Kt)}}var H=!1,z=!1,te=!1,re=!1,ce=!1,q;q=Symbol.for("react.module.reference");function G(ye){return!!(typeof ye=="string"||typeof ye=="function"||ye===r||ye===d||ce||ye===c||ye===x||ye===T||re||ye===A||H||z||te||typeof ye=="object"&&ye!==null&&(ye.$$typeof===M||ye.$$typeof===O||ye.$$typeof===f||ye.$$typeof===p||ye.$$typeof===C||ye.$$typeof===q||ye.getModuleId!==void 0))}function j(ye,Ge,et){var Ct=ye.displayName;if(Ct)return Ct;var Bt=Ge.displayName||Ge.name||"";return Bt!==""?et+"("+Bt+")":et}function _e(ye){return ye.displayName||"Context"}function pe(ye){if(ye==null)return null;if(typeof ye.tag=="number"&&$("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ye=="function")return ye.displayName||ye.name||null;if(typeof ye=="string")return ye;switch(ye){case r:return"Fragment";case n:return"Portal";case d:return"Profiler";case c:return"StrictMode";case x:return"Suspense";case T:return"SuspenseList"}if(typeof ye=="object")switch(ye.$$typeof){case p:var Ge=ye;return _e(Ge)+".Consumer";case f:var et=ye;return _e(et._context)+".Provider";case C:return j(ye,ye.render,"ForwardRef");case O:var Ct=ye.displayName||null;return Ct!==null?Ct:pe(ye.type)||"Memo";case M:{var Bt=ye,Kt=Bt._payload,$t=Bt._init;try{return pe($t(Kt))}catch{return null}}}return null}var J=Object.assign,ee=0,F,D,V,ne,Y,U,Q;function k(){}k.__reactDisabledLog=!0;function m(){{if(ee===0){F=console.log,D=console.info,V=console.warn,ne=console.error,Y=console.group,U=console.groupCollapsed,Q=console.groupEnd;var ye={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:ye,log:ye,warn:ye,error:ye,group:ye,groupCollapsed:ye,groupEnd:ye})}ee++}}function y(){{if(ee--,ee===0){var ye={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},ye,{value:F}),info:J({},ye,{value:D}),warn:J({},ye,{value:V}),error:J({},ye,{value:ne}),group:J({},ye,{value:Y}),groupCollapsed:J({},ye,{value:U}),groupEnd:J({},ye,{value:Q})})}ee<0&&$("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var R=K.ReactCurrentDispatcher,Z;function ue(ye,Ge,et){{if(Z===void 0)try{throw Error()}catch(Bt){var Ct=Bt.stack.trim().match(/\n( *(at )?)/);Z=Ct&&Ct[1]||""}return`
18
- `+Z+ye}}var ge=!1,ae;{var Te=typeof WeakMap=="function"?WeakMap:Map;ae=new Te}function Ae(ye,Ge){if(!ye||ge)return"";{var et=ae.get(ye);if(et!==void 0)return et}var Ct;ge=!0;var Bt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Kt;Kt=R.current,R.current=null,m();try{if(Ge){var $t=function(){throw Error()};if(Object.defineProperty($t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($t,[])}catch(Zn){Ct=Zn}Reflect.construct(ye,[],$t)}else{try{$t.call()}catch(Zn){Ct=Zn}ye.call($t.prototype)}}else{try{throw Error()}catch(Zn){Ct=Zn}ye()}}catch(Zn){if(Zn&&Ct&&typeof Zn.stack=="string"){for(var Pt=Zn.stack.split(`
19
- `),mn=Ct.stack.split(`
20
- `),sn=Pt.length-1,tn=mn.length-1;sn>=1&&tn>=0&&Pt[sn]!==mn[tn];)tn--;for(;sn>=1&&tn>=0;sn--,tn--)if(Pt[sn]!==mn[tn]){if(sn!==1||tn!==1)do if(sn--,tn--,tn<0||Pt[sn]!==mn[tn]){var Bn=`
21
- `+Pt[sn].replace(" at new "," at ");return ye.displayName&&Bn.includes("<anonymous>")&&(Bn=Bn.replace("<anonymous>",ye.displayName)),typeof ye=="function"&&ae.set(ye,Bn),Bn}while(sn>=1&&tn>=0);break}}}finally{ge=!1,R.current=Kt,y(),Error.prepareStackTrace=Bt}var mr=ye?ye.displayName||ye.name:"",_i=mr?ue(mr):"";return typeof ye=="function"&&ae.set(ye,_i),_i}function ze(ye,Ge,et){return Ae(ye,!1)}function oe(ye){var Ge=ye.prototype;return!!(Ge&&Ge.isReactComponent)}function ie(ye,Ge,et){if(ye==null)return"";if(typeof ye=="function")return Ae(ye,oe(ye));if(typeof ye=="string")return ue(ye);switch(ye){case x:return ue("Suspense");case T:return ue("SuspenseList")}if(typeof ye=="object")switch(ye.$$typeof){case C:return ze(ye.render);case O:return ie(ye.type,Ge,et);case M:{var Ct=ye,Bt=Ct._payload,Kt=Ct._init;try{return ie(Kt(Bt),Ge,et)}catch{}}}return""}var de=Object.prototype.hasOwnProperty,we={},ke=K.ReactDebugCurrentFrame;function Be(ye){if(ye){var Ge=ye._owner,et=ie(ye.type,ye._source,Ge?Ge.type:null);ke.setExtraStackFrame(et)}else ke.setExtraStackFrame(null)}function Ye(ye,Ge,et,Ct,Bt){{var Kt=Function.call.bind(de);for(var $t in ye)if(Kt(ye,$t)){var Pt=void 0;try{if(typeof ye[$t]!="function"){var mn=Error((Ct||"React class")+": "+et+" type `"+$t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ye[$t]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw mn.name="Invariant Violation",mn}Pt=ye[$t](Ge,$t,Ct,et,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(sn){Pt=sn}Pt&&!(Pt instanceof Error)&&(Be(Bt),$("%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).",Ct||"React class",et,$t,typeof Pt),Be(null)),Pt instanceof Error&&!(Pt.message in we)&&(we[Pt.message]=!0,Be(Bt),$("Failed %s type: %s",et,Pt.message),Be(null))}}}var ct=Array.isArray;function yt(ye){return ct(ye)}function dt(ye){{var Ge=typeof Symbol=="function"&&Symbol.toStringTag,et=Ge&&ye[Symbol.toStringTag]||ye.constructor.name||"Object";return et}}function ve(ye){try{return se(ye),!1}catch{return!0}}function se(ye){return""+ye}function he(ye){if(ve(ye))return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dt(ye)),se(ye)}var Oe=K.ReactCurrentOwner,Me={key:!0,ref:!0,__self:!0,__source:!0},De,We,qe;qe={};function Qe(ye){if(de.call(ye,"ref")){var Ge=Object.getOwnPropertyDescriptor(ye,"ref").get;if(Ge&&Ge.isReactWarning)return!1}return ye.ref!==void 0}function ft(ye){if(de.call(ye,"key")){var Ge=Object.getOwnPropertyDescriptor(ye,"key").get;if(Ge&&Ge.isReactWarning)return!1}return ye.key!==void 0}function Lt(ye,Ge){if(typeof ye.ref=="string"&&Oe.current&&Ge&&Oe.current.stateNode!==Ge){var et=pe(Oe.current.type);qe[et]||($('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',pe(Oe.current.type),ye.ref),qe[et]=!0)}}function Ve(ye,Ge){{var et=function(){De||(De=!0,$("%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)",Ge))};et.isReactWarning=!0,Object.defineProperty(ye,"key",{get:et,configurable:!0})}}function je(ye,Ge){{var et=function(){We||(We=!0,$("%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)",Ge))};et.isReactWarning=!0,Object.defineProperty(ye,"ref",{get:et,configurable:!0})}}var nt=function(ye,Ge,et,Ct,Bt,Kt,$t){var Pt={$$typeof:e,type:ye,key:Ge,ref:et,props:$t,_owner:Kt};return Pt._store={},Object.defineProperty(Pt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Pt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ct}),Object.defineProperty(Pt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Bt}),Object.freeze&&(Object.freeze(Pt.props),Object.freeze(Pt)),Pt};function _t(ye,Ge,et,Ct,Bt){{var Kt,$t={},Pt=null,mn=null;et!==void 0&&(he(et),Pt=""+et),ft(Ge)&&(he(Ge.key),Pt=""+Ge.key),Qe(Ge)&&(mn=Ge.ref,Lt(Ge,Bt));for(Kt in Ge)de.call(Ge,Kt)&&!Me.hasOwnProperty(Kt)&&($t[Kt]=Ge[Kt]);if(ye&&ye.defaultProps){var sn=ye.defaultProps;for(Kt in sn)$t[Kt]===void 0&&($t[Kt]=sn[Kt])}if(Pt||mn){var tn=typeof ye=="function"?ye.displayName||ye.name||"Unknown":ye;Pt&&Ve($t,tn),mn&&je($t,tn)}return nt(ye,Pt,mn,Bt,Ct,Oe.current,$t)}}var Et=K.ReactCurrentOwner,St=K.ReactDebugCurrentFrame;function Ot(ye){if(ye){var Ge=ye._owner,et=ie(ye.type,ye._source,Ge?Ge.type:null);St.setExtraStackFrame(et)}else St.setExtraStackFrame(null)}var bt;bt=!1;function xt(ye){return typeof ye=="object"&&ye!==null&&ye.$$typeof===e}function Qt(){{if(Et.current){var ye=pe(Et.current.type);if(ye)return`
22
-
23
- Check the render method of \``+ye+"`."}return""}}function At(ye){{if(ye!==void 0){var Ge=ye.fileName.replace(/^.*[\\\/]/,""),et=ye.lineNumber;return`
24
-
25
- Check your code at `+Ge+":"+et+"."}return""}}var zt={};function It(ye){{var Ge=Qt();if(!Ge){var et=typeof ye=="string"?ye:ye.displayName||ye.name;et&&(Ge=`
26
-
27
- Check the top-level render call using <`+et+">.")}return Ge}}function gr(ye,Ge){{if(!ye._store||ye._store.validated||ye.key!=null)return;ye._store.validated=!0;var et=It(Ge);if(zt[et])return;zt[et]=!0;var Ct="";ye&&ye._owner&&ye._owner!==Et.current&&(Ct=" It was passed a child from "+pe(ye._owner.type)+"."),Ot(ye),$('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',et,Ct),Ot(null)}}function wr(ye,Ge){{if(typeof ye!="object")return;if(yt(ye))for(var et=0;et<ye.length;et++){var Ct=ye[et];xt(Ct)&&gr(Ct,Ge)}else if(xt(ye))ye._store&&(ye._store.validated=!0);else if(ye){var Bt=P(ye);if(typeof Bt=="function"&&Bt!==ye.entries)for(var Kt=Bt.call(ye),$t;!($t=Kt.next()).done;)xt($t.value)&&gr($t.value,Ge)}}}function Bi(ye){{var Ge=ye.type;if(Ge==null||typeof Ge=="string")return;var et;if(typeof Ge=="function")et=Ge.propTypes;else if(typeof Ge=="object"&&(Ge.$$typeof===C||Ge.$$typeof===O))et=Ge.propTypes;else return;if(et){var Ct=pe(Ge);Ye(et,ye.props,"prop",Ct,ye)}else if(Ge.PropTypes!==void 0&&!bt){bt=!0;var Bt=pe(Ge);$("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Bt||"Unknown")}typeof Ge.getDefaultProps=="function"&&!Ge.getDefaultProps.isReactClassApproved&&$("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ms(ye){{for(var Ge=Object.keys(ye.props),et=0;et<Ge.length;et++){var Ct=Ge[et];if(Ct!=="children"&&Ct!=="key"){Ot(ye),$("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ct),Ot(null);break}}ye.ref!==null&&(Ot(ye),$("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function _s(ye,Ge,et,Ct,Bt,Kt){{var $t=G(ye);if(!$t){var Pt="";(ye===void 0||typeof ye=="object"&&ye!==null&&Object.keys(ye).length===0)&&(Pt+=" 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 mn=At(Bt);mn?Pt+=mn:Pt+=Qt();var sn;ye===null?sn="null":yt(ye)?sn="array":ye!==void 0&&ye.$$typeof===e?(sn="<"+(pe(ye.type)||"Unknown")+" />",Pt=" Did you accidentally export a JSX literal instead of a component?"):sn=typeof ye,$("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",sn,Pt)}var tn=_t(ye,Ge,et,Bt,Kt);if(tn==null)return tn;if($t){var Bn=Ge.children;if(Bn!==void 0)if(Ct)if(yt(Bn)){for(var mr=0;mr<Bn.length;mr++)wr(Bn[mr],ye);Object.freeze&&Object.freeze(Bn)}else $("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 wr(Bn,ye)}return ye===r?ms(tn):Bi(tn),tn}}function fn(ye,Ge,et){return _s(ye,Ge,et,!0)}function pr(ye,Ge,et){return _s(ye,Ge,et,!1)}var Qr=pr,ys=fn;Hl.Fragment=r,Hl.jsx=Qr,Hl.jsxs=ys}()),Hl}process.env.NODE_ENV==="production"?Ku.exports=U_():Ku.exports=z_();var at=Ku.exports;function G_(t){switch(t){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const np={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},Uu={GOOGLE:"google",APPLE:"apple",BING:"bing"},Y_=(t,e)=>{const r={region:"localizedRegionName",countryCode:"localizedCountryName"}[t];return r&&e[r]},V_=(t,e=[],n,r={route:!1})=>{const c="Failed to construct query for maps service.";let d=t&&ff([t.line1,t.line2,t.city,t.region,t.postalCode,t.countryCode]);switch(r.provider){case Uu.APPLE:{if(!d){console.warn(`${c} Check that you've provided a valid Yext Address.`);break}return j_(d,r.route)}case Uu.BING:{if(d=t&&ff([t.line1,t.city,t.region,t.postalCode]),!d){console.warn(`${c} Check that you've provided a valid Yext Address.`);break}return q_(d,r.route)}default:{const f=e.find(p=>{var C;return((C=p==null?void 0:p.publisher)==null?void 0:C.toUpperCase())===np.GOOGLEMYBUSINESS});if(f!=null&&f.listingUrl)return f.listingUrl;if(n)return Z_(n,d,r.route);if(!d){console.warn(`${c} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return J_(d,r.route)}}},j_=(t,e)=>e?`https://maps.apple.com/?daddr=${t}`:`https://maps.apple.com/?address=${t}`,q_=(t,e)=>e?`https://bing.com/maps/default.aspx?rtp=adr.${t}`:`https://bing.com/maps/default.aspx?where1=${t}`,Z_=(t,e,n)=>{const r=e?`&query=${e}`:"";return n?`https://maps.google.com/maps/dir/?api=1${r}&destination_place_id=${t}&destination=direct`:r?`https://maps.google.com/maps/search/?api=1${r}&query_place_id=${t}`:`https://maps.google.com/maps/dir/?api=1&destination_place_id=${t}&destination=direct`},J_=(t,e)=>e?`https://maps.google.com/maps/dir/?api=1&destination=${t}`:`https://maps.google.com/maps/search/?api=1&query=${t}`,ff=(t=[])=>{if(!t.length)return"";const e=t.filter(Boolean).join(", ");return encodeURI(e)},X_=({address:t,lines:e,separator:n=",",...r})=>{const c=(e||G_(t.countryCode)).map(d=>at.jsx(Q_,{address:t,line:d,separator:n},d.toString()));return rt.createElement("div",{...r,key:t.toString()},c)},Q_=({address:t,line:e,separator:n})=>{const r=[];for(const c of e){if(c===","){r.push(at.jsx("span",{children:n},c));continue}const d=t[c];if(!d)continue;const f=Y_(c,t);if(f){r.push(at.jsxs(K_.Fragment,{children:[" ",at.jsx("abbr",{title:f,children:d})]},c));continue}r.push(at.jsx("span",{children:" "+d},c))}return at.jsx("div",{className:"address-line",children:r})};var tl={};Object.defineProperty(tl,"__esModule",{value:!0});var ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ty=typeof window<"u"&&typeof window.document<"u",ny=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,ry=(typeof self>"u"?"undefined":ey(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",iy=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),oy=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",hf=tl.isBrowser=ty;tl.isWebWorker=ry;var sy=tl.isNode=ny;tl.isJsDom=iy;var ly=tl.isDeno=oy;class ay{constructor(){$n(this,"name");$n(this,"isServerSide");$n(this,"version");var e;ly?(this.name="deno",this.version="",hf&&(this.version=((e=window.Deno)==null?void 0:e.version.deno)||""),this.isServerSide=!0):sy?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):hf?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const Mo=()=>new ay,cy=(...t)=>{var r;if(Mo().name!=="browser")return!1;const n=(r=window==null?void 0:window.location)==null?void 0:r.hostname;return t.length===0?n!=="localhost"&&!n.includes("preview.pagescdn.com"):t.some(c=>c==null?void 0:c.includes(n))};var zu={exports:{}};(function(t,e){var n=typeof self<"u"?self:Wu,r=function(){function d(){this.fetch=!1,this.DOMException=n.DOMException}return d.prototype=n,new d}();(function(d){(function(f){var p={searchParams:"URLSearchParams"in d,iterable:"Symbol"in d&&"iterator"in Symbol,blob:"FileReader"in d&&"Blob"in d&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in d,arrayBuffer:"ArrayBuffer"in d};function C(J){return J&&DataView.prototype.isPrototypeOf(J)}if(p.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],T=ArrayBuffer.isView||function(J){return J&&x.indexOf(Object.prototype.toString.call(J))>-1};function O(J){if(typeof J!="string"&&(J=String(J)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(J))throw new TypeError("Invalid character in header field name");return J.toLowerCase()}function M(J){return typeof J!="string"&&(J=String(J)),J}function A(J){var ee={next:function(){var F=J.shift();return{done:F===void 0,value:F}}};return p.iterable&&(ee[Symbol.iterator]=function(){return ee}),ee}function v(J){this.map={},J instanceof v?J.forEach(function(ee,F){this.append(F,ee)},this):Array.isArray(J)?J.forEach(function(ee){this.append(ee[0],ee[1])},this):J&&Object.getOwnPropertyNames(J).forEach(function(ee){this.append(ee,J[ee])},this)}v.prototype.append=function(J,ee){J=O(J),ee=M(ee);var F=this.map[J];this.map[J]=F?F+", "+ee:ee},v.prototype.delete=function(J){delete this.map[O(J)]},v.prototype.get=function(J){return J=O(J),this.has(J)?this.map[J]:null},v.prototype.has=function(J){return this.map.hasOwnProperty(O(J))},v.prototype.set=function(J,ee){this.map[O(J)]=M(ee)},v.prototype.forEach=function(J,ee){for(var F in this.map)this.map.hasOwnProperty(F)&&J.call(ee,this.map[F],F,this)},v.prototype.keys=function(){var J=[];return this.forEach(function(ee,F){J.push(F)}),A(J)},v.prototype.values=function(){var J=[];return this.forEach(function(ee){J.push(ee)}),A(J)},v.prototype.entries=function(){var J=[];return this.forEach(function(ee,F){J.push([F,ee])}),A(J)},p.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function w(J){if(J.bodyUsed)return Promise.reject(new TypeError("Already read"));J.bodyUsed=!0}function P(J){return new Promise(function(ee,F){J.onload=function(){ee(J.result)},J.onerror=function(){F(J.error)}})}function K(J){var ee=new FileReader,F=P(ee);return ee.readAsArrayBuffer(J),F}function $(J){var ee=new FileReader,F=P(ee);return ee.readAsText(J),F}function W(J){for(var ee=new Uint8Array(J),F=new Array(ee.length),D=0;D<ee.length;D++)F[D]=String.fromCharCode(ee[D]);return F.join("")}function H(J){if(J.slice)return J.slice(0);var ee=new Uint8Array(J.byteLength);return ee.set(new Uint8Array(J)),ee.buffer}function z(){return this.bodyUsed=!1,this._initBody=function(J){this._bodyInit=J,J?typeof J=="string"?this._bodyText=J:p.blob&&Blob.prototype.isPrototypeOf(J)?this._bodyBlob=J:p.formData&&FormData.prototype.isPrototypeOf(J)?this._bodyFormData=J:p.searchParams&&URLSearchParams.prototype.isPrototypeOf(J)?this._bodyText=J.toString():p.arrayBuffer&&p.blob&&C(J)?(this._bodyArrayBuffer=H(J.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):p.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(J)||T(J))?this._bodyArrayBuffer=H(J):this._bodyText=J=Object.prototype.toString.call(J):this._bodyText="",this.headers.get("content-type")||(typeof J=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(J)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var J=w(this);if(J)return J;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(K)}),this.text=function(){var J=w(this);if(J)return J;if(this._bodyBlob)return $(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(W(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(q)}),this.json=function(){return this.text().then(JSON.parse)},this}var te=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function re(J){var ee=J.toUpperCase();return te.indexOf(ee)>-1?ee:J}function ce(J,ee){ee=ee||{};var F=ee.body;if(J instanceof ce){if(J.bodyUsed)throw new TypeError("Already read");this.url=J.url,this.credentials=J.credentials,ee.headers||(this.headers=new v(J.headers)),this.method=J.method,this.mode=J.mode,this.signal=J.signal,!F&&J._bodyInit!=null&&(F=J._bodyInit,J.bodyUsed=!0)}else this.url=String(J);if(this.credentials=ee.credentials||this.credentials||"same-origin",(ee.headers||!this.headers)&&(this.headers=new v(ee.headers)),this.method=re(ee.method||this.method||"GET"),this.mode=ee.mode||this.mode||null,this.signal=ee.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(F)}ce.prototype.clone=function(){return new ce(this,{body:this._bodyInit})};function q(J){var ee=new FormData;return J.trim().split("&").forEach(function(F){if(F){var D=F.split("="),V=D.shift().replace(/\+/g," "),ne=D.join("=").replace(/\+/g," ");ee.append(decodeURIComponent(V),decodeURIComponent(ne))}}),ee}function G(J){var ee=new v,F=J.replace(/\r?\n[\t ]+/g," ");return F.split(/\r?\n/).forEach(function(D){var V=D.split(":"),ne=V.shift().trim();if(ne){var Y=V.join(":").trim();ee.append(ne,Y)}}),ee}z.call(ce.prototype);function j(J,ee){ee||(ee={}),this.type="default",this.status=ee.status===void 0?200:ee.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in ee?ee.statusText:"OK",this.headers=new v(ee.headers),this.url=ee.url||"",this._initBody(J)}z.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},j.error=function(){var J=new j(null,{status:0,statusText:""});return J.type="error",J};var _e=[301,302,303,307,308];j.redirect=function(J,ee){if(_e.indexOf(ee)===-1)throw new RangeError("Invalid status code");return new j(null,{status:ee,headers:{location:J}})},f.DOMException=d.DOMException;try{new f.DOMException}catch{f.DOMException=function(ee,F){this.message=ee,this.name=F;var D=Error(ee);this.stack=D.stack},f.DOMException.prototype=Object.create(Error.prototype),f.DOMException.prototype.constructor=f.DOMException}function pe(J,ee){return new Promise(function(F,D){var V=new ce(J,ee);if(V.signal&&V.signal.aborted)return D(new f.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function Y(){ne.abort()}ne.onload=function(){var U={status:ne.status,statusText:ne.statusText,headers:G(ne.getAllResponseHeaders()||"")};U.url="responseURL"in ne?ne.responseURL:U.headers.get("X-Request-URL");var Q="response"in ne?ne.response:ne.responseText;F(new j(Q,U))},ne.onerror=function(){D(new TypeError("Network request failed"))},ne.ontimeout=function(){D(new TypeError("Network request failed"))},ne.onabort=function(){D(new f.DOMException("Aborted","AbortError"))},ne.open(V.method,V.url,!0),V.credentials==="include"?ne.withCredentials=!0:V.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&p.blob&&(ne.responseType="blob"),V.headers.forEach(function(U,Q){ne.setRequestHeader(Q,U)}),V.signal&&(V.signal.addEventListener("abort",Y),ne.onreadystatechange=function(){ne.readyState===4&&V.signal.removeEventListener("abort",Y)}),ne.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return pe.polyfill=!0,d.fetch||(d.fetch=pe,d.Headers=v,d.Request=ce,d.Response=j),f.Headers=v,f.Request=ce,f.Response=j,f.fetch=pe,Object.defineProperty(f,"__esModule",{value:!0}),f})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var c=r;e=c.fetch,e.default=c.fetch,e.fetch=c.fetch,e.Headers=c.Headers,e.Request=c.Request,e.Response=c.Response,t.exports=e})(zu,zu.exports);var uy=zu.exports;const gf=hc(uy);var dy=function(){function t(){}return t.prototype.post=function(e,n,r){var c=JSON.stringify(n),d={method:"POST",headers:r,body:c,keepalive:!0};return typeof window<"u"&&window.fetch?window.fetch(e,d):gf(e,d)},t.prototype.get=function(e){var n={method:"GET",mode:"no-cors",keepalive:!0};return typeof window<"u"&&window.fetch?window.fetch(e,n):gf(e,n)},t}(),fy={US:{PRODUCTION:"https://us.yextevents.com",SANDBOX:"https://sbx.us.yextevents.com"},EU:{PRODUCTION:"https://eu.yextevents.com",SANDBOX:void 0}},hy={US:{PRODUCTION:"https://realtimeanalytics.yext.com",SANDBOX:"https://sandbox-realtimeanalytics.yext.com"},EU:{PRODUCTION:void 0,SANDBOX:void 0}};function gy(t,e){var n=e?ad(t):_y(t);return"".concat(n,"/store_pagespixel")}function py(){var t=ad("US","PRODUCTION");return"".concat(t,"/conversiontracking/conversion")}function my(){var t=ad("US","PRODUCTION");return"".concat(t,"/listings")}function ad(t,e){return rp(hy,t,e,!0)}function _y(t,e){return rp(fy,t,e)}function rp(t,e,n,r){e===void 0&&(e="US"),n===void 0&&(n="PRODUCTION"),r===void 0&&(r=!1);var c=t[e][n];if(!c)throw Error('The combination of the environment: "'.concat(n,'", region: "').concat(e,'",')+'and conversionTrackingEnabled: "'.concat(r,'" is unsupported.'));return c}var pf;(function(t){t.AllTabNavigation="ALL_TAB_NAVIGATION",t.VerticalTabNavigation="VERTICAL_TAB_NAVIGATION",t.ScrollToBottomOfPage="SCROLL_TO_BOTTOM_OF_PAGE",t.QuestionFocus="QUESTION_FOCUS",t.QuestionSubmit="QUESTION_SUBMIT",t.RowExpand="ROW_EXPAND",t.RowCollapse="ROW_COLLAPSE",t.ThumbsUp="THUMBS_UP",t.ThumbsDown="THUMBS_DOWN",t.VoiceStart="VOICE_START",t.VoiceStop="VOICE_STOP",t.SearchBarImpression="SEARCH_BAR_IMPRESSION",t.SearchClearButton="SEARCH_CLEAR_BUTTON",t.Paginate="PAGINATE",t.AutocompleteSelection="AUTO_COMPLETE_SELECTION",t.VerticalViewAll="VERTICAL_VIEW_ALL",t.CtaClick="CTA_CLICK",t.TitleClick="TITLE_CLICK",t.TapToCall="TAP_TO_CALL",t.OrderNow="ORDER_NOW",t.AddToCart="ADD_TO_CART",t.ApplyNow="APPLY_NOW",t.DrivingDirections="DRIVING_DIRECTIONS",t.ViewWebsite="VIEW_WEBSITE",t.Email="EMAIL",t.BookAppointment="BOOK_APPOINTMENT",t.Rsvp="RSVP",t.ResultsHidden="RESULTS_HIDDEN",t.ResultsUnhidden="RESULTS_UNHIDDEN",t.FollowUpQuery="FOLLOW_UP_QUERY"})(pf||(pf={}));var Xr;(function(t){t.PageView="PAGE_VIEW",t.CTA="CTA_CLICK",t.Website="WEBSITE",t.DrivingDirection="DRIVING_DIRECTIONS",t.PhoneCall="CALL"})(Xr||(Xr={}));Xr.CTA;Xr.Website;Xr.DrivingDirection;var yy={eventType:Xr.PageView};Xr.PhoneCall;var mf;(function(t){t.Production="PRODUCTION",t.Sandbox="SANDBOX"})(mf||(mf={}));var _f;(function(t){t.US="US",t.EU="EU"})(_f||(_f={}));var ql="_yfpc",Gc="__temp__",ip="y_source";function op(){return Date.now()+Math.floor(1e3*Math.random())}var Yc=function(t,e,n,r){function c(d){return d instanceof n?d:new n(function(f){f(d)})}return new(n||(n=Promise))(function(d,f){function p(T){try{x(r.next(T))}catch(O){f(O)}}function C(T){try{x(r.throw(T))}catch(O){f(O)}}function x(T){T.done?d(T.value):c(T.value).then(p,C)}x((r=r.apply(t,e||[])).next())})},Vc=function(t,e){var n={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,c,d,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(x){return function(T){return C([x,T])}}function C(x){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,c&&(d=x[0]&2?c.return:x[0]?c.throw||((d=c.return)&&d.call(c),0):c.next)&&!(d=d.call(c,x[1])).done)return d;switch(c=0,d&&(x=[x[0]&2,d.value]),x[0]){case 0:case 1:d=x;break;case 4:return n.label++,{value:x[1],done:!1};case 5:n.label++,c=x[1],x=[0];continue;case 7:x=n.ops.pop(),n.trys.pop();continue;default:if(d=n.trys,!(d=d.length>0&&d[d.length-1])&&(x[0]===6||x[0]===2)){n=0;continue}if(x[0]===3&&(!d||x[1]>d[0]&&x[1]<d[3])){n.label=x[1];break}if(x[0]===6&&n.label<d[1]){n.label=d[1],d=x;break}if(d&&n.label<d[2]){n.label=d[2],n.ops.push(x);break}d[2]&&n.ops.pop(),n.trys.pop();continue}x=e.call(t,n)}catch(T){x=[6,T],c=0}finally{r=d=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},Cy=function(){function t(e,n){this.httpRequesterService=e,this.debug=n,this._debug=n,this._conversionTrackingEndpoint=py(),this._conversionTrackingListingsEndpoint=my()}return t.prototype.printEvent=function(e,n){this._debug&&console.log("%c[YextAnalytics]%c- Tracked ".concat(n," event: ").concat(e),"background: white; color: blue;","")},t.prototype.handleRequest=function(e){return Yc(this,void 0,void 0,function(){var n,r;return Vc(this,function(c){switch(c.label){case 0:return[4,this.httpRequesterService.get(e.toString())];case 1:return n=c.sent(),n.status!==200&&!(n.type==="opaqueredirect"||n.type==="opaque")?[4,n.text()]:[3,3];case 2:throw r=c.sent(),new Error(r);case 3:return[2]}})})},t.formatBaseEvent=function(e,n){n.set(ql,e.cookieId),e.referrer&&n.set("referrer",e.referrer),n.set("v",op().toString()),n.set("location",e.location)},t.prototype.trackConversion=function(e){return Yc(this,void 0,void 0,function(){var n,r;return Vc(this,function(c){switch(c.label){case 0:return n=new URL(this._conversionTrackingEndpoint),r=new URLSearchParams,r.set("cid",e.cid),e.cv&&r.set("cv",e.cv),t.formatBaseEvent(e,r),n.search=r.toString(),[4,this.handleRequest(n.toString())];case 1:return c.sent(),this.printEvent(e.cid,"Conversion"),[2]}})})},t.prototype.trackListings=function(e){return Yc(this,void 0,void 0,function(){var n,r;return Vc(this,function(c){switch(c.label){case 0:return n=new URL(this._conversionTrackingListingsEndpoint),r=new URLSearchParams,r.set(ip,e.source),t.formatBaseEvent(e,r),n.search=r.toString(),[4,this.handleRequest(n.toString())];case 1:return c.sent(),this.printEvent(e.source,"Listings Click"),[2]}})})},t.prototype.setDebugEnabled=function(e){this._debug=e},t}(),yf=function(t,e,n,r){function c(d){return d instanceof n?d:new n(function(f){f(d)})}return new(n||(n=Promise))(function(d,f){function p(T){try{x(r.next(T))}catch(O){f(O)}}function C(T){try{x(r.throw(T))}catch(O){f(O)}}function x(T){T.done?d(T.value):c(T.value).then(p,C)}x((r=r.apply(t,e||[])).next())})},Cf=function(t,e){var n={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,c,d,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(x){return function(T){return C([x,T])}}function C(x){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,c&&(d=x[0]&2?c.return:x[0]?c.throw||((d=c.return)&&d.call(c),0):c.next)&&!(d=d.call(c,x[1])).done)return d;switch(c=0,d&&(x=[x[0]&2,d.value]),x[0]){case 0:case 1:d=x;break;case 4:return n.label++,{value:x[1],done:!1};case 5:n.label++,c=x[1],x=[0];continue;case 7:x=n.ops.pop(),n.trys.pop();continue;default:if(d=n.trys,!(d=d.length>0&&d[d.length-1])&&(x[0]===6||x[0]===2)){n=0;continue}if(x[0]===3&&(!d||x[1]>d[0]&&x[1]<d[3])){n.label=x[1];break}if(x[0]===6&&n.label<d[1]){n.label=d[1],d=x;break}if(d&&n.label<d[2]){n.label=d[2],n.ops.push(x);break}d[2]&&n.ops.pop(),n.trys.pop();continue}x=e.call(t,n)}catch(T){x=[6,T],c=0}finally{r=d=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},Ny="sites",Mn;(function(t){t.BusinessId="businessids",t.Product="product",t.SiteId="siteId",t.IsStaging="isStaging",t.CacheBuster="v",t.UrlPath="pageurl",t.Referrer="pagesReferrer",t.EventType="eventType",t.PageSetId="pageSetId",t.EntityInternalId="ids",t.DirectoryId="directoryId",t.SearchId="searchId",t.StaticPageId="staticPageId",t.PageType="pageType",t.VisitorId="visitorId",t.VisitorMethod="visitorIdMethod",t.PageDomain="pageDomain"})(Mn||(Mn={}));var nl=new Map;nl.set(Xr.PageView,"pageview");nl.set(Xr.CTA,"calltoactionclick");nl.set(Xr.PhoneCall,"phonecall");nl.set(Xr.DrivingDirection,"drivingdirection");nl.set(Xr.Website,"clicktowebsite");function Ey(t){var e=nl.get(t);return typeof e=="string"?e:t}var Ty=function(){function t(e,n){this.config=e,this.httpRequesterService=n,this.setVisitor(e.visitor),this._debug=e.debug,this._conversionTracker=new Cy(this.httpRequesterService,this._debug),this._hasTrackedListings=!1,this._region=e.region;try{this._pageUrl=new URL(e.pageUrl)}catch{throw new Error("pageUrl property must be a valid URL, was: '".concat(e.pageUrl,"'"))}if(e.pageDomain)try{this._pageDomain=new URL(e.pageDomain)}catch{console.warn("pageDomain '".concat(e.pageDomain,"' is not a valid URL."),"It will not be included as a query param sent to the API.")}}return t.prototype.printEvent=function(e){this._debug&&console.log("%c[YextAnalytics]%c- Tracked Pages event: ".concat(e.eventType),"background: white; color: blue;","")},t.prototype.urlParameters=function(e){var n=new URLSearchParams;return n.set(Mn.BusinessId,this.config.businessId.toString()),n.set(Mn.Product,Ny),n.set(Mn.SiteId,this.config.siteId.toString()),n.set(Mn.IsStaging,(!this.config.production).toString()),n.set(Mn.EventType,Ey(e.eventType)),n.set(Mn.PageType,this.config.pageType.name),this.config.pageType.name==="entity"?(n.set(Mn.PageSetId,this.config.pageType.pageSetId),n.set(Mn.EntityInternalId,this.config.pageType.id.toString())):this.config.pageType.name==="directory"?(n.set(Mn.DirectoryId,this.config.pageType.directoryId),n.set(Mn.EntityInternalId,this.config.pageType.id.toString())):this.config.pageType.name==="locator"?n.set(Mn.SearchId,this.config.pageType.searchId):Mn.StaticPageId in this.config.pageType&&n.set(Mn.StaticPageId,this.config.pageType.staticPageId),n.set(Mn.CacheBuster,op().toString()),n.set(Mn.UrlPath,this._pageUrl.pathname),n.set(Mn.Referrer,this.config.referrer),this._pageDomain&&n.set(Mn.PageDomain,this._pageDomain.toString()),this._conversionTrackingEnabled&&this._cookieID&&n.set(ql,this._cookieID),this._visitor&&(n.set(Mn.VisitorId,this._visitor.id),this._visitor.idMethod&&n.set(Mn.VisitorMethod,this._visitor.idMethod)),n},t.prototype.pageView=function(){return yf(this,void 0,void 0,function(){var e;return Cf(this,function(n){switch(n.label){case 0:return e=this._pageUrl.searchParams.get(ip),this._conversionTrackingEnabled&&this._cookieID&&!this._hasTrackedListings&&e?[4,this._conversionTracker.trackListings({cookieId:this._cookieID,location:this._pageUrl.toString(),source:e})]:[3,2];case 1:n.sent(),this._hasTrackedListings=!0,n.label=2;case 2:return[2,this.track(yy)]}})})},t.prototype.track=function(e,n){return yf(this,void 0,void 0,function(){var r,c,d,f;return Cf(this,function(p){switch(p.label){case 0:return r=gy(this._region,this._conversionTrackingEnabled),c=new URL(r),c.search=this.urlParameters(e).toString(),[4,this.httpRequesterService.get(c.toString())];case 1:return d=p.sent(),d.status!==200&&!(d.type=="opaque"||d.type=="opaqueredirect")?[4,d.text()]:[3,3];case 2:throw f=p.sent(),new Error(f);case 3:return this.printEvent(e),this._conversionTrackingEnabled&&this._cookieID&&n?[4,this._conversionTracker.trackConversion({cid:n.cid,cv:n.cv,cookieId:this._cookieID,location:this._pageUrl.toString()})]:[3,5];case 4:p.sent(),p.label=5;case 5:return[2]}})})},t.prototype.setDebugEnabled=function(e){this._debug=e,this._conversionTracker&&this._conversionTracker.setDebugEnabled(e)},t.prototype.setVisitor=function(e){this._visitor=e},t.prototype.setConversionTrackingEnabled=function(e,n){this._conversionTrackingEnabled=e,this._cookieID=n},t}();var xy=function(){function t(e,n){e===void 0&&(e=window),n===void 0&&(n=document),this._outerWindow=e,this._outerDocument=n}return t.prototype.setAndGetYextCookie=function(){var e=this.fetchCookie();return e||(e=t.generateRandomCookie().toString()),this.setCookieAndRemoveOldCookies(e),e},t.generateRandomCookie=function(){return Math.floor(Math.random()*new Date().getTime())},t.prototype.fetchCookie=function(){var e=this,n="",r=function(c){if(e.canSetCookieWithDomain(c)){var d=e.removeCookieByDomain(c);return d&&(n=d,e.setCookie(n,c)),!0}};return this.forEachDomainIncreasingSpecificity(r),n||r(""),n},t.prototype.forEachDomainIncreasingSpecificity=function(e){for(var n=!1,r=this._outerDocument.location.hostname.split(".").reverse(),c="",d=0;d<r.length;d++)if(c="."+r[d]+c,e(c)){n=!0;break}n||e("")},t.prototype.removeCookieByDomain=function(e){var n=this.persistentCookies();this.clearCookie(e);var r=this.persistentCookies();return r.length<n.length&&t.listDifference(n,r)[0]||""},t.listDifference=function(e,n){for(var r=Array.from(e),c=0;c<n.length;c++){var d=r.indexOf(n[c]);d!==-1&&r.splice(d,1)}return r},t.prototype.persistentCookies=function(){return this.allCookies().filter(function(e){return e!==Gc})},t.prototype.allCookies=function(){var e=[];return this.forEachCookieNameValue(function(n,r){n===ql&&e.push(r)}),e},t.prototype.forEachCookieNameValue=function(e){this._outerDocument.cookie.split(";").forEach(function(n){var r=n.split("="),c=r[0],d=r[1];c&&d&&e(c.trim(),d.trim())})},t.prototype.setCookieAndRemoveOldCookies=function(e){var n=this,r=!1,c=this.allCookies().length,d=0;this.forEachDomainIncreasingSpecificity(function(f){if(r?n.removeCookieByDomain(f)&&d++:n.canSetCookieWithDomain(f)&&(n.removeCookieByDomain(f)&&d++,n.setCookie(e,f),r=!0),d>=c&&r)return!0})},t.prototype.canSetCookieWithDomain=function(e){var n=this.removeCookieByDomain(e),r=this.allCookies();this.setCookie(Gc,e);var c=this.allCookies();return r.length<c.length?(n?this.setCookie(n,e):this.clearCookie(e),!0):!1},t.prototype.setCookie=function(e,n){this._outerDocument.cookie=this.formatCookie(ql,e,n)},t.prototype.formatCookie=function(e,n,r,c){c===void 0&&(c="/");var d=e+"="+n,f=new Date;return f.setTime(f.getTime()+90*24*60*60*1e3),d+=";path="+c,d+=";expires="+f.toUTCString(),r&&(d+=";domain="+r),d+=";samesite=None;",this._outerWindow.location.protocol==="https:"&&(d+=" Secure "),d},t.prototype.clearCookie=function(e,n){e===void 0&&(e=""),n===void 0&&(n="/");var r=new Date(0),c=ql+"="+Gc;c+=";path="+n,c+=";expires="+r.toUTCString(),e&&(c+=";domain="+e+";"),c+=";samesite=None;",this._outerWindow.location.protocol==="https:"&&(c+=" Secure "),this._outerDocument.cookie=c},t}();function vy(t){var e=new dy;return new Ty(t,e)}function sp(t){return t?t.toLowerCase().trim().replace(/\s/g,""):""}function Gu(t,e){return[t,e].filter(n=>!!n).map(n=>sp(n)).join("_")}class lp{constructor(e,n,r,c=[]){$n(this,"_optedIn");$n(this,"_conversionTrackingEnabled",!1);$n(this,"_cookieManager");$n(this,"_analyticsReporter");$n(this,"_pageViewFired",!1);$n(this,"_enableDebugging",!1);this.templateData=e,this.pageDomain=r,this.productionDomains=c,this._optedIn=!n,this.makeReporter(),this.pageView()}calculatePageType(){var c,d,f,p;const e=!!((d=(c=this.templateData.document)==null?void 0:c.__)!=null&&d.staticPage),n=!!((p=(f=this.templateData.document)==null?void 0:f.__)!=null&&p.entityPageSet);let r;if(e)r={name:"static",staticPageId:this.templateData.document.__.name};else if(n)r={name:"entity",pageSetId:this.templateData.document.__.name,id:this.templateData.document.uid};else throw new Error("invalid document type");return r}makeReporter(){if(Mo().name!=="browser"||!this._optedIn)return;const e=cy(...this.productionDomains);this._analyticsReporter=vy({businessId:this.templateData.document.businessId,pageType:this.calculatePageType(),pageUrl:window.location.href,production:e,referrer:document.referrer,siteId:this.templateData.document.siteId,pageDomain:this.pageDomain}),this.setDebugEnabled(this._enableDebugging)}canTrack(){return Mo().name==="browser"&&this._optedIn&&!!this._analyticsReporter}setupConversionTracking(){var e;this._cookieManager=new xy,(e=this._analyticsReporter)==null||e.setConversionTrackingEnabled(!0,this._cookieManager.setAndGetYextCookie())}enableTrackingCookie(){this._conversionTrackingEnabled=!0,this.canTrack()&&this.setupConversionTracking()}identify(e){var n;this.canTrack()&&((n=this._analyticsReporter)==null||n.setVisitor(e))}async optIn(){this._optedIn=!0,this.makeReporter(),this._conversionTrackingEnabled&&!this._cookieManager&&this.setupConversionTracking(),this._pageViewFired||await this.pageView()}async pageView(){var e;if(!this.canTrack())return Promise.resolve(void 0);await((e=this._analyticsReporter)==null?void 0:e.pageView()),this._pageViewFired=!0}async track(e,n){var r;if(!this.canTrack())return Promise.resolve();await((r=this._analyticsReporter)==null?void 0:r.track({eventType:sp(e)},n))}getDebugEnabled(){return this._enableDebugging}setDebugEnabled(e){var n;this._enableDebugging=e,(n=this._analyticsReporter)==null||n.setDebugEnabled(e)}trackClick(e,n){return r=>{if(!this.canTrack())return Promise.resolve();if(r.target===null||r.defaultPrevented)return this.track(e,n);const c=r.target;if(c.href===null||c.href===void 0)return this.track(e,n);const d=new URL(c.href);if(d.protocol==="mailto:"||d.protocol==="tel:"||d.protocol==="javascript:"||d.hostname===window.location.hostname)return this.track(e,n);if(c.target&&!c.target.match(/^_(self|parent|top)$/i)||r.ctrlKey||r.shiftKey||r.metaKey)return this.track(e,n);r.preventDefault();const p=()=>{window.location.assign(d)},C=new Promise(x=>{setTimeout(()=>{x()},1e3)});return Promise.race([this.track(e,n),C]).then(p).catch(p)}}}const cd=rt.createContext(null),Yu=rt.createContext({name:""}),ud=()=>rt.useContext(Yu).name;function Sy(t){var c;const e=ud(),[n]=rt.useState({name:Gu(e,t.name)});return((c=rl())==null?void 0:c.getDebugEnabled())?at.jsx("section",{"data-ya-scope":n.name,children:at.jsx(Yu.Provider,{value:n,children:t.children})}):at.jsx(Yu.Provider,{value:n,children:t.children})}function rl(){const t=rt.useContext(cd);if(!t)return t;Mo().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await t.optIn()});const e=ud();return{trackClick(n,r){return t.trackClick(Gu(e,n),r)},getDebugEnabled(){return t.getDebugEnabled()},setDebugEnabled(n){return t.setDebugEnabled(n)},enableTrackingCookie(){return t.enableTrackingCookie()},identify(n){return t.identify(n)},optIn(){return t.optIn()},pageView(){return t.pageView()},track(n,r){return t.track(Gu(e,n),r)}}}const wy=()=>{var t;return(t=rl())==null?void 0:t.track},Oy=()=>{var t;return(t=rl())==null?void 0:t.pageView},Dy=()=>{var t;return(t=rl())==null?void 0:t.identify},by=rt.lazy(()=>Promise.resolve().then(()=>require("./debugger-x0jOMtzI.cjs")));function Ry(t){var O;const{children:e,requireOptIn:n,enableTrackingCookie:r,enableDebugging:c,templateData:d,pageDomain:f,productionDomains:p}=t,C=rt.useRef(null);C.current===null&&(C.current=new lp(d,n,f,p));const x=C.current;r&&x.enableTrackingCookie();let T=My();return Mo().name==="node"&&(T=T||((O=process.env)==null?void 0:O.NODE_ENV)==="development"),x.setDebugEnabled(c??T),at.jsxs(at.Fragment,{children:[at.jsx(cd.Provider,{value:x,children:e}),(c??T)&&Mo().name==="browser"?at.jsx(rt.Suspense,{fallback:at.jsx(at.Fragment,{}),children:at.jsx(by,{})}):null]})}function My(){return Mo().name!=="browser"||typeof window===void 0?!1:!!new URL(window.location.href).searchParams.get("xYextDebug")}const Ro={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},Ay=t=>{const e=t.protocol.slice(0,-1);if(e!=="http"&&e!=="https"){console.error(`Invalid scheme: ${t}`);return}const n=t.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${t}`);return}r="eu"}if(!t.pathname.startsWith("/f")){console.error(`Invalid path: ${t}`);return}const c=t.pathname.replace(/^\//,"").split("/");if(c.length<2||c.length>3){console.error(`Invalid path: ${t}`);return}let d;if(c[0]==="f")d="prod";else switch(c[0].replace("f-","")){case"sandbox":{d="sbx";break}case"qa":{d="qa";break}case"dev":{d="dev";break}default:{console.error(`Invalid path: ${t}`);return}}if(r==="eu"&&(d==="dev"||d==="sbx")){console.error(`Invalid path: ${t}`);return}let f;if(c.length===3&&(f=parseInt(c[1]),Number.isNaN(f))){console.error(`Invalid account id: ${t}`);return}const p=c[c.length-1].split("."),C=p.length===2?`.${p[1]}`:"",x=p[0];return{scheme:e,partition:r,env:d,accountId:f,contentHash:x,extension:C}},ky=(t,e,n)=>{const r=`https://dyn${t.partition==="us"?"":`.${t.partition}`}.mktgcdn.com`;let c="f";switch(t.env){case"prod":break;case"sbx":{c+="-sandbox";break}default:c+=`-${t.env.toString()}`}const d=t.accountId!==void 0?`${t.accountId}/`:"";return`${r}/${c}/${d}${t.contentHash}${t.extension}/width=${Math.round(e)},height=${Math.round(n)}`},Ly=t=>{const e=t.protocol.slice(0,-1);if(e!=="http"&&e!=="https"){console.error(`Invalid scheme: ${t}`);return}if(t.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${t}`);return}if(!t.pathname.startsWith("/p")){console.error(`Invalid path: ${t}`);return}const n=t.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${t}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${t}`);return}}const c=n[1];let d;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${t}`);return}if(d=parseFloat(n[2]),Number.isNaN(d)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${t}`);return}}const f=n[n.length-1].split("."),p=f.length===2?`.${f[1]}`:"",C=f[0];return{scheme:e,env:r,contentHash:c,aspectRatio:d,name:C,extension:p}},Iy=(t,e,n)=>{const r="https://dyn.mktgcdn.com";let c="p";switch(t.env){case"prod":break;case"sbx":{c+="-sandbox";break}default:c+=`-${t.env.toString()}`}return`${r}/${c}/${t.contentHash}/width=${Math.round(e)},height=${Math.round(n)}`},Vu=(t,e,n)=>{if(!ap(t)){console.error(`Invalid image url: ${t}.`);return}const r=new URL(t);if(r.pathname.startsWith("/p")){const c=Ly(r);if(c)return Iy(c,e,n)}else if(r.pathname.startsWith("/f")){const c=Ay(r);if(c)return ky(c,e,n)}return t},ap=t=>{let e;try{e=new URL(t)}catch{return!1}return e.protocol==="http:"||e.protocol==="https:"},Py=({image:t,className:e,width:n,height:r,aspectRatio:c,layout:d=Ro.INTRINSIC,placeholder:f,imgOverrides:p,style:C={},loading:x="lazy"})=>{const T=rt.useRef(null),[O,M]=rt.useState(!1),A="image"in t?t.image:t;rt.useEffect(()=>{var ce;(ce=T.current)!=null&&ce.complete&&M(!0)},[]),$y(d,A.width,A.height,n,r,c);const v=Math.abs(A.width);v||console.warn("Invalid image width.");const w=Math.abs(A.height);if(w||console.warn("Invalid image height."),!ap(A.url))return console.error(`Invalid image url: ${A.url}`),at.jsx(at.Fragment,{children:f!=null&&f});const P=n&&n>0?n:void 0,K=r&&r>0?r:void 0,{src:$,imgStyle:W,widths:H}=Fy(d,v,w,C,A.url,P,K,c),z=H.map(ce=>`${Vu(A.url,ce,w/v*ce)} ${ce}w`).join(", "),te=[640,768,1024,1280,1536],re=H.map((ce,q)=>q===H.length-1?`${ce}px`:`(max-width: ${te[q]}px) ${ce}px`).join(", ");return at.jsxs(at.Fragment,{children:[!O&&f!=null&&f,at.jsx("img",{ref:T,style:W,src:$,className:e,width:P,height:K,srcSet:z,sizes:re,loading:x,alt:A.alternateText||"",...p})]})},$y=(t,e,n,r,c,d)=>{if(e<0&&console.warn(`Invalid image width: ${e}.`),n<0&&console.warn(`Invalid image height: ${n}.`),t===Ro.FIXED){if(!r&&!c){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),c&&c<0&&console.warn(`Using fixed layout but height is invalid: ${c}.`);return}(r||c)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),t===Ro.ASPECT&&!d&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},Fy=(t,e,n,r,c,d,f,p)=>{let C=[100,320,640,960,1280,1920],x=Vu(c,500,500);const T={...r};switch(T.objectFit=T.objectFit||"cover",T.objectPosition=T.objectPosition||"center",t){case Ro.INTRINSIC:T.maxWidth=e,T.width="100%",T.aspectRatio=p?`${p}`:`${e} / ${n}`;break;case Ro.FIXED:{const{fixedWidth:O,fixedHeight:M,fixedWidths:A}=By(e,n,C,d,f);T.width=O,T.height=M,C=A,x=Vu(c,O,M);break}case Ro.ASPECT:T.aspectRatio=p?`${p}`:`${e} / ${n}`;break;case Ro.FILL:T.width="100%",T.aspectRatio=p?`${p}`:`${e} / ${n}`;break;default:console.warn(`Unrecognized layout: ${t}.`);break}return{src:x,imgStyle:T,widths:C}},By=(t,e,n,r,c)=>r&&c?{fixedWidth:r,fixedHeight:c,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*e/t,fixedWidths:[r]}:c?{fixedWidth:c/e*t,fixedHeight:c,fixedWidths:[c/e*t]}:{fixedWidth:t,fixedHeight:e,fixedWidths:n};var cp={exports:{}};/*!
28
- Copyright (c) 2018 Jed Watson.
29
- Licensed under the MIT License (MIT), see
30
- http://jedwatson.github.io/classnames
31
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],c=0;c<arguments.length;c++){var d=arguments[c];if(d){var f=typeof d;if(f==="string"||f==="number")r.push(d);else if(Array.isArray(d)){if(d.length){var p=n.apply(null,d);p&&r.push(p)}}else if(f==="object"){if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]")){r.push(d.toString());continue}for(var C in d)e.call(d,C)&&d[C]&&r.push(C)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(cp);var Hy=cp.exports;const Qs=hc(Hy),Wy=t=>t.linkType==="Email"||!t.linkType&&up(t.link)?`mailto:${t.link}`:t.linkType==="Phone"?`tel:${t.link}`:t.link,up=t=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t),Ky=t=>{let e="";for(let n=t.length-1;n>=0;e+=t[n--]);return e},Uy=t=>"href"in t,dp=rt.forwardRef(function(e,n){const r=Uy(e)?{link:e.href}:e.cta,{children:c,onClick:d,className:f,eventName:p,cta:C,...x}=e,T=p||(C?"cta":"link"),O=rl(),M=e.obfuscate||e.obfuscate!==!1&&up(r.link),[A,v]=rt.useState(!1),w=async H=>{if(v(!0),O!==null)try{await O.trackClick(T,e.conversionDetails)(H)}catch{console.error("Failed to report click Analytics Event")}d&&d(H)},P=!c&&!r.label,K=!A&&M,$={...e.style,unicodeBidi:"bidi-override",direction:P&&K?"rtl":"ltr"},W=K?Ky(r.link):r.link;return at.jsx("a",{className:Qs("Link",f),href:A||!M?Wy(r):"obfuscate",onClick:w,rel:e.target&&!e.rel?"noopener":void 0,ref:n,style:$,"data-ya-track":T,...x,children:c||r.label||W})}),zy={URL:"URL",Email:"Email",Phone:"Phone"},dn=Object.freeze({DEGREE:Symbol("deg"),KILOMETER:Symbol("km"),MILE:Symbol("mi"),RADIAN:Symbol("r")}),jr=Object.freeze({MERCATOR:Symbol("mercator"),SPHERICAL:Symbol("spherical")}),jc=3959,qc=6371,Gy=["latitude","lat"],Yy=["longitude","lon","lng","long"];function Nf(t,e){for(const n of e)if(t[n]||t[n]===0)return t[n]}function Ef(t){switch(typeof t){case"string":case"number":const e=Number.parseFloat(t);if(Number.isNaN(e))throw new Error(`'${t}' must be convertible to a Number'`);return e;default:throw new Error(`typeof '${t}' must be a number or a string that can be converted to a number, is '${typeof t}'`)}}function us(t){return t*Math.PI/180}function Xi(t){return t/Math.PI*180}function Vy(t,e){const n=us(t.latitude),r=us(e.latitude),c=r-n,d=us(e.longitude-t.longitude),f=Math.pow(Math.sin(c/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(d/2),2);return 2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}function jy(t,e){const n=Math.tan(Math.PI/360*(t+90)),r=Math.tan(Math.PI/360*(e+90));return Math.log(r/n)}function qy(t,e){const r=Math.tan(Math.PI/360*(t+90))*Math.pow(Math.E,e);return Math.atan(r)*360/Math.PI-90}class rn{constructor(e,n){let r=e;typeof e=="object"&&(r=Nf(e,Gy),n=Nf(e,Yy),r=typeof r=="function"?r():r,n=typeof n=="function"?n():n),this.latitude=r,this.longitude=n}get latitude(){return this._lat}get longitude(){return this._lon}get normalLon(){return((this._lon+180)%360+360)%360-180}set latitude(e){this._lat=Math.max(-90,Math.min(Ef(e),90))}set longitude(e){this._lon=Ef(e)}add(e,n,r=dn.DEGREE,c=jr.SPHERICAL){if(c===jr.MERCATOR&&(r===dn.DEGREE||r===dn.RADIAN)){const d=r===dn.DEGREE?us(e):e,f=r===dn.DEGREE?n:Xi(n);this.latitude=qy(this.latitude,d),this.longitude+=f}else switch(r){case dn.DEGREE:this.latitude+=e,this.longitude+=n;break;case dn.KILOMETER:this.latitude+=Xi(e)*qc,this.longitude+=Xi(n)*qc*Math.cos(us(this.latitude));break;case dn.MILE:this.latitude+=Xi(e)*jc,this.longitude+=Xi(n)*jc*Math.cos(us(this.latitude));break;case dn.RADIAN:this.latitude+=Xi(e),this.longitude+=Xi(n);break;default:throw new Error(`unit unhandled: ${r}`)}}distanceTo(e,n=dn.MILE,r=jr.SPHERICAL){if(r===jr.MERCATOR&&(n===dn.DEGREE||n===dn.RADIAN)){const c=jy(this.latitude,e.latitude),d=Math.abs(e.normalLon-this.normalLon),f=us(Math.min(d,360-d)),p=Math.sqrt(Math.pow(c,2)+Math.pow(f,2));switch(n){case dn.DEGREE:return Xi(p);case dn.RADIAN:return p;default:throw new Error(`unit unhandled: ${n}`)}}else{const c=Vy(this,e);switch(n){case dn.DEGREE:return Xi(c);case dn.KILOMETER:return c*qc;case dn.MILE:return c*jc;case dn.RADIAN:return c;default:throw new Error(`unit unhandled: ${n}`)}}}equals(e){return e&&e.latitude===this.latitude&&e.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function fp(t,e=()=>null){const n=document.createElement("script");n.async=!0,n.onload=e,n.src=t,document.head.appendChild(n)}const fr={UNDEFINED:"undefined",NULL:"object",BOOLEAN:"boolean",NUMBER:"number",BIGINT:"bigint",STRING:"string",SYMBOL:"symbol",FUNCTION:"function",OBJECT:"object"};function Sr(t,e){if(typeof e!="string")throw new Error("Assertion error: 'type' must be a string");if(typeof t!==e)throw new Error(`Expected an object of type '${e}' but received '${typeof t}'`)}function hr(t,e){let n;try{n=t instanceof e}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${e.name}' but received '${t.constructor.name}'`)}class hp{constructor(e,n){hr(e,gs),hr(n,HTMLElement),this.providerMapClass=e.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(e){return this.controlEnabled=e,this}withPanHandler(e){return Sr(e,fr.FUNCTION),this.panHandler=e,this}withPanStartHandler(e){return Sr(e,fr.FUNCTION),this.panStartHandler=e,this}withProviderOptions(e){return this.providerOptions=e,this}build(){const e=this.providerMapClass;return new e(this)}}class il{constructor(e){hr(e,hp),this._panHandler=e.panHandler,this._panStartHandler=e.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(e,n){throw new Error("not implemented")}setZoom(e,n){throw new Error("not implemented")}setZoomCenter(e,n,r){this.setZoom(e,r),this.setCenter(n,r)}}class gp{constructor(e){hr(e,gs),this.providerPinClass=e.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={}}withClickHandler(e){return Sr(e,fr.FUNCTION),this.clickHandler=e,this}withFocusHandler(e){return Sr(e,fr.FUNCTION),this.focusHandler=e,this}withHoverHandler(e){return Sr(e,fr.FUNCTION),this.hoverHandler=e,this}withIcons(e){return this.icons=e,this}build(){const e=this.providerPinClass;return new e(this)}}class dd{constructor(e){hr(e,gp),this._clickHandler=e.clickHandler,this._focusHandler=e.focusHandler,this._hoverHandler=e.hoverHandler,this._icons=e.icons}setCoordinate(e){throw new Error("not implemented")}setMap(e,n){throw new Error("not implemented")}setProperties(e){throw new Error("not implemented")}}const Zy=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class gc extends dd{static get baseStyle(){return Zy}constructor(e){super(e),this._pinEl=document.createElement("button"),Object.assign(this._pinEl.style,this.constructor.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}addListeners(){this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(e){this.setElementProperties(e);const n=e.getClass(),r=e.getElement()||this._pinEl,c=e.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=c,this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)))}setElementProperties(e){const n=e.getAnchorX(),r=e.getAnchorY(),c=e.getHeight(),d=this._icons[e.getIcon()],f=e.getSRText(),p=e.getWidth();Object.assign(this._pinEl.style,{backgroundImage:d?`url("${d}")`:"",height:c+"px",transform:`translate(${-100*n}%, ${-100*r}%)`,width:p+"px"}),this._pinAlt.innerText=f}}class hs{constructor(){this.loadFunction=(e,n,r,c)=>e(),this.mapClass=il,this.pinClass=dd,this.providerName=""}withLoadFunction(e){return Sr(e,fr.FUNCTION),this.loadFunction=e,this}withMapClass(e){return this.mapClass=e,this}withPinClass(e){return this.pinClass=e,this}withProviderName(e){return this.providerName=e,this}build(){return new gs(this)}}class gs{constructor(e){hr(e,hs),this._loadFunction=e.loadFunction,this._mapClass=e.mapClass,this._pinClass=e.pinClass,this._providerName=e.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(e=this._apiKey,n=this._options){this._loadInvoked||(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,e,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(e,n=null){this._loadInvoked||(this._apiKey=e,this._options=n||this._options)}}const Tf={GEOCODER:"geocoder",PLACES:"places"};class Jy extends il{constructor(e){super(e),this.map=new google.maps.Map(e.wrapper,{disableDefaultUI:!e.controlEnabled,fullscreenControl:!1,gestureHandling:e.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:e.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...e.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()})}getCenter(){return new rn(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,n){const r=new google.maps.LatLng(e.latitude,e.longitude);n?this.map.panTo(r):this.map.setCenter(r)}setZoom(e,n){this.map.setZoom(Math.floor(e))}setZoomCenter(e,n,r){this.setCenter(n,r),this.setZoom(e,r)}}class Xy extends gc{constructor(e){super(e),this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper);const n=this;class r extends google.maps.OverlayView{draw(){var f;const d=(f=this.getProjection())==null?void 0:f.fromLatLngToDivPixel(n._latLng);d&&(n._wrapper.style.left=d.x+"px",n._wrapper.style.top=d.y+"px")}onAdd(){this.getPanes().floatPane.appendChild(n._wrapper)}onRemove(){var d;(d=n._wrapper.parentNode)==null||d.removeChild(n._wrapper)}}this.pin=new r}setCoordinate(e){this._latLng=new google.maps.LatLng(e.latitude,e.longitude),this.pin.draw()}setMap(e,n){this.pin.setMap(e?e.getProviderMap().map:null)}}const xf="GoogleMapsCallback_b7d77ff2",Qy="https://maps.googleapis.com/maps/api/js";function eC(t,e,n,{autocomplete:r=!1,channel:c=window.location.hostname,client:d,language:f,region:p,libraries:C=[],params:x={}}={}){window[xf]=t,r&&C.push(Tf.GEOCODER,Tf.PLACES);const T={callback:xf,channel:c,libraries:C.join(","),...x};n&&(T.key=n),d&&(T.client=d),f&&(T.language=f),p&&(T.region=p),fp(Qy+"?"+Object.entries(T).map(([O,M])=>O+"="+M).join("&"))}const fd=new hs().withLoadFunction(eC).withMapClass(Jy).withPinClass(Xy).withProviderName("Google").build();class as{static fit(e){const n=e.map(x=>x.latitude),r=Math.max(...n),c=Math.min(...n),d=e.map(x=>x.normalLon).sort((x,T)=>x-T),f=d.map((x,T)=>({distance:(T<d.length-1?d[T+1]:d[0]+360)-x,index:T})).reduce((x,T)=>T.distance>x.distance?T:x).index,p=d[f],C=d[(f+1)%d.length];return new this(new rn(c,C),new rn(r,p))}constructor(e,n){this._ne=new rn(n),this._sw=new rn(e)}get ne(){return this._ne}get sw(){return this._sw}set ne(e){this._ne=new rn(e)}set sw(e){this._sw=new rn(e)}contains(e){const n=this._sw.latitude<=e.latitude&&e.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,c=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=e.normalLon&&e.normalLon<=this._ne.normalLon:this._sw.normalLon<=e.normalLon||e.normalLon<=this._ne.normalLon;return n&&(r||c)}extend(e){if(this._ne.latitude=Math.max(this._ne.latitude,e.latitude),this._sw.latitude=Math.min(this._sw.latitude,e.latitude),!this.contains(e)){const n=((e.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-e.longitude)%360+360)%360;n<r?this._ne.longitude+=n:this._sw.longitude-=r}}getCenter(e=jr.SPHERICAL){const n=new rn(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(n,dn.DEGREE,e),c=(n.longitude+this._ne.longitude)/2+(this._ne.longitude<n.longitude?180:0);return n.add(-r/2,0,dn.DEGREE,e),n.longitude=c,n}}class tC{constructor(){this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(e){return this._anchorX=e,this}setAnchorY(e){return this._anchorY=e,this}setClass(e){return this._class=e,this}setElement(e){return this._element=e,this}setHeight(e){return this._height=e,this}setIcon(e){return this._icon=e,this}setSRText(e){return this._srText=e,this}setWidth(e){return this._width=e,this}setZIndex(e){return this._zIndex=e,this}}class hd{constructor(){this.coordinate=new rn(0,0),this.hideOffscreen=!1,this.icons={},this.propertiesForStatus=e=>new tC,this.provider=null,this.type=""}withCoordinate(e){return this.coordinate=new rn(e),this}withHideOffscreen(e){return this.hideOffscreen=e,this}withIcon(e,n){return this.icons[e]=n,this}withPropertiesForStatus(e){return Sr(e,fr.FUNCTION),this.propertiesForStatus=e,this}withProvider(e){return hr(e,gs),this.provider=e,this}withType(e){return this.type=e,this}build(){return new nC(this)}}class nC{constructor(e){if(hr(e,hd),hr(e.provider,gs),!e.provider.loaded)throw new Error(`MapProvider '${e.provider.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=e.coordinate,this._hideOffscreen=e.hideOffscreen,this._icons={...e.icons},this._propertiesForStatus=e.propertiesForStatus,this._type=e.type,this._clickHandler=()=>null,this._focusHandler=n=>this._hoverHandler(n),this._hoverHandler=n=>null,this._hidden=!1,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new gp(e.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(n=>this._focusHandler(n)).withHoverHandler(n=>this._hoverHandler(n)).build(),this._pin.setCoordinate(e.coordinate),this._status={},this.setStatus(this._status)}getCoordinate(){return this._coordinate}getIcon(e){return this._icons[e]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null)}setClickHandler(e){Sr(e,fr.FUNCTION),this._clickHandler=e}setCoordinate(e){this._coordinate=new rn(e),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen()}setFocusHandler(e){Sr(e,fr.FUNCTION),this._focusHandler=e}setHoverHandler(e){Sr(e,fr.FUNCTION),this._hoverHandler=e}setMap(e){if(e!==this._map&&(e!==null&&hr(e,mp),this._pin.setMap(e,this._hidden?null:this._map),this._map=e,this._hidden=!1,this._cancelHiddenUpdater(),e&&this._hideOffscreen)){let n=!1;const r=new Promise(c=>{this._cancelHiddenUpdater=()=>{n=!0,c()}});(async()=>{for(;!n;)this._hideIfOffscreen(),await Promise.race([r,e.moving()]),await Promise.race([r,e.idle()])})()}}setStatus(e){Object.assign(this._status,e),this._pin.setProperties(this._propertiesForStatus(this._status))}_hideIfOffscreen(){if(this._map){const e=this._map.getBounds().contains(this._coordinate);this._hidden&&e?this._pin.setMap(this._map,null):!this._hidden&&!e&&this._pin.setMap(null,this._map),this._hidden=!e}}}const So=.98;function Ya(t,e){return Math.max(typeof t==fr.FUNCTION?t():t||0,0)/e}class pp{constructor(){this.controlEnabled=!0,this.defaultCenter=new rn(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(e,n)=>null,this.panStartHandler=e=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null}withControlEnabled(e){return this.controlEnabled=e,this}withDefaultCenter(e){return this.defaultCenter=new rn(e),this}withDefaultZoom(e){return this.defaultZoom=e,this}withLegendPins(e){return this.legendPins=Array.from(e),this}withPadding(e){return this.padding=e,this}withPanHandler(e){return Sr(e,fr.FUNCTION),this.panHandler=e,this}withPanStartHandler(e){return Sr(e,fr.FUNCTION),this.panStartHandler=e,this}withProvider(e){return hr(e,gs),this.provider=e,this}withProviderOptions(e){return this.providerOptions=e,this}withSinglePinZoom(e){return this.singlePinZoom=e,this}withWrapper(e){return hr(e,HTMLElement),this.wrapper=e,this}build(){return new mp(this)}}let mp=class{constructor(e){if(hr(e,pp),hr(e.provider,gs),hr(e.wrapper,HTMLElement),!e.provider.loaded)throw new Error(`MapProvider '${e.provider.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=e.defaultCenter,this._defaultZoom=e.defaultZoom,this._legendPins=e.legendPins,this._provider=e.provider,this._singlePinZoom=e.singlePinZoom,this._wrapper=e.wrapper,this._padding={},this.setPadding(e.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(e.panHandler),this.setPanStartHandler(e.panStartHandler);this._wrapper.firstChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=!1,this._panStartHandlerRunning=!1,this._map=new hp(e.provider,this._wrapper).withControlEnabled(e.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(e.providerOptions).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds()}fitCoordinates(e,n=!1,r=this._singlePinZoom){e.length?this.setBounds(as.fit(e),n,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,n)}getBounds(){if(!this._cachedBounds){const e=this._wrapper.offsetHeight,n=this._wrapper.offsetWidth,r=this.getZoom(),c=this.getCenter(),d=360/Math.pow(2,r+8),f=n*d,p=e*d;this._cachedBounds=new as(c,c),this._cachedBounds.ne.add(p/2,f/2,dn.DEGREE,jr.MERCATOR),this._cachedBounds.sw.add(-p/2,-f/2,dn.DEGREE,jr.MERCATOR),this.moving().then(()=>this._cachedBounds=null)}return new as(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise}async moving(){await this._movingPromise}newPinOptions(){return new hd().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=!0,requestAnimationFrame(()=>{const e=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler(e,new as(new rn(this._currentBounds.sw),new rn(this._currentBounds.ne))),this._panHandlerRunning=!1}),this._setIdle())}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=!0,requestAnimationFrame(()=>{this._panStartHandler(new as(new rn(this._currentBounds.sw),new rn(this._currentBounds.ne))),this._panStartHandlerRunning=!1}),this._setMoving())}setBounds({ne:e,sw:n},r=!1,c={},d=1/0){const f=this._wrapper.offsetHeight,p=this._wrapper.offsetWidth;if(!f||!p)return;let C=Ya(c.bottom,f),x=Ya(c.left,p),T=Ya(c.right,p),O=Ya(c.top,f),M=x+T,A=C+O;M>So&&(x*=So/M,T*=So/M,M=So),A>So&&(C*=So/A,O*=So/A,A=So);const v=f*(1-A),w=p*(1-M),P=new as(n,e),K=new rn(P.ne.latitude,P.sw.longitude),$=P.sw.distanceTo(K,dn.DEGREE,jr.MERCATOR),W=(P.ne.longitude-K.longitude+360)%360;let H=Math.max($,W*v/w)/(1-A),z=Math.max(W,$*w/v)/(1-M),te=Math.log2(p*360/z)-8;te>d&&(te=d,z=p*360/2**(te+8),H=z*f/p);const re=P.getCenter(jr.MERCATOR),ce=(O-C)/2*H,q=(T-x)/2*z;re.add(ce,q,dn.DEGREE,jr.MERCATOR),this.setZoomCenter(te,re,r)}setCenter(e,n=!1){this._map.setCenter(new rn(e),n)}setPadding({bottom:e=this._padding.bottom,left:n=this._padding.left,right:r=this._padding.right,top:c=this._padding.top}){return this._padding={bottom:e,left:n,right:r,top:c},this}setPanHandler(e){Sr(e,fr.FUNCTION),this._panHandler=e}setPanStartHandler(e){Sr(e,fr.FUNCTION),this._panStartHandler=e}setZoom(e,n=!1){this._map.setZoom(e,n)}setZoomCenter(e,n,r=!1){this._map.setZoomCenter(e,n,r)}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(e=>this._resolveMoving=e),this._resolveIdle()}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(e=>this._resolveIdle=e),this._resolveMoving()}};const pc=rt.createContext(null);function rC(){const t=rt.useContext(pc);if(!t||t.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return t.map}const gd=({apiKey:t,bounds:e,children:n,className:r,clientKey:c,controls:d,defaultCenter:f,defaultZoom:p,mapRef:C,padding:x,panStartHandler:T,panHandler:O,provider:M,providerOptions:A={},singleZoom:v})=>{const w=rt.useRef(null),[P,K]=rt.useState(f),[$,W]=rt.useState(!1),[H,z]=rt.useState(),[te,re]=rt.useState(p),ce=(q,G)=>{O(q,G),K(G.getCenter())};return rt.useEffect(()=>{!$||!H||re(H.getZoom())},[P]),rt.useEffect(()=>{if(!e||!$||!H)return;const q=e.map(G=>new rn(G));H.fitCoordinates(q)},[JSON.stringify(e),H]),rt.useEffect(()=>{if(!$||H)return;const q=new pp().withControlEnabled(d).withDefaultCenter(P).withDefaultZoom(te).withPadding(x).withPanHandler(ce).withPanStartHandler(T).withProvider(M).withProviderOptions(A).withSinglePinZoom(v).withWrapper(w.current).build();z(q),C&&(C.current=q)},[$]),rt.useEffect(()=>{$||H||!w.current||M.load(t,{...A,...c&&{client:c}}).then(()=>W(!0))},[]),at.jsx("div",{className:Qs({"is-loaded":$},r),id:"map",ref:w,"data-testid":"map",children:H&&at.jsx(pc.Provider,{value:{map:H,provider:M},children:n})})};gd.defaultProps={controls:!0,defaultCenter:{latitude:39.83,longitude:-98.58},defaultZoom:4,padding:{bottom:50,left:50,right:50,top:50},panHandler:()=>null,panStartHandler:()=>null,provider:fd,providerOptions:{},singleZoom:14};const iC=({count:t})=>at.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:at.jsxs("g",{fill:"none",fillRule:"evenodd",children:[at.jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),at.jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:at.jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:t})})]})}),pd=rt.createContext(null);function oC(){const t=rt.useContext(pd);if(!t)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return t}const sC=({clusterRadius:t=50,children:e,ClusterTemplate:n=iC})=>{const{map:r}=rt.useContext(pc),[c,d]=rt.useState([]),[f,p]=rt.useState(),[C,x]=rt.useState([]),[T,O]=rt.useState([]);return rt.useEffect(()=>{p(lC(c,r.getZoom(),t))},[c,r.getZoom()]),rt.useEffect(()=>{O(()=>[]),x(()=>[]),(f==null?void 0:f.length)!==0&&(f==null||f.forEach(M=>{if(M.length===1){M[0].pin.setMap(r);return}if(M.length>1){const A=as.fit(M.map(w=>w.pin.getCoordinate())).getCenter(jr.MERCATOR),v=`cluster-{${A._lat},${A._lon}}`;M.forEach(w=>w.pin.setMap(null)),x(w=>[...w,v]),O(w=>[...w,at.jsx(mc,{coordinate:A,id:v,onClick:()=>r.fitCoordinates(M.map(P=>P.pin.getCoordinate()),!0,1/0),children:at.jsx(n,{count:M.length})},v)])}}))},[f]),at.jsx(pd.Provider,{value:{clusters:f??[],clusterIds:C,setPinStore:d},children:at.jsxs(at.Fragment,{children:[T.map((M,A)=>at.jsx(rt.Fragment,{children:M},A)),e]})})},lC=(t,e,n)=>{const r=n*Math.PI/2**(e+7),c=t.map((p,C)=>[C]),d=[];t.forEach((p,C)=>{for(let x=C;x<t.length;x++)x!==C&&new rn(p.pin.getCoordinate()).distanceTo(new rn(t[x].pin.getCoordinate()),dn.RADIAN,jr.MERCATOR)<=r&&(c[C].push(x),c[x].push(C))});let f=1;for(;f;){f=0;let p;if(c.forEach((T,O)=>{T.length>f&&(f=T.length,p=O)}),!f)break;const C=c[p??0],x=[];c[p??0]=[];for(const T of C){const O=c[T];x.push(t[T]),c[T]=[],O.forEach(M=>c[M].splice(c[M].indexOf(T),1))}d.push(x)}return d},aC=at.jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:at.jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),mc=({children:t,coordinate:e,hideOffscreen:n,id:r,icon:c,onClick:d,onFocus:f,onHover:p,zIndex:C})=>{const{map:x,provider:T}=rt.useContext(pc),O=rt.useContext(pd),M=rt.useMemo(()=>new hd().withCoordinate(e).withHideOffscreen(n).withProvider(T).build(),[]);rt.useEffect(()=>{if(C!==0&&!C)return;const v=M.getProviderPin().getWrapperElement();v&&(v.style.zIndex=C.toString())},[C]),rt.useEffect(()=>{M.setMap(x),M.setClickHandler(()=>d(r)),M.setFocusHandler(w=>f(w,r)),M.setHoverHandler(w=>p(w,r));const v=O==null?void 0:O.clusterIds.includes(r);return O&&!v&&O.setPinStore(w=>[...w,{pin:M,id:r}]),()=>{M.setMap(null),O&&O.setPinStore(w=>w.filter(P=>P.id!==r))}},[]);const A=t||c;if(A){const v=M.getProviderPin().getPinElement();return Object.assign(v.style,{height:"auto",width:"auto"}),ld.createPortal(A,v)}return null};mc.defaultProps={hideOffscreen:!1,icon:aC,onClick:()=>null,onHover:()=>null,onFocus:()=>null};const _p=({children:t,coordinate:e,linkSameTab:n,pinUrl:r,onClick:c=()=>null,onHover:d=()=>null,onFocus:f=()=>null,...p})=>at.jsx(gd,{bounds:[e],...p,children:at.jsx(mc,{coordinate:e,id:"location-map-marker",onClick:c,onHover:d,onFocus:f,children:r?at.jsx(dp,{href:r,target:n?"_self":"_blank",children:t}):t||void 0})});_p.defaultProps={controls:!0,panHandler:()=>null,provider:fd,singleZoom:16};var Zc={},Wl={},vf;function cC(){if(vf)return Wl;vf=1;var t=rt;const e=t.createContext(null);function n(c,d){let f=null;c!=null&&(f=c[1]);function p(){return d??(f!=null?f.getTheme():null)}return{getTheme:p}}function r(){const c=t.useContext(e);if(c==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return c}return Wl.LexicalComposerContext=e,Wl.createLexicalComposerContext=n,Wl.useLexicalComposerContext=r,Wl}var Kl={},Sf;function uC(){if(Sf)return Kl;Sf=1;var t=rt;function e(r){let c=new URLSearchParams;c.append("code",r);for(let d=1;d<arguments.length;d++)c.append("v",arguments[d]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${c} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=t.createContext(null);return Kl.LexicalComposerContext=n,Kl.createLexicalComposerContext=function(r,c){let d=null;return r!=null&&(d=r[1]),{getTheme:function(){return c??(d!=null?d.getTheme():null)}}},Kl.useLexicalComposerContext=function(){let r=t.useContext(n);return r==null&&e(8),r},Kl}var Jc,wf;function Yn(){return wf||(wf=1,Jc=process.env.NODE_ENV==="development"?cC():uC()),Jc}var Pe={},Of;function dC(){if(Of)return Pe;Of=1;function t(u){return{type:u}}const e=t("SELECTION_CHANGE_COMMAND"),n=t("CLICK_COMMAND"),r=t("DELETE_CHARACTER_COMMAND"),c=t("INSERT_LINE_BREAK_COMMAND"),d=t("INSERT_PARAGRAPH_COMMAND"),f=t("CONTROLLED_TEXT_INSERTION_COMMAND"),p=t("PASTE_COMMAND"),C=t("REMOVE_TEXT_COMMAND"),x=t("DELETE_WORD_COMMAND"),T=t("DELETE_LINE_COMMAND"),O=t("FORMAT_TEXT_COMMAND"),M=t("UNDO_COMMAND"),A=t("REDO_COMMAND"),v=t("KEYDOWN_COMMAND"),w=t("KEY_ARROW_RIGHT_COMMAND"),P=t("MOVE_TO_END"),K=t("KEY_ARROW_LEFT_COMMAND"),$=t("MOVE_TO_START"),W=t("KEY_ARROW_UP_COMMAND"),H=t("KEY_ARROW_DOWN_COMMAND"),z=t("KEY_ENTER_COMMAND"),te=t("KEY_SPACE_COMMAND"),re=t("KEY_BACKSPACE_COMMAND"),ce=t("KEY_ESCAPE_COMMAND"),q=t("KEY_DELETE_COMMAND"),G=t("KEY_TAB_COMMAND"),j=t("INSERT_TAB_COMMAND"),_e=t("INDENT_CONTENT_COMMAND"),pe=t("OUTDENT_CONTENT_COMMAND"),J=t("DROP_COMMAND"),ee=t("FORMAT_ELEMENT_COMMAND"),F=t("DRAGSTART_COMMAND"),D=t("DRAGOVER_COMMAND"),V=t("DRAGEND_COMMAND"),ne=t("COPY_COMMAND"),Y=t("CUT_COMMAND"),U=t("SELECT_ALL_COMMAND"),Q=t("CLEAR_EDITOR_COMMAND"),k=t("CLEAR_HISTORY_COMMAND"),m=t("CAN_REDO_COMMAND"),y=t("CAN_UNDO_COMMAND"),R=t("FOCUS_COMMAND"),Z=t("BLUR_COMMAND"),ue=t("KEY_MODIFIER_COMMAND"),ge=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ae=ge&&"documentMode"in document?document.documentMode:null,Te=ge&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ae=ge&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ze=ge&&"InputEvent"in window&&!ae?"getTargetRanges"in new window.InputEvent("input"):!1,oe=ge&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ie=ge&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,de=ge&&/Android/.test(navigator.userAgent),we=ge&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ke=ge&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!we,Be=1,Ye=3,ct=0,yt=1,dt=2,ve=0,se=1,he=2,Oe=1,Me=2,De=4,We=8,qe=16,Qe=32,ft=64,Lt=128,Ve=Oe|Me|De|We|qe|Qe|ft|Lt,je=1,nt=2,_t=1,Et=2,St=3,Ot=4,bt=5,xt=6,Qt=" ",zt=oe||ie||ke?Qt:"​",It=`
32
-
33
- `,gr=Ae?Qt:zt,wr="֑-߿יִ-﷽ﹰ-ﻼ",Bi="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",ms=new RegExp("^[^"+Bi+"]*["+wr+"]"),_s=new RegExp("^[^"+wr+"]*["+Bi+"]"),fn={bold:Oe,code:qe,highlight:Lt,italic:Me,strikethrough:De,subscript:Qe,superscript:ft,underline:We},pr={directionless:je,unmergeable:nt},Qr={center:Et,end:xt,justify:Ot,left:_t,right:St,start:bt},ys={[Et]:"center",[xt]:"end",[Ot]:"justify",[_t]:"left",[St]:"right",[bt]:"start"},ye={normal:ve,segmented:he,token:se},Ge={[ve]:"normal",[he]:"segmented",[se]:"token"},et=100;let Ct=!1,Bt=0;function Kt(){return Ct}function $t(u){Bt=u.timeStamp}function Pt(u){Bt===0&&Ki(u).addEventListener("textInput",$t,!0)}function mn(u,o,a){return o.__lexicalLineBreak===u||u[`__lexicalKey_${a._key}`]!==void 0}function sn(u){return u.getEditorState().read(()=>{const o=cn();return o!==null?o.clone():null})}function tn(u,o,a){const h=yr(a._window);let _=null,E=null;h!==null&&h.anchorNode===u&&(_=h.anchorOffset,E=h.focusOffset);const I=u.nodeValue;I!==null&&Fo(o,I,_,E,!1)}function Bn(u,o,a){if(pt(u)){const h=u.anchor.getNode();if(h.is(a)&&u.format!==h.getFormat())return!1}return o.nodeType===Ye&&a.isAttached()}function mr(u,o,a){Ct=!0;const h=performance.now()-Bt>et;try{Ar(u,()=>{const _=cn()||sn(u),E=new Map,I=u.getRootElement(),B=u._editorState,le=u._blockCursorElement;let fe=!1,Ce="";for(let xe=0;xe<o.length;xe++){const Ne=o[xe],He=Ne.type,Ie=Ne.target;let Re=_r(Ie,B);if(!(Re===null&&Ie!==I||Sn(Re))){if(He==="characterData")h&&gt(Re)&&Bn(_,Ie,Re)&&tn(Ie,Re,u);else if(He==="childList"){fe=!0;const mt=Ne.addedNodes;for(let Ft=0;Ft<mt.length;Ft++){const Mt=mt[Ft],Nt=Ni(Mt),vt=Mt.parentNode;if(vt!=null&&Mt!==le&&Nt===null&&(Mt.nodeName!=="BR"||!mn(Mt,vt,u))){if(Ae){const Wt=Mt.innerText||Mt.nodeValue;Wt&&(Ce+=Wt)}vt.removeChild(Mt)}}const Ue=Ne.removedNodes,tt=Ue.length;if(tt>0){let Ft=0;for(let Mt=0;Mt<tt;Mt++){const Nt=Ue[Mt];(Nt.nodeName==="BR"&&mn(Nt,Ie,u)||le===Nt)&&(Ie.appendChild(Nt),Ft++)}tt!==Ft&&(Ie===I&&(Re=Ei(B)),E.set(Ie,Re))}}}}if(E.size>0)for(const[xe,Ne]of E)if(Je(Ne)){const He=Ne.getChildrenKeys();let Ie=xe.firstChild;for(let Re=0;Re<He.length;Re++){const mt=He[Re],Ue=u.getElementByKey(mt);Ue!==null&&(Ie==null?(xe.appendChild(Ue),Ie=Ue):Ie!==Ue&&xe.replaceChild(Ue,Ie),Ie=Ie.nextSibling)}}else gt(Ne)&&Ne.markDirty();const Ee=a.takeRecords();if(Ee.length>0){for(let xe=0;xe<Ee.length;xe++){const Ne=Ee[xe],He=Ne.addedNodes,Ie=Ne.target;for(let Re=0;Re<He.length;Re++){const mt=He[Re],Ue=mt.parentNode;Ue!=null&&mt.nodeName==="BR"&&!mn(mt,Ie,u)&&Ue.removeChild(mt)}}a.takeRecords()}_!==null&&(fe&&(_.dirty=!0,Dr(_)),Ae&&Ta(u)&&_.insertRawText(Ce))})}finally{Ct=!1}}function _i(u){const o=u._observer;if(o!==null){const a=o.takeRecords();mr(u,a,o)}}function Zn(u){Pt(u),u._observer=new MutationObserver((o,a)=>{mr(u,o,a)})}function dl(u,o){const a=u.__mode,h=u.__format,_=u.__style,E=o.__mode,I=o.__format,B=o.__style;return(a===null||a===E)&&(h===null||h===I)&&(_===null||_===B)}function ei(u,o){const a=u.mergeWithSibling(o),h=gn()._normalizedNodes;return h.add(u.__key),h.add(o.__key),a}function fl(u){let o=u;if(o.__text===""&&o.isSimpleText()&&!o.isUnmergeable()){o.remove();return}let a;for(;(a=o.getPreviousSibling())!==null&&gt(a)&&a.isSimpleText()&&!a.isUnmergeable();)if(a.__text==="")a.remove();else if(dl(a,o)){o=ei(a,o);break}else break;let h;for(;(h=o.getNextSibling())!==null&&gt(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(dl(o,h)){o=ei(o,h);break}else break}function Hi(u){return Cs(u.anchor),Cs(u.focus),u}function Cs(u){for(;u.type==="element";){const o=u.getNode(),a=u.offset;let h,_;if(a===o.getChildrenSize()?(h=o.getChildAtIndex(a-1),_=!0):(h=o.getChildAtIndex(a),_=!1),gt(h)){u.set(h.__key,_?h.getTextContentSize():0,"text");break}else if(!Je(h))break;u.set(h.__key,_?h.getChildrenSize():0,"element")}}let hl=1;function gl(){return""+hl++}function Ir(u,o){const a=u._nodes.get(o);if(a===void 0)throw Error(`registeredNode: Type ${o} not found`);return a}const Ns=typeof queueMicrotask=="function"?queueMicrotask:u=>{Promise.resolve().then(u)};function Sc(u){return Sn(_r(u))}function oo(u){const o=document.activeElement;if(o===null)return!1;const a=o.nodeName;return Sn(_r(u))&&(a==="INPUT"||a==="TEXTAREA"||o.contentEditable==="true"&&o.__lexicalEditor==null)}function ti(u,o,a){const h=u.getRootElement();try{return h!==null&&h.contains(o)&&h.contains(a)&&o!==null&&!oo(o)&&Io(o)===u}catch{return!1}}function Io(u){let o=u;for(;o!=null;){const a=o.__lexicalEditor;if(a!=null)return a;o=Ds(o)}return null}function la(u){return ms.test(u)?"rtl":_s.test(u)?"ltr":null}function pl(u){return u.isToken()||u.isSegmented()}function On(u){return u.nodeType===Ye}function Ln(u){let o=u;for(;o!=null;){if(On(o))return o;o=o.firstChild}return null}function Or(u,o,a){const h=fn[o];if(a!==null&&(u&h)===(a&h))return u;let _=u^h;return o==="subscript"?_&=~fn.superscript:o==="superscript"&&(_&=~fn.subscript),_}function yi(u){return gt(u)||bi(u)||Sn(u)}function Hn(u,o){if(o!=null){u.__key=o;return}rr(),Zd();const a=gn(),h=ki(),_=gl();h._nodeMap.set(_,u),Je(u)?a._dirtyElements.set(_,!0):a._dirtyLeaves.add(_),a._cloneNotNeeded.add(_),a._dirtyType=yt,u.__key=_}function Po(u,o,a){let h=u;for(;h!==null;){if(a.has(h))return;const _=o.get(h);if(_===void 0)break;a.set(h,!1),h=_.__parent}}function Ci(u){const o=u.getParent();if(o!==null){const a=u.getWritable(),h=o.getWritable(),_=u.getPreviousSibling(),E=u.getNextSibling();if(_===null)if(E!==null){const I=E.getWritable();h.__first=E.__key,I.__prev=null}else h.__first=null;else{const I=_.getWritable();if(E!==null){const B=E.getWritable();B.__prev=I.__key,I.__next=B.__key}else I.__next=null;a.__prev=null}if(E===null)if(_!==null){const I=_.getWritable();h.__last=_.__key,I.__next=null}else h.__last=null;else{const I=E.getWritable();if(_!==null){const B=_.getWritable();B.__next=I.__key,I.__prev=B.__key}else I.__prev=null;a.__next=null}h.__size--,a.__parent=null}}function so(u){Zd();const o=u.getLatest(),a=o.__parent,h=ki(),_=gn(),E=h._nodeMap,I=_._dirtyElements;a!==null&&Po(a,E,I);const B=o.__key;_._dirtyType=yt,Je(u)?I.set(B,!0):_._dirtyLeaves.add(B)}function Es(u){const o=u.getPreviousSibling(),a=u.getNextSibling();o!==null&&so(o),a!==null&&so(a)}function _n(u){rr();const o=gn(),a=o._compositionKey;if(u!==a){if(o._compositionKey=u,a!==null){const h=En(a);h!==null&&h.getWritable()}if(u!==null){const h=En(u);h!==null&&h.getWritable()}}}function Pr(){return Ks()?null:gn()._compositionKey}function En(u,o){const h=(o||ki())._nodeMap.get(u);return h===void 0?null:h}function Ni(u,o){const a=gn(),h=u[`__lexicalKey_${a._key}`];return h!==void 0?En(h,o):null}function _r(u,o){let a=u;for(;a!=null;){const h=Ni(a,o);if(h!==null)return h;a=Ds(a)}return null}function Ts(u){const o=u._decorators,a=Object.assign({},o);return u._pendingDecorators=a,a}function lo(u){return u.read(()=>Jn().getTextContent())}function xs(u,o){Ar(u,()=>{const a=ki();if(a.isEmpty())return;if(o==="root"){Jn().markDirty();return}const h=a._nodeMap;for(const[,_]of h)_.markDirty()},u._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Jn(){return Ei(ki())}function Ei(u){return u._nodeMap.get("root")}function Dr(u){rr();const o=ki();if(u!==null){if(Object.isFrozen(u))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");u.dirty=!0,u.setCachedNodes(null)}o._selection=u}function aa(){rr();const u=gn();_i(u)}function ni(u){const o=gn(),a=ca(u,o);if(a===null){const h=o.getRootElement();return u===h?En("root"):null}return En(a)}function vs(u,o){return o?u.getTextContentSize():0}function ca(u,o){let a=u;for(;a!=null;){const h=a[`__lexicalKey_${o._key}`];if(h!==void 0)return h;a=Ds(a)}return null}function ml(u){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(u)}function Ss(u){const o=[];let a=u;for(;a!==null;)o.push(a),a=a._parentEditor;return o}function $o(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function ao(u){return u.nodeType===Ye?u.nodeValue:null}function ws(u,o,a){const h=yr(o._window);if(h===null)return;const _=h.anchorNode;let{anchorOffset:E,focusOffset:I}=h;if(_!==null){let B=ao(_);const le=_r(_);if(B!==null&&gt(le)){if(B===zt&&a){const fe=a.length;B=a,E=fe,I=fe}B!==null&&Fo(le,B,E,I,u)}}}function Fo(u,o,a,h,_){let E=u;if(E.isAttached()&&(_||!E.isDirty())){const I=E.isComposing();let B=o;(I||_)&&o[o.length-1]===zt&&(B=o.slice(0,-1));const le=E.getTextContent();if(_||B!==le){if(B===""){if(_n(null),!oe&&!ie&&!ke){const Ie=gn();setTimeout(()=>{Ie.update(()=>{E.isAttached()&&E.remove()})},20)}else E.remove();return}const fe=E.getParent(),Ce=Ws(),Ee=E.getTextContentSize(),xe=Pr(),Ne=E.getKey();if(E.isToken()||xe!==null&&Ne===xe&&!I||pt(Ce)&&(fe!==null&&!fe.canInsertTextBefore()&&Ce.anchor.offset===0||Ce.anchor.key===u.__key&&Ce.anchor.offset===0&&!E.canInsertTextBefore()||Ce.focus.key===u.__key&&Ce.focus.offset===Ee&&!E.canInsertTextAfter())){E.markDirty();return}const He=cn();if(!pt(He)||a===null||h===null){E.setTextContent(B);return}if(He.setTextNodeRange(E,a,E,h),E.isSegmented()){const Ie=E.getTextContent(),Re=Un(Ie);E.replace(Re),E=Re}E.setTextContent(B)}}}function _l(u){const o=u.getPreviousSibling();return(gt(o)||Je(o)&&o.isInline())&&!o.canInsertTextAfter()}function ri(u,o){if(o.isSegmented())return!0;if(!u.isCollapsed())return!1;const a=u.anchor.offset,h=o.getParentOrThrow(),_=o.isToken();return a===0?!o.canInsertTextBefore()||!h.canInsertTextBefore()||_||_l(o):a===o.getTextContentSize()?!o.canInsertTextAfter()||!h.canInsertTextAfter()||_:!1}function yl(u,o,a,h){return u===9&&!o&&!a&&!h}function Bo(u,o,a,h){return u===66&&!o&&ii(a,h)}function ua(u,o,a,h){return u===73&&!o&&ii(a,h)}function da(u,o,a,h){return u===85&&!o&&ii(a,h)}function co(u,o){return Ea(u)&&!o}function Ho(u,o){return Ea(u)&&o}function Cl(u,o){return Te&&o&&u===79}function Nl(u,o,a){return $r(u)&&(Te?o:a)}function Wo(u,o,a){return Fr(u)&&(Te?o:a)}function Ko(u,o){return Te&&o&&$r(u)}function fa(u,o){return Te&&o&&Fr(u)}function ha(u,o,a,h){return Te?o||a?!1:$r(u)||u===72&&h:h||o||a?!1:$r(u)}function ga(u,o,a,h,_){return Te?a||h||_?!1:Fr(u)||u===68&&o:o||h||_?!1:Fr(u)}function pa(u,o,a,h){return u===90&&!o&&ii(a,h)}function wc(u,o,a,h){return Te?u===90&&a&&o:u===89&&h||u===90&&h&&o}function Oc(u,o,a,h){return o?!1:u===67?Te?a:h:!1}function ma(u,o,a,h){return o?!1:u===88?Te?a:h:!1}function _a(u){return u===37}function ya(u){return u===39}function Dc(u){return u===38}function bc(u){return u===40}function El(u,o,a,h){return _a(u)&&!o&&!h&&!a}function Rc(u,o,a,h,_){return _a(u)&&!h&&!a&&(o||_)}function Mc(u,o,a,h){return ya(u)&&!o&&!h&&!a}function Ca(u,o,a,h,_){return ya(u)&&!h&&!a&&(o||_)}function uo(u,o,a){return Dc(u)&&!o&&!a}function Na(u,o,a){return bc(u)&&!o&&!a}function Ac(u,o,a,h){return u||o||a||h}function Tl(u){return u===32}function ii(u,o){return Te?u:o}function Ea(u){return u===13}function $r(u){return u===8}function kc(u){return u===27}function Fr(u){return u===46}function Ti(u,o,a){return u===65&&ii(o,a)}function xl(){const u=Jn(),o=u.select(0,u.getChildrenSize());Dr(Hi(o))}function Wi(u,o){u.__lexicalClassNameCache===void 0&&(u.__lexicalClassNameCache={});const a=u.__lexicalClassNameCache,h=a[o];if(h!==void 0)return h;const _=u[o];if(typeof _=="string"){const E=_.split(" ");return a[o]=E,E}return _}function Uo(u,o,a,h,_){if(a.size===0)return;const E=h.__type,I=h.__key,B=o.get(E);if(B===void 0)throw Error(`Type ${E} not in registeredNodes`);const le=B.klass;let fe=u.get(le);fe===void 0&&(fe=new Map,u.set(le,fe));const Ce=fe.get(I),Ee=Ce==="destroyed"&&_==="created";(Ce===void 0||Ee)&&fe.set(I,Ee?"updated":_)}function vl(u){const o=ki(),a=o._readOnly,h=u.getType(),_=o._nodeMap,E=[];for(const[,I]of _)I instanceof u&&I.__type===h&&(a||I.isAttached())&&E.push(I);return E}function zo(u,o,a){const h=u.getParent();let _=a,E=u;return h!==null&&(o&&a===0?(_=E.getIndexWithinParent(),E=h):!o&&a===E.getChildrenSize()&&(_=E.getIndexWithinParent()+1,E=h)),E.getChildAtIndex(o?_-1:_)}function oi(u,o){const a=u.offset;if(u.type==="element"){const h=u.getNode();return zo(h,o,a)}else{const h=u.getNode();if(o&&a===0||!o&&a===h.getTextContentSize()){const _=o?h.getPreviousSibling():h.getNextSibling();return _===null?zo(h.getParentOrThrow(),o,h.getIndexWithinParent()+(o?0:1)):_}}return null}function Ta(u){const o=Ki(u).event,a=o&&o.inputType;return a==="insertFromPaste"||a==="insertFromPasteAsQuotation"}function st(u,o,a){return tf(u,o,a)}function Go(u){return!kr(u)&&!u.isLastChild()&&!u.isInline()}function Os(u,o){const a=u._keyToDOMMap.get(o);if(a===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${o}`);return a}function Ds(u){const o=u.assignedSlot||u.parentElement;return o!==null&&o.nodeType===11?o.host:o}function xa(u,o,a){const h=a.ownerDocument,_=h.defaultView;if(_===null)return;let{top:E,bottom:I}=o,B=0,le=0,fe=a;for(;fe!==null;){const Ce=fe===h.body;if(Ce)B=0,le=Ki(u).innerHeight;else{const xe=fe.getBoundingClientRect();B=xe.top,le=xe.bottom}let Ee=0;if(E<B?Ee=-(B-E):I>le&&(Ee=I-le),Ee!==0)if(Ce)_.scrollBy(0,Ee);else{const xe=fe.scrollTop;fe.scrollTop+=Ee;const Ne=fe.scrollTop-xe;E-=Ne,I-=Ne}if(Ce)break;fe=Ds(fe)}}function Lc(u){return gn()._updateTags.has(u)}function xi(u){rr(),gn()._updateTags.add(u)}function Wn(u){const o=cn();if(!pt(o)||!Je(u))return o;const{anchor:a,focus:h}=o,_=a.getNode(),E=h.getNode();return ht(_,u)&&a.set(u.__key,0,"element"),ht(E,u)&&h.set(u.__key,0,"element"),o}function ht(u,o){let a=u.getParent();for(;a!==null;){if(a.is(o))return!0;a=a.getParent()}return!1}function fo(u){const o=u.ownerDocument;return o&&o.defaultView||null}function Ki(u){const o=u._window;if(o===null)throw Error("window object not found");return o}function va(u){return Je(u)&&u.isInline()||Sn(u)&&u.isInline()}function br(u){let o=u.getParentOrThrow();for(;o!==null;){if(Br(o))return o;o=o.getParentOrThrow()}return o}function Br(u){return kr(u)||Je(u)&&u.isShadowRoot()}function Sl(u){const o=u.constructor.clone(u);return Hn(o,null),o}function ho(u){const o=gn(),a=u.constructor.getType(),h=o._nodes.get(a);if(h===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const _=h.replace;if(_!==null){const E=_(u);if(!(E instanceof u.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return E}return u}function Hr(u,o){const a=u.getParent();if(kr(a)&&!Je(o)&&!Sn(o))throw Error("Only element or decorator nodes can be inserted in to the root node")}function wl(u){const o=u.theme,a=document.createElement("div");a.contentEditable="false",a.setAttribute("data-lexical-cursor","true");let h=o.blockCursor;if(h!==void 0){if(typeof h=="string"){const _=h.split(" ");h=o.blockCursor=_}h!==void 0&&a.classList.add(...h)}return a}function go(u){return(Sn(u)||Je(u)&&!u.canBeEmpty())&&!u.isInline()}function wt(u,o,a){a.style.removeProperty("caret-color"),o._blockCursorElement=null;const h=u.parentElement;h!==null&&h.removeChild(u)}function Ol(u,o,a){let h=u._blockCursorElement;if(pt(a)&&a.isCollapsed()&&a.anchor.type==="element"&&o.contains(document.activeElement)){const _=a.anchor,E=_.getNode(),I=_.offset,B=E.getChildrenSize();let le=!1,fe=null;if(I===B){const Ce=E.getChildAtIndex(I-1);go(Ce)&&(le=!0)}else{const Ce=E.getChildAtIndex(I);if(go(Ce)){const Ee=Ce.getPreviousSibling();(Ee===null||go(Ee))&&(le=!0,fe=u.getElementByKey(Ce.__key))}}if(le){const Ce=u.getElementByKey(E.__key);h===null&&(u._blockCursorElement=h=wl(u._config)),o.style.caretColor="transparent",fe===null?Ce.appendChild(h):Ce.insertBefore(h,fe);return}}h!==null&&wt(h,u,o)}function yr(u){return ge?(u||window).getSelection():null}function bs(u,o){let a=u.getChildAtIndex(o);if(a==null&&(a=u),Br(u))throw Error("Can not call $splitNode() on root element");const h=I=>{const B=I.getParentOrThrow(),le=Br(B),fe=I===a&&!le?I:Sl(I);if(le)return I.insertAfter(fe),[I,fe,fe];{const[Ce,Ee,xe]=h(B),Ne=I.getNextSiblings();return xe.append(fe,...Ne),[Ce,Ee,fe]}},[_,E]=h(a);return[_,E]}function Yo(u,o){let a=u;for(;a!==Jn()&&a!=null;){if(o(a))return a;a=a.getParent()}return null}function Ui(u){const o=[],a=[u];for(;a.length>0;){const h=a.pop();if(h===void 0)throw Error("Stack.length > 0; can't be undefined");Je(h)&&a.unshift(...h.getChildren()),h!==u&&o.push(h)}return o}function Vo(u){return jo(u)&&u.tagName==="A"}function jo(u){return u.nodeType===1}function zi(u){if(Sn(u)&&!u.isInline())return!0;if(!Je(u)||Br(u))return!1;const o=u.getFirstChild(),a=o===null||bi(o)||gt(o)||o.isInline();return!u.isInline()&&u.canBeEmpty()!==!1&&a}function Rs(u,o){let a=u;for(;a!==null&&a.getParent()!==null&&!o(a);)a=a.getParentOrThrow();return o(a)?a:null}function Sa(u,o){const a=u._decorators;let _=u._pendingDecorators||a;const E=o._nodeMap;let I;for(I in _)E.has(I)||(_===a&&(_=Ts(u)),delete _[I])}function Dl(u,o,a,h,_,E){let I=u.getFirstChild();for(;I!==null;){const B=I.__key;I.__parent===o&&(Je(I)&&Dl(I,B,a,h,_,E),a.has(B)||E.delete(B),_.push(B)),I=I.getNextSibling()}}function wa(u,o,a,h){const _=u._nodeMap,E=o._nodeMap,I=[];for(const[B]of h){const le=E.get(B);le!==void 0&&(le.isAttached()||(Je(le)&&Dl(le,B,_,E,I,h),_.has(B)||h.delete(B),I.push(B)))}for(const B of I)E.delete(B);for(const B of a){const le=E.get(B);le!==void 0&&!le.isAttached()&&(_.has(B)||a.delete(B),E.delete(B))}}let Tn="",Vn="",Rr="",vi,Kn,jt,Gi=!1,po=!1,qo,Ms=null,mo,As,Si,si,Zo,Jo;function yn(u,o){const a=Si.get(u);if(o!==null){const h=an(u);h.parentNode===o&&o.removeChild(h)}if(si.has(u)||Kn._keyToDOMMap.delete(u),Je(a)){const h=yo(a,Si);xn(h,0,h.length-1,null)}a!==void 0&&Uo(Jo,jt,qo,a,"destroyed")}function xn(u,o,a,h){let _=o;for(;_<=a;++_){const E=u[_];E!==void 0&&yn(E,h)}}function vn(u,o){u.setProperty("text-align",o)}const bl="40px";function _o(u,o){const a=vi.theme.indent;if(typeof a=="string"){const _=u.classList.contains(a);o>0&&!_?u.classList.add(a):o<1&&_&&u.classList.remove(a)}const h=getComputedStyle(u).getPropertyValue("--lexical-indent-base-value")||bl;u.style.setProperty("padding-inline-start",o===0?"":`calc(${o} * ${h})`)}function Rl(u,o){const a=u.style;o===0?vn(a,""):o===_t?vn(a,"left"):o===Et?vn(a,"center"):o===St?vn(a,"right"):o===Ot?vn(a,"justify"):o===bt?vn(a,"start"):o===xt&&vn(a,"end")}function li(u,o,a){const h=si.get(u);if(h===void 0)throw Error("createNode: node does not exist in nodeMap");const _=h.createDOM(vi,Kn);if(Ra(u,_,Kn),gt(h)?_.setAttribute("data-lexical-text","true"):Sn(h)&&_.setAttribute("data-lexical-decorator","true"),Je(h)){const E=h.__indent,I=h.__size;if(E!==0&&_o(_,E),I!==0){const le=I-1,fe=yo(h,si);Xn(fe,le,h,_)}const B=h.__format;B!==0&&Rl(_,B),h.isInline()||Ml(null,h,_),Go(h)&&(Tn+=It,Rr+=It)}else{const E=h.getTextContent();if(Sn(h)){const I=h.decorate(Kn,vi);I!==null&&Co(u,I),_.contentEditable="false"}else gt(h)&&(h.isDirectionless()||(Vn+=E));Tn+=E,Rr+=E}if(o!==null)if(a!=null)o.insertBefore(_,a);else{const E=o.__lexicalLineBreak;E!=null?o.insertBefore(_,E):o.appendChild(_)}return Object.freeze(h),Uo(Jo,jt,qo,h,"created"),_}function Xn(u,o,a,h){const _=Vn;Vn="",Cr(u,a,0,o,h,null),Oa(a,h),Vn=_}function Cr(u,o,a,h,_,E){const I=Tn;Tn="";let B=a;for(;B<=h;++B)li(u[B],_,E);Go(o)&&(Tn+=It),_.__lexicalTextContent=Tn,Tn=I+Tn}function ln(u,o){const a=o.get(u);return bi(a)||Sn(a)&&a.isInline()}function Ml(u,o,a){const h=u!==null&&(u.__size===0||ln(u.__last,Si)),_=o.__size===0||ln(o.__last,si);if(h){if(!_){const E=a.__lexicalLineBreak;E!=null&&a.removeChild(E),a.__lexicalLineBreak=null}}else if(_){const E=document.createElement("br");a.__lexicalLineBreak=E,a.appendChild(E)}}function Oa(u,o){const a=o.__lexicalDirTextContent,h=o.__lexicalDir;if(a!==Vn||h!==Ms){const _=Vn==="",E=_?Ms:la(Vn);if(E!==h){const I=o.classList,B=vi.theme;let le=h!==null?B[h]:void 0,fe=E!==null?B[E]:void 0;if(le!==void 0){if(typeof le=="string"){const Ce=le.split(" ");le=B[h]=Ce}I.remove(...le)}if(E===null||_&&E==="ltr")o.removeAttribute("dir");else{if(fe!==void 0){if(typeof fe=="string"){const Ce=fe.split(" ");fe=B[E]=Ce}fe!==void 0&&I.add(...fe)}o.dir=E}if(!po){const Ce=u.getWritable();Ce.__dir=E}}Ms=E,o.__lexicalDirTextContent=Vn,o.__lexicalDir=E}}function Ic(u,o,a){const h=Vn;Vn="",Da(u,o,a),Oa(o,a),Vn=h}function yo(u,o){const a=[];let h=u.__first;for(;h!==null;){const _=o.get(h);if(_===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");a.push(h),h=_.__next}return a}function Da(u,o,a){const h=Tn,_=u.__size,E=o.__size;if(Tn="",_===1&&E===1){const I=u.__first,B=o.__first;if(I===B)Mr(I,a);else{const le=an(I),fe=li(B,null,null);a.replaceChild(fe,le),yn(I,null)}}else{const I=yo(u,Si),B=yo(o,si);if(_===0)E!==0&&Cr(B,o,0,E-1,a,null);else if(E===0){if(_!==0){const fe=a.__lexicalLineBreak==null;xn(I,0,_-1,fe?null:a),fe&&(a.textContent="")}}else ba(o,I,B,_,E,a)}Go(o)&&(Tn+=It),a.__lexicalTextContent=Tn,Tn=h+Tn}function Mr(u,o){const a=Si.get(u);let h=si.get(u);if(a===void 0||h===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const _=Gi||As.has(u)||mo.has(u),E=Os(Kn,u);if(a===h&&!_){if(Je(a)){const I=E.__lexicalTextContent;I!==void 0&&(Tn+=I,Rr+=I);const B=E.__lexicalDirTextContent;B!==void 0&&(Vn+=B)}else{const I=a.getTextContent();gt(a)&&!a.isDirectionless()&&(Vn+=I),Rr+=I,Tn+=I}return E}if(a!==h&&_&&Uo(Jo,jt,qo,h,"updated"),h.updateDOM(a,E,vi)){const I=li(u,null,null);if(o===null)throw Error("reconcileNode: parentDOM is null");return o.replaceChild(I,E),yn(u,null),I}if(Je(a)&&Je(h)){const I=h.__indent;I!==a.__indent&&_o(E,I);const B=h.__format;B!==a.__format&&Rl(E,B),_&&(Ic(a,h,E),!kr(h)&&!h.isInline()&&Ml(a,h,E)),Go(h)&&(Tn+=It,Rr+=It)}else{const I=h.getTextContent();if(Sn(h)){const B=h.decorate(Kn,vi);B!==null&&Co(u,B)}else gt(h)&&!h.isDirectionless()&&(Vn+=I);Tn+=I,Rr+=I}return!po&&kr(h)&&h.__cachedText!==Rr&&(h=h.getWritable(),h.__cachedText=Rr),Object.freeze(h),E}function Co(u,o){let a=Kn._pendingDecorators;const h=Kn._decorators;if(a===null){if(h[u]===o)return;a=Ts(Kn)}a[u]=o}function ot(u){return u.firstChild}function ks(u){let o=u.nextSibling;return o!==null&&o===Kn._blockCursorElement&&(o=o.nextSibling),o}function ba(u,o,a,h,_,E){const I=h-1,B=_-1;let le,fe,Ce=ot(E),Ee=0,xe=0;for(;Ee<=I&&xe<=B;){const Ie=o[Ee],Re=a[xe];if(Ie===Re)Ce=ks(Mr(Re,E)),Ee++,xe++;else{le===void 0&&(le=new Set(o)),fe===void 0&&(fe=new Set(a));const mt=fe.has(Ie),Ue=le.has(Re);if(!mt)Ce=ks(an(Ie)),yn(Ie,E),Ee++;else if(!Ue)li(Re,E,Ce),xe++;else{const tt=Os(Kn,Re);tt===Ce?Ce=ks(Mr(Re,E)):(Ce!=null?E.insertBefore(tt,Ce):E.appendChild(tt),Mr(Re,E)),Ee++,xe++}}}const Ne=Ee>I,He=xe>B;if(Ne&&!He){const Ie=a[B+1],Re=Ie===void 0?null:Kn.getElementByKey(Ie);Cr(a,u,xe,B,E,Re)}else He&&!Ne&&xn(o,Ee,I,E)}function lr(u,o,a,h,_,E){Tn="",Rr="",Vn="",Gi=h===dt,Ms=null,Kn=a,vi=a._config,jt=a._nodes,qo=Kn._listeners.mutation,mo=_,As=E,Si=u._nodeMap,si=o._nodeMap,po=o._readOnly,Zo=new Map(a._keyToDOMMap);const I=new Map;return Jo=I,Mr("root",null),Kn=void 0,jt=void 0,mo=void 0,As=void 0,Si=void 0,si=void 0,vi=void 0,Zo=void 0,Jo=void 0,I}function Ra(u,o,a){const h=a._keyToDOMMap;o["__lexicalKey_"+a._key]=u,h.set(u,o)}function an(u){const o=Zo.get(u);if(o===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${u}`);return o}const Qn=Object.freeze({}),Ze=30,Ls=[["keydown",S],["pointerdown",La],["compositionstart",s],["compositionend",N],["input",i],["click",Nr],["cut",Qn],["copy",Qn],["dragstart",Qn],["dragover",Qn],["dragend",Qn],["paste",Qn],["focus",Qn],["blur",Qn],["drop",Qn]];ze&&Ls.push(["beforeinput",(u,o)=>l(u,o)]);let Wr=0,nr=0,Ma=0,wi=null,No=0,Eo=!1,Oi=!1,Xo=!1,ar=!1,Al=[0,"",0,"root",0];function Aa(u,o,a,h,_){const E=u.anchor,I=u.focus,B=E.getNode(),le=gn(),fe=yr(le._window),Ce=fe!==null?fe.anchorNode:null,Ee=E.key,xe=le.getElementByKey(Ee),Ne=a.length;return Ee!==I.key||!gt(B)||(!_&&(!ze||Ma<h+50)||B.isDirty()&&Ne<2||ml(a))&&E.offset!==I.offset&&!B.isComposing()||pl(B)||B.isDirty()&&Ne>1||(_||!ze)&&xe!==null&&!B.isComposing()&&Ce!==Ln(xe)||fe!==null&&o!==null&&(!o.collapsed||o.startContainer!==fe.anchorNode||o.startOffset!==fe.anchorOffset)||B.getFormat()!==u.format||B.getStyle()!==u.style||ri(u,B)}function ka(u,o){return u!==null&&u.nodeValue!==null&&u.nodeType===Ye&&o!==0&&o!==u.nodeValue.length}function Is(u,o,a){const{anchorNode:h,anchorOffset:_,focusNode:E,focusOffset:I}=u;Eo&&(Eo=!1,ka(h,_)&&ka(E,I))||Ar(o,()=>{if(!a){Dr(null);return}if(!ti(o,h,E))return;const B=cn();if(pt(B)){const le=B.anchor,fe=le.getNode();if(B.isCollapsed()){u.type==="Range"&&u.anchorNode===u.focusNode&&(B.dirty=!0);const Ce=Ki(o).event,Ee=Ce?Ce.timeStamp:performance.now(),[xe,Ne,He,Ie,Re]=Al,mt=Jn(),Ue=o.isComposing()===!1&&mt.getTextContent()==="";Ee<Re+200&&le.offset===He&&le.key===Ie?(B.format=xe,B.style=Ne):le.type==="text"?(B.format=fe.getFormat(),B.style=fe.getStyle()):le.type==="element"&&!Ue&&(B.format=0,B.style="")}else{let Ce=Ve,Ee=!1;const xe=B.getNodes(),Ne=xe.length;for(let He=0;He<Ne;He++){const Ie=xe[He];if(gt(Ie)&&(Ee=!0,Ce&=Ie.getFormat(),Ce===0))break}B.format=Ee?Ce:0}}st(o,e,void 0)})}function Nr(u,o){Ar(o,()=>{const a=cn(),h=yr(o._window),_=Ws();if(h){if(pt(a)){const E=a.anchor,I=E.getNode();if(E.type==="element"&&E.offset===0&&a.isCollapsed()&&!kr(I)&&Jn().getChildrenSize()===1&&I.getTopLevelElementOrThrow().isEmpty()&&_!==null&&a.is(_))h.removeAllRanges(),a.dirty=!0;else if(u.detail===3&&!a.isCollapsed()){const le=a.focus.getNode();I!==le&&(Je(I)?I.select(0):I.getParentOrThrow().select(0))}}else if(u.pointerType==="touch"){const E=h.anchorNode;if(E!==null){const I=E.nodeType;if(I===Be||I===Ye){const B=$c(_,h,o);Dr(B)}}}}st(o,n,u)})}function La(u,o){const a=u.target,h=u.pointerType;a instanceof Node&&h!=="touch"&&Ar(o,()=>{Sc(a)||(Oi=!0)})}function Ps(u){if(!u.getTargetRanges)return null;const o=u.getTargetRanges();return o.length===0?null:o[0]}function Ia(u,o){return u!==o||Je(u)||Je(o)||!u.isToken()||!o.isToken()}function Qo(u){return nr===229&&u<Wr+Ze}function l(u,o){const a=u.inputType,h=Ps(u);a==="deleteCompositionText"||Ae&&Ta(o)||a!=="insertCompositionText"&&Ar(o,()=>{const _=cn();if(a==="deleteContentBackward"){if(_===null){const Ce=Ws();if(!pt(Ce))return;Dr(Ce.clone())}if(pt(_)){if(de&&_n(_.anchor.key),Qo(u.timeStamp)&&o.isComposing()&&_.anchor.key===_.focus.key){if(_n(null),Wr=0,setTimeout(()=>{Ar(o,()=>{_n(null)})},Ze),pt(_)){const Ee=_.anchor.getNode();Ee.markDirty(),_.format=Ee.getFormat(),_.style=Ee.getStyle()}_.anchor.getNode().getTextContent().length<=1&&(u.preventDefault(),st(o,r,!0))}else u.preventDefault(),st(o,r,!0);return}}if(!pt(_))return;const E=u.data;wi!==null&&ws(!1,o,wi),(!_.dirty||wi!==null)&&_.isCollapsed()&&!kr(_.anchor.getNode())&&h!==null&&_.applyDOMRange(h),wi=null;const I=_.anchor,B=_.focus,le=I.getNode(),fe=B.getNode();if(a==="insertText"||a==="insertTranspose"){if(E===`
34
- `)u.preventDefault(),st(o,c,!1);else if(E===It)u.preventDefault(),st(o,d,void 0);else if(E==null&&u.dataTransfer){const Ce=u.dataTransfer.getData("text/plain");u.preventDefault(),_.insertRawText(Ce)}else E!=null&&Aa(_,h,E,u.timeStamp,!0)?(u.preventDefault(),st(o,f,E)):wi=E;Ma=u.timeStamp;return}switch(u.preventDefault(),a){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{st(o,f,u);break}case"insertFromComposition":{_n(null),st(o,f,u);break}case"insertLineBreak":{_n(null),st(o,c,!1);break}case"insertParagraph":{_n(null),Xo&&!ie?(Xo=!1,st(o,c,!1)):st(o,d,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{st(o,p,u);break}case"deleteByComposition":{Ia(le,fe)&&st(o,C,u);break}case"deleteByDrag":case"deleteByCut":{st(o,C,u);break}case"deleteContent":{st(o,r,!1);break}case"deleteWordBackward":{st(o,x,!0);break}case"deleteWordForward":{st(o,x,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{st(o,T,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{st(o,T,!1);break}case"formatStrikeThrough":{st(o,O,"strikethrough");break}case"formatBold":{st(o,O,"bold");break}case"formatItalic":{st(o,O,"italic");break}case"formatUnderline":{st(o,O,"underline");break}case"historyUndo":{st(o,M,void 0);break}case"historyRedo":{st(o,A,void 0);break}}})}function i(u,o){u.stopPropagation(),Ar(o,()=>{const a=cn(),h=u.data,_=Ps(u);if(h!=null&&pt(a)&&Aa(a,_,h,u.timeStamp,!1)){ar&&(g(o,h),ar=!1);const E=a.anchor,I=E.getNode(),B=yr(o._window);if(B===null)return;const le=E.offset;(!ze||a.isCollapsed()||!gt(I)||B.anchorNode===null||I.getTextContent().slice(0,le)+h+I.getTextContent().slice(le+a.focus.offset)!==ao(B.anchorNode))&&st(o,f,h);const fe=h.length;Ae&&fe>1&&u.inputType==="insertCompositionText"&&!o.isComposing()&&(a.anchor.offset-=fe),!oe&&!ie&&!ke&&o.isComposing()&&(Wr=0,_n(null))}else ws(!1,o,h!==null?h:void 0),ar&&(g(o,h||void 0),ar=!1);aa()}),wi=null}function s(u,o){Ar(o,()=>{const a=cn();if(pt(a)&&!o.isComposing()){const h=a.anchor,_=a.anchor.getNode();_n(h.key),(u.timeStamp<Wr+Ze||h.type==="element"||!a.isCollapsed()||_.getFormat()!==a.format||_.getStyle()!==a.style)&&st(o,f,gr)}})}function g(u,o){const a=u._compositionKey;if(_n(null),a!==null&&o!=null){if(o===""){const h=En(a),_=Ln(u.getElementByKey(a));_!==null&&_.nodeValue!==null&&gt(h)&&Fo(h,_.nodeValue,null,null,!0);return}if(o[o.length-1]===`
35
- `){const h=cn();if(pt(h)){const _=h.focus;h.anchor.set(_.key,_.offset,_.type),st(u,z,null);return}}}ws(!0,u,o)}function N(u,o){Ae?ar=!0:Ar(o,()=>{g(o,u.data)})}function S(u,o){if(Wr=u.timeStamp,nr=u.keyCode,o.isComposing())return;const{keyCode:a,shiftKey:h,ctrlKey:_,metaKey:E,altKey:I}=u;if(!st(o,v,u)){if(Mc(a,_,I,E))st(o,w,u);else if(Ca(a,_,h,I,E))st(o,P,u);else if(El(a,_,I,E))st(o,K,u);else if(Rc(a,_,h,I,E))st(o,$,u);else if(uo(a,_,E))st(o,W,u);else if(Na(a,_,E))st(o,H,u);else if(Ho(a,h))Xo=!0,st(o,z,u);else if(Tl(a))st(o,te,u);else if(Cl(a,_))u.preventDefault(),Xo=!0,st(o,c,!0);else if(co(a,h))Xo=!1,st(o,z,u);else if(ha(a,I,E,_))$r(a)?st(o,re,u):(u.preventDefault(),st(o,r,!0));else if(kc(a))st(o,ce,u);else if(ga(a,_,h,I,E))Fr(a)?st(o,q,u):(u.preventDefault(),st(o,r,!1));else if(Nl(a,I,_))u.preventDefault(),st(o,x,!0);else if(Wo(a,I,_))u.preventDefault(),st(o,x,!1);else if(Ko(a,E))u.preventDefault(),st(o,T,!0);else if(fa(a,E))u.preventDefault(),st(o,T,!1);else if(Bo(a,I,E,_))u.preventDefault(),st(o,O,"bold");else if(da(a,I,E,_))u.preventDefault(),st(o,O,"underline");else if(ua(a,I,E,_))u.preventDefault(),st(o,O,"italic");else if(yl(a,I,_,E))st(o,G,u);else if(pa(a,h,E,_))u.preventDefault(),st(o,M,void 0);else if(wc(a,h,E,_))u.preventDefault(),st(o,A,void 0);else{const B=o._editorState._selection;Tr(B)?Oc(a,h,E,_)?(u.preventDefault(),st(o,ne,u)):ma(a,h,E,_)?(u.preventDefault(),st(o,Y,u)):Ti(a,E,_)&&(u.preventDefault(),st(o,U,u)):!Ae&&Ti(a,E,_)&&(u.preventDefault(),st(o,U,u))}Ac(_,h,I,E)&&st(o,ue,u)}}function b(u){let o=u.__lexicalEventHandles;return o===void 0&&(o=[],u.__lexicalEventHandles=o),o}const X=new Map;function me(u){const o=u.target,a=o==null?null:o.nodeType===9?o.defaultView:o.ownerDocument.defaultView,h=yr(a);if(h===null)return;const _=Io(h.anchorNode);if(_===null)return;Oi&&(Oi=!1,Ar(_,()=>{const Ce=Ws(),Ee=h.anchorNode;if(Ee===null)return;const xe=Ee.nodeType;if(xe!==Be&&xe!==Ye)return;const Ne=$c(Ce,h,_);Dr(Ne)}));const E=Ss(_),I=E[E.length-1],B=I._key,le=X.get(B),fe=le||I;fe!==_&&Is(h,fe,!1),Is(h,_,!0),_!==I?X.set(B,_):le&&X.delete(B)}function Se(u){u._lexicalHandled=!0}function Fe(u){return u._lexicalHandled===!0}function Ke(u,o){No===0&&u.ownerDocument.addEventListener("selectionchange",me),No++,u.__lexicalEditor=o;const a=b(u);for(let h=0;h<Ls.length;h++){const[_,E]=Ls[h],I=typeof E=="function"?B=>{Fe(B)||(Se(B),o.isEditable()&&E(B,o))}:B=>{if(!Fe(B)&&(Se(B),o.isEditable()))switch(_){case"cut":return st(o,Y,B);case"copy":return st(o,ne,B);case"paste":return st(o,p,B);case"dragstart":return st(o,F,B);case"dragover":return st(o,D,B);case"dragend":return st(o,V,B);case"focus":return st(o,R,B);case"blur":return st(o,Z,B);case"drop":return st(o,J,B)}};u.addEventListener(_,I),a.push(()=>{u.removeEventListener(_,I)})}}function Le(u){No!==0&&(No--,No===0&&u.ownerDocument.removeEventListener("selectionchange",me));const o=u.__lexicalEditor;o!=null&&(be(o),u.__lexicalEditor=null);const a=b(u);for(let h=0;h<a.length;h++)a[h]();u.__lexicalEventHandles=[]}function be(u){if(u._parentEditor!==null){const o=Ss(u),h=o[o.length-1]._key;X.get(h)===u&&X.delete(h)}else X.delete(u._key)}function Xe(){Eo=!0}function ut(u,o,a,h,_){Al=[u,o,a,h,_]}function Tt(u,o,a){rr();const h=u.__key,_=u.getParent();if(_===null)return;const E=Wn(u);let I=!1;if(pt(E)&&o){const B=E.anchor,le=E.focus;B.key===h&&(Ua(B,u,_,u.getPreviousSibling(),u.getNextSibling()),I=!0),le.key===h&&(Ua(le,u,_,u.getPreviousSibling(),u.getNextSibling()),I=!0)}else Tr(E)&&o&&u.isSelected()&&u.selectPrevious();if(pt(E)&&o&&!I){const B=u.getIndexWithinParent();Ci(u),Ka(E,_,B,-1)}else Ci(u);!a&&!Br(_)&&!_.canBeEmpty()&&_.isEmpty()&&Tt(_,o),o&&kr(_)&&_.isEmpty()&&_.selectEnd()}class Rt{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(o){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}constructor(o){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Hn(this,o),this.__type!=="root"&&(rr(),hn(this.__type,this.constructor))}getType(){return this.__type}isAttached(){let o=this.__key;for(;o!==null;){if(o==="root")return!0;const a=En(o);if(a===null)break;o=a.__parent}return!1}isSelected(o){const a=o||cn();if(a==null)return!1;const h=a.getNodes().some(_=>_.__key===this.__key);return gt(this)?h:pt(a)&&a.anchor.type==="element"&&a.focus.type==="element"&&a.anchor.key===a.focus.key&&a.anchor.offset===a.focus.offset?!1:h}getKey(){return this.__key}getIndexWithinParent(){const o=this.getParent();if(o===null)return-1;let a=o.getFirstChild(),h=0;for(;a!==null;){if(this.is(a))return h;h++,a=a.getNextSibling()}return-1}getParent(){const o=this.getLatest().__parent;return o===null?null:En(o)}getParentOrThrow(){const o=this.getParent();if(o===null)throw Error(`Expected node ${this.__key} to have a parent.`);return o}getTopLevelElement(){let o=this;for(;o!==null;){const a=o.getParent();if(Br(a))return o;o=a}return null}getTopLevelElementOrThrow(){const o=this.getTopLevelElement();if(o===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return o}getParents(){const o=[];let a=this.getParent();for(;a!==null;)o.push(a),a=a.getParent();return o}getParentKeys(){const o=[];let a=this.getParent();for(;a!==null;)o.push(a.__key),a=a.getParent();return o}getPreviousSibling(){const a=this.getLatest().__prev;return a===null?null:En(a)}getPreviousSiblings(){const o=[],a=this.getParent();if(a===null)return o;let h=a.getFirstChild();for(;h!==null&&!h.is(this);)o.push(h),h=h.getNextSibling();return o}getNextSibling(){const a=this.getLatest().__next;return a===null?null:En(a)}getNextSiblings(){const o=[];let a=this.getNextSibling();for(;a!==null;)o.push(a),a=a.getNextSibling();return o}getCommonAncestor(o){const a=this.getParents(),h=o.getParents();Je(this)&&a.unshift(this),Je(o)&&h.unshift(o);const _=a.length,E=h.length;if(_===0||E===0||a[_-1]!==h[E-1])return null;const I=new Set(h);for(let B=0;B<_;B++){const le=a[B];if(I.has(le))return le}return null}is(o){return o==null?!1:this.__key===o.__key}isBefore(o){if(this===o)return!1;if(o.isParentOf(this))return!0;if(this.isParentOf(o))return!1;const a=this.getCommonAncestor(o);let h=0,_=0,E=this;for(;;){const I=E.getParentOrThrow();if(I===a){h=E.getIndexWithinParent();break}E=I}for(E=o;;){const I=E.getParentOrThrow();if(I===a){_=E.getIndexWithinParent();break}E=I}return h<_}isParentOf(o){const a=this.__key;if(a===o.__key)return!1;let h=o;for(;h!==null;){if(h.__key===a)return!0;h=h.getParent()}return!1}getNodesBetween(o){const a=this.isBefore(o),h=[],_=new Set;let E=this;for(;;){const I=E.__key;if(_.has(I)||(_.add(I),h.push(E)),E===o)break;const B=Je(E)?a?E.getFirstChild():E.getLastChild():null;if(B!==null){E=B;continue}const le=a?E.getNextSibling():E.getPreviousSibling();if(le!==null){E=le;continue}const fe=E.getParentOrThrow();if(_.has(fe.__key)||h.push(fe),fe===o)break;let Ce=null,Ee=fe;do{if(Ee===null)throw Error("getNodesBetween: ancestor is null");Ce=a?Ee.getNextSibling():Ee.getPreviousSibling(),Ee=Ee.getParent(),Ee!==null&&Ce===null&&!_.has(Ee.__key)&&h.push(Ee)}while(Ce===null);E=Ce}return a||h.reverse(),h}isDirty(){const a=gn()._dirtyLeaves;return a!==null&&a.has(this.__key)}getLatest(){const o=En(this.__key);if(o===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return o}getWritable(){rr();const o=ki(),a=gn(),h=o._nodeMap,_=this.__key,E=this.getLatest(),I=E.__parent,B=a._cloneNotNeeded,le=cn();if(Er(le)&&le.setCachedNodes(null),B.has(_))return so(E),E;const Ce=E.constructor.clone(E);return Ce.__parent=I,Ce.__next=E.__next,Ce.__prev=E.__prev,Je(E)&&Je(Ce)?(Ce.__first=E.__first,Ce.__last=E.__last,Ce.__size=E.__size,Ce.__indent=E.__indent,Ce.__format=E.__format,Ce.__dir=E.__dir):gt(E)&&gt(Ce)&&(Ce.__format=E.__format,Ce.__style=E.__style,Ce.__mode=E.__mode,Ce.__detail=E.__detail),B.add(_),Ce.__key=_,so(Ce),h.set(_,Ce),Ce}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(o,a){throw Error("createDOM: base method not extended")}updateDOM(o,a,h){throw Error("updateDOM: base method not extended")}exportDOM(o){return{element:this.createDOM(o._config,o)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(o){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(o){Tt(this,!0,o)}replace(o,a){rr();let h=cn();h!==null&&(h=h.clone()),Hr(this,o);const _=this.getLatest(),E=this.__key,I=o.__key,B=o.getWritable(),le=this.getParentOrThrow().getWritable(),fe=le.__size;Ci(B);const Ce=_.getPreviousSibling(),Ee=_.getNextSibling(),xe=_.__prev,Ne=_.__next,He=_.__parent;if(Tt(_,!1,!0),Ce===null)le.__first=I;else{const Ie=Ce.getWritable();Ie.__next=I}if(B.__prev=xe,Ee===null)le.__last=I;else{const Ie=Ee.getWritable();Ie.__prev=I}if(B.__next=Ne,B.__parent=He,le.__size=fe,a&&this.getChildren().forEach(Ie=>{B.append(Ie)}),pt(h)){Dr(h);const Ie=h.anchor,Re=h.focus;Ie.key===E&&Ha(Ie,B),Re.key===E&&Ha(Re,B)}return Pr()===E&&_n(I),B}insertAfter(o,a=!0){rr(),Hr(this,o);const h=this.getWritable(),_=o.getWritable(),E=_.getParent(),I=cn();let B=!1,le=!1;if(E!==null){const Ne=o.getIndexWithinParent();if(Ci(_),pt(I)){const He=E.__key,Ie=I.anchor,Re=I.focus;B=Ie.type==="element"&&Ie.key===He&&Ie.offset===Ne+1,le=Re.type==="element"&&Re.key===He&&Re.offset===Ne+1}}const fe=this.getNextSibling(),Ce=this.getParentOrThrow().getWritable(),Ee=_.__key,xe=h.__next;if(fe===null)Ce.__last=Ee;else{const Ne=fe.getWritable();Ne.__prev=Ee}if(Ce.__size++,h.__next=Ee,_.__next=xe,_.__prev=h.__key,_.__parent=h.__parent,a&&pt(I)){const Ne=this.getIndexWithinParent();Ka(I,Ce,Ne+1);const He=Ce.__key;B&&I.anchor.set(He,Ne+2,"element"),le&&I.focus.set(He,Ne+2,"element")}return o}insertBefore(o,a=!0){rr(),Hr(this,o);const h=this.getWritable(),_=o.getWritable(),E=_.__key;Ci(_);const I=this.getPreviousSibling(),B=this.getParentOrThrow().getWritable(),le=h.__prev,fe=this.getIndexWithinParent();if(I===null)B.__first=E;else{const Ee=I.getWritable();Ee.__next=E}B.__size++,h.__prev=E,_.__prev=le,_.__next=h.__key,_.__parent=h.__parent;const Ce=cn();if(a&&pt(Ce)){const Ee=this.getParentOrThrow();Ka(Ce,Ee,fe)}return o}isParentRequired(){return!1}createParentElementNode(){return Zi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(o,a){rr();const h=this.getPreviousSibling(),_=this.getParentOrThrow();if(h===null)return _.select(0,0);if(Je(h))return h.select();if(!gt(h)){const E=h.getIndexWithinParent()+1;return _.select(E,E)}return h.select(o,a)}selectNext(o,a){rr();const h=this.getNextSibling(),_=this.getParentOrThrow();if(h===null)return _.select();if(Je(h))return h.select(0,0);if(!gt(h)){const E=h.getIndexWithinParent();return _.select(E,E)}return h.select(o,a)}markDirty(){this.getWritable()}}function hn(u,o){const a=gn()._nodes.get(u);if(a===void 0)throw Error(`Create node: Attempted to create node ${o.name} that was not configured to be used on the editor.`);const h=a.klass;if(h!==o)throw Error(`Create node: Type ${u} in node ${o.name} does not match registered node ${h.name} with the same type`)}function cr(u,o,a){const h=a||o.getParentOrThrow().getLastChild();let _=o;const E=[o];for(;_!==h;){if(!_.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");_=_.getNextSibling(),E.push(_)}let I=u;for(const B of E)I=I.insertAfter(B)}class Kr extends Rt{static getType(){return"linebreak"}static clone(o){return new Kr(o.__key)}constructor(o){super(o)}getTextContent(){return`
36
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:o=>{const a=o.parentElement;let h,_;return a!==null&&((h=a.firstChild)===o||h.nextSibling===o&&h.nodeType===Ye&&(h.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((_=a.lastChild)===o||_.previousSibling===o&&_.nodeType===Ye&&(_.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:ai,priority:0}}}}static importJSON(o){return Di()}exportJSON(){return{type:"linebreak",version:1}}}function ai(u){return{node:Di()}}function Di(){return ho(new Kr)}function bi(u){return u instanceof Kr}function To(u,o){return o&qe?"code":o&Lt?"mark":o&Qe?"sub":o&ft?"sup":null}function kl(u,o){return o&Oe?"strong":o&Me?"em":"span"}function $s(u,o,a,h,_){const E=h.classList;let I=Wi(_,"base");I!==void 0&&E.add(...I),I=Wi(_,"underlineStrikethrough");let B=!1;const le=o&We&&o&De,fe=a&We&&a&De;I!==void 0&&(fe?(B=!0,le||E.add(...I)):le&&E.remove(...I));for(const Ce in fn){const xe=fn[Ce];if(I=Wi(_,Ce),I!==void 0)if(a&xe){if(B&&(Ce==="underline"||Ce==="strikethrough")){o&xe&&E.remove(...I);continue}(!(o&xe)||le&&Ce==="underline"||Ce==="strikethrough")&&E.add(...I)}else o&xe&&E.remove(...I)}}function Ur(u,o){const a=u.length,h=o.length;let _=0,E=0;for(;_<a&&_<h&&u[_]===o[_];)_++;for(;E+_<a&&E+_<h&&u[a-E-1]===o[h-E-1];)E++;return[_,a-_-E,o.slice(_,h-E)]}function xo(u,o,a){const h=o.firstChild,_=a.isComposing(),I=u+(_?zt:"");if(h==null)o.textContent=I;else{const B=h.nodeValue;if(B!==I)if(_||Ae){const[le,fe,Ce]=Ur(B,I);fe!==0&&h.deleteData(le,fe),h.insertData(le,Ce)}else h.nodeValue=I}}function Fs(u,o,a,h,_,E){xo(_,u,o);const B=E.theme.text;B!==void 0&&$s(a,0,h,u,B)}function es(u,o){const a=document.createElement(o);return a.appendChild(u),a}class Yi extends Rt{static getType(){return"text"}static clone(o){return new Yi(o.__text,o.__key)}constructor(o,a){super(a),this.__text=o,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const o=this.getLatest();return Ge[o.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===se}isComposing(){return this.__key===Pr()}isSegmented(){return this.getLatest().__mode===he}isDirectionless(){return(this.getLatest().__detail&je)!==0}isUnmergeable(){return(this.getLatest().__detail&nt)!==0}hasFormat(o){const a=fn[o];return(this.getFormat()&a)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(o,a){const _=this.getLatest().__format;return Or(_,o,a)}createDOM(o){const a=this.__format,h=To(this,a),_=kl(this,a),E=h===null?_:h,I=document.createElement(E);let B=I;this.hasFormat("code")&&I.setAttribute("spellcheck","false"),h!==null&&(B=document.createElement(_),I.appendChild(B));const le=this.__text;Fs(B,this,_,a,le,o);const fe=this.__style;return fe!==""&&(I.style.cssText=fe),I}updateDOM(o,a,h){const _=this.__text,E=o.__format,I=this.__format,B=To(this,E),le=To(this,I),fe=kl(this,E),Ce=kl(this,I);if((B===null?fe:B)!==(le===null?Ce:le))return!0;if(B===le&&fe!==Ce){const Ue=a.firstChild;if(Ue==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const tt=document.createElement(Ce);return Fs(tt,this,Ce,I,_,h),a.replaceChild(tt,Ue),!1}let Ne=a;if(le!==null&&B!==null&&(Ne=a.firstChild,Ne==null))throw Error("updateDOM: innerDOM is null or undefined");xo(_,Ne,this);const Ie=h.theme.text;Ie!==void 0&&E!==I&&$s(Ce,E,I,Ne,Ie);const Re=o.__style,mt=this.__style;return Re!==mt&&(a.style.cssText=mt),!1}static importDOM(){return{"#text":()=>({conversion:Il,priority:0}),b:()=>({conversion:$a,priority:0}),code:()=>({conversion:zr,priority:0}),em:()=>({conversion:zr,priority:0}),i:()=>({conversion:zr,priority:0}),s:()=>({conversion:zr,priority:0}),span:()=>({conversion:Pa,priority:0}),strong:()=>({conversion:zr,priority:0}),sub:()=>({conversion:zr,priority:0}),sup:()=>({conversion:zr,priority:0}),u:()=>({conversion:zr,priority:0})}}static importJSON(o){const a=Un(o.text);return a.setFormat(o.format),a.setDetail(o.detail),a.setMode(o.mode),a.setStyle(o.style),a}exportDOM(o){let{element:a}=super.exportDOM(o);if(!(a!==null&&jo(a)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return a.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(a=es(a,"b")),this.hasFormat("italic")&&(a=es(a,"i")),this.hasFormat("strikethrough")&&(a=es(a,"s")),this.hasFormat("underline")&&(a=es(a,"u")),{element:a}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(o,a){}setFormat(o){const a=this.getWritable();return a.__format=typeof o=="string"?fn[o]:o,a}setDetail(o){const a=this.getWritable();return a.__detail=typeof o=="string"?pr[o]:o,a}setStyle(o){const a=this.getWritable();return a.__style=o,a}toggleFormat(o){const a=this.getFormat(),h=Or(a,o,null);return this.setFormat(h)}toggleDirectionless(){const o=this.getWritable();return o.__detail^=je,o}toggleUnmergeable(){const o=this.getWritable();return o.__detail^=nt,o}setMode(o){const a=ye[o];if(this.__mode===a)return this;const h=this.getWritable();return h.__mode=a,h}setTextContent(o){if(this.__text===o)return this;const a=this.getWritable();return a.__text=o,a}select(o,a){rr();let h=o,_=a;const E=cn(),I=this.getTextContent(),B=this.__key;if(typeof I=="string"){const le=I.length;h===void 0&&(h=le),_===void 0&&(_=le)}else h=0,_=0;if(pt(E)){const le=Pr();(le===E.anchor.key||le===E.focus.key)&&_n(B),E.setTextNodeRange(this,h,this,_)}else return zd(B,h,B,_,"text","text");return E}selectStart(){return this.select(0,0)}selectEnd(){const o=this.getTextContentSize();return this.select(o,o)}spliceText(o,a,h,_){const E=this.getWritable(),I=E.__text,B=h.length;let le=o;le<0&&(le=B+le,le<0&&(le=0));const fe=cn();if(_&&pt(fe)){const Ee=o+B;fe.setTextNodeRange(E,Ee,E,Ee)}const Ce=I.slice(0,le)+h+I.slice(le+a);return E.__text=Ce,E}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...o){rr();const a=this.getLatest(),h=a.getTextContent(),_=a.__key,E=Pr(),I=new Set(o),B=[],le=h.length;let fe="";for(let vt=0;vt<le;vt++)fe!==""&&I.has(vt)&&(B.push(fe),fe=""),fe+=h[vt];fe!==""&&B.push(fe);const Ce=B.length;if(Ce===0)return[];if(B[0]===h)return[a];const Ee=B[0],xe=a.getParentOrThrow();let Ne;const He=a.getFormat(),Ie=a.getStyle(),Re=a.__detail;let mt=!1;a.isSegmented()?(Ne=Un(Ee),Ne.__format=He,Ne.__style=Ie,Ne.__detail=Re,mt=!0):(Ne=a.getWritable(),Ne.__text=Ee);const Ue=cn(),tt=[Ne];let Ft=Ee.length;for(let vt=1;vt<Ce;vt++){const Wt=B[vt],Zt=Wt.length,pn=Un(Wt).getWritable();pn.__format=He,pn.__style=Ie,pn.__detail=Re;const qt=pn.__key,Dn=Ft+Zt;if(pt(Ue)){const ui=Ue.anchor,Ji=Ue.focus;ui.key===_&&ui.type==="text"&&ui.offset>Ft&&ui.offset<=Dn&&(ui.key=qt,ui.offset-=Ft,Ue.dirty=!0),Ji.key===_&&Ji.type==="text"&&Ji.offset>Ft&&Ji.offset<=Dn&&(Ji.key=qt,Ji.offset-=Ft,Ue.dirty=!0)}E===_&&_n(qt),Ft=Dn,tt.push(pn)}Es(this);const Mt=xe.getWritable(),Nt=this.getIndexWithinParent();return mt?(Mt.splice(Nt,0,tt),this.remove()):Mt.splice(Nt,1,tt),pt(Ue)&&Ka(Ue,xe,Nt,Ce-1),tt}mergeWithSibling(o){const a=o===this.getPreviousSibling();if(!a&&o!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const h=this.__key,_=o.__key,E=this.__text,I=E.length;Pr()===_&&_n(h);const le=cn();if(pt(le)){const xe=le.anchor,Ne=le.focus;xe!==null&&xe.key===_&&(Yd(xe,a,h,o,I),le.dirty=!0),Ne!==null&&Ne.key===_&&(Yd(Ne,a,h,o,I),le.dirty=!0)}const fe=o.__text,Ce=a?fe+E:E+fe;this.setTextContent(Ce);const Ee=this.getWritable();return o.remove(),Ee}isTextEntity(){return!1}}function Pa(u){const o=u,a=o.style.fontWeight==="700",h=o.style.textDecoration==="line-through",_=o.style.fontStyle==="italic",E=o.style.textDecoration==="underline",I=o.style.verticalAlign;return{forChild:B=>(gt(B)&&(a&&B.toggleFormat("bold"),h&&B.toggleFormat("strikethrough"),_&&B.toggleFormat("italic"),E&&B.toggleFormat("underline"),I==="sub"&&B.toggleFormat("subscript"),I==="super"&&B.toggleFormat("superscript")),B),node:null}}function $a(u){const a=u.style.fontWeight==="normal";return{forChild:h=>(gt(h)&&!a&&h.toggleFormat("bold"),h),node:null}}const ts=new WeakMap;function Fa(u){return u.nodeName==="PRE"||u.nodeType===Be&&u.style!==void 0&&u.style.whiteSpace!==void 0&&u.style.whiteSpace.startsWith("pre")}function Ll(u){let o,a=u.parentNode;const h=[u];for(;a!==null&&(o=ts.get(a))===void 0&&!Fa(a);)h.push(a),a=a.parentNode;const _=o===void 0?a:o;for(let E=0;E<h.length;E++)ts.set(h[E],_);return _}function Il(u){const o=u;if(u.parentElement===null)throw Error("Expected parentElement of Text not to be null");let h=o.textContent||"";if(Ll(o)!==null){const _=h.split(/(\r?\n|\t)/),E=[],I=_.length;for(let B=0;B<I;B++){const le=_[B];le===`
37
- `||le===`\r
38
- `?E.push(Di()):le===" "?E.push(Vi()):le!==""&&E.push(Un(le))}return{node:E}}if(h=h.replace(/\r/g,"").replace(/[ \t\n]+/g," "),h==="")return{node:null};if(h[0]===" "){let _=o,E=!0;for(;_!==null&&(_=vo(_,!1))!==null;){const I=_.textContent||"";if(I.length>0){/[ \t\n]$/.test(I)&&(h=h.slice(1)),E=!1;break}}E&&(h=h.slice(1))}if(h[h.length-1]===" "){let _=o,E=!0;for(;_!==null&&(_=vo(_,!0))!==null;)if((_.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){E=!1;break}E&&(h=h.slice(0,h.length-1))}return h===""?{node:null}:{node:Un(h)}}const Ba=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function vo(u,o){let a=u;for(;;){let h;for(;(h=o?a.nextSibling:a.previousSibling)===null;){const E=a.parentElement;if(E===null)return null;a=E}if(a=h,a.nodeType===Be){const E=a.style.display;if(E===""&&a.nodeName.match(Ba)===null||E!==""&&!E.startsWith("inline"))return null}let _=a;for(;(_=o?a.firstChild:a.lastChild)!==null;)a=_;if(a.nodeType===Ye)return a;if(a.nodeName==="BR")return null}}const Bs={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function zr(u){const o=Bs[u.nodeName.toLowerCase()];return o===void 0?{node:null}:{forChild:a=>(gt(a)&&!a.hasFormat(o)&&a.toggleFormat(o),a),node:null}}function Un(u=""){return ho(new Yi(u))}function gt(u){return u instanceof Yi}class Ri extends Yi{static getType(){return"tab"}static clone(o){const a=new Ri(o.__key);return a.__text=o.__text,a.__format=o.__format,a.__style=o.__style,a}constructor(o){super(" ",o),this.__detail=nt}static importDOM(){return null}static importJSON(o){const a=Vi();return a.setFormat(o.format),a.setStyle(o.style),a}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(o){throw Error("TabNode does not support setTextContent")}setDetail(o){throw Error("TabNode does not support setDetail")}setMode(o){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Vi(){return ho(new Ri)}function ns(u){return u instanceof Ri}class Mi{constructor(o,a,h){this._selection=null,this.key=o,this.offset=a,this.type=h}is(o){return this.key===o.key&&this.offset===o.offset&&this.type===o.type}isBefore(o){let a=this.getNode(),h=o.getNode();const _=this.offset,E=o.offset;if(Je(a)){const I=a.getDescendantByIndex(_);a=I??a}if(Je(h)){const I=h.getDescendantByIndex(E);h=I??h}return a===h?_<E:a.isBefore(h)}getNode(){const o=this.key,a=En(o);if(a===null)throw Error("Point.getNode: node not found");return a}set(o,a,h){const _=this._selection,E=this.key;this.key=o,this.offset=a,this.type=h,Ks()||(Pr()===E&&_n(o),_!==null&&(_.setCachedNodes(null),_.dirty=!0))}}function Gr(u,o,a){return new Mi(u,o,a)}function rs(u,o){let a=o.__key,h=u.offset,_="element";if(gt(o)){_="text";const E=o.getTextContentSize();h>E&&(h=E)}else if(!Je(o)){const E=o.getNextSibling();if(gt(E))a=E.__key,h=0,_="text";else{const I=o.getParent();I&&(a=I.__key,h=o.getIndexWithinParent()+1)}}u.set(a,h,_)}function Ha(u,o){if(Je(o)){const a=o.getLastDescendant();Je(a)||gt(a)?rs(u,a):rs(u,o)}else rs(u,o)}function Pl(u,o,a,h){const _=u.getNode(),E=_.getChildAtIndex(u.offset),I=Un(),B=kr(_)?Zi().append(I):I;I.setFormat(a),I.setStyle(h),E===null?_.append(B):E.insertBefore(B),u.is(o)&&o.set(I.__key,0,"text"),u.set(I.__key,0,"text")}function ci(u,o,a,h){u.key=o,u.offset=a,u.type=h}class nn{constructor(o,a){this.anchor=o,this.focus=a,o._selection=this,a._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(o){this._cachedNodes=o}is(o){return Er(o)?this.anchor.is(o.anchor)&&this.focus.is(o.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return tr(this)}}class In{constructor(o){this.dirty=!1,this._nodes=o,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(o){this._cachedNodes=o}is(o){if(!Tr(o))return!1;const a=this._nodes,h=o._nodes;return a.size===h.size&&Array.from(a).every(_=>h.has(_))}add(o){this.dirty=!0,this._nodes.add(o),this._cachedNodes=null}delete(o){this.dirty=!0,this._nodes.delete(o),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(o){return this._nodes.has(o)}clone(){return new In(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(o){}insertText(){}insertNodes(o){const a=this.getNodes(),h=a.length,_=a[h-1];let E;if(gt(_))E=_.select();else{const I=_.getIndexWithinParent()+1;E=_.getParentOrThrow().select(I,I)}E.insertNodes(o);for(let I=0;I<h;I++)a[I].remove()}getNodes(){const o=this._cachedNodes;if(o!==null)return o;const a=this._nodes,h=[];for(const _ of a){const E=En(_);E!==null&&h.push(E)}return Ks()||(this._cachedNodes=h),h}getTextContent(){const o=this.getNodes();let a="";for(let h=0;h<o.length;h++)a+=o[h].getTextContent();return a}}function pt(u){return u instanceof Pn}function Er(u){return u instanceof nn}function ji(u){const[o,,a]=jd(u),h=a.getChildren(),_=h.length,E=h[0].getChildren().length,I=new Array(_);for(let B=0;B<_;B++)I[B]=new Array(E);for(let B=0;B<_;B++){const fe=h[B].getChildren();let Ce=0;for(let Ee=0;Ee<fe.length;Ee++){for(;I[B][Ce];)Ce++;const xe=fe[Ee],Ne=xe.__rowSpan||1,He=xe.__colSpan||1;for(let Ie=0;Ie<Ne;Ie++)for(let Re=0;Re<He;Re++)I[B+Ie][Ce+Re]=xe;if(o===xe)return{colSpan:He,columnIndex:Ce,rowIndex:B,rowSpan:Ne};Ce+=He}}return null}class er extends nn{constructor(o,a,h){super(a,h),this.gridKey=o}getCachedNodes(){return this._cachedNodes}setCachedNodes(o){this._cachedNodes=o}is(o){return ur(o)?this.gridKey===o.gridKey&&this.anchor.is(o.anchor)&&this.focus.is(o.focus):!1}set(o,a,h){this.dirty=!0,this.gridKey=o,this.anchor.key=a,this.focus.key=h,this._cachedNodes=null}clone(){return new er(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(o){}insertText(){}insertNodes(o){const a=this.focus.getNode();Hi(a.select(0,a.getChildrenSize())).insertNodes(o)}getShape(){const o=En(this.anchor.key);if(!Yr(o))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");const a=ji(o);if(a===null)throw Error("getCellRect: expected to find AnchorNode");const h=En(this.focus.key);if(!Yr(h))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const _=ji(h);if(_===null)throw Error("getCellRect: expected to find focusCellNode");const E=Math.min(a.columnIndex,_.columnIndex),I=Math.max(a.columnIndex,_.columnIndex),B=Math.min(a.rowIndex,_.rowIndex),le=Math.max(a.rowIndex,_.rowIndex);return{fromX:Math.min(E,I),fromY:Math.min(B,le),toX:Math.max(E,I),toY:Math.max(B,le)}}getNodes(){const o=this._cachedNodes;if(o!==null)return o;const a=this.anchor.getNode(),h=this.focus.getNode(),_=Yo(a,Yr),E=Yo(h,Yr);if(!Yr(_))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");if(!Yr(E))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const I=_.getParent();if(!Fl(I))throw Error("Expected anchorCell to have a parent GridRowNode");const B=I.getParent();if(!zc(B))throw Error("Expected tableNode to have a parent GridNode");const le=E.getParents()[1];if(le!==B){if(B.isParentOf(E)){const vt=le.getParent();if(vt==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,E.getKey(),vt.getKey())}else{const vt=B.getParent();if(vt==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,vt.getKey(),E.getKey())}return this.getNodes()}const[fe,Ce,Ee]=Vd(B,_,E);let xe=Math.min(Ce.startColumn,Ee.startColumn),Ne=Math.min(Ce.startRow,Ee.startRow),He=Math.max(Ce.startColumn+Ce.cell.__colSpan-1,Ee.startColumn+Ee.cell.__colSpan-1),Ie=Math.max(Ce.startRow+Ce.cell.__rowSpan-1,Ee.startRow+Ee.cell.__rowSpan-1),Re=xe,mt=Ne,Ue=xe,tt=Ne;function Ft(vt){const{cell:Wt,startColumn:Zt,startRow:pn}=vt;xe=Math.min(xe,Zt),Ne=Math.min(Ne,pn),He=Math.max(He,Zt+Wt.__colSpan-1),Ie=Math.max(Ie,pn+Wt.__rowSpan-1)}for(;xe<Re||Ne<mt||He>Ue||Ie>tt;){if(xe<Re){const vt=tt-mt,Wt=Re-1;for(let Zt=0;Zt<=vt;Zt++)Ft(fe[mt+Zt][Wt]);Re=Wt}if(Ne<mt){const vt=Ue-Re,Wt=mt-1;for(let Zt=0;Zt<=vt;Zt++)Ft(fe[Wt][Re+Zt]);mt=Wt}if(He>Ue){const vt=tt-mt,Wt=Ue+1;for(let Zt=0;Zt<=vt;Zt++)Ft(fe[mt+Zt][Wt]);Ue=Wt}if(Ie>tt){const vt=Ue-Re,Wt=tt+1;for(let Zt=0;Zt<=vt;Zt++)Ft(fe[Wt][Re+Zt]);tt=Wt}}const Mt=[B];let Nt=null;for(let vt=Ne;vt<=Ie;vt++)for(let Wt=xe;Wt<=He;Wt++){const{cell:Zt}=fe[vt][Wt],pn=Zt.getParent();if(!Fl(pn))throw Error("Expected GridCellNode parent to be a GridRowNode");pn!==Nt&&Mt.push(pn),Mt.push(Zt,...Ui(Zt)),Nt=pn}return Ks()||(this._cachedNodes=Mt),Mt}getTextContent(){const o=this.getNodes();let a="";for(let h=0;h<o.length;h++)a+=o[h].getTextContent();return a}}function ur(u){return u instanceof er}class Pn extends nn{constructor(o,a,h,_){super(o,a),this.format=h,this.style=_}getCachedNodes(){return this._cachedNodes}setCachedNodes(o){this._cachedNodes=o}is(o){return pt(o)?this.anchor.is(o.anchor)&&this.focus.is(o.focus)&&this.format===o.format&&this.style===o.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const o=this._cachedNodes;if(o!==null)return o;const a=this.anchor,h=this.focus,_=a.isBefore(h),E=_?a:h,I=_?h:a;let B=E.getNode(),le=I.getNode();const fe=E.offset,Ce=I.offset;if(Je(B)){const xe=B.getDescendantByIndex(fe);B=xe??B}if(Je(le)){let xe=le.getDescendantByIndex(Ce);xe!==null&&xe!==B&&le.getChildAtIndex(Ce)===xe&&(xe=xe.getPreviousSibling()),le=xe??le}let Ee;return B.is(le)?Je(B)&&B.getChildrenSize()>0?Ee=[]:Ee=[B]:Ee=B.getNodesBetween(le),Ks()||(this._cachedNodes=Ee),Ee}setTextNodeRange(o,a,h,_){ci(this.anchor,o.__key,a,"text"),ci(this.focus,h.__key,_,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const o=this.getNodes();if(o.length===0)return"";const a=o[0],h=o[o.length-1],_=this.anchor,E=this.focus,I=_.isBefore(E),[B,le]=tr(this);let fe="",Ce=!0;for(let Ee=0;Ee<o.length;Ee++){const xe=o[Ee];if(Je(xe)&&!xe.isInline())Ce||(fe+=`
39
- `),xe.isEmpty()?Ce=!1:Ce=!0;else if(Ce=!1,gt(xe)){let Ne=xe.getTextContent();xe===a?xe===h?(_.type!=="element"||E.type!=="element"||E.offset===_.offset)&&(Ne=B<le?Ne.slice(B,le):Ne.slice(le,B)):Ne=I?Ne.slice(B):Ne.slice(le):xe===h&&(Ne=I?Ne.slice(0,le):Ne.slice(0,B)),fe+=Ne}else(Sn(xe)||bi(xe))&&(xe!==h||!this.isCollapsed())&&(fe+=xe.getTextContent())}return fe}applyDOMRange(o){const a=gn(),_=a.getEditorState()._selection,E=Ud(o.startContainer,o.startOffset,o.endContainer,o.endOffset,a,_);if(E===null)return;const[I,B]=E;ci(this.anchor,I.key,I.offset,I.type),ci(this.focus,B.key,B.offset,B.type),this._cachedNodes=null}clone(){const o=this.anchor,a=this.focus;return new Pn(Gr(o.key,o.offset,o.type),Gr(a.key,a.offset,a.type),this.format,this.style)}toggleFormat(o){this.format=Or(this.format,o,null),this.dirty=!0}setStyle(o){this.style=o,this.dirty=!0}hasFormat(o){const a=fn[o];return(this.format&a)!==0}insertRawText(o){const a=o.split(/(\r?\n|\t)/),h=[],_=a.length;for(let E=0;E<_;E++){const I=a[E];I===`
40
- `||I===`\r
41
- `?h.push(Di()):I===" "?h.push(Vi()):h.push(Un(I))}this.insertNodes(h)}insertText(o){const a=this.anchor,h=this.focus,_=this.isCollapsed()||a.isBefore(h),E=this.format,I=this.style;_&&a.type==="element"?Pl(a,h,E,I):!_&&h.type==="element"&&Pl(h,a,E,I);const B=this.getNodes(),le=B.length,fe=_?a:h,Ce=_?h:a,Ee=fe.offset,xe=Ce.offset;let Ne=B[0];if(!gt(Ne))throw Error("insertText: first node is not a text node");const Ie=Ne.getTextContent().length,Re=Ne.getParentOrThrow(),mt=le-1;let Ue=B[mt];if(this.isCollapsed()&&Ee===Ie&&(Ne.isSegmented()||Ne.isToken()||!Ne.canInsertTextAfter()||!Re.canInsertTextAfter()&&Ne.getNextSibling()===null)){let tt=Ne.getNextSibling();if((!gt(tt)||!tt.canInsertTextBefore()||pl(tt))&&(tt=Un(),tt.setFormat(E),Re.canInsertTextAfter()?Ne.insertAfter(tt):Re.insertAfter(tt)),tt.select(0,0),Ne=tt,o!==""){this.insertText(o);return}}else if(this.isCollapsed()&&Ee===0&&(Ne.isSegmented()||Ne.isToken()||!Ne.canInsertTextBefore()||!Re.canInsertTextBefore()&&Ne.getPreviousSibling()===null)){let tt=Ne.getPreviousSibling();if((!gt(tt)||pl(tt))&&(tt=Un(),tt.setFormat(E),Re.canInsertTextBefore()?Ne.insertBefore(tt):Re.insertBefore(tt)),tt.select(),Ne=tt,o!==""){this.insertText(o);return}}else if(Ne.isSegmented()&&Ee!==Ie){const tt=Un(Ne.getTextContent());tt.setFormat(E),Ne.replace(tt),Ne=tt}else if(!this.isCollapsed()&&o!==""){const tt=Ue.getParent();if(!Re.canInsertTextBefore()||!Re.canInsertTextAfter()||Je(tt)&&(!tt.canInsertTextBefore()||!tt.canInsertTextAfter())){this.insertText(""),Kd(this.anchor,this.focus,null),this.insertText(o);return}}if(le===1){if(Ne.isToken()){const Nt=Un(o);Nt.select(),Ne.replace(Nt);return}const tt=Ne.getFormat(),Ft=Ne.getStyle();if(Ee===xe&&(tt!==E||Ft!==I))if(Ne.getTextContent()==="")Ne.setFormat(E),Ne.setStyle(I);else{const Nt=Un(o);if(Nt.setFormat(E),Nt.setStyle(I),Nt.select(),Ee===0)Ne.insertBefore(Nt,!1);else{const[vt]=Ne.splitText(Ee);vt.insertAfter(Nt,!1)}Nt.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=o.length);return}else if(ns(Ne)){const Nt=Un(o);Nt.setFormat(E),Nt.setStyle(I),Nt.select(),Ne.replace(Nt);return}const Mt=xe-Ee;Ne=Ne.spliceText(Ee,Mt,o,!0),Ne.getTextContent()===""?Ne.remove():this.anchor.type==="text"&&(Ne.isComposing()?this.anchor.offset-=o.length:(this.format=tt,this.style=Ft))}else{const tt=new Set([...Ne.getParentKeys(),...Ue.getParentKeys()]),Ft=Je(Ne)?Ne:Ne.getParentOrThrow();let Mt=Je(Ue)?Ue:Ue.getParentOrThrow(),Nt=Ue;if(!Ft.is(Mt)&&Mt.isInline())do Nt=Mt,Mt=Mt.getParentOrThrow();while(Mt.isInline());if(Ce.type==="text"&&(xe!==0||Ue.getTextContent()==="")||Ce.type==="element"&&Ue.getIndexWithinParent()<xe)if(gt(Ue)&&!Ue.isToken()&&xe!==Ue.getTextContentSize()){if(Ue.isSegmented()){const qt=Un(Ue.getTextContent());Ue.replace(qt),Ue=qt}!kr(Ce.getNode())&&Ce.type==="text"&&(Ue=Ue.spliceText(0,xe,"")),tt.add(Ue.__key)}else{const qt=Ue.getParentOrThrow();!qt.canBeEmpty()&&qt.getChildrenSize()===1?qt.remove():Ue.remove()}else tt.add(Ue.__key);const vt=Mt.getChildren(),Wt=new Set(B),Zt=Ft.is(Mt),pn=Ft.isInline()&&Ne.getNextSibling()===null?Ft:Ne;for(let qt=vt.length-1;qt>=0;qt--){const Dn=vt[qt];if(Dn.is(Ne)||Je(Dn)&&Dn.isParentOf(Ne))break;Dn.isAttached()&&(!Wt.has(Dn)||Dn.is(Nt)?Zt||pn.insertAfter(Dn,!1):Dn.remove())}if(!Zt){let qt=Mt,Dn=null;for(;qt!==null;){const ui=qt.getChildren(),Ji=ui.length;(Ji===0||ui[Ji-1].is(Dn))&&(tt.delete(qt.__key),Dn=qt),qt=qt.getParent()}}if(!Ne.isToken())Ne=Ne.spliceText(Ee,Ie-Ee,o,!0),Ne.getTextContent()===""?Ne.remove():Ne.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=o.length);else if(Ee===Ie)Ne.select();else{const qt=Un(o);qt.select(),Ne.replace(qt)}for(let qt=1;qt<le;qt++){const Dn=B[qt],ui=Dn.__key;tt.has(ui)||Dn.remove()}}}removeText(){this.insertText("")}formatText(o){if(this.isCollapsed()){this.toggleFormat(o),_n(null);return}const a=this.getNodes(),h=[];for(const Ue of a)gt(Ue)&&h.push(Ue);const _=h.length;if(_===0){this.toggleFormat(o),_n(null);return}const E=this.anchor,I=this.focus,B=this.isBackward(),le=B?I:E,fe=B?E:I;let Ce=0,Ee=h[0],xe=le.type==="element"?0:le.offset;if(le.type==="text"&&xe===Ee.getTextContentSize()&&(Ce=1,Ee=h[1],xe=0),Ee==null)return;const Ne=Ee.getFormatFlags(o,null),He=_-1;let Ie=h[He];const Re=fe.type==="text"?fe.offset:Ie.getTextContentSize();if(Ee.is(Ie)){if(xe===Re)return;if(xe===0&&Re===Ee.getTextContentSize())Ee.setFormat(Ne);else{const Ue=Ee.splitText(xe,Re),tt=xe===0?Ue[0]:Ue[1];tt.setFormat(Ne),le.type==="text"&&le.set(tt.__key,0,"text"),fe.type==="text"&&fe.set(tt.__key,Re-xe,"text")}this.format=Ne;return}xe!==0&&([,Ee]=Ee.splitText(xe),xe=0),Ee.setFormat(Ne);const mt=Ie.getFormatFlags(o,Ne);Re>0&&(Re!==Ie.getTextContentSize()&&([Ie]=Ie.splitText(Re)),Ie.setFormat(mt));for(let Ue=Ce+1;Ue<He;Ue++){const tt=h[Ue];if(!tt.isToken()){const Ft=tt.getFormatFlags(o,mt);tt.setFormat(Ft)}}le.type==="text"&&le.set(Ee.__key,xe,"text"),fe.type==="text"&&fe.set(Ie.__key,Re,"text"),this.format=Ne|mt}insertNodes(o){if(o.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Re=cn();if(!pt(Re))throw Error("Expected RangeSelection after insertParagraph");return Re.insertNodes(o)}const a=Rs(this.anchor.getNode(),zi),h=o[o.length-1];if("__language"in a){if("__language"in o[0])this.insertText(o[0].getTextContent());else{const Re=Fc(this);a.splice(Re,0,o),h.selectEnd()}return}const _=Re=>(Je(Re)||Sn(Re))&&!Re.isInline();if(!o.some(_)){const Re=Fc(this);a.splice(Re,0,o),h.selectEnd();return}const E=m_(o),I=E.getLastDescendant(),B=E.getChildren(),le=Re=>"__value"in Re&&"__checked"in Re,fe=Re=>Je(Re)&&zi(Re)&&!Re.isEmpty()&&Je(a)&&(!a.isEmpty()||le(a)),Ee=!Je(a)||!a.isEmpty()?this.insertParagraph():null,xe=B[B.length-1];let Ne=B[0];fe(Ne)&&(a.append(...Ne.getChildren()),Ne=B[1]),Ne&&cr(a,Ne);const He=Rs(I,zi);Ee&&Je(He)&&(le(Ee)||zi(xe))&&(He.append(...Ee.getChildren()),Ee.remove()),Je(a)&&a.isEmpty()&&a.remove(),I.selectEnd();const Ie=Je(a)?a.getLastChild():null;bi(Ie)&&He!==a&&Ie.remove()}insertParagraph(){if(this.anchor.key==="root"){const I=Zi();return Jn().splice(this.anchor.offset,0,[I]),I.select(),I}const o=Fc(this),a=Rs(this.anchor.getNode(),zi),h=a.getChildAtIndex(o),_=h?[h,...h.getNextSiblings()]:[],E=a.insertNewAfter(this,!1);return E?(E.append(..._),E.selectStart(),E):null}insertLineBreak(o){const a=Di();if(this.insertNodes([a]),o){const h=a.getParentOrThrow(),_=a.getIndexWithinParent();h.select(_,_)}}extract(){const o=this.getNodes(),a=o.length,h=a-1,_=this.anchor,E=this.focus;let I=o[0],B=o[h];const[le,fe]=tr(this);if(a===0)return[];if(a===1){if(gt(I)&&!this.isCollapsed()){const Ee=le>fe?fe:le,xe=le>fe?le:fe,Ne=I.splitText(Ee,xe),He=Ee===0?Ne[0]:Ne[1];return He!=null?[He]:[]}return[I]}const Ce=_.isBefore(E);if(gt(I)){const Ee=Ce?le:fe;Ee===I.getTextContentSize()?o.shift():Ee!==0&&([,I]=I.splitText(Ee),o[0]=I)}if(gt(B)){const xe=B.getTextContent().length,Ne=Ce?fe:le;Ne===0?o.pop():Ne!==xe&&([B]=B.splitText(Ne),o[h]=B)}return o}modify(o,a,h){const _=this.focus,E=this.anchor,I=o==="move",B=oi(_,a);if(Sn(B)&&!B.isIsolated()){if(I&&B.isKeyboardSelectable()){const Ne=Pc();Ne.add(B.__key),Dr(Ne);return}const xe=a?B.getPreviousSibling():B.getNextSibling();if(gt(xe)){const Ne=xe.__key,He=a?xe.getTextContent().length:0;_.set(Ne,He,"text"),I&&E.set(Ne,He,"text");return}else{const Ne=B.getParentOrThrow();let He,Ie;Je(xe)?(Ie=xe.__key,He=a?xe.getChildrenSize():0):(He=B.getIndexWithinParent(),Ie=Ne.__key,a||He++),_.set(Ie,He,"element"),I&&E.set(Ie,He,"element");return}}const le=gn(),fe=yr(le._window);if(!fe)return;const Ce=le._blockCursorElement,Ee=le._rootElement;if(Ee!==null&&Ce!==null&&Je(B)&&!B.isInline()&&!B.canBeEmpty()&&wt(Ce,le,Ee),Hs(fe,o,a?"backward":"forward",h),fe.rangeCount>0){const xe=fe.getRangeAt(0),Ne=this.anchor.getNode(),He=kr(Ne)?Ne:br(Ne);if(this.applyDOMRange(xe),this.dirty=!0,!I){const Ie=this.getNodes(),Re=[];let mt=!1;for(let Ue=0;Ue<Ie.length;Ue++){const tt=Ie[Ue];ht(tt,He)?Re.push(tt):mt=!0}if(mt&&Re.length>0)if(a){const Ue=Re[0];Je(Ue)?Ue.selectStart():Ue.getParentOrThrow().selectStart()}else{const Ue=Re[Re.length-1];Je(Ue)?Ue.selectEnd():Ue.getParentOrThrow().selectEnd()}(fe.anchorNode!==xe.startContainer||fe.anchorOffset!==xe.startOffset)&&qi(this)}}}deleteCharacter(o){const a=this.isCollapsed();if(this.isCollapsed()){const h=this.anchor,_=this.focus;let E=h.getNode();if(!o&&(h.type==="element"&&Je(E)&&h.offset===E.getChildrenSize()||h.type==="text"&&h.offset===E.getTextContentSize())){const B=E.getParent(),le=E.getNextSibling()||(B===null?null:B.getNextSibling());if(Je(le)&&le.isShadowRoot())return}const I=oi(_,o);if(Sn(I)&&!I.isIsolated()){if(I.isKeyboardSelectable()&&Je(E)&&E.getChildrenSize()===0){E.remove();const B=Pc();B.add(I.__key),Dr(B)}else I.remove(),gn().dispatchCommand(e,void 0);return}else if(!o&&Je(I)&&Je(E)&&E.isEmpty()){E.remove(),I.selectStart();return}if(this.modify("extend",o,"character"),this.isCollapsed()){if(o&&h.offset===0&&(h.type==="element"?h.getNode():h.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const B=_.type==="text"?_.getNode():null;if(E=h.type==="text"?h.getNode():null,B!==null&&B.isSegmented()){const le=_.offset,fe=B.getTextContentSize();if(B.is(E)||o&&le!==fe||!o&&le!==0){Bd(B,o,le);return}}else if(E!==null&&E.isSegmented()){const le=h.offset,fe=E.getTextContentSize();if(E.is(B)||o&&le!==0||!o&&le!==fe){Bd(E,o,le);return}}Wa(this,o)}}if(this.removeText(),o&&!a&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const h=this.anchor.getNode();h.isEmpty()&&kr(h.getParent())&&h.getIndexWithinParent()===0&&h.collapseAtStart(this)}}deleteLine(o){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",o,"lineboundary"),(o?this.focus:this.anchor).offset===0&&this.modify("extend",o,"character")),this.removeText()}deleteWord(o){this.isCollapsed()&&this.modify("extend",o,"word"),this.removeText()}}function Tr(u){return u instanceof In}function Ai(u){const o=u.offset;if(u.type==="text")return o;const a=u.getNode();return o===a.getChildrenSize()?a.getTextContent().length:0}function tr(u){const o=u.anchor,a=u.focus;return o.type==="element"&&a.type==="element"&&o.key===a.key&&o.offset===a.offset?[0,0]:[Ai(o),Ai(a)]}function qi(u){const o=u.focus,a=u.anchor,h=a.key,_=a.offset,E=a.type;ci(a,o.key,o.offset,o.type),ci(o,h,_,E),u._cachedNodes=null}function Hs(u,o,a,h){u.modify(o,a,h)}function Wa(u,o){const a=u.anchor,h=u.focus,_=a.getNode(),E=h.getNode();if(_===E&&a.type==="text"&&h.type==="text"){const I=a.offset,B=h.offset,le=I<B,fe=le?I:B,Ce=le?B:I,Ee=Ce-1;if(fe!==Ee){const xe=_.getTextContent().slice(fe,Ce);ml(xe)||(o?h.offset=Ee:a.offset=Ee)}}}function Bd(u,o,a){const h=u,E=h.getTextContent().split(/(?=\s)/g),I=E.length;let B=0,le=0;for(let Ce=0;Ce<I;Ce++){const Ee=E[Ce],xe=Ce===I-1;if(le=B,B+=Ee.length,o&&B===a||B>a||xe){E.splice(Ce,1),xe&&(le=void 0);break}}const fe=E.join("").trim();fe===""?h.remove():(h.setTextContent(fe),h.select(le,le))}function l_(u,o,a){const h=u.getParent();return a===null||h===null||!h.canBeEmpty()||h!==a.getNode()}function Hd(u,o,a,h){let _=o,E;if(u.nodeType===Be){let I=!1;const B=u.childNodes,le=B.length;_===le&&(I=!0,_=le-1);let fe=B[_],Ce=!1;if(fe===h._blockCursorElement?(fe=B[_+1],Ce=!0):h._blockCursorElement!==null&&_--,E=ni(fe),gt(E))_=vs(E,I);else{let Ee=ni(u);if(Ee===null)return null;if(Je(Ee)){let xe=Ee.getChildAtIndex(_);if(Je(xe)&&l_(xe,_,a)){const Ne=I?xe.getLastDescendant():xe.getFirstDescendant();Ne===null?(Ee=xe,_=0):(xe=Ne,Ee=Je(xe)?xe:xe.getParentOrThrow())}gt(xe)?(E=xe,Ee=null,_=vs(xe,I)):xe!==Ee&&I&&!Ce&&_++}else{const xe=Ee.getIndexWithinParent();o===0&&Sn(Ee)&&ni(u)===Ee?_=xe:_=xe+1,Ee=Ee.getParentOrThrow()}if(Je(Ee))return Gr(Ee.__key,_,"element")}}else E=ni(u);return gt(E)?Gr(E.__key,_,"text"):null}function Wd(u,o,a){const h=u.offset,_=u.getNode();if(h===0){const E=_.getPreviousSibling(),I=_.getParent();if(!o)Je(E)&&!a&&E.isInline()?(u.key=E.__key,u.offset=E.getChildrenSize(),u.type="element"):gt(E)&&(u.key=E.__key,u.offset=E.getTextContent().length);else if((a||!o)&&E===null&&Je(I)&&I.isInline()){const B=I.getPreviousSibling();gt(B)&&(u.key=B.__key,u.offset=B.getTextContent().length)}}else if(h===_.getTextContent().length){const E=_.getNextSibling(),I=_.getParent();if(o&&Je(E)&&E.isInline())u.key=E.__key,u.offset=0,u.type="element";else if((a||o)&&E===null&&Je(I)&&I.isInline()&&!I.canInsertTextAfter()){const B=I.getNextSibling();gt(B)&&(u.key=B.__key,u.offset=0)}}}function Kd(u,o,a){if(u.type==="text"&&o.type==="text"){const h=u.isBefore(o),_=u.is(o);Wd(u,h,_),Wd(o,!h,_),_&&(o.key=u.key,o.offset=u.offset,o.type=u.type);const E=gn();if(E.isComposing()&&E._compositionKey!==u.key&&pt(a)){const I=a.anchor,B=a.focus;ci(u,I.key,I.offset,I.type),ci(o,B.key,B.offset,B.type)}}}function Ud(u,o,a,h,_,E){if(u===null||a===null||!ti(_,u,a))return null;const I=Hd(u,o,pt(E)?E.anchor:null,_);if(I===null)return null;const B=Hd(a,h,pt(E)?E.focus:null,_);if(B===null)return null;if(I.type==="element"&&B.type==="element"){const le=ni(u),fe=ni(a);if(Sn(le)&&Sn(fe))return null}return Kd(I,B,E),[I,B]}function a_(u){return Je(u)&&!u.isInline()}function zd(u,o,a,h,_,E){const I=ki(),B=new Pn(Gr(u,o,_),Gr(a,h,E),0,"");return B.dirty=!0,I._selection=B,B}function c_(){const u=Gr("root",0,"element"),o=Gr("root",0,"element");return new Pn(u,o,0,"")}function Pc(){return new In(new Set)}function u_(){const u=Gr("root",0,"element"),o=Gr("root",0,"element");return new er("root",u,o)}function d_(u){const a=u.getEditorState()._selection,h=yr(u._window);return pt(a)||a==null?$c(a,h,u):a.clone()}function $c(u,o,a){const h=a._window;if(h===null)return null;const _=h.event,E=_?_.type:void 0,I=E==="selectionchange",B=!Kt()&&(I||E==="beforeinput"||E==="compositionstart"||E==="compositionend"||E==="click"&&_&&_.detail===3||E==="drop"||E===void 0);let le,fe,Ce,Ee;if(!pt(u)||B){if(o===null)return null;if(le=o.anchorNode,fe=o.focusNode,Ce=o.anchorOffset,Ee=o.focusOffset,I&&pt(u)&&!ti(a,le,fe))return u.clone()}else return u.clone();const xe=Ud(le,Ce,fe,Ee,a,u);if(xe===null)return null;const[Ne,He]=xe;return new Pn(Ne,He,pt(u)?u.format:0,pt(u)?u.style:"")}function cn(){return ki()._selection}function Ws(){return gn()._editorState._selection}function Ka(u,o,a,h=1){const _=u.anchor,E=u.focus,I=_.getNode(),B=E.getNode();if(!o.is(I)&&!o.is(B))return;const le=o.__key;if(u.isCollapsed()){const fe=_.offset;if(a<=fe&&h>0||a<fe&&h<0){const Ce=Math.max(0,fe+h);_.set(le,Ce,"element"),E.set(le,Ce,"element"),Gd(u)}}else{const fe=u.isBackward(),Ce=fe?E:_,Ee=Ce.getNode(),xe=fe?_:E,Ne=xe.getNode();if(o.is(Ee)){const He=Ce.offset;(a<=He&&h>0||a<He&&h<0)&&Ce.set(le,Math.max(0,He+h),"element")}if(o.is(Ne)){const He=xe.offset;(a<=He&&h>0||a<He&&h<0)&&xe.set(le,Math.max(0,He+h),"element")}}Gd(u)}function Gd(u){const o=u.anchor,a=o.offset,h=u.focus,_=h.offset,E=o.getNode(),I=h.getNode();if(u.isCollapsed()){if(!Je(E))return;const B=E.getChildrenSize(),le=a>=B,fe=le?E.getChildAtIndex(B-1):E.getChildAtIndex(a);if(gt(fe)){let Ce=0;le&&(Ce=fe.getTextContentSize()),o.set(fe.__key,Ce,"text"),h.set(fe.__key,Ce,"text")}return}if(Je(E)){const B=E.getChildrenSize(),le=a>=B,fe=le?E.getChildAtIndex(B-1):E.getChildAtIndex(a);if(gt(fe)){let Ce=0;le&&(Ce=fe.getTextContentSize()),o.set(fe.__key,Ce,"text")}}if(Je(I)){const B=I.getChildrenSize(),le=_>=B,fe=le?I.getChildAtIndex(B-1):I.getChildAtIndex(_);if(gt(fe)){let Ce=0;le&&(Ce=fe.getTextContentSize()),h.set(fe.__key,Ce,"text")}}}function f_(u,o){const h=o.getEditorState()._selection,_=u._selection;if(pt(_)){const E=_.anchor,I=_.focus;let B;if(E.type==="text"&&(B=E.getNode(),B.selectionTransform(h,_)),I.type==="text"){const le=I.getNode();B!==le&&le.selectionTransform(h,_)}}}function Ua(u,o,a,h,_){let E=null,I=0,B=null;h!==null?(E=h.__key,gt(h)?(I=h.getTextContentSize(),B="text"):Je(h)&&(I=h.getChildrenSize(),B="element")):_!==null&&(E=_.__key,gt(_)?B="text":Je(_)&&(B="element")),E!==null&&B!==null?u.set(E,I,B):(I=o.getIndexWithinParent(),I===-1&&(I=a.getChildrenSize()),u.set(a.__key,I,"element"))}function Yd(u,o,a,h,_){u.type==="text"?(u.key=a,o||(u.offset+=_)):u.offset>h.getIndexWithinParent()&&(u.offset-=1)}function h_(u,o,a,h,_,E,I){const B=h.anchorNode,le=h.focusNode,fe=h.anchorOffset,Ce=h.focusOffset,Ee=document.activeElement;if(_.has("collaboration")&&Ee!==E||Ee!==null&&oo(Ee))return;if(!pt(o)){u!==null&&ti(a,B,le)&&h.removeAllRanges();return}const xe=o.anchor,Ne=o.focus,He=xe.key,Ie=Ne.key,Re=Os(a,He),mt=Os(a,Ie),Ue=xe.offset,tt=Ne.offset,Ft=o.format,Mt=o.style,Nt=o.isCollapsed();let vt=Re,Wt=mt,Zt=!1;if(xe.type==="text"){vt=Ln(Re);const pn=xe.getNode();Zt=pn.getFormat()!==Ft||pn.getStyle()!==Mt}else pt(u)&&u.anchor.type==="text"&&(Zt=!0);if(Ne.type==="text"&&(Wt=Ln(mt)),!(vt===null||Wt===null)&&(Nt&&(u===null||Zt||pt(u)&&(u.format!==Ft||u.style!==Mt))&&ut(Ft,Mt,Ue,He,performance.now()),!(fe===Ue&&Ce===tt&&B===vt&&le===Wt&&!(h.type==="Range"&&Nt)&&((Ee===null||!E.contains(Ee))&&E.focus({preventScroll:!0}),xe.type!=="element")))){try{h.setBaseAndExtent(vt,Ue,Wt,tt)}catch{}if(!_.has("skip-scroll-into-view")&&o.isCollapsed()&&E!==null&&E===document.activeElement){const pn=o instanceof Pn&&o.anchor.type==="element"?vt.childNodes[Ue]||null:h.rangeCount>0?h.getRangeAt(0):null;if(pn!==null){let qt;if(pn instanceof Text){const Dn=document.createRange();Dn.selectNode(pn),qt=Dn.getBoundingClientRect()}else qt=pn.getBoundingClientRect();xa(a,qt,E)}}Xe()}}function g_(u){let o=cn()||Ws();o===null&&(o=Jn().selectEnd()),o.insertNodes(u)}function p_(){const u=cn();return u===null?"":u.getTextContent()}function Vd(u,o,a){const h=[];let _=null,E=null;function I(fe,Ce,Ee){const xe={cell:Ee,startColumn:Ce,startRow:fe},Ne=Ee.__rowSpan,He=Ee.__colSpan;for(let Ie=0;Ie<Ne;Ie++){h[fe+Ie]===void 0&&(h[fe+Ie]=[]);for(let Re=0;Re<He;Re++)h[fe+Ie][Ce+Re]=xe}o.is(Ee)&&(_=xe),a.is(Ee)&&(E=xe)}function B(fe,Ce){return h[fe]===void 0||h[fe][Ce]===void 0}const le=u.getChildren();for(let fe=0;fe<le.length;fe++){const Ce=le[fe];if(!Fl(Ce))throw Error("Expected GridNode children to be GridRowNode");const Ee=Ce.getChildren();let xe=0;for(const Ne of Ee){if(!Yr(Ne))throw Error("Expected GridRowNode children to be GridCellNode");for(;!B(fe,xe);)xe++;I(fe,xe,Ne),xe+=Ne.__colSpan}}if(_===null)throw Error("Anchor not found in Grid");if(E===null)throw Error("Focus not found in Grid");return[h,_,E]}function jd(u){let o;if(u instanceof Uc)o=u;else if(u instanceof Rt){const _=Yo(u,Yr);if(!Yr(_))throw Error("Expected to find a parent GridCellNode");o=_}else{const _=Yo(u.getNode(),Yr);if(!Yr(_))throw Error("Expected to find a parent GridCellNode");o=_}const a=o.getParent();if(!Fl(a))throw Error("Expected GridCellNode to have a parent GridRowNode");const h=a.getParent();if(!zc(h))throw Error("Expected GridRowNode to have a parent GridNode");return[o,a,h]}function Fc(u){u.isCollapsed()||u.removeText();const o=u.anchor,a=o.getNode();if(!gt(a))return o.offset;const h=a.getParent();if(!h){const le=Zi();return Jn().append(le),le.select(),0}const _=a.splitText(o.offset);if(_.length===0)return 0;const E=o.offset===0?0:1,I=_[0].getIndexWithinParent()+E;if(!h.isInline()||I===0)return I;const B=h.getChildAtIndex(I);return B&&h.insertNewAfter(u).append(B,...B.getNextSiblings()),h.getIndexWithinParent()+E}function m_(u){const o=Zi();let a=null;for(let h=0;h<u.length;h++){const _=u[h],E=bi(_);if(E||Sn(_)&&_.isInline()||Je(_)&&_.isInline()||gt(_)||_.isParentRequired()){if(a===null&&(a=_.createParentElementNode(),o.append(a),E))continue;a!==null&&a.append(_)}else o.append(_),a=null}return o}let jn=null,qn=null,xr=!1,Bc=!1,za=0;const qd={characterData:!0,childList:!0,subtree:!0};function Ks(){return xr||jn!==null&&jn._readOnly}function rr(){if(xr)throw Error("Cannot use method in read-only mode.")}function Zd(){if(za>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function ki(){if(jn===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return jn}function gn(){if(qn===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return qn}function __(){return qn}function Jd(u,o,a){const h=o.__type,_=Ir(u,h);let E=a.get(h);E===void 0&&(E=Array.from(_.transforms),a.set(h,E));const I=E.length;for(let B=0;B<I&&(E[B](o),!!o.isAttached());B++);}function Xd(u,o){return u!==void 0&&u.__key!==o&&u.isAttached()}function y_(u,o){const a=o._dirtyLeaves,h=u._nodeMap;for(const _ of a){const E=h.get(_);gt(E)&&E.isAttached()&&E.isSimpleText()&&!E.isUnmergeable()&&fl(E)}}function C_(u,o){const a=o._dirtyLeaves,h=o._dirtyElements,_=u._nodeMap,E=Pr(),I=new Map;let B=a,le=B.size,fe=h,Ce=fe.size;for(;le>0||Ce>0;){if(le>0){o._dirtyLeaves=new Set;for(const Ee of B){const xe=_.get(Ee);gt(xe)&&xe.isAttached()&&xe.isSimpleText()&&!xe.isUnmergeable()&&fl(xe),xe!==void 0&&Xd(xe,E)&&Jd(o,xe,I),a.add(Ee)}if(B=o._dirtyLeaves,le=B.size,le>0){za++;continue}}o._dirtyLeaves=new Set,o._dirtyElements=new Map;for(const Ee of fe){const xe=Ee[0],Ne=Ee[1];if(xe!=="root"&&!Ne)continue;const He=_.get(xe);He!==void 0&&Xd(He,E)&&Jd(o,He,I),h.set(xe,Ne)}B=o._dirtyLeaves,le=B.size,fe=o._dirtyElements,Ce=fe.size,za++}o._dirtyLeaves=a,o._dirtyElements=h}function N_(u){return Hc(u,gn()._nodes)}function Hc(u,o){const a=u.type,h=o.get(a);if(h===void 0)throw Error(`parseEditorState: type "${a}" + not found`);const _=h.klass;if(u.type!==_.getType())throw Error(`LexicalNode: Node ${_.name} does not implement .importJSON().`);const E=_.importJSON(u),I=u.children;if(Je(E)&&Array.isArray(I))for(let B=0;B<I.length;B++){const le=I[B],fe=Hc(le,o);E.append(fe)}return E}function E_(u,o,a){const h=Kc(),_=jn,E=xr,I=qn,B=o._dirtyElements,le=o._dirtyLeaves,fe=o._cloneNotNeeded,Ce=o._dirtyType;o._dirtyElements=new Map,o._dirtyLeaves=new Set,o._cloneNotNeeded=new Set,o._dirtyType=0,jn=h,xr=!1,qn=o;try{const Ee=o._nodes,xe=u.root;Hc(xe,Ee),a&&a(),h._readOnly=!0,ef(h)}catch(Ee){Ee instanceof Error&&o._onError(Ee)}finally{o._dirtyElements=B,o._dirtyLeaves=le,o._cloneNotNeeded=fe,o._dirtyType=Ce,jn=_,xr=E,qn=I}return h}function Qd(u,o){const a=jn,h=xr,_=qn;jn=u,xr=!0,qn=null;try{return o()}finally{jn=a,xr=h,qn=_}}function ef(u){const o=u._nodeMap;o.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},o.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},o.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function is(u,o){const a=u._pendingEditorState,h=u._rootElement,_=u._headless||h===null;if(a===null)return;const E=u._editorState,I=E._selection,B=a._selection,le=u._dirtyType!==ct,fe=jn,Ce=xr,Ee=qn,xe=u._updating,Ne=u._observer;let He=null;if(u._pendingEditorState=null,u._editorState=a,!_&&le&&Ne!==null){qn=u,jn=a,xr=!1,u._updating=!0;try{const Nt=u._dirtyType,vt=u._dirtyElements,Wt=u._dirtyLeaves;Ne.disconnect(),He=lr(E,a,u,Nt,vt,Wt)}catch(Nt){if(Nt instanceof Error&&u._onError(Nt),!Bc)lf(u,null,h,a),Zn(u),u._dirtyType=dt,Bc=!0,is(u,E),Bc=!1;else throw Nt;return}finally{Ne.observe(h,qd),u._updating=xe,jn=fe,xr=Ce,qn=Ee}}a._readOnly||(a._readOnly=!0,ef(a),pt(B)&&(Object.freeze(B.anchor),Object.freeze(B.focus)),Object.freeze(B));const Ie=u._dirtyLeaves,Re=u._dirtyElements,mt=u._normalizedNodes,Ue=u._updateTags,tt=u._deferred;le&&(u._dirtyType=ct,u._cloneNotNeeded.clear(),u._dirtyLeaves=new Set,u._dirtyElements=new Map,u._normalizedNodes=new Set,u._updateTags=new Set),Sa(u,a);const Ft=_?null:yr(u._window);if(u._editable&&Ft!==null&&(le||B===null||B.dirty)){qn=u,jn=a;try{if(Ne!==null&&Ne.disconnect(),le||B===null||B.dirty){const Nt=u._blockCursorElement;Nt!==null&&wt(Nt,u,h),h_(I,B,u,Ft,Ue,h)}Ol(u,h,B),Ne!==null&&Ne.observe(h,qd)}finally{qn=Ee,jn=fe}}He!==null&&x_(u,He,Ue,Ie,E),!pt(B)&&B!==null&&(I===null||!I.is(B))&&u.dispatchCommand(e,void 0);const Mt=u._pendingDecorators;Mt!==null&&(u._decorators=Mt,u._pendingDecorators=null,$l("decorator",u,!0,Mt)),T_(u,o||E,a),$l("update",u,!0,{dirtyElements:Re,dirtyLeaves:Ie,editorState:a,normalizedNodes:mt,prevEditorState:o||E,tags:Ue}),S_(u,tt),v_(u)}function T_(u,o,a){const h=lo(o),_=lo(a);h!==_&&$l("textcontent",u,!0,_)}function x_(u,o,a,h,_){const E=Array.from(u._listeners.mutation),I=E.length;for(let B=0;B<I;B++){const[le,fe]=E[B],Ce=o.get(fe);Ce!==void 0&&le(Ce,{dirtyLeaves:h,prevEditorState:_,updateTags:a})}}function $l(u,o,a,...h){const _=o._updating;o._updating=a;try{const E=Array.from(o._listeners[u]);for(let I=0;I<E.length;I++)E[I].apply(null,h)}finally{o._updating=_}}function tf(u,o,a){if(u._updating===!1||qn!==u){let _=!1;return u.update(()=>{_=tf(u,o,a)}),_}const h=Ss(u);for(let _=4;_>=0;_--)for(let E=0;E<h.length;E++){const le=h[E]._commands.get(o);if(le!==void 0){const fe=le[_];if(fe!==void 0){const Ce=Array.from(fe),Ee=Ce.length;for(let xe=0;xe<Ee;xe++)if(Ce[xe](a,u)===!0)return!0}}}return!1}function v_(u){const o=u._updates;if(o.length!==0){const a=o.shift();if(a){const[h,_]=a;rf(u,h,_)}}}function S_(u,o){if(u._deferred=[],o.length!==0){const a=u._updating;u._updating=!0;try{for(let h=0;h<o.length;h++)o[h]()}finally{u._updating=a}}}function nf(u,o){const a=u._updates;let h=o||!1;for(;a.length!==0;){const _=a.shift();if(_){const[E,I]=_;let B,le;I!==void 0&&(B=I.onUpdate,le=I.tag,I.skipTransforms&&(h=!0),B&&u._deferred.push(B),le&&u._updateTags.add(le)),E()}}return h}function rf(u,o,a){const h=u._updateTags;let _,E,I=!1,B=!1;a!==void 0&&(_=a.onUpdate,E=a.tag,E!=null&&h.add(E),I=a.skipTransforms||!1,B=a.discrete||!1),_&&u._deferred.push(_);const le=u._editorState;let fe=u._pendingEditorState,Ce=!1;(fe===null||fe._readOnly)&&(fe=u._pendingEditorState=D_(fe||le),Ce=!0),fe._flushSync=B;const Ee=jn,xe=xr,Ne=qn,He=u._updating;jn=fe,xr=!1,u._updating=!0,qn=u;try{Ce&&(u._headless?le._selection!=null&&(fe._selection=le._selection.clone()):fe._selection=d_(u));const Re=u._compositionKey;o(),I=nf(u,I),f_(fe,u),u._dirtyType!==ct&&(I?y_(fe,u):C_(fe,u),nf(u),wa(le,fe,u._dirtyLeaves,u._dirtyElements));const mt=u._compositionKey;Re!==mt&&(fe._flushSync=!0);const Ue=fe._selection;if(pt(Ue)){const tt=fe._nodeMap,Ft=Ue.anchor.key,Mt=Ue.focus.key;if(tt.get(Ft)===void 0||tt.get(Mt)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else Tr(Ue)&&Ue._nodes.size===0&&(fe._selection=null)}catch(Re){Re instanceof Error&&u._onError(Re),u._pendingEditorState=le,u._dirtyType=dt,u._cloneNotNeeded.clear(),u._dirtyLeaves=new Set,u._dirtyElements.clear(),is(u);return}finally{jn=Ee,xr=xe,qn=Ne,u._updating=He,za=0}u._dirtyType!==ct||O_(fe,u)?fe._flushSync?(fe._flushSync=!1,is(u)):Ce&&Ns(()=>{is(u)}):(fe._flushSync=!1,Ce&&(h.clear(),u._deferred=[],u._pendingEditorState=null))}function Ar(u,o,a){u._updating?u._updates.push([o,a]):rf(u,o,a)}class Wc extends Rt{constructor(o){super(o)}decorate(o,a){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Sn(u){return u instanceof Wc}class os extends Rt{constructor(o){super(o),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const o=this.getFormat();return ys[o]||""}getIndent(){return this.getLatest().__indent}getChildren(){const o=[];let a=this.getFirstChild();for(;a!==null;)o.push(a),a=a.getNextSibling();return o}getChildrenKeys(){const o=[];let a=this.getFirstChild();for(;a!==null;)o.push(a.__key),a=a.getNextSibling();return o}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const a=gn()._dirtyElements;return a!==null&&a.has(this.__key)}isLastChild(){const o=this.getLatest(),a=this.getParentOrThrow().getLastChild();return a!==null&&a.is(o)}getAllTextNodes(){const o=[];let a=this.getFirstChild();for(;a!==null;){if(gt(a)&&o.push(a),Je(a)){const h=a.getAllTextNodes();o.push(...h)}a=a.getNextSibling()}return o}getFirstDescendant(){let o=this.getFirstChild();for(;o!==null;){if(Je(o)){const a=o.getFirstChild();if(a!==null){o=a;continue}}break}return o}getLastDescendant(){let o=this.getLastChild();for(;o!==null;){if(Je(o)){const a=o.getLastChild();if(a!==null){o=a;continue}}break}return o}getDescendantByIndex(o){const a=this.getChildren(),h=a.length;if(o>=h){const E=a[h-1];return Je(E)&&E.getLastDescendant()||E||null}const _=a[o];return Je(_)&&_.getFirstDescendant()||_||null}getFirstChild(){const a=this.getLatest().__first;return a===null?null:En(a)}getFirstChildOrThrow(){const o=this.getFirstChild();if(o===null)throw Error(`Expected node ${this.__key} to have a first child.`);return o}getLastChild(){const a=this.getLatest().__last;return a===null?null:En(a)}getLastChildOrThrow(){const o=this.getLastChild();if(o===null)throw Error(`Expected node ${this.__key} to have a last child.`);return o}getChildAtIndex(o){const a=this.getChildrenSize();let h,_;if(o<a/2){for(h=this.getFirstChild(),_=0;h!==null&&_<=o;){if(_===o)return h;h=h.getNextSibling(),_++}return null}for(h=this.getLastChild(),_=a-1;h!==null&&_>=o;){if(_===o)return h;h=h.getPreviousSibling(),_--}return null}getTextContent(){let o="";const a=this.getChildren(),h=a.length;for(let _=0;_<h;_++){const E=a[_];o+=E.getTextContent(),Je(E)&&_!==h-1&&!E.isInline()&&(o+=It)}return o}getTextContentSize(){let o=0;const a=this.getChildren(),h=a.length;for(let _=0;_<h;_++){const E=a[_];o+=E.getTextContentSize(),Je(E)&&_!==h-1&&!E.isInline()&&(o+=It.length)}return o}getDirection(){return this.getLatest().__dir}hasFormat(o){if(o!==""){const a=Qr[o];return(this.getFormat()&a)!==0}return!1}select(o,a){rr();const h=cn();let _=o,E=a;const I=this.getChildrenSize();if(!this.canBeEmpty()){if(o===0&&a===0){const le=this.getFirstChild();if(gt(le)||Je(le))return le.select(0,0)}else if((o===void 0||o===I)&&(a===void 0||a===I)){const le=this.getLastChild();if(gt(le)||Je(le))return le.select()}}_===void 0&&(_=I),E===void 0&&(E=I);const B=this.__key;if(pt(h))h.anchor.set(B,_,"element"),h.focus.set(B,E,"element"),h.dirty=!0;else return zd(B,_,B,E,"element","element");return h}selectStart(){const o=this.getFirstDescendant();return o?o.selectStart():this.select()}selectEnd(){const o=this.getLastDescendant();return o?o.selectEnd():this.select()}clear(){const o=this.getWritable();return this.getChildren().forEach(h=>h.remove()),o}append(...o){return this.splice(this.getChildrenSize(),0,o)}setDirection(o){const a=this.getWritable();return a.__dir=o,a}setFormat(o){const a=this.getWritable();return a.__format=o!==""?Qr[o]:0,this}setIndent(o){const a=this.getWritable();return a.__indent=o,this}splice(o,a,h){const _=h.length,E=this.getChildrenSize(),I=this.getWritable(),B=I.__key,le=[],fe=[],Ce=this.getChildAtIndex(o+a);let Ee=null,xe=E-a+_;if(o!==0)if(o===E)Ee=this.getLastChild();else{const He=this.getChildAtIndex(o);He!==null&&(Ee=He.getPreviousSibling())}if(a>0){let He=Ee===null?this.getFirstChild():Ee.getNextSibling();for(let Ie=0;Ie<a;Ie++){if(He===null)throw Error("splice: sibling not found");const Re=He.getNextSibling(),mt=He.__key,Ue=He.getWritable();Ci(Ue),fe.push(mt),He=Re}}let Ne=Ee;for(let He=0;He<_;He++){const Ie=h[He];Ne!==null&&Ie.is(Ne)&&(Ee=Ne=Ne.getPreviousSibling());const Re=Ie.getWritable();Re.__parent===B&&xe--,Ci(Re);const mt=Ie.__key;if(Ne===null)I.__first=mt,Re.__prev=null;else{const Ue=Ne.getWritable();Ue.__next=mt,Re.__prev=Ue.__key}if(Ie.__key===B)throw Error("append: attempting to append self");Re.__parent=B,le.push(mt),Ne=Ie}if(o+a===E){if(Ne!==null){const He=Ne.getWritable();He.__next=null,I.__last=Ne.__key}}else if(Ce!==null){const He=Ce.getWritable();if(Ne!==null){const Ie=Ne.getWritable();He.__prev=Ne.__key,Ie.__next=Ce.__key}else He.__prev=null}if(I.__size=xe,fe.length){const He=cn();if(pt(He)){const Ie=new Set(fe),Re=new Set(le),{anchor:mt,focus:Ue}=He;of(mt,Ie,Re)&&Ua(mt,mt.getNode(),this,Ee,Ce),of(Ue,Ie,Re)&&Ua(Ue,Ue.getNode(),this,Ee,Ce),xe===0&&!this.canBeEmpty()&&!Br(this)&&this.remove()}}return I}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(o,a){return null}canIndent(){return!0}collapseAtStart(o){return!1}excludeFromCopy(o){return!1}canExtractContents(){return!0}canReplaceWith(o){return!0}canInsertAfter(o){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(o){return!1}extractWithChild(o,a,h){return!1}}function Je(u){return u instanceof os}function of(u,o,a){let h=u.getNode();for(;h;){const _=h.__key;if(o.has(_)&&!a.has(_))return!0;h=h.getParent()}return!1}class Us extends os{static getType(){return"root"}static clone(){return new Us}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const o=this.__cachedText;return(Ks()||gn()._dirtyType===ct)&&o!==null?o:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(o){throw Error("replace: cannot be called on root nodes")}insertBefore(o){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(o){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(o,a){return!1}append(...o){for(let a=0;a<o.length;a++){const h=o[a];if(!Je(h)&&!Sn(h))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...o)}static importJSON(o){const a=Jn();return a.setFormat(o.format),a.setIndent(o.indent),a.setDirection(o.direction),a}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function w_(){return new Us}function kr(u){return u instanceof Us}function O_(u,o){const a=o.getEditorState()._selection,h=u._selection;if(h!==null){if(h.dirty||!h.is(a))return!0}else if(a!==null)return!0;return!1}function D_(u){return new Ga(new Map(u._nodeMap))}function Kc(){return new Ga(new Map([["root",w_()]]))}function sf(u){const o=u.exportJSON(),a=u.constructor;if(o.type!==a.getType())throw Error(`LexicalNode: Node ${a.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);const h=o.children;if(Je(u)){if(!Array.isArray(h))throw Error(`LexicalNode: Node ${a.name} is an element but .exportJSON() does not have a children array.`);const _=u.getChildren();for(let E=0;E<_.length;E++){const I=_[E],B=sf(I);h.push(B)}}return o}class Ga{constructor(o,a){this._nodeMap=o,this._selection=a||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(o){return Qd(this,o)}clone(o){const a=new Ga(this._nodeMap,o===void 0?this._selection:o);return a._readOnly=!0,a}toJSON(){return Qd(this,()=>({root:sf(Jn())}))}}class zs extends os{static getType(){return"paragraph"}static clone(o){return new zs(o.__key)}createDOM(o){const a=document.createElement("p"),h=Wi(o.theme,"paragraph");return h!==void 0&&a.classList.add(...h),a}updateDOM(o,a,h){return!1}static importDOM(){return{p:o=>({conversion:b_,priority:0})}}exportDOM(o){const{element:a}=super.exportDOM(o);if(a&&jo(a)){this.isEmpty()&&a.append(document.createElement("br"));const h=this.getFormatType();a.style.textAlign=h;const _=this.getDirection();_&&(a.dir=_);const E=this.getIndent();E>0&&(a.style.textIndent=`${E*20}px`)}return{element:a}}static importJSON(o){const a=Zi();return a.setFormat(o.format),a.setIndent(o.indent),a.setDirection(o.direction),a}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(o,a){const h=Zi(),_=this.getDirection();return h.setDirection(_),this.insertAfter(h,a),h}collapseAtStart(){const o=this.getChildren();if(o.length===0||gt(o[0])&&o[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 b_(u){const o=Zi();if(u.style){o.setFormat(u.style.textAlign);const a=parseInt(u.style.textIndent,10)/20;a>0&&o.setIndent(a)}return{node:o}}function Zi(){return ho(new zs)}function R_(u){return u instanceof zs}const M_=0,A_=1,k_=2,L_=3,I_=4;function lf(u,o,a,h){const _=u._keyToDOMMap;_.clear(),u._editorState=Kc(),u._pendingEditorState=h,u._compositionKey=null,u._dirtyType=ct,u._cloneNotNeeded.clear(),u._dirtyLeaves=new Set,u._dirtyElements.clear(),u._normalizedNodes=new Set,u._updateTags=new Set,u._updates=[],u._blockCursorElement=null;const E=u._observer;E!==null&&(E.disconnect(),u._observer=null),o!==null&&(o.textContent=""),a!==null&&(a.textContent="",_.set("root",a))}function P_(u,o){const a=new Map,h=new Set,_=E=>{Object.keys(E).forEach(I=>{let B=a.get(I);B===void 0&&(B=[],a.set(I,B)),B.push(E[I])})};return u.forEach(E=>{const I=E.klass.importDOM!=null?E.klass.importDOM.bind(E.klass):null;if(I==null||h.has(I))return;h.add(I);const B=I();B!==null&&_(B)}),o&&_(o),a}function $_(u){const o=u||{},a=__(),h=o.theme||{},_=u===void 0?a:o.parentEditor||null,E=o.disableEvents||!1,I=Kc(),B=o.namespace||(_!==null?_._config.namespace:$o()),le=o.editorState,fe=[Us,Yi,Kr,Ri,zs,...o.nodes||[]],{onError:Ce,html:Ee}=o,xe=o.editable!==void 0?o.editable:!0;let Ne;if(u===void 0&&a!==null)Ne=a._nodes;else{Ne=new Map;for(let Ie=0;Ie<fe.length;Ie++){let Re=fe[Ie],mt=null,Ue=null;if(typeof Re!="function"){const Nt=Re;Re=Nt.replace,mt=Nt.with,Ue=Nt.withKlass||null}{const Nt=Re.name;if(Nt!=="RootNode"){const vt=Re.prototype;["getType","clone"].forEach(Wt=>{Re.hasOwnProperty(Wt)||console.warn(`${Nt} must implement static "${Wt}" method`)}),!Re.hasOwnProperty("importDOM")&&Re.hasOwnProperty("exportDOM")&&console.warn(`${Nt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),vt instanceof Wc&&(vt.hasOwnProperty("decorate")||console.warn(`${vt.constructor.name} must implement "decorate" method`)),Re.hasOwnProperty("importJSON")||console.warn(`${Nt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),vt.hasOwnProperty("exportJSON")||console.warn(`${Nt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const tt=Re.getType(),Ft=Re.transform(),Mt=new Set;Ft!==null&&Mt.add(Ft),Ne.set(tt,{exportDOM:Ee&&Ee.export?Ee.export.get(Re):void 0,klass:Re,replace:mt,replaceWithKlass:Ue,transforms:Mt})}}const He=new F_(I,_,Ne,{disableEvents:E,namespace:B,theme:h},Ce||console.error,P_(Ne,Ee?Ee.import:void 0),xe);return le!==void 0&&(He._pendingEditorState=le,He._dirtyType=dt),He}class F_{constructor(o,a,h,_,E,I,B){this._parentEditor=a,this._rootElement=null,this._editorState=o,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=_,this._nodes=h,this._decorators={},this._pendingDecorators=null,this._dirtyType=ct,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=$o(),this._onError=E,this._htmlConversions=I,this._editable=B,this._headless=a!==null&&a._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(o){const a=this._listeners.update;return a.add(o),()=>{a.delete(o)}}registerEditableListener(o){const a=this._listeners.editable;return a.add(o),()=>{a.delete(o)}}registerDecoratorListener(o){const a=this._listeners.decorator;return a.add(o),()=>{a.delete(o)}}registerTextContentListener(o){const a=this._listeners.textcontent;return a.add(o),()=>{a.delete(o)}}registerRootListener(o){const a=this._listeners.root;return o(this._rootElement,null),a.add(o),()=>{o(null,this._rootElement),a.delete(o)}}registerCommand(o,a,h){if(h===void 0)throw Error('Listener for type "command" requires a "priority".');const _=this._commands;_.has(o)||_.set(o,[new Set,new Set,new Set,new Set,new Set]);const E=_.get(o);if(E===void 0)throw Error(`registerCommand: Command ${String(o)} not found in command map`);const I=E[h];return I.add(a),()=>{I.delete(a),E.every(B=>B.size===0)&&_.delete(o)}}registerMutationListener(o,a){if(this._nodes.get(o.getType())===void 0)throw Error(`Node ${o.name} has not been registered. Ensure node has been passed to createEditor.`);const _=this._listeners.mutation;return _.set(a,o),()=>{_.delete(a)}}registerNodeTransformToKlass(o,a){const h=o.getType(),_=this._nodes.get(h);if(_===void 0)throw Error(`Node ${o.name} has not been registered. Ensure node has been passed to createEditor.`);return _.transforms.add(a),_}registerNodeTransform(o,a){const h=this.registerNodeTransformToKlass(o,a),_=[h],E=h.replaceWithKlass;if(E!=null){const I=this.registerNodeTransformToKlass(E,a);_.push(I)}return xs(this,o.getType()),()=>{_.forEach(I=>I.transforms.delete(a))}}hasNode(o){return this._nodes.has(o.getType())}hasNodes(o){return o.every(this.hasNode.bind(this))}dispatchCommand(o,a){return st(this,o,a)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(o){const a=this._rootElement;if(o!==a){const h=Wi(this._config.theme,"root"),_=this._pendingEditorState||this._editorState;if(this._rootElement=o,lf(this,a,o,_),a!==null&&(this._config.disableEvents||Le(a),h!=null&&a.classList.remove(...h)),o!==null){const E=fo(o),I=o.style;I.userSelect="text",I.whiteSpace="pre-wrap",I.wordBreak="break-word",o.setAttribute("data-lexical-editor","true"),this._window=E,this._dirtyType=dt,Zn(this),this._updateTags.add("history-merge"),is(this),this._config.disableEvents||Ke(o,this),h!=null&&o.classList.add(...h)}else this._editorState=_,this._pendingEditorState=null,this._window=null;$l("root",this,!1,o,a)}}getElementByKey(o){return this._keyToDOMMap.get(o)||null}getEditorState(){return this._editorState}setEditorState(o,a){if(o.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");_i(this);const h=this._pendingEditorState,_=this._updateTags,E=a!==void 0?a.tag:null;h!==null&&!h.isEmpty()&&(E!=null&&_.add(E),is(this)),this._pendingEditorState=o,this._dirtyType=dt,this._dirtyElements.set("root",!1),this._compositionKey=null,E!=null&&_.add(E),is(this)}parseEditorState(o,a){const h=typeof o=="string"?JSON.parse(o):o;return E_(h,this,a)}update(o,a){Ar(this,o,a)}focus(o,a={}){const h=this._rootElement;h!==null&&(h.setAttribute("autocapitalize","off"),Ar(this,()=>{const _=cn(),E=Jn();_!==null?_.dirty=!0:E.getChildrenSize()!==0&&(a.defaultSelection==="rootStart"?E.selectStart():E.selectEnd())},{onUpdate:()=>{h.removeAttribute("autocapitalize"),o&&o()},tag:"focus"}),this._pendingEditorState===null&&h.removeAttribute("autocapitalize"))}blur(){const o=this._rootElement;o!==null&&o.blur();const a=yr(this._window);a!==null&&a.removeAllRanges()}isEditable(){return this._editable}setEditable(o){this._editable!==o&&(this._editable=o,$l("editable",this,!0,o))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Uc extends os{constructor(o,a){super(a),this.__colSpan=o,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(o){return this.getWritable().__colSpan=o,this}getRowSpan(){return this.__rowSpan}setRowSpan(o){return this.getWritable().__rowSpan=o,this}}function Yr(u){return u instanceof Uc}class af extends os{}function zc(u){return u instanceof af}class cf extends os{}function Fl(u){return u instanceof cf}return Pe.$INTERNAL_isPointSelection=Er,Pe.$addUpdateTag=xi,Pe.$applyNodeReplacement=ho,Pe.$copyNode=Sl,Pe.$createLineBreakNode=Di,Pe.$createNodeSelection=Pc,Pe.$createParagraphNode=Zi,Pe.$createRangeSelection=c_,Pe.$createTabNode=Vi,Pe.$createTextNode=Un,Pe.$getAdjacentNode=oi,Pe.$getNearestNodeFromDOMNode=_r,Pe.$getNearestRootOrShadowRoot=br,Pe.$getNodeByKey=En,Pe.$getPreviousSelection=Ws,Pe.$getRoot=Jn,Pe.$getSelection=cn,Pe.$getTextContent=p_,Pe.$hasAncestor=ht,Pe.$hasUpdateTag=Lc,Pe.$insertNodes=g_,Pe.$isBlockElementNode=a_,Pe.$isDecoratorNode=Sn,Pe.$isElementNode=Je,Pe.$isInlineElementOrDecoratorNode=va,Pe.$isLeafNode=yi,Pe.$isLineBreakNode=bi,Pe.$isNodeSelection=Tr,Pe.$isParagraphNode=R_,Pe.$isRangeSelection=pt,Pe.$isRootNode=kr,Pe.$isRootOrShadowRoot=Br,Pe.$isTabNode=ns,Pe.$isTextNode=gt,Pe.$nodesOfType=vl,Pe.$normalizeSelection__EXPERIMENTAL=Hi,Pe.$parseSerializedNode=N_,Pe.$selectAll=xl,Pe.$setCompositionKey=_n,Pe.$setSelection=Dr,Pe.$splitNode=bs,Pe.BLUR_COMMAND=Z,Pe.CAN_REDO_COMMAND=m,Pe.CAN_UNDO_COMMAND=y,Pe.CLEAR_EDITOR_COMMAND=Q,Pe.CLEAR_HISTORY_COMMAND=k,Pe.CLICK_COMMAND=n,Pe.COMMAND_PRIORITY_CRITICAL=I_,Pe.COMMAND_PRIORITY_EDITOR=M_,Pe.COMMAND_PRIORITY_HIGH=L_,Pe.COMMAND_PRIORITY_LOW=A_,Pe.COMMAND_PRIORITY_NORMAL=k_,Pe.CONTROLLED_TEXT_INSERTION_COMMAND=f,Pe.COPY_COMMAND=ne,Pe.CUT_COMMAND=Y,Pe.DELETE_CHARACTER_COMMAND=r,Pe.DELETE_LINE_COMMAND=T,Pe.DELETE_WORD_COMMAND=x,Pe.DEPRECATED_$computeGridMap=Vd,Pe.DEPRECATED_$createGridSelection=u_,Pe.DEPRECATED_$getGridCellNodeRect=ji,Pe.DEPRECATED_$getNodeTriplet=jd,Pe.DEPRECATED_$isGridCellNode=Yr,Pe.DEPRECATED_$isGridNode=zc,Pe.DEPRECATED_$isGridRowNode=Fl,Pe.DEPRECATED_$isGridSelection=ur,Pe.DEPRECATED_GridCellNode=Uc,Pe.DEPRECATED_GridNode=af,Pe.DEPRECATED_GridRowNode=cf,Pe.DRAGEND_COMMAND=V,Pe.DRAGOVER_COMMAND=D,Pe.DRAGSTART_COMMAND=F,Pe.DROP_COMMAND=J,Pe.DecoratorNode=Wc,Pe.ElementNode=os,Pe.FOCUS_COMMAND=R,Pe.FORMAT_ELEMENT_COMMAND=ee,Pe.FORMAT_TEXT_COMMAND=O,Pe.INDENT_CONTENT_COMMAND=_e,Pe.INSERT_LINE_BREAK_COMMAND=c,Pe.INSERT_PARAGRAPH_COMMAND=d,Pe.INSERT_TAB_COMMAND=j,Pe.KEY_ARROW_DOWN_COMMAND=H,Pe.KEY_ARROW_LEFT_COMMAND=K,Pe.KEY_ARROW_RIGHT_COMMAND=w,Pe.KEY_ARROW_UP_COMMAND=W,Pe.KEY_BACKSPACE_COMMAND=re,Pe.KEY_DELETE_COMMAND=q,Pe.KEY_DOWN_COMMAND=v,Pe.KEY_ENTER_COMMAND=z,Pe.KEY_ESCAPE_COMMAND=ce,Pe.KEY_MODIFIER_COMMAND=ue,Pe.KEY_SPACE_COMMAND=te,Pe.KEY_TAB_COMMAND=G,Pe.LineBreakNode=Kr,Pe.MOVE_TO_END=P,Pe.MOVE_TO_START=$,Pe.OUTDENT_CONTENT_COMMAND=pe,Pe.PASTE_COMMAND=p,Pe.ParagraphNode=zs,Pe.REDO_COMMAND=A,Pe.REMOVE_TEXT_COMMAND=C,Pe.RootNode=Us,Pe.SELECTION_CHANGE_COMMAND=e,Pe.SELECT_ALL_COMMAND=U,Pe.TabNode=Ri,Pe.TextNode=Yi,Pe.UNDO_COMMAND=M,Pe.createCommand=t,Pe.createEditor=$_,Pe.getNearestEditorFromDOMNode=Io,Pe.isHTMLAnchorElement=Vo,Pe.isHTMLElement=jo,Pe.isSelectionCapturedInDecoratorInput=oo,Pe.isSelectionWithinEditor=ti,Pe}var $e={},Df;function fC(){if(Df)return $e;Df=1;let t={},e={},n={},r={},c={},d={},f={},p={},C={},x={},T={},O={},M={},A={},v={},w={},P={},K={},$={},W={},H={},z={},te={},re={},ce={},q={},G={},j={},_e={},pe={},J={},ee={},F={},D={},V={},ne={};function Y(l){let i=new URLSearchParams;i.append("code",l);for(let s=1;s<arguments.length;s++)i.append("v",arguments[s]);throw Error(`Minified Lexical error #${l}; visit https://lexical.dev/docs/error?${i} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let U=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Q=U&&"documentMode"in document?document.documentMode:null,k=U&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),m=U&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),y=U&&"InputEvent"in window&&!Q?"getTargetRanges"in new window.InputEvent("input"):!1,R=U&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Z=U&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ue=U&&/Android/.test(navigator.userAgent),ge=U&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ae=U&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ge,Te=R||Z||ae?" ":"​",Ae=m?" ":Te,ze=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,oe=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,ie={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},de={directionless:1,unmergeable:2},we={center:2,end:6,justify:4,left:1,right:3,start:5},ke={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},Be={normal:0,segmented:2,token:1},Ye={0:"normal",2:"segmented",1:"token"},ct=!1,yt=0;function dt(l){yt=l.timeStamp}function ve(l,i,s){return i.__lexicalLineBreak===l||l[`__lexicalKey_${s._key}`]!==void 0}function se(l){return l.getEditorState().read(()=>{let i=jt();return i!==null?i.clone():null})}function he(l,i,s){ct=!0;let g=100<performance.now()-yt;try{lr(l,()=>{let N=jt()||se(l);var S=new Map,b=l.getRootElement(),X=l._editorState,me=l._blockCursorElement;let Se=!1,Fe="";for(var Ke=0;Ke<i.length;Ke++){var Le=i[Ke],be=Le.type,Xe=Le.target,ut=wr(Xe,X);if(!(ut===null&&Xe!==b||an(ut))){if(be==="characterData"){if(Le=g&&ht(ut))e:{Le=N,be=Xe;var Tt=ut;if(wt(Le)){var Rt=Le.anchor.getNode();if(Rt.is(Tt)&&Le.format!==Rt.getFormat()){Le=!1;break e}}Le=be.nodeType===3&&Tt.isAttached()}Le&&(Tt=Ir(l._window),be=Le=null,Tt!==null&&Tt.anchorNode===Xe&&(Le=Tt.anchorOffset,be=Tt.focusOffset),Xe=Xe.nodeValue,Xe!==null&&Ct(ut,Xe,Le,be,!1))}else if(be==="childList"){for(Se=!0,be=Le.addedNodes,Tt=0;Tt<be.length;Tt++){Rt=be[Tt];var hn=gr(Rt),cr=Rt.parentNode;cr==null||Rt===me||hn!==null||Rt.nodeName==="BR"&&ve(Rt,cr,l)||(m&&(hn=Rt.innerText||Rt.nodeValue)&&(Fe+=hn),cr.removeChild(Rt))}if(Le=Le.removedNodes,be=Le.length,0<be){for(Tt=0,Rt=0;Rt<be;Rt++)cr=Le[Rt],(cr.nodeName==="BR"&&ve(cr,Xe,l)||me===cr)&&(Xe.appendChild(cr),Tt++);be!==Tt&&(Xe===b&&(ut=X._nodeMap.get("root")),S.set(Xe,ut))}}}}if(0<S.size)for(let[Kr,ai]of S)if(Ze(ai))for(S=ai.getChildrenKeys(),b=Kr.firstChild,X=0;X<S.length;X++)me=l.getElementByKey(S[X]),me!==null&&(b==null?(Kr.appendChild(me),b=me):b!==me&&Kr.replaceChild(me,b),b=b.nextSibling);else ht(ai)&&ai.markDirty();if(S=s.takeRecords(),0<S.length){for(b=0;b<S.length;b++)for(me=S[b],X=me.addedNodes,me=me.target,Ke=0;Ke<X.length;Ke++)ut=X[Ke],Xe=ut.parentNode,Xe==null||ut.nodeName!=="BR"||ve(ut,me,l)||Xe.removeChild(ut);s.takeRecords()}N!==null&&(Se&&(N.dirty=!0,pr(N)),m&&sn(l)&&N.insertRawText(Fe))})}finally{ct=!1}}function Oe(l){let i=l._observer;if(i!==null){let s=i.takeRecords();he(l,s,i)}}function Me(l){yt===0&&Zn(l).addEventListener("textInput",dt,!0),l._observer=new MutationObserver((i,s)=>{he(l,i,s)})}function De(l,i){let s=l.__mode,g=l.__format;l=l.__style;let N=i.__mode,S=i.__format;return i=i.__style,(s===null||s===N)&&(g===null||g===S)&&(l===null||l===i)}function We(l,i){let s=l.mergeWithSibling(i),g=ln()._normalizedNodes;return g.add(l.__key),g.add(i.__key),s}function qe(l){if(l.__text===""&&l.isSimpleText()&&!l.isUnmergeable())l.remove();else{for(var i;(i=l.getPreviousSibling())!==null&&ht(i)&&i.isSimpleText()&&!i.isUnmergeable();)if(i.__text==="")i.remove();else{De(i,l)&&(l=We(i,l));break}for(var s;(s=l.getNextSibling())!==null&&ht(s)&&s.isSimpleText()&&!s.isUnmergeable();)if(s.__text==="")s.remove();else{De(l,s)&&We(l,s);break}}}function Qe(l){return ft(l.anchor),ft(l.focus),l}function ft(l){for(;l.type==="element";){var i=l.getNode(),s=l.offset;if(s===i.getChildrenSize()?(i=i.getChildAtIndex(s-1),s=!0):(i=i.getChildAtIndex(s),s=!1),ht(i)){l.set(i.__key,s?i.getTextContentSize():0,"text");break}else if(!Ze(i))break;l.set(i.__key,s?i.getChildrenSize():0,"element")}}let Lt=1,Ve=typeof queueMicrotask=="function"?queueMicrotask:l=>{Promise.resolve().then(l)};function je(l){let i=document.activeElement;if(i===null)return!1;let s=i.nodeName;return an(wr(l))&&(s==="INPUT"||s==="TEXTAREA"||i.contentEditable==="true"&&i.__lexicalEditor==null)}function nt(l,i,s){let g=l.getRootElement();try{return g!==null&&g.contains(i)&&g.contains(s)&&i!==null&&!je(i)&&_t(i)===l}catch{return!1}}function _t(l){for(;l!=null;){let i=l.__lexicalEditor;if(i!=null)return i;l=mr(l)}return null}function Et(l){return l.isToken()||l.isSegmented()}function St(l){for(;l!=null;){if(l.nodeType===3)return l;l=l.firstChild}return null}function Ot(l,i,s){let g=ie[i];return s!==null&&(l&g)===(s&g)||(l^=g,i==="subscript"?l&=~ie.superscript:i==="superscript"&&(l&=~ie.subscript)),l}function bt(l,i){if(i!=null)l.__key=i;else{Xn(),99<_o&&Y(14),i=ln();var s=Cr(),g=""+Lt++;s._nodeMap.set(g,l),Ze(l)?i._dirtyElements.set(g,!0):i._dirtyLeaves.add(g),i._cloneNotNeeded.add(g),i._dirtyType=1,l.__key=g}}function xt(l){var i=l.getParent();if(i!==null){let N=l.getWritable();i=i.getWritable();var s=l.getPreviousSibling();if(l=l.getNextSibling(),s===null)if(l!==null){var g=l.getWritable();i.__first=l.__key,g.__prev=null}else i.__first=null;else{if(g=s.getWritable(),l!==null){let S=l.getWritable();S.__prev=g.__key,g.__next=S.__key}else g.__next=null;N.__prev=null}l===null?s!==null?(l=s.getWritable(),i.__last=s.__key,l.__next=null):i.__last=null:(l=l.getWritable(),s!==null?(s=s.getWritable(),s.__next=l.__key,l.__prev=s.__key):l.__prev=null,N.__next=null),i.__size--,N.__parent=null}}function Qt(l){99<_o&&Y(14);var i=l.getLatest(),s=i.__parent,g=Cr();let N=ln(),S=g._nodeMap;if(g=N._dirtyElements,s!==null)e:for(;s!==null;){if(g.has(s))break e;let b=S.get(s);if(b===void 0)break;g.set(s,!1),s=b.__parent}i=i.__key,N._dirtyType=1,Ze(l)?g.set(i,!0):N._dirtyLeaves.add(i)}function At(l){Xn();var i=ln();let s=i._compositionKey;l!==s&&(i._compositionKey=l,s!==null&&(i=It(s),i!==null&&i.getWritable()),l!==null&&(l=It(l),l!==null&&l.getWritable()))}function zt(){return li()?null:ln()._compositionKey}function It(l,i){return l=(i||Cr())._nodeMap.get(l),l===void 0?null:l}function gr(l,i){let s=ln();return l=l[`__lexicalKey_${s._key}`],l!==void 0?It(l,i):null}function wr(l,i){for(;l!=null;){let s=gr(l,i);if(s!==null)return s;l=mr(l)}return null}function Bi(l){let i=Object.assign({},l._decorators);return l._pendingDecorators=i}function ms(l){return l.read(()=>fn().getTextContent())}function _s(l,i){lr(l,()=>{var s=Cr();if(!s.isEmpty())if(i==="root")fn().markDirty();else{s=s._nodeMap;for(let[,g]of s)g.markDirty()}},l._pendingEditorState===null?{tag:"history-merge"}:void 0)}function fn(){return Cr()._nodeMap.get("root")}function pr(l){Xn();let i=Cr();l!==null&&(l.dirty=!0,l.setCachedNodes(null)),i._selection=l}function Qr(l){var i=ln(),s;e:{for(s=l;s!=null;){let g=s[`__lexicalKey_${i._key}`];if(g!==void 0){s=g;break e}s=mr(s)}s=null}return s===null?(i=i.getRootElement(),l===i?It("root"):null):It(s)}function ys(l){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(l)}function ye(l){let i=[];for(;l!==null;)i.push(l),l=l._parentEditor;return i}function Ge(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function et(l,i,s){if(i=Ir(i._window),i!==null){var g=i.anchorNode,{anchorOffset:N,focusOffset:S}=i;if(g!==null&&(i=g.nodeType===3?g.nodeValue:null,g=wr(g),i!==null&&ht(g))){if(i===Te&&s){let b=s.length;i=s,S=N=b}i!==null&&Ct(g,i,N,S,l)}}}function Ct(l,i,s,g,N){let S=l;if(S.isAttached()&&(N||!S.isDirty())){let Se=S.isComposing(),Fe=i;if((Se||N)&&i[i.length-1]===Te&&(Fe=i.slice(0,-1)),i=S.getTextContent(),N||Fe!==i)if(Fe==="")if(At(null),R||Z||ae)S.remove();else{let Ke=ln();setTimeout(()=>{Ke.update(()=>{S.isAttached()&&S.remove()})},20)}else{N=S.getParent(),i=Gi();var b=S.getTextContentSize(),X=zt(),me=S.getKey();S.isToken()||X!==null&&me===X&&!Se||wt(i)&&(N!==null&&!N.canInsertTextBefore()&&i.anchor.offset===0||i.anchor.key===l.__key&&i.anchor.offset===0&&!S.canInsertTextBefore()||i.focus.key===l.__key&&i.focus.offset===b&&!S.canInsertTextAfter())?S.markDirty():(l=jt(),wt(l)&&s!==null&&g!==null&&(l.setTextNodeRange(S,s,S,g),S.isSegmented()&&(s=S.getTextContent(),s=Wn(s),S.replace(s),S=s)),S.setTextContent(Fe))}}}function Bt(l,i){if(i.isSegmented())return!0;if(!l.isCollapsed())return!1;l=l.anchor.offset;let s=i.getParentOrThrow(),g=i.isToken();return l===0?((l=!i.canInsertTextBefore()||!s.canInsertTextBefore()||g)||(i=i.getPreviousSibling(),l=(ht(i)||Ze(i)&&i.isInline())&&!i.canInsertTextAfter()),l):l===i.getTextContentSize()?!i.canInsertTextAfter()||!s.canInsertTextAfter()||g:!1}function Kt(l,i){l.__lexicalClassNameCache===void 0&&(l.__lexicalClassNameCache={});let s=l.__lexicalClassNameCache,g=s[i];return g!==void 0?g:(l=l[i],typeof l=="string"?(l=l.split(" "),s[i]=l):l)}function $t(l,i,s,g,N){s.size!==0&&(s=g.__type,g=g.__key,i=i.get(s),i===void 0&&Y(33,s),s=i.klass,i=l.get(s),i===void 0&&(i=new Map,l.set(s,i)),l=i.get(g),s=l==="destroyed"&&N==="created",(l===void 0||s)&&i.set(g,s?"updated":N))}function Pt(l,i,s){let g=l.getParent(),N=s;return g!==null&&(i&&s===0?(N=l.getIndexWithinParent(),l=g):i||s!==l.getChildrenSize()||(N=l.getIndexWithinParent()+1,l=g)),l.getChildAtIndex(i?N-1:N)}function mn(l,i){var s=l.offset;return l.type==="element"?(l=l.getNode(),Pt(l,i,s)):(l=l.getNode(),i&&s===0||!i&&s===l.getTextContentSize()?(s=i?l.getPreviousSibling():l.getNextSibling(),s===null?Pt(l.getParentOrThrow(),i,l.getIndexWithinParent()+(i?0:1)):s):null)}function sn(l){return l=(l=Zn(l).event)&&l.inputType,l==="insertFromPaste"||l==="insertFromPasteAsQuotation"}function tn(l){return!nr(l)&&!l.isLastChild()&&!l.isInline()}function Bn(l,i){return l=l._keyToDOMMap.get(i),l===void 0&&Y(75,i),l}function mr(l){return l=l.assignedSlot||l.parentElement,l!==null&&l.nodeType===11?l.host:l}function _i(l,i){for(l=l.getParent();l!==null;){if(l.is(i))return!0;l=l.getParent()}return!1}function Zn(l){return l=l._window,l===null&&Y(78),l}function dl(l){for(l=l.getParentOrThrow();l!==null&&!ei(l);)l=l.getParentOrThrow();return l}function ei(l){return nr(l)||Ze(l)&&l.isShadowRoot()}function fl(l){return l=l.constructor.clone(l),bt(l,null),l}function Hi(l){var i=ln();let s=l.constructor.getType();return i=i._nodes.get(s),i===void 0&&Y(97),i=i.replace,i!==null?(i=i(l),i instanceof l.constructor||Y(98),i):l}function Cs(l,i){l=l.getParent(),!nr(l)||Ze(i)||an(i)||Y(99)}function hl(l){return(an(l)||Ze(l)&&!l.canBeEmpty())&&!l.isInline()}function gl(l,i,s){s.style.removeProperty("caret-color"),i._blockCursorElement=null,i=l.parentElement,i!==null&&i.removeChild(l)}function Ir(l){return U?(l||window).getSelection():null}function Ns(l,i){for(;l!==fn()&&l!=null;){if(i(l))return l;l=l.getParent()}return null}function Sc(l){let i=[],s=[l];for(;0<s.length;){let g=s.pop();g===void 0&&Y(112),Ze(g)&&s.unshift(...g.getChildren()),g!==l&&i.push(g)}return i}function oo(l){return l.nodeType===1}function ti(l){if(an(l)&&!l.isInline())return!0;if(!Ze(l)||ei(l))return!1;var i=l.getFirstChild();return i=i===null||Ti(i)||ht(i)||i.isInline(),!l.isInline()&&l.canBeEmpty()!==!1&&i}function Io(l,i){for(;l!==null&&l.getParent()!==null&&!i(l);)l=l.getParentOrThrow();return i(l)?l:null}function la(l,i,s,g,N,S){for(l=l.getFirstChild();l!==null;){let b=l.__key;l.__parent===i&&(Ze(l)&&la(l,b,s,g,N,S),s.has(b)||S.delete(b),N.push(b)),l=l.getNextSibling()}}function pl(l,i,s,g){l=l._nodeMap,i=i._nodeMap;let N=[];for(let[S]of g){let b=i.get(S);b===void 0||b.isAttached()||(Ze(b)&&la(b,S,l,i,N,g),l.has(S)||g.delete(S),N.push(S))}for(let S of N)i.delete(S);for(let S of s)g=i.get(S),g===void 0||g.isAttached()||(l.has(S)||s.delete(S),i.delete(S))}let On="",Ln="",Or="",yi,Hn,Po,Ci=!1,so=!1,Es,_n=null,Pr,En,Ni,_r,Ts,lo;function xs(l,i){let s=Ni.get(l);if(i!==null){let g=_l(l);g.parentNode===i&&i.removeChild(g)}_r.has(l)||Hn._keyToDOMMap.delete(l),Ze(s)&&(l=$o(s,Ni),Jn(l,0,l.length-1,null)),s!==void 0&&$t(lo,Po,Es,s,"destroyed")}function Jn(l,i,s,g){for(;i<=s;++i){let N=l[i];N!==void 0&&xs(N,g)}}function Ei(l,i){l.setProperty("text-align",i)}function Dr(l,i){var s=yi.theme.indent;if(typeof s=="string"){let g=l.classList.contains(s);0<i&&!g?l.classList.add(s):1>i&&g&&l.classList.remove(s)}s=getComputedStyle(l).getPropertyValue("--lexical-indent-base-value")||"40px",l.style.setProperty("padding-inline-start",i===0?"":`calc(${i} * ${s})`)}function aa(l,i){l=l.style,i===0?Ei(l,""):i===1?Ei(l,"left"):i===2?Ei(l,"center"):i===3?Ei(l,"right"):i===4?Ei(l,"justify"):i===5?Ei(l,"start"):i===6&&Ei(l,"end")}function ni(l,i,s){let g=_r.get(l);g===void 0&&Y(60);let N=g.createDOM(yi,Hn);var S=Hn._keyToDOMMap;if(N["__lexicalKey_"+Hn._key]=l,S.set(l,N),ht(g)?N.setAttribute("data-lexical-text","true"):an(g)&&N.setAttribute("data-lexical-decorator","true"),Ze(g)){if(l=g.__indent,S=g.__size,l!==0&&Dr(N,l),S!==0){--S,l=$o(g,_r);var b=Ln;Ln="",vs(l,g,0,S,N,null),Ss(g,N),Ln=b}l=g.__format,l!==0&&aa(N,l),g.isInline()||ml(null,g,N),tn(g)&&(On+=`
42
-
43
- `,Or+=`
44
-
45
- `)}else S=g.getTextContent(),an(g)?(b=g.decorate(Hn,yi),b!==null&&ws(l,b),N.contentEditable="false"):ht(g)&&(g.isDirectionless()||(Ln+=S)),On+=S,Or+=S;return i!==null&&(s!=null?i.insertBefore(N,s):(s=i.__lexicalLineBreak,s!=null?i.insertBefore(N,s):i.appendChild(N))),$t(lo,Po,Es,g,"created"),N}function vs(l,i,s,g,N,S){let b=On;for(On="";s<=g;++s)ni(l[s],N,S);tn(i)&&(On+=`
46
-
47
- `),N.__lexicalTextContent=On,On=b+On}function ca(l,i){return l=i.get(l),Ti(l)||an(l)&&l.isInline()}function ml(l,i,s){l=l!==null&&(l.__size===0||ca(l.__last,Ni)),i=i.__size===0||ca(i.__last,_r),l?i||(i=s.__lexicalLineBreak,i!=null&&s.removeChild(i),s.__lexicalLineBreak=null):i&&(i=document.createElement("br"),s.__lexicalLineBreak=i,s.appendChild(i))}function Ss(l,i){var s=i.__lexicalDir;if(i.__lexicalDirTextContent!==Ln||s!==_n){let S=Ln==="";if(S)var g=_n;else g=Ln,g=ze.test(g)?"rtl":oe.test(g)?"ltr":null;if(g!==s){let b=i.classList,X=yi.theme;var N=s!==null?X[s]:void 0;let me=g!==null?X[g]:void 0;N!==void 0&&(typeof N=="string"&&(N=N.split(" "),N=X[s]=N),b.remove(...N)),g===null||S&&g==="ltr"?i.removeAttribute("dir"):(me!==void 0&&(typeof me=="string"&&(s=me.split(" "),me=X[g]=s),me!==void 0&&b.add(...me)),i.dir=g),so||(l.getWritable().__dir=g)}_n=g,i.__lexicalDirTextContent=Ln,i.__lexicalDir=g}}function $o(l,i){let s=[];for(l=l.__first;l!==null;){let g=i.get(l);g===void 0&&Y(101),s.push(l),l=g.__next}return s}function ao(l,i){var s=Ni.get(l),g=_r.get(l);s!==void 0&&g!==void 0||Y(61);var N=Ci||En.has(l)||Pr.has(l);let S=Bn(Hn,l);if(s===g&&!N)return Ze(s)?(g=S.__lexicalTextContent,g!==void 0&&(On+=g,Or+=g),g=S.__lexicalDirTextContent,g!==void 0&&(Ln+=g)):(g=s.getTextContent(),ht(s)&&!s.isDirectionless()&&(Ln+=g),Or+=g,On+=g),S;if(s!==g&&N&&$t(lo,Po,Es,g,"updated"),g.updateDOM(s,S,yi))return g=ni(l,null,null),i===null&&Y(62),i.replaceChild(g,S),xs(l,null),g;if(Ze(s)&&Ze(g)){if(l=g.__indent,l!==s.__indent&&Dr(S,l),l=g.__format,l!==s.__format&&aa(S,l),N){l=g,N=Ln,Ln="",i=On;var b=s.__size,X=l.__size;if(On="",b===1&&X===1){var me=s.__first,Se=l.__first;if(me===Se)ao(me,S);else{var Fe=_l(me);Se=ni(Se,null,null),S.replaceChild(Se,Fe),xs(me,null)}}else{Se=$o(s,Ni);var Ke=$o(l,_r);if(b===0)X!==0&&vs(Ke,l,0,X-1,S,null);else if(X===0)b!==0&&(me=S.__lexicalLineBreak==null,Jn(Se,0,b-1,me?null:S),me&&(S.textContent=""));else{var Le=Se;Se=Ke,Ke=b-1,b=X-1;let Xe=S.firstChild,ut=0;for(X=0;ut<=Ke&&X<=b;){var be=Le[ut];let Tt=Se[X];if(be===Tt)Xe=Fo(ao(Tt,S)),ut++,X++;else{me===void 0&&(me=new Set(Le)),Fe===void 0&&(Fe=new Set(Se));let Rt=Fe.has(be),hn=me.has(Tt);Rt?(hn?(be=Bn(Hn,Tt),be===Xe?Xe=Fo(ao(Tt,S)):(Xe!=null?S.insertBefore(be,Xe):S.appendChild(be),ao(Tt,S)),ut++):ni(Tt,S,Xe),X++):(Xe=Fo(_l(be)),xs(be,S),ut++)}}me=ut>Ke,Fe=X>b,me&&!Fe?(me=Se[b+1],me=me===void 0?null:Hn.getElementByKey(me),vs(Se,l,X,b,S,me)):Fe&&!me&&Jn(Le,ut,Ke,S)}}tn(l)&&(On+=`
48
-
49
- `),S.__lexicalTextContent=On,On=i+On,Ss(l,S),Ln=N,nr(g)||g.isInline()||ml(s,g,S)}tn(g)&&(On+=`
50
-
51
- `,Or+=`
52
-
53
- `)}else s=g.getTextContent(),an(g)?(N=g.decorate(Hn,yi),N!==null&&ws(l,N)):ht(g)&&!g.isDirectionless()&&(Ln+=s),On+=s,Or+=s;return!so&&nr(g)&&g.__cachedText!==Or&&(g=g.getWritable(),g.__cachedText=Or),S}function ws(l,i){let s=Hn._pendingDecorators,g=Hn._decorators;if(s===null){if(g[l]===i)return;s=Bi(Hn)}s[l]=i}function Fo(l){return l=l.nextSibling,l!==null&&l===Hn._blockCursorElement&&(l=l.nextSibling),l}function _l(l){let i=Ts.get(l);return i===void 0&&Y(75,l),i}let ri=Object.freeze({}),yl=[["keydown",Mc],["pointerdown",Oc],["compositionstart",bc],["compositionend",Rc],["input",Dc],["click",wc],["cut",ri],["copy",ri],["dragstart",ri],["dragover",ri],["dragend",ri],["paste",ri],["focus",ri],["blur",ri],["drop",ri]];y&&yl.push(["beforeinput",(l,i)=>ya(l,i)]);let Bo=0,ua=0,da=0,co=null,Ho=0,Cl=!1,Nl=!1,Wo=!1,Ko=!1,fa=[0,"",0,"root",0];function ha(l,i,s,g,N){let S=l.anchor,b=l.focus,X=S.getNode();var me=ln();let Se=Ir(me._window),Fe=Se!==null?Se.anchorNode:null,Ke=S.key;me=me.getElementByKey(Ke);let Le=s.length;return Ke!==b.key||!ht(X)||(!N&&(!y||da<g+50)||X.isDirty()&&2>Le||ys(s))&&S.offset!==b.offset&&!X.isComposing()||Et(X)||X.isDirty()&&1<Le||(N||!y)&&me!==null&&!X.isComposing()&&Fe!==St(me)||Se!==null&&i!==null&&(!i.collapsed||i.startContainer!==Se.anchorNode||i.startOffset!==Se.anchorOffset)||X.getFormat()!==l.format||X.getStyle()!==l.style||Bt(l,X)}function ga(l,i){return l!==null&&l.nodeValue!==null&&l.nodeType===3&&i!==0&&i!==l.nodeValue.length}function pa(l,i,s){let{anchorNode:g,anchorOffset:N,focusNode:S,focusOffset:b}=l;Cl&&(Cl=!1,ga(g,N)&&ga(S,b))||lr(i,()=>{if(!s)pr(null);else if(nt(i,g,S)){var X=jt();if(wt(X)){var me=X.anchor,Se=me.getNode();if(X.isCollapsed()){l.type==="Range"&&l.anchorNode===l.focusNode&&(X.dirty=!0);var Fe=Zn(i).event;Fe=Fe?Fe.timeStamp:performance.now();let[Le,be,Xe,ut,Tt]=fa;var Ke=fn();Ke=i.isComposing()===!1&&Ke.getTextContent()==="",Fe<Tt+200&&me.offset===Xe&&me.key===ut?(X.format=Le,X.style=be):me.type==="text"?(X.format=Se.getFormat(),X.style=Se.getStyle()):me.type!=="element"||Ke||(X.format=0,X.style="")}else{me=255,Se=!1,Fe=X.getNodes(),Ke=Fe.length;for(let Le=0;Le<Ke;Le++){let be=Fe[Le];if(ht(be)&&(Se=!0,me&=be.getFormat(),me===0))break}X.format=Se?me:0}}ot(i,t,void 0)}})}function wc(l,i){lr(i,()=>{let s=jt();var g=Ir(i._window);let N=Gi();if(g)if(wt(s)){let b=s.anchor;var S=b.getNode();b.type==="element"&&b.offset===0&&s.isCollapsed()&&!nr(S)&&fn().getChildrenSize()===1&&S.getTopLevelElementOrThrow().isEmpty()&&N!==null&&s.is(N)?(g.removeAllRanges(),s.dirty=!0):l.detail!==3||s.isCollapsed()||(g=s.focus.getNode(),S!==g&&(Ze(S)?S.select(0):S.getParentOrThrow().select(0)))}else l.pointerType==="touch"&&(S=g.anchorNode,S!==null&&(S=S.nodeType,S===1||S===3))&&(g=Kn(N,g,i),pr(g));ot(i,e,l)})}function Oc(l,i){let s=l.target;l=l.pointerType,s instanceof Node&&l!=="touch"&&lr(i,()=>{an(wr(s))||(Nl=!0)})}function ma(l){return l.getTargetRanges?(l=l.getTargetRanges(),l.length===0?null:l[0]):null}function _a(l,i){return l!==i||Ze(l)||Ze(i)||!l.isToken()||!i.isToken()}function ya(l,i){let s=l.inputType,g=ma(l);s==="deleteCompositionText"||m&&sn(i)||s!=="insertCompositionText"&&lr(i,()=>{let N=jt();if(s==="deleteContentBackward"){if(N===null){var S=Gi();if(!wt(S))return;pr(S.clone())}if(wt(N)){ue&&At(N.anchor.key),ua===229&&l.timeStamp<Bo+30&&i.isComposing()&&N.anchor.key===N.focus.key?(At(null),Bo=0,setTimeout(()=>{lr(i,()=>{At(null)})},30),wt(N)&&(S=N.anchor.getNode(),S.markDirty(),N.format=S.getFormat(),N.style=S.getStyle()),1>=N.anchor.getNode().getTextContent().length&&(l.preventDefault(),ot(i,n,!0))):(l.preventDefault(),ot(i,n,!0));return}}if(wt(N)){S=l.data,co!==null&&et(!1,i,co),N.dirty&&co===null||!N.isCollapsed()||nr(N.anchor.getNode())||g===null||N.applyDOMRange(g),co=null;var b=N.focus,X=N.anchor.getNode();if(b=b.getNode(),s==="insertText"||s==="insertTranspose")S===`
54
- `?(l.preventDefault(),ot(i,r,!1)):S===`
55
-
56
- `?(l.preventDefault(),ot(i,c,void 0)):S==null&&l.dataTransfer?(S=l.dataTransfer.getData("text/plain"),l.preventDefault(),N.insertRawText(S)):S!=null&&ha(N,g,S,l.timeStamp,!0)?(l.preventDefault(),ot(i,d,S)):co=S,da=l.timeStamp;else switch(l.preventDefault(),s){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":ot(i,d,l);break;case"insertFromComposition":At(null),ot(i,d,l);break;case"insertLineBreak":At(null),ot(i,r,!1);break;case"insertParagraph":At(null),Wo&&!Z?(Wo=!1,ot(i,r,!1)):ot(i,c,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":ot(i,f,l);break;case"deleteByComposition":_a(X,b)&&ot(i,p,l);break;case"deleteByDrag":case"deleteByCut":ot(i,p,l);break;case"deleteContent":ot(i,n,!1);break;case"deleteWordBackward":ot(i,C,!0);break;case"deleteWordForward":ot(i,C,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":ot(i,x,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":ot(i,x,!1);break;case"formatStrikeThrough":ot(i,T,"strikethrough");break;case"formatBold":ot(i,T,"bold");break;case"formatItalic":ot(i,T,"italic");break;case"formatUnderline":ot(i,T,"underline");break;case"historyUndo":ot(i,O,void 0);break;case"historyRedo":ot(i,M,void 0)}}})}function Dc(l,i){l.stopPropagation(),lr(i,()=>{var s=jt(),g=l.data,N=ma(l);if(g!=null&&wt(s)&&ha(s,N,g,l.timeStamp,!1)){Ko&&(El(i,g),Ko=!1);var S=s.anchor,b=S.getNode();if(N=Ir(i._window),N===null)return;let X=S.offset;(S=y&&!s.isCollapsed()&&ht(b)&&N.anchorNode!==null)&&(b=b.getTextContent().slice(0,X)+g+b.getTextContent().slice(X+s.focus.offset),N=N.anchorNode,S=b===(N.nodeType===3?N.nodeValue:null)),S||ot(i,d,g),g=g.length,m&&1<g&&l.inputType==="insertCompositionText"&&!i.isComposing()&&(s.anchor.offset-=g),R||Z||ae||!i.isComposing()||(Bo=0,At(null))}else et(!1,i,g!==null?g:void 0),Ko&&(El(i,g||void 0),Ko=!1);Xn(),s=ln(),Oe(s)}),co=null}function bc(l,i){lr(i,()=>{let s=jt();if(wt(s)&&!i.isComposing()){let g=s.anchor,N=s.anchor.getNode();At(g.key),(l.timeStamp<Bo+30||g.type==="element"||!s.isCollapsed()||N.getFormat()!==s.format||N.getStyle()!==s.style)&&ot(i,d,Ae)}})}function El(l,i){var s=l._compositionKey;if(At(null),s!==null&&i!=null){if(i===""){i=It(s),l=St(l.getElementByKey(s)),l!==null&&l.nodeValue!==null&&ht(i)&&Ct(i,l.nodeValue,null,null,!0);return}if(i[i.length-1]===`
57
- `&&(s=jt(),wt(s))){i=s.focus,s.anchor.set(i.key,i.offset,i.type),ot(l,H,null);return}}et(!0,l,i)}function Rc(l,i){m?Ko=!0:lr(i,()=>{El(i,l.data)})}function Mc(l,i){if(Bo=l.timeStamp,ua=l.keyCode,!i.isComposing()){var{keyCode:s,shiftKey:g,ctrlKey:N,metaKey:S,altKey:b}=l;if(!ot(i,A,l)){if(s!==39||N||S||b)if(s!==39||b||g||!N&&!S)if(s!==37||N||S||b)if(s!==37||b||g||!N&&!S)if(s!==38||N||S)if(s!==40||N||S)if(s===13&&g)Wo=!0,ot(i,H,l);else if(s===32)ot(i,z,l);else if(k&&N&&s===79)l.preventDefault(),Wo=!0,ot(i,r,!0);else if(s!==13||g){var X=k?b||S?!1:s===8||s===72&&N:N||b||S?!1:s===8;X?s===8?ot(i,te,l):(l.preventDefault(),ot(i,n,!0)):s===27?ot(i,re,l):(X=k?g||b||S?!1:s===46||s===68&&N:N||b||S?!1:s===46,X?s===46?ot(i,ce,l):(l.preventDefault(),ot(i,n,!1)):s===8&&(k?b:N)?(l.preventDefault(),ot(i,C,!0)):s===46&&(k?b:N)?(l.preventDefault(),ot(i,C,!1)):k&&S&&s===8?(l.preventDefault(),ot(i,x,!0)):k&&S&&s===46?(l.preventDefault(),ot(i,x,!1)):s===66&&!b&&(k?S:N)?(l.preventDefault(),ot(i,T,"bold")):s===85&&!b&&(k?S:N)?(l.preventDefault(),ot(i,T,"underline")):s===73&&!b&&(k?S:N)?(l.preventDefault(),ot(i,T,"italic")):s!==9||b||N||S?s===90&&!g&&(k?S:N)?(l.preventDefault(),ot(i,O,void 0)):(X=k?s===90&&S&&g:s===89&&N||s===90&&N&&g,X?(l.preventDefault(),ot(i,M,void 0)):Vo(i._editorState._selection)?(X=g?!1:s===67?k?S:N:!1,X?(l.preventDefault(),ot(i,J,l)):(X=g?!1:s===88?k?S:N:!1,X?(l.preventDefault(),ot(i,ee,l)):s===65&&(k?S:N)&&(l.preventDefault(),ot(i,F,l)))):!m&&s===65&&(k?S:N)&&(l.preventDefault(),ot(i,F,l))):ot(i,q,l))}else Wo=!1,ot(i,H,l);else ot(i,W,l);else ot(i,$,l);else ot(i,K,l);else ot(i,P,l);else ot(i,w,l);else ot(i,v,l);(N||g||b||S)&&ot(i,ne,l)}}}function Ca(l){let i=l.__lexicalEventHandles;return i===void 0&&(i=[],l.__lexicalEventHandles=i),i}let uo=new Map;function Na(l){l=l.target;let i=Ir(l==null?null:l.nodeType===9?l.defaultView:l.ownerDocument.defaultView);if(i!==null){var s=_t(i.anchorNode);if(s!==null){Nl&&(Nl=!1,lr(s,()=>{var b=Gi(),X=i.anchorNode;X!==null&&(X=X.nodeType,X===1||X===3)&&(b=Kn(b,i,s),pr(b))})),l=ye(s),l=l[l.length-1];var g=l._key,N=uo.get(g),S=N||l;S!==s&&pa(i,S,!1),pa(i,s,!0),s!==l?uo.set(g,s):N&&uo.delete(g)}}}function Ac(l,i){Ho===0&&l.ownerDocument.addEventListener("selectionchange",Na),Ho++,l.__lexicalEditor=i;let s=Ca(l);for(let g=0;g<yl.length;g++){let[N,S]=yl[g],b=typeof S=="function"?X=>{X._lexicalHandled!==!0&&(X._lexicalHandled=!0,i.isEditable()&&S(X,i))}:X=>{if(X._lexicalHandled!==!0&&(X._lexicalHandled=!0,i.isEditable()))switch(N){case"cut":return ot(i,ee,X);case"copy":return ot(i,J,X);case"paste":return ot(i,f,X);case"dragstart":return ot(i,j,X);case"dragover":return ot(i,_e,X);case"dragend":return ot(i,pe,X);case"focus":return ot(i,D,X);case"blur":return ot(i,V,X);case"drop":return ot(i,G,X)}};l.addEventListener(N,b),s.push(()=>{l.removeEventListener(N,b)})}}function Tl(l,i,s){Xn();var g=l.__key;let N=l.getParent();if(N!==null){var S=jt();if(wt(S)&&Ze(l)){var{anchor:b,focus:X}=S,me=b.getNode(),Se=X.getNode();_i(me,l)&&b.set(l.__key,0,"element"),_i(Se,l)&&X.set(l.__key,0,"element")}if(me=S,Se=!1,wt(me)&&i){S=me.anchor;let Fe=me.focus;S.key===g&&(mo(S,l,N,l.getPreviousSibling(),l.getNextSibling()),Se=!0),Fe.key===g&&(mo(Fe,l,N,l.getPreviousSibling(),l.getNextSibling()),Se=!0)}else Vo(me)&&i&&l.isSelected()&&l.selectPrevious();wt(me)&&i&&!Se?(g=l.getIndexWithinParent(),xt(l),po(me,N,g,-1)):xt(l),s||ei(N)||N.canBeEmpty()||!N.isEmpty()||Tl(N,i),i&&nr(N)&&N.isEmpty()&&N.selectEnd()}}class ii{static getType(){Y(64,this.name)}static clone(){Y(65,this.name)}constructor(i){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,bt(this,i)}getType(){return this.__type}isAttached(){for(var i=this.__key;i!==null;){if(i==="root")return!0;if(i=It(i),i===null)break;i=i.__parent}return!1}isSelected(i){if(i=i||jt(),i==null)return!1;let s=i.getNodes().some(g=>g.__key===this.__key);return ht(this)?s:wt(i)&&i.anchor.type==="element"&&i.focus.type==="element"&&i.anchor.key===i.focus.key&&i.anchor.offset===i.focus.offset?!1:s}getKey(){return this.__key}getIndexWithinParent(){var i=this.getParent();if(i===null)return-1;i=i.getFirstChild();let s=0;for(;i!==null;){if(this.is(i))return s;s++,i=i.getNextSibling()}return-1}getParent(){let i=this.getLatest().__parent;return i===null?null:It(i)}getParentOrThrow(){let i=this.getParent();return i===null&&Y(66,this.__key),i}getTopLevelElement(){let i=this;for(;i!==null;){let s=i.getParent();if(ei(s))return i;i=s}return null}getTopLevelElementOrThrow(){let i=this.getTopLevelElement();return i===null&&Y(67,this.__key),i}getParents(){let i=[],s=this.getParent();for(;s!==null;)i.push(s),s=s.getParent();return i}getParentKeys(){let i=[],s=this.getParent();for(;s!==null;)i.push(s.__key),s=s.getParent();return i}getPreviousSibling(){let i=this.getLatest().__prev;return i===null?null:It(i)}getPreviousSiblings(){let i=[];var s=this.getParent();if(s===null)return i;for(s=s.getFirstChild();s!==null&&!s.is(this);)i.push(s),s=s.getNextSibling();return i}getNextSibling(){let i=this.getLatest().__next;return i===null?null:It(i)}getNextSiblings(){let i=[],s=this.getNextSibling();for(;s!==null;)i.push(s),s=s.getNextSibling();return i}getCommonAncestor(i){let s=this.getParents();var g=i.getParents();Ze(this)&&s.unshift(this),Ze(i)&&g.unshift(i),i=s.length;var N=g.length;if(i===0||N===0||s[i-1]!==g[N-1])return null;for(g=new Set(g),N=0;N<i;N++){let S=s[N];if(g.has(S))return S}return null}is(i){return i==null?!1:this.__key===i.__key}isBefore(i){if(this===i)return!1;if(i.isParentOf(this))return!0;if(this.isParentOf(i))return!1;var s=this.getCommonAncestor(i);let g=this;for(;;){var N=g.getParentOrThrow();if(N===s){N=g.getIndexWithinParent();break}g=N}for(g=i;;){if(i=g.getParentOrThrow(),i===s){s=g.getIndexWithinParent();break}g=i}return N<s}isParentOf(i){let s=this.__key;if(s===i.__key)return!1;for(;i!==null;){if(i.__key===s)return!0;i=i.getParent()}return!1}getNodesBetween(i){let s=this.isBefore(i),g=[],N=new Set;for(var S=this;;){var b=S.__key;if(N.has(b)||(N.add(b),g.push(S)),S===i)break;if(b=Ze(S)?s?S.getFirstChild():S.getLastChild():null,b!==null)S=b;else if(b=s?S.getNextSibling():S.getPreviousSibling(),b!==null)S=b;else{if(S=S.getParentOrThrow(),N.has(S.__key)||g.push(S),S===i)break;b=S;do b===null&&Y(68),S=s?b.getNextSibling():b.getPreviousSibling(),b=b.getParent(),b!==null&&(S!==null||N.has(b.__key)||g.push(b));while(S===null)}}return s||g.reverse(),g}isDirty(){let i=ln()._dirtyLeaves;return i!==null&&i.has(this.__key)}getLatest(){let i=It(this.__key);return i===null&&Y(113),i}getWritable(){Xn();var i=Cr(),s=ln();i=i._nodeMap;let g=this.__key,N=this.getLatest(),S=N.__parent;s=s._cloneNotNeeded;var b=jt();return Ol(b)&&b.setCachedNodes(null),s.has(g)?(Qt(N),N):(b=N.constructor.clone(N),b.__parent=S,b.__next=N.__next,b.__prev=N.__prev,Ze(N)&&Ze(b)?(b.__first=N.__first,b.__last=N.__last,b.__size=N.__size,b.__indent=N.__indent,b.__format=N.__format,b.__dir=N.__dir):ht(N)&&ht(b)&&(b.__format=N.__format,b.__style=N.__style,b.__mode=N.__mode,b.__detail=N.__detail),s.add(g),b.__key=g,Qt(b),i.set(g,b),b)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){Y(70)}updateDOM(){Y(71)}exportDOM(i){return{element:this.createDOM(i._config,i)}}exportJSON(){Y(72)}static importJSON(){Y(18,this.name)}static transform(){return null}remove(i){Tl(this,!0,i)}replace(i,s){Xn();var g=jt();g!==null&&(g=g.clone()),Cs(this,i);let N=this.getLatest(),S=this.__key,b=i.__key,X=i.getWritable();i=this.getParentOrThrow().getWritable();let me=i.__size;xt(X);let Se=N.getPreviousSibling(),Fe=N.getNextSibling(),Ke=N.__prev,Le=N.__next,be=N.__parent;return Tl(N,!1,!0),Se===null?i.__first=b:Se.getWritable().__next=b,X.__prev=Ke,Fe===null?i.__last=b:Fe.getWritable().__prev=b,X.__next=Le,X.__parent=be,i.__size=me,s&&this.getChildren().forEach(Xe=>{X.append(Xe)}),wt(g)&&(pr(g),s=g.anchor,g=g.focus,s.key===S&&Sl(s,X),g.key===S&&Sl(g,X)),zt()===S&&At(b),X}insertAfter(i,s=!0){Xn(),Cs(this,i);var g=this.getWritable();let N=i.getWritable();var S=N.getParent();let b=jt();var X=!1,me=!1;if(S!==null){var Se=i.getIndexWithinParent();xt(N),wt(b)&&(me=S.__key,X=b.anchor,S=b.focus,X=X.type==="element"&&X.key===me&&X.offset===Se+1,me=S.type==="element"&&S.key===me&&S.offset===Se+1)}S=this.getNextSibling(),Se=this.getParentOrThrow().getWritable();let Fe=N.__key,Ke=g.__next;return S===null?Se.__last=Fe:S.getWritable().__prev=Fe,Se.__size++,g.__next=Fe,N.__next=Ke,N.__prev=g.__key,N.__parent=g.__parent,s&&wt(b)&&(s=this.getIndexWithinParent(),po(b,Se,s+1),g=Se.__key,X&&b.anchor.set(g,s+2,"element"),me&&b.focus.set(g,s+2,"element")),i}insertBefore(i,s=!0){Xn(),Cs(this,i);var g=this.getWritable();let N=i.getWritable(),S=N.__key;xt(N);let b=this.getPreviousSibling(),X=this.getParentOrThrow().getWritable(),me=g.__prev,Se=this.getIndexWithinParent();return b===null?X.__first=S:b.getWritable().__next=S,X.__size++,g.__prev=S,N.__prev=me,N.__next=g.__key,N.__parent=g.__parent,g=jt(),s&&wt(g)&&(s=this.getParentOrThrow(),po(g,s,Se)),i}isParentRequired(){return!1}createParentElementNode(){return ar()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(i,s){Xn();let g=this.getPreviousSibling(),N=this.getParentOrThrow();return g===null?N.select(0,0):Ze(g)?g.select():ht(g)?g.select(i,s):(i=g.getIndexWithinParent()+1,N.select(i,i))}selectNext(i,s){Xn();let g=this.getNextSibling(),N=this.getParentOrThrow();return g===null?N.select():Ze(g)?g.select(0,0):ht(g)?g.select(i,s):(i=g.getIndexWithinParent(),N.select(i,i))}markDirty(){this.getWritable()}}function Ea(l,i,s){s=s||i.getParentOrThrow().getLastChild();let g=i;for(i=[i];g!==s;){if(!g.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");g=g.getNextSibling(),i.push(g)}for(let N of i)l=l.insertAfter(N)}class $r extends ii{static getType(){return"linebreak"}static clone(i){return new $r(i.__key)}constructor(i){super(i)}getTextContent(){return`
58
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:i=>{let s=i.parentElement,g,N;return s!==null&&((g=s.firstChild)===i||g.nextSibling===i&&g.nodeType===3&&(g.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((N=s.lastChild)===i||N.previousSibling===i&&N.nodeType===3&&(N.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:kc,priority:0}}}}static importJSON(){return Fr()}exportJSON(){return{type:"linebreak",version:1}}}function kc(){return{node:Fr()}}function Fr(){return Hi(new $r)}function Ti(l){return l instanceof $r}function xl(l,i){return i&16?"code":i&128?"mark":i&32?"sub":i&64?"sup":null}function Wi(l,i){return i&1?"strong":i&2?"em":"span"}function Uo(l,i,s,g,N){l=g.classList,g=Kt(N,"base"),g!==void 0&&l.add(...g),g=Kt(N,"underlineStrikethrough");let S=!1,b=i&8&&i&4;var X=s&8&&s&4;g!==void 0&&(X?(S=!0,b||l.add(...g)):b&&l.remove(...g));for(let me in ie)X=ie[me],g=Kt(N,me),g!==void 0&&(s&X?!S||me!=="underline"&&me!=="strikethrough"?(!(i&X)||b&&me==="underline"||me==="strikethrough")&&l.add(...g):i&X&&l.remove(...g):i&X&&l.remove(...g))}function vl(l,i,s){let g=i.firstChild;if(s=s.isComposing(),l+=s?Te:"",g==null)i.textContent=l;else if(i=g.nodeValue,i!==l)if(s||m){s=i.length;let N=l.length,S=0,b=0;for(;S<s&&S<N&&i[S]===l[S];)S++;for(;b+S<s&&b+S<N&&i[s-b-1]===l[N-b-1];)b++;l=[S,s-S-b,l.slice(S,N-b)];let[X,me,Se]=l;me!==0&&g.deleteData(X,me),g.insertData(X,Se)}else g.nodeValue=l}function zo(l,i){return i=document.createElement(i),i.appendChild(l),i}class oi extends ii{static getType(){return"text"}static clone(i){return new oi(i.__text,i.__key)}constructor(i,s){super(s),this.__text=i,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let i=this.getLatest();return Ye[i.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===zt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(i){return i=ie[i],(this.getFormat()&i)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(i,s){let g=this.getLatest().__format;return Ot(g,i,s)}createDOM(i){var s=this.__format,g=xl(this,s);let N=Wi(this,s),S=document.createElement(g===null?N:g),b=S;return this.hasFormat("code")&&S.setAttribute("spellcheck","false"),g!==null&&(b=document.createElement(N),S.appendChild(b)),g=b,vl(this.__text,g,this),i=i.theme.text,i!==void 0&&Uo(N,0,s,g,i),s=this.__style,s!==""&&(S.style.cssText=s),S}updateDOM(i,s,g){let N=this.__text;var S=i.__format,b=this.__format,X=xl(this,S);let me=xl(this,b);var Se=Wi(this,S);let Fe=Wi(this,b);return(X===null?Se:X)!==(me===null?Fe:me)?!0:X===me&&Se!==Fe?(S=s.firstChild,S==null&&Y(48),i=X=document.createElement(Fe),vl(N,i,this),g=g.theme.text,g!==void 0&&Uo(Fe,0,b,i,g),s.replaceChild(X,S),!1):(Se=s,me!==null&&X!==null&&(Se=s.firstChild,Se==null&&Y(49)),vl(N,Se,this),g=g.theme.text,g!==void 0&&S!==b&&Uo(Fe,S,b,Se,g),b=this.__style,i.__style!==b&&(s.style.cssText=b),!1)}static importDOM(){return{"#text":()=>({conversion:Os,priority:0}),b:()=>({conversion:st,priority:0}),code:()=>({conversion:xi,priority:0}),em:()=>({conversion:xi,priority:0}),i:()=>({conversion:xi,priority:0}),s:()=>({conversion:xi,priority:0}),span:()=>({conversion:Ta,priority:0}),strong:()=>({conversion:xi,priority:0}),sub:()=>({conversion:xi,priority:0}),sup:()=>({conversion:xi,priority:0}),u:()=>({conversion:xi,priority:0})}}static importJSON(i){let s=Wn(i.text);return s.setFormat(i.format),s.setDetail(i.detail),s.setMode(i.mode),s.setStyle(i.style),s}exportDOM(i){return{element:i}=super.exportDOM(i),i!==null&&oo(i)||Y(132),i.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(i=zo(i,"b")),this.hasFormat("italic")&&(i=zo(i,"i")),this.hasFormat("strikethrough")&&(i=zo(i,"s")),this.hasFormat("underline")&&(i=zo(i,"u")),{element:i}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(i){let s=this.getWritable();return s.__format=typeof i=="string"?ie[i]:i,s}setDetail(i){let s=this.getWritable();return s.__detail=typeof i=="string"?de[i]:i,s}setStyle(i){let s=this.getWritable();return s.__style=i,s}toggleFormat(i){let s=this.getFormat();return i=Ot(s,i,null),this.setFormat(i)}toggleDirectionless(){let i=this.getWritable();return i.__detail^=1,i}toggleUnmergeable(){let i=this.getWritable();return i.__detail^=2,i}setMode(i){if(i=Be[i],this.__mode===i)return this;let s=this.getWritable();return s.__mode=i,s}setTextContent(i){if(this.__text===i)return this;let s=this.getWritable();return s.__text=i,s}select(i,s){Xn();let g=jt();var N=this.getTextContent();let S=this.__key;if(typeof N=="string"?(N=N.length,i===void 0&&(i=N),s===void 0&&(s=N)):s=i=0,wt(g))N=zt(),N!==g.anchor.key&&N!==g.focus.key||At(S),g.setTextNodeRange(this,i,this,s);else return Vn(S,i,S,s,"text","text");return g}selectStart(){return this.select(0,0)}selectEnd(){let i=this.getTextContentSize();return this.select(i,i)}spliceText(i,s,g,N){let S=this.getWritable(),b=S.__text,X=g.length,me=i;0>me&&(me=X+me,0>me&&(me=0));let Se=jt();return N&&wt(Se)&&(i+=X,Se.setTextNodeRange(S,i,S,i)),s=b.slice(0,me)+g+b.slice(me+s),S.__text=s,S}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...i){Xn();var s=this.getLatest(),g=s.getTextContent(),N=s.__key,S=zt(),b=new Set(i);i=[];for(var X=g.length,me="",Se=0;Se<X;Se++)me!==""&&b.has(Se)&&(i.push(me),me=""),me+=g[Se];if(me!==""&&i.push(me),b=i.length,b===0)return[];if(i[0]===g)return[s];var Fe=i[0];g=s.getParentOrThrow(),Se=s.getFormat();let Ke=s.getStyle(),Le=s.__detail;X=!1,s.isSegmented()?(me=Wn(Fe),me.__format=Se,me.__style=Ke,me.__detail=Le,X=!0):(me=s.getWritable(),me.__text=Fe),s=jt(),me=[me],Fe=Fe.length;for(let ut=1;ut<b;ut++){var be=i[ut],Xe=be.length;be=Wn(be).getWritable(),be.__format=Se,be.__style=Ke,be.__detail=Le;let Tt=be.__key;if(Xe=Fe+Xe,wt(s)){let Rt=s.anchor,hn=s.focus;Rt.key===N&&Rt.type==="text"&&Rt.offset>Fe&&Rt.offset<=Xe&&(Rt.key=Tt,Rt.offset-=Fe,s.dirty=!0),hn.key===N&&hn.type==="text"&&hn.offset>Fe&&hn.offset<=Xe&&(hn.key=Tt,hn.offset-=Fe,s.dirty=!0)}S===N&&At(Tt),Fe=Xe,me.push(be)}return N=this.getPreviousSibling(),S=this.getNextSibling(),N!==null&&Qt(N),S!==null&&Qt(S),N=g.getWritable(),S=this.getIndexWithinParent(),X?(N.splice(S,0,me),this.remove()):N.splice(S,1,me),wt(s)&&po(s,g,S,b-1),me}mergeWithSibling(i){var s=i===this.getPreviousSibling();s||i===this.getNextSibling()||Y(50);var g=this.__key;let N=i.__key,S=this.__text,b=S.length;zt()===N&&At(g);let X=jt();if(wt(X)){let me=X.anchor,Se=X.focus;me!==null&&me.key===N&&(As(me,s,g,i,b),X.dirty=!0),Se!==null&&Se.key===N&&(As(Se,s,g,i,b),X.dirty=!0)}return g=i.__text,this.setTextContent(s?g+S:S+g),s=this.getWritable(),i.remove(),s}isTextEntity(){return!1}}function Ta(l){let i=l.style.fontWeight==="700",s=l.style.textDecoration==="line-through",g=l.style.fontStyle==="italic",N=l.style.textDecoration==="underline",S=l.style.verticalAlign;return{forChild:b=>(ht(b)&&(i&&b.toggleFormat("bold"),s&&b.toggleFormat("strikethrough"),g&&b.toggleFormat("italic"),N&&b.toggleFormat("underline"),S==="sub"&&b.toggleFormat("subscript"),S==="super"&&b.toggleFormat("superscript")),b),node:null}}function st(l){let i=l.style.fontWeight==="normal";return{forChild:s=>(ht(s)&&!i&&s.toggleFormat("bold"),s),node:null}}let Go=new WeakMap;function Os(l){l.parentElement===null&&Y(129);for(var i=l.textContent||"",s,g=l.parentNode,N=[l];g!==null&&(s=Go.get(g))===void 0&&!(g.nodeName==="PRE"||g.nodeType===1&&g.style!==void 0&&g.style.whiteSpace!==void 0&&g.style.whiteSpace.startsWith("pre"));)N.push(g),g=g.parentNode;for(s=s===void 0?g:s,g=0;g<N.length;g++)Go.set(N[g],s);if(s!==null){for(i=i.split(/(\r?\n|\t)/),l=[],N=i.length,s=0;s<N;s++)g=i[s],g===`
59
- `||g===`\r
60
- `?l.push(Fr()):g===" "?l.push(Ki()):g!==""&&l.push(Wn(g));return{node:l}}if(i=i.replace(/\r/g,"").replace(/[ \t\n]+/g," "),i==="")return{node:null};if(i[0]===" "){for(N=l,s=!0;N!==null&&(N=xa(N,!1))!==null;)if(g=N.textContent||"",0<g.length){/[ \t\n]$/.test(g)&&(i=i.slice(1)),s=!1;break}s&&(i=i.slice(1))}if(i[i.length-1]===" "){for(N=!0;l!==null&&(l=xa(l,!0))!==null;)if(0<(l.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){N=!1;break}N&&(i=i.slice(0,i.length-1))}return i===""?{node:null}:{node:Wn(i)}}let Ds=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function xa(l,i){for(;;){for(var s=void 0;(s=i?l.nextSibling:l.previousSibling)===null;)if(l=l.parentElement,l===null)return null;if(l=s,l.nodeType===1&&(s=l.style.display,s===""&&l.nodeName.match(Ds)===null||s!==""&&!s.startsWith("inline")))return null;for(;(s=i?l.firstChild:l.lastChild)!==null;)l=s;if(l.nodeType===3)return l;if(l.nodeName==="BR")return null}}let Lc={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function xi(l){let i=Lc[l.nodeName.toLowerCase()];return i===void 0?{node:null}:{forChild:s=>(ht(s)&&!s.hasFormat(i)&&s.toggleFormat(i),s),node:null}}function Wn(l=""){return Hi(new oi(l))}function ht(l){return l instanceof oi}class fo extends oi{static getType(){return"tab"}static clone(i){let s=new fo(i.__key);return s.__text=i.__text,s.__format=i.__format,s.__style=i.__style,s}constructor(i){super(" ",i),this.__detail=2}static importDOM(){return null}static importJSON(i){let s=Ki();return s.setFormat(i.format),s.setStyle(i.style),s}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){Y(126)}setDetail(){Y(127)}setMode(){Y(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ki(){return Hi(new fo)}function va(l){return l instanceof fo}class br{constructor(i,s,g){this._selection=null,this.key=i,this.offset=s,this.type=g}is(i){return this.key===i.key&&this.offset===i.offset&&this.type===i.type}isBefore(i){let s=this.getNode(),g=i.getNode(),N=this.offset;if(i=i.offset,Ze(s)){var S=s.getDescendantByIndex(N);s=S??s}return Ze(g)&&(S=g.getDescendantByIndex(i),g=S??g),s===g?N<i:s.isBefore(g)}getNode(){let i=It(this.key);return i===null&&Y(20),i}set(i,s,g){let N=this._selection,S=this.key;this.key=i,this.offset=s,this.type=g,li()||(zt()===S&&At(i),N!==null&&(N.setCachedNodes(null),N.dirty=!0))}}function Br(l,i){let s=i.__key,g=l.offset,N="element";if(ht(i))N="text",i=i.getTextContentSize(),g>i&&(g=i);else if(!Ze(i)){var S=i.getNextSibling();ht(S)?(s=S.__key,g=0,N="text"):(S=i.getParent())&&(s=S.__key,g=i.getIndexWithinParent()+1)}l.set(s,g,N)}function Sl(l,i){if(Ze(i)){let s=i.getLastDescendant();Ze(s)||ht(s)?Br(l,s):Br(l,i)}else Br(l,i)}function ho(l,i,s,g){let N=l.getNode(),S=N.getChildAtIndex(l.offset),b=Wn(),X=nr(N)?ar().append(b):b;b.setFormat(s),b.setStyle(g),S===null?N.append(X):S.insertBefore(X),l.is(i)&&i.set(b.__key,0,"text"),l.set(b.__key,0,"text")}function Hr(l,i,s,g){l.key=i,l.offset=s,l.type=g}class wl{constructor(i,s){this.anchor=i,this.focus=s,i._selection=this,s._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(i){this._cachedNodes=i}is(i){return Ol(i)?this.anchor.is(i.anchor)&&this.focus.is(i.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return zi(this)}}class go{constructor(i){this.dirty=!1,this._nodes=i,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(i){this._cachedNodes=i}is(i){if(!Vo(i))return!1;let s=this._nodes,g=i._nodes;return s.size===g.size&&Array.from(s).every(N=>g.has(N))}add(i){this.dirty=!0,this._nodes.add(i),this._cachedNodes=null}delete(i){this.dirty=!0,this._nodes.delete(i),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(i){return this._nodes.has(i)}clone(){return new go(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(i){let s=this.getNodes(),g=s.length;var N=s[g-1];if(ht(N))N=N.select();else{let S=N.getIndexWithinParent()+1;N=N.getParentOrThrow().select(S,S)}for(N.insertNodes(i),i=0;i<g;i++)s[i].remove()}getNodes(){var i=this._cachedNodes;if(i!==null)return i;var s=this._nodes;i=[];for(let g of s)s=It(g),s!==null&&i.push(s);return li()||(this._cachedNodes=i),i}getTextContent(){let i=this.getNodes(),s="";for(let g=0;g<i.length;g++)s+=i[g].getTextContent();return s}}function wt(l){return l instanceof Ui}function Ol(l){return l instanceof wl}function yr(l){let[i,,s]=si(l);l=s.getChildren();let g=l.length;var N=l[0].getChildren().length;let S=Array(g);for(var b=0;b<g;b++)S[b]=Array(N);for(N=0;N<g;N++){b=l[N].getChildren();let X=0;for(let me=0;me<b.length;me++){for(;S[N][X];)X++;let Se=b[me],Fe=Se.__rowSpan||1,Ke=Se.__colSpan||1;for(let Le=0;Le<Fe;Le++)for(let be=0;be<Ke;be++)S[N+Le][X+be]=Se;if(i===Se)return{colSpan:Ke,columnIndex:X,rowIndex:N,rowSpan:Fe};X+=Ke}}return null}class bs extends wl{constructor(i,s,g){super(s,g),this.gridKey=i}getCachedNodes(){return this._cachedNodes}setCachedNodes(i){this._cachedNodes=i}is(i){return Yo(i)?this.gridKey===i.gridKey&&this.anchor.is(i.anchor)&&this.focus.is(i.focus):!1}set(i,s,g){this.dirty=!0,this.gridKey=i,this.anchor.key=s,this.focus.key=g,this._cachedNodes=null}clone(){return new bs(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(i){let s=this.focus.getNode();Qe(s.select(0,s.getChildrenSize())).insertNodes(i)}getShape(){var i=It(this.anchor.key);if(Nr(i)||Y(103),i=yr(i),i===null)throw Error("getCellRect: expected to find AnchorNode");var s=It(this.focus.key);Nr(s)||Y(104);let g=yr(s);if(g===null)throw Error("getCellRect: expected to find focusCellNode");s=Math.min(i.columnIndex,g.columnIndex);let N=Math.max(i.columnIndex,g.columnIndex),S=Math.min(i.rowIndex,g.rowIndex);return i=Math.max(i.rowIndex,g.rowIndex),{fromX:Math.min(s,N),fromY:Math.min(S,i),toX:Math.max(s,N),toY:Math.max(S,i)}}getNodes(){function i(Tt){let{cell:Rt,startColumn:hn,startRow:cr}=Tt;Se=Math.min(Se,hn),Fe=Math.min(Fe,cr),Ke=Math.max(Ke,hn+Rt.__colSpan-1),Le=Math.max(Le,cr+Rt.__rowSpan-1)}var s=this._cachedNodes;if(s!==null)return s;var g=this.anchor.getNode();s=this.focus.getNode();var N=Ns(g,Nr);g=Ns(s,Nr),Nr(N)||Y(103),Nr(g)||Y(104),s=N.getParent(),Qo(s)||Y(105),s=s.getParent(),Ps(s)||Y(106);var S=g.getParents()[1];if(S!==s){if(s.isParentOf(g)){if(s=S.getParent(),s==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,g.getKey(),s.getKey())}else{if(s=s.getParent(),s==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,s.getKey(),g.getKey())}return this.getNodes()}let[b,X,me]=Si(s,N,g),Se=Math.min(X.startColumn,me.startColumn),Fe=Math.min(X.startRow,me.startRow),Ke=Math.max(X.startColumn+X.cell.__colSpan-1,me.startColumn+me.cell.__colSpan-1),Le=Math.max(X.startRow+X.cell.__rowSpan-1,me.startRow+me.cell.__rowSpan-1);g=Se,N=Fe,S=Se;for(var be=Fe;Se<g||Fe<N||Ke>S||Le>be;){if(Se<g){var Xe=be-N;--g;for(var ut=0;ut<=Xe;ut++)i(b[N+ut][g])}if(Fe<N)for(Xe=S-g,--N,ut=0;ut<=Xe;ut++)i(b[N][g+ut]);if(Ke>S)for(Xe=be-N,S+=1,ut=0;ut<=Xe;ut++)i(b[N+ut][S]);if(Le>be)for(Xe=S-g,be+=1,ut=0;ut<=Xe;ut++)i(b[be][g+ut])}for(s=[s],g=null,N=Fe;N<=Le;N++)for(S=Se;S<=Ke;S++)({cell:be}=b[N][S]),Xe=be.getParent(),Qo(Xe)||Y(107),Xe!==g&&s.push(Xe),s.push(be,...Sc(be)),g=Xe;return li()||(this._cachedNodes=s),s}getTextContent(){let i=this.getNodes(),s="";for(let g=0;g<i.length;g++)s+=i[g].getTextContent();return s}}function Yo(l){return l instanceof bs}class Ui extends wl{constructor(i,s,g,N){super(i,s),this.format=g,this.style=N}getCachedNodes(){return this._cachedNodes}setCachedNodes(i){this._cachedNodes=i}is(i){return wt(i)?this.anchor.is(i.anchor)&&this.focus.is(i.focus)&&this.format===i.format&&this.style===i.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var i=this._cachedNodes;if(i!==null)return i;i=this.anchor;var s=this.focus,g=i.isBefore(s),N=g?i:s;g=g?s:i,i=N.getNode(),s=g.getNode();let S=N.offset;return N=g.offset,Ze(i)&&(g=i.getDescendantByIndex(S),i=g??i),Ze(s)&&(g=s.getDescendantByIndex(N),g!==null&&g!==i&&s.getChildAtIndex(N)===g&&(g=g.getPreviousSibling()),s=g??s),i=i.is(s)?Ze(i)&&0<i.getChildrenSize()?[]:[i]:i.getNodesBetween(s),li()||(this._cachedNodes=i),i}setTextNodeRange(i,s,g,N){Hr(this.anchor,i.__key,s,"text"),Hr(this.focus,g.__key,N,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let i=this.getNodes();if(i.length===0)return"";let s=i[0],g=i[i.length-1],N=this.anchor,S=this.focus,b=N.isBefore(S),[X,me]=zi(this),Se="",Fe=!0;for(let Ke=0;Ke<i.length;Ke++){let Le=i[Ke];if(Ze(Le)&&!Le.isInline())Fe||(Se+=`
61
- `),Fe=!Le.isEmpty();else if(Fe=!1,ht(Le)){let be=Le.getTextContent();Le===s?Le===g?(N.type!=="element"||S.type!=="element"||S.offset===N.offset)&&(be=X<me?be.slice(X,me):be.slice(me,X)):be=b?be.slice(X):be.slice(me):Le===g&&(be=b?be.slice(0,me):be.slice(0,X)),Se+=be}else!an(Le)&&!Ti(Le)||Le===g&&this.isCollapsed()||(Se+=Le.getTextContent())}return Se}applyDOMRange(i){let s=ln(),g=s.getEditorState()._selection;if(i=Tn(i.startContainer,i.startOffset,i.endContainer,i.endOffset,s,g),i!==null){var[N,S]=i;Hr(this.anchor,N.key,N.offset,N.type),Hr(this.focus,S.key,S.offset,S.type),this._cachedNodes=null}}clone(){let i=this.anchor,s=this.focus;return new Ui(new br(i.key,i.offset,i.type),new br(s.key,s.offset,s.type),this.format,this.style)}toggleFormat(i){this.format=Ot(this.format,i,null),this.dirty=!0}setStyle(i){this.style=i,this.dirty=!0}hasFormat(i){return(this.format&ie[i])!==0}insertRawText(i){i=i.split(/(\r?\n|\t)/);let s=[],g=i.length;for(let N=0;N<g;N++){let S=i[N];S===`
62
- `||S===`\r
63
- `?s.push(Fr()):S===" "?s.push(Ki()):s.push(Wn(S))}this.insertNodes(s)}insertText(i){var s=this.anchor,g=this.focus,N=this.isCollapsed()||s.isBefore(g),S=this.format,b=this.style;N&&s.type==="element"?ho(s,g,S,b):N||g.type!=="element"||ho(g,s,S,b);var X=this.getNodes(),me=X.length,Se=N?g:s;g=(N?s:g).offset;var Fe=Se.offset;s=X[0],ht(s)||Y(26),N=s.getTextContent().length;var Ke=s.getParentOrThrow(),Le=X[me-1];if(this.isCollapsed()&&g===N&&(s.isSegmented()||s.isToken()||!s.canInsertTextAfter()||!Ke.canInsertTextAfter()&&s.getNextSibling()===null)){var be=s.getNextSibling();if(ht(be)&&be.canInsertTextBefore()&&!Et(be)||(be=Wn(),be.setFormat(S),Ke.canInsertTextAfter()?s.insertAfter(be):Ke.insertAfter(be)),be.select(0,0),s=be,i!==""){this.insertText(i);return}}else if(this.isCollapsed()&&g===0&&(s.isSegmented()||s.isToken()||!s.canInsertTextBefore()||!Ke.canInsertTextBefore()&&s.getPreviousSibling()===null)){if(be=s.getPreviousSibling(),(!ht(be)||Et(be))&&(be=Wn(),be.setFormat(S),Ke.canInsertTextBefore()?s.insertBefore(be):Ke.insertBefore(be)),be.select(),s=be,i!==""){this.insertText(i);return}}else if(s.isSegmented()&&g!==N)Ke=Wn(s.getTextContent()),Ke.setFormat(S),s.replace(Ke),s=Ke;else if(!(this.isCollapsed()||i===""||(be=Le.getParent(),Ke.canInsertTextBefore()&&Ke.canInsertTextAfter()&&(!Ze(be)||be.canInsertTextBefore()&&be.canInsertTextAfter())))){this.insertText(""),wa(this.anchor,this.focus,null),this.insertText(i);return}if(me===1)if(s.isToken())i=Wn(i),i.select(),s.replace(i);else{if(X=s.getFormat(),me=s.getStyle(),g===Fe&&(X!==S||me!==b))if(s.getTextContent()==="")s.setFormat(S),s.setStyle(b);else{X=Wn(i),X.setFormat(S),X.setStyle(b),X.select(),g===0?s.insertBefore(X,!1):([me]=s.splitText(g),me.insertAfter(X,!1)),X.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=i.length);return}else if(va(s)){i=Wn(i),i.setFormat(S),i.setStyle(b),i.select(),s.replace(i);return}s=s.spliceText(g,Fe-g,i,!0),s.getTextContent()===""?s.remove():this.anchor.type==="text"&&(s.isComposing()?this.anchor.offset-=i.length:(this.format=X,this.style=me))}else{if(S=new Set([...s.getParentKeys(),...Le.getParentKeys()]),be=Ze(s)?s:s.getParentOrThrow(),b=Ze(Le)?Le:Le.getParentOrThrow(),Ke=Le,!be.is(b)&&b.isInline())do Ke=b,b=b.getParentOrThrow();while(b.isInline());if(Se.type==="text"&&(Fe!==0||Le.getTextContent()==="")||Se.type==="element"&&Le.getIndexWithinParent()<Fe)if(ht(Le)&&!Le.isToken()&&Fe!==Le.getTextContentSize()){if(Le.isSegmented()){var Xe=Wn(Le.getTextContent());Le.replace(Xe),Le=Xe}nr(Se.getNode())||Se.type!=="text"||(Le=Le.spliceText(0,Fe,"")),S.add(Le.__key)}else Se=Le.getParentOrThrow(),Se.canBeEmpty()||Se.getChildrenSize()!==1?Le.remove():Se.remove();else S.add(Le.__key);for(Se=b.getChildren(),Fe=new Set(X),Le=be.is(b),be=be.isInline()&&s.getNextSibling()===null?be:s,Xe=Se.length-1;0<=Xe;Xe--){let ut=Se[Xe];if(ut.is(s)||Ze(ut)&&ut.isParentOf(s))break;ut.isAttached()&&(!Fe.has(ut)||ut.is(Ke)?Le||be.insertAfter(ut,!1):ut.remove())}if(!Le)for(Se=b,b=null;Se!==null;)Fe=Se.getChildren(),Le=Fe.length,(Le===0||Fe[Le-1].is(b))&&(S.delete(Se.__key),b=Se),Se=Se.getParent();for(s.isToken()?g===N?s.select():(i=Wn(i),i.select(),s.replace(i)):(s=s.spliceText(g,N-g,i,!0),s.getTextContent()===""?s.remove():s.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=i.length)),i=1;i<me;i++)s=X[i],S.has(s.__key)||s.remove()}}removeText(){this.insertText("")}formatText(i){if(this.isCollapsed())this.toggleFormat(i),At(null);else{var s=this.getNodes(),g=[];for(var N of s)ht(N)&&g.push(N);var S=g.length;if(S===0)this.toggleFormat(i),At(null);else{N=this.anchor;var b=this.focus,X=this.isBackward();s=X?b:N,N=X?N:b;var me=0,Se=g[0];if(b=s.type==="element"?0:s.offset,s.type==="text"&&b===Se.getTextContentSize()&&(me=1,Se=g[1],b=0),Se!=null){X=Se.getFormatFlags(i,null);var Fe=S-1,Ke=g[Fe];if(S=N.type==="text"?N.offset:Ke.getTextContentSize(),Se.is(Ke))b!==S&&(b===0&&S===Se.getTextContentSize()?Se.setFormat(X):(i=Se.splitText(b,S),i=b===0?i[0]:i[1],i.setFormat(X),s.type==="text"&&s.set(i.__key,0,"text"),N.type==="text"&&N.set(i.__key,S-b,"text")),this.format=X);else{b!==0&&([,Se]=Se.splitText(b),b=0),Se.setFormat(X);var Le=Ke.getFormatFlags(i,X);for(0<S&&(S!==Ke.getTextContentSize()&&([Ke]=Ke.splitText(S)),Ke.setFormat(Le)),me+=1;me<Fe;me++){let be=g[me];if(!be.isToken()){let Xe=be.getFormatFlags(i,Le);be.setFormat(Xe)}}s.type==="text"&&s.set(Se.__key,b,"text"),N.type==="text"&&N.set(Ke.__key,S,"text"),this.format=X|Le}}}}}insertNodes(i){if(i.length!==0){if(this.anchor.key==="root"){this.insertParagraph();var s=jt();if(!wt(s))throw Error("Expected RangeSelection after insertParagraph");return s.insertNodes(i)}var g=Io(this.anchor.getNode(),ti);if(s=i[i.length-1],"__language"in g)if("__language"in i[0])this.insertText(i[0].getTextContent());else{var N=Zo(this);g.splice(N,0,i),s.selectEnd()}else if(i.some(X=>(Ze(X)||an(X))&&!X.isInline())){s=Jo(i),i=s.getLastDescendant();var S=s.getChildren();s=Ze(g)&&g.isEmpty()?null:this.insertParagraph(),N=S[S.length-1];var b=S[0];(X=>Ze(X)&&ti(X)&&!X.isEmpty()&&Ze(g)&&(!g.isEmpty()||"__value"in g&&"__checked"in g))(b)&&(g.append(...b.getChildren()),b=S[1]),b&&Ea(g,b),S=Io(i,ti),s&&Ze(S)&&("__value"in s&&"__checked"in s||ti(N))&&(S.append(...s.getChildren()),s.remove()),Ze(g)&&g.isEmpty()&&g.remove(),i.selectEnd(),i=Ze(g)?g.getLastChild():null,Ti(i)&&S!==g&&i.remove()}else N=Zo(this),g.splice(N,0,i),s.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var i=ar();return fn().splice(this.anchor.offset,0,[i]),i.select(),i}var s=Zo(this);return i=Io(this.anchor.getNode(),ti),s=(s=i.getChildAtIndex(s))?[s,...s.getNextSiblings()]:[],(i=i.insertNewAfter(this,!1))?(i.append(...s),i.selectStart(),i):null}insertLineBreak(i){var s=Fr();this.insertNodes([s]),i&&(i=s.getParentOrThrow(),s=s.getIndexWithinParent(),i.select(s,s))}extract(){var i=this.getNodes(),s=i.length,g=s-1,N=this.anchor;let S=this.focus;var b=i[0];let X=i[g],[me,Se]=zi(this);return s===0?[]:s===1?ht(b)&&!this.isCollapsed()?(i=me>Se?Se:me,g=b.splitText(i,me>Se?me:Se),i=i===0?g[0]:g[1],i!=null?[i]:[]):[b]:(s=N.isBefore(S),ht(b)&&(N=s?me:Se,N===b.getTextContentSize()?i.shift():N!==0&&([,b]=b.splitText(N),i[0]=b)),ht(X)&&(b=X.getTextContent().length,s=s?Se:me,s===0?i.pop():s!==b&&([X]=X.splitText(s),i[g]=X)),i)}modify(i,s,g){var N=this.focus,S=this.anchor,b=i==="move",X=mn(N,s);if(an(X)&&!X.isIsolated())b&&X.isKeyboardSelectable()?(s=Rr(),s.add(X.__key),pr(s)):(i=s?X.getPreviousSibling():X.getNextSibling(),ht(i)?(X=i.__key,s=s?i.getTextContent().length:0,N.set(X,s,"text"),b&&S.set(X,s,"text")):(g=X.getParentOrThrow(),Ze(i)?(g=i.__key,X=s?i.getChildrenSize():0):(X=X.getIndexWithinParent(),g=g.__key,s||X++),N.set(g,X,"element"),b&&S.set(g,X,"element")));else if(S=ln(),N=Ir(S._window)){var me=S._blockCursorElement,Se=S._rootElement;if(Se===null||me===null||!Ze(X)||X.isInline()||X.canBeEmpty()||gl(me,S,Se),N.modify(i,s?"backward":"forward",g),0<N.rangeCount&&(X=N.getRangeAt(0),S=this.anchor.getNode(),S=nr(S)?S:dl(S),this.applyDOMRange(X),this.dirty=!0,!b)){for(b=this.getNodes(),i=[],g=!1,me=0;me<b.length;me++)Se=b[me],_i(Se,S)?i.push(Se):g=!0;g&&0<i.length&&(s?(s=i[0],Ze(s)?s.selectStart():s.getParentOrThrow().selectStart()):(s=i[i.length-1],Ze(s)?s.selectEnd():s.getParentOrThrow().selectEnd())),(N.anchorNode!==X.startContainer||N.anchorOffset!==X.startOffset)&&(s=this.focus,b=this.anchor,N=b.key,X=b.offset,S=b.type,Hr(b,s.key,s.offset,s.type),Hr(s,N,X,S),this._cachedNodes=null)}}}deleteCharacter(i){let s=this.isCollapsed();if(this.isCollapsed()){var g=this.anchor,N=this.focus,S=g.getNode();if(!i&&(g.type==="element"&&Ze(S)&&g.offset===S.getChildrenSize()||g.type==="text"&&g.offset===S.getTextContentSize())){var b=S.getParent();if(b=S.getNextSibling()||(b===null?null:b.getNextSibling()),Ze(b)&&b.isShadowRoot())return}if(b=mn(N,i),an(b)&&!b.isIsolated()){b.isKeyboardSelectable()&&Ze(S)&&S.getChildrenSize()===0?(S.remove(),i=Rr(),i.add(b.__key),pr(i)):(b.remove(),ln().dispatchCommand(t,void 0));return}if(!i&&Ze(b)&&Ze(S)&&S.isEmpty()){S.remove(),b.selectStart();return}if(this.modify("extend",i,"character"),this.isCollapsed()){if(i&&g.offset===0&&(g.type==="element"?g.getNode():g.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(b=N.type==="text"?N.getNode():null,S=g.type==="text"?g.getNode():null,b!==null&&b.isSegmented()){if(g=N.offset,N=b.getTextContentSize(),b.is(S)||i&&g!==N||!i&&g!==0){Rs(b,i,g);return}}else if(S!==null&&S.isSegmented()&&(g=g.offset,N=S.getTextContentSize(),S.is(b)||i&&g!==0||!i&&g!==N)){Rs(S,i,g);return}if(S=this.anchor,b=this.focus,g=S.getNode(),N=b.getNode(),g===N&&S.type==="text"&&b.type==="text"){var X=S.offset,me=b.offset;let Se=X<me;N=Se?X:me,me=Se?me:X,X=me-1,N!==X&&(g=g.getTextContent().slice(N,me),ys(g)||(i?b.offset=X:S.offset=X))}}}this.removeText(),i&&!s&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(i=this.anchor.getNode(),i.isEmpty()&&nr(i.getParent())&&i.getIndexWithinParent()===0&&i.collapseAtStart(this))}deleteLine(i){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",i,"lineboundary"),(i?this.focus:this.anchor).offset===0&&this.modify("extend",i,"character")),this.removeText()}deleteWord(i){this.isCollapsed()&&this.modify("extend",i,"word"),this.removeText()}}function Vo(l){return l instanceof go}function jo(l){let i=l.offset;return l.type==="text"?i:(l=l.getNode(),i===l.getChildrenSize()?l.getTextContent().length:0)}function zi(l){let i=l.anchor;return l=l.focus,i.type==="element"&&l.type==="element"&&i.key===l.key&&i.offset===l.offset?[0,0]:[jo(i),jo(l)]}function Rs(l,i,s){let g=l.getTextContent().split(/(?=\s)/g),N=g.length,S=0,b=0;for(let X=0;X<N;X++){let me=g[X],Se=X===N-1;if(b=S,S+=me.length,i&&S===s||S>s||Se){g.splice(X,1),Se&&(b=void 0);break}}i=g.join("").trim(),i===""?l.remove():(l.setTextContent(i),l.select(b,b))}function Sa(l,i,s,g){var N=i;if(l.nodeType===1){let X=!1;var S=l.childNodes,b=S.length;N===b&&(X=!0,N=b-1);let me=S[N];if(b=!1,me===g._blockCursorElement?(me=S[N+1],b=!0):g._blockCursorElement!==null&&N--,g=Qr(me),ht(g))N=X?g.getTextContentSize():0;else{if(S=Qr(l),S===null)return null;if(Ze(S)?(l=S.getChildAtIndex(N),(i=Ze(l))&&(i=l.getParent(),i=s===null||i===null||!i.canBeEmpty()||i!==s.getNode()),i&&(s=X?l.getLastDescendant():l.getFirstDescendant(),s===null?(S=l,N=0):(l=s,S=Ze(l)?l:l.getParentOrThrow())),ht(l)?(g=l,S=null,N=X?l.getTextContentSize():0):l!==S&&X&&!b&&N++):(N=S.getIndexWithinParent(),N=i===0&&an(S)&&Qr(l)===S?N:N+1,S=S.getParentOrThrow()),Ze(S))return new br(S.__key,N,"element")}}else g=Qr(l);return ht(g)?new br(g.__key,N,"text"):null}function Dl(l,i,s){var g=l.offset,N=l.getNode();g===0?(g=N.getPreviousSibling(),N=N.getParent(),i?(s||!i)&&g===null&&Ze(N)&&N.isInline()&&(i=N.getPreviousSibling(),ht(i)&&(l.key=i.__key,l.offset=i.getTextContent().length)):Ze(g)&&!s&&g.isInline()?(l.key=g.__key,l.offset=g.getChildrenSize(),l.type="element"):ht(g)&&(l.key=g.__key,l.offset=g.getTextContent().length)):g===N.getTextContent().length&&(g=N.getNextSibling(),N=N.getParent(),i&&Ze(g)&&g.isInline()?(l.key=g.__key,l.offset=0,l.type="element"):(s||i)&&g===null&&Ze(N)&&N.isInline()&&!N.canInsertTextAfter()&&(i=N.getNextSibling(),ht(i)&&(l.key=i.__key,l.offset=0)))}function wa(l,i,s){if(l.type==="text"&&i.type==="text"){var g=l.isBefore(i);let N=l.is(i);Dl(l,g,N),Dl(i,!g,N),N&&(i.key=l.key,i.offset=l.offset,i.type=l.type),g=ln(),g.isComposing()&&g._compositionKey!==l.key&&wt(s)&&(g=s.anchor,s=s.focus,Hr(l,g.key,g.offset,g.type),Hr(i,s.key,s.offset,s.type))}}function Tn(l,i,s,g,N,S){return l===null||s===null||!nt(N,l,s)||(i=Sa(l,i,wt(S)?S.anchor:null,N),i===null)||(g=Sa(s,g,wt(S)?S.focus:null,N),g===null||i.type==="element"&&g.type==="element"&&(l=Qr(l),s=Qr(s),an(l)&&an(s)))?null:(wa(i,g,S),[i,g])}function Vn(l,i,s,g,N,S){let b=Cr();return l=new Ui(new br(l,i,N),new br(s,g,S),0,""),l.dirty=!0,b._selection=l}function Rr(){return new go(new Set)}function vi(l){let i=l.getEditorState()._selection,s=Ir(l._window);return wt(i)||i==null?Kn(i,s,l):i.clone()}function Kn(l,i,s){var g=s._window;if(g===null)return null;var N=g.event,S=N?N.type:void 0;g=S==="selectionchange",N=!ct&&(g||S==="beforeinput"||S==="compositionstart"||S==="compositionend"||S==="click"&&N&&N.detail===3||S==="drop"||S===void 0);let b;if(!wt(l)||N){if(i===null)return null;if(N=i.anchorNode,S=i.focusNode,b=i.anchorOffset,i=i.focusOffset,g&&wt(l)&&!nt(s,N,S))return l.clone()}else return l.clone();if(s=Tn(N,b,S,i,s,l),s===null)return null;let[X,me]=s;return new Ui(X,me,wt(l)?l.format:0,wt(l)?l.style:"")}function jt(){return Cr()._selection}function Gi(){return ln()._editorState._selection}function po(l,i,s,g=1){var N=l.anchor,S=l.focus,b=N.getNode(),X=S.getNode();if(i.is(b)||i.is(X)){if(b=i.__key,l.isCollapsed())i=N.offset,(s<=i&&0<g||s<i&&0>g)&&(s=Math.max(0,i+g),N.set(b,s,"element"),S.set(b,s,"element"),qo(l));else{let Se=l.isBackward();X=Se?S:N;var me=X.getNode();N=Se?N:S,S=N.getNode(),i.is(me)&&(me=X.offset,(s<=me&&0<g||s<me&&0>g)&&X.set(b,Math.max(0,me+g),"element")),i.is(S)&&(i=N.offset,(s<=i&&0<g||s<i&&0>g)&&N.set(b,Math.max(0,i+g),"element"))}qo(l)}}function qo(l){var i=l.anchor,s=i.offset;let g=l.focus;var N=g.offset,S=i.getNode(),b=g.getNode();if(l.isCollapsed())Ze(S)&&(b=S.getChildrenSize(),b=(N=s>=b)?S.getChildAtIndex(b-1):S.getChildAtIndex(s),ht(b)&&(s=0,N&&(s=b.getTextContentSize()),i.set(b.__key,s,"text"),g.set(b.__key,s,"text")));else{if(Ze(S)){let X=S.getChildrenSize();s=(l=s>=X)?S.getChildAtIndex(X-1):S.getChildAtIndex(s),ht(s)&&(S=0,l&&(S=s.getTextContentSize()),i.set(s.__key,S,"text"))}Ze(b)&&(s=b.getChildrenSize(),N=(i=N>=s)?b.getChildAtIndex(s-1):b.getChildAtIndex(N),ht(N)&&(b=0,i&&(b=N.getTextContentSize()),g.set(N.__key,b,"text")))}}function Ms(l,i){if(i=i.getEditorState()._selection,l=l._selection,wt(l)){var s=l.anchor;let g=l.focus,N;s.type==="text"&&(N=s.getNode(),N.selectionTransform(i,l)),g.type==="text"&&(s=g.getNode(),N!==s&&s.selectionTransform(i,l))}}function mo(l,i,s,g,N){let S=null,b=0,X=null;g!==null?(S=g.__key,ht(g)?(b=g.getTextContentSize(),X="text"):Ze(g)&&(b=g.getChildrenSize(),X="element")):N!==null&&(S=N.__key,ht(N)?X="text":Ze(N)&&(X="element")),S!==null&&X!==null?l.set(S,b,X):(b=i.getIndexWithinParent(),b===-1&&(b=s.getChildrenSize()),l.set(s.__key,b,"element"))}function As(l,i,s,g,N){l.type==="text"?(l.key=s,i||(l.offset+=N)):l.offset>g.getIndexWithinParent()&&--l.offset}function Si(l,i,s){let g=[],N=null,S=null;l=l.getChildren();for(let Fe=0;Fe<l.length;Fe++){var b=l[Fe];Qo(b)||Y(108);var X=b.getChildren();b=0;for(let Ke of X){for(Nr(Ke)||Y(109);g[Fe]!==void 0&&g[Fe][b]!==void 0;)b++;X=Fe;var me=b,Se=Ke;let Le={cell:Se,startColumn:me,startRow:X},be=Se.__rowSpan,Xe=Se.__colSpan;for(let ut=0;ut<be;ut++){g[X+ut]===void 0&&(g[X+ut]=[]);for(let Tt=0;Tt<Xe;Tt++)g[X+ut][me+Tt]=Le}i.is(Se)&&(N=Le),s.is(Se)&&(S=Le),b+=Ke.__colSpan}}return N===null&&Y(110),S===null&&Y(111),[g,N,S]}function si(l){l instanceof Is||(l instanceof ii?(l=Ns(l,Nr),Nr(l)||Y(114)):(l=Ns(l.getNode(),Nr),Nr(l)||Y(114)));let i=l.getParent();Qo(i)||Y(115);let s=i.getParent();return Ps(s)||Y(116),[l,i,s]}function Zo(l){l.isCollapsed()||l.removeText();var i=l.anchor,s=i.getNode();if(!ht(s))return i.offset;let g=s.getParent();return g?(s=s.splitText(i.offset),s.length===0?0:(i=i.offset===0?0:1,s=s[0].getIndexWithinParent()+i,!g.isInline()||s===0?s:((s=g.getChildAtIndex(s))&&g.insertNewAfter(l).append(s,...s.getNextSiblings()),g.getIndexWithinParent()+i))):(l=ar(),fn().append(l),l.select(),0)}function Jo(l){let i=ar(),s=null;for(let g=0;g<l.length;g++){let N=l[g],S=Ti(N);if(S||an(N)&&N.isInline()||Ze(N)&&N.isInline()||ht(N)||N.isParentRequired()){if(s===null&&(s=N.createParentElementNode(),i.append(s),S))continue;s!==null&&s.append(N)}else i.append(N),s=null}return i}let yn=null,xn=null,vn=!1,bl=!1,_o=0,Rl={characterData:!0,childList:!0,subtree:!0};function li(){return vn||yn!==null&&yn._readOnly}function Xn(){vn&&Y(13)}function Cr(){return yn===null&&Y(15),yn}function ln(){return xn===null&&Y(16),xn}function Ml(l,i,s){var g=i.__type;let N=l._nodes.get(g);for(N===void 0&&Y(30,g),l=s.get(g),l===void 0&&(l=Array.from(N.transforms),s.set(g,l)),s=l.length,g=0;g<s&&(l[g](i),i.isAttached());g++);}function Oa(l,i){i=i._dirtyLeaves,l=l._nodeMap;for(let s of i)i=l.get(s),ht(i)&&i.isAttached()&&i.isSimpleText()&&!i.isUnmergeable()&&qe(i)}function Ic(l,i){let s=i._dirtyLeaves,g=i._dirtyElements;l=l._nodeMap;let N=zt(),S=new Map;var b=s;let X=b.size;for(var me=g,Se=me.size;0<X||0<Se;){if(0<X){i._dirtyLeaves=new Set;for(let Fe of b)b=l.get(Fe),ht(b)&&b.isAttached()&&b.isSimpleText()&&!b.isUnmergeable()&&qe(b),b!==void 0&&b!==void 0&&b.__key!==N&&b.isAttached()&&Ml(i,b,S),s.add(Fe);if(b=i._dirtyLeaves,X=b.size,0<X){_o++;continue}}i._dirtyLeaves=new Set,i._dirtyElements=new Map;for(let Fe of me)me=Fe[0],Se=Fe[1],(me==="root"||Se)&&(b=l.get(me),b!==void 0&&b!==void 0&&b.__key!==N&&b.isAttached()&&Ml(i,b,S),g.set(me,Se));b=i._dirtyLeaves,X=b.size,me=i._dirtyElements,Se=me.size,_o++}i._dirtyLeaves=s,i._dirtyElements=g}function yo(l,i){var s=l.type,g=i.get(s);if(g===void 0&&Y(17,s),s=g.klass,l.type!==s.getType()&&Y(18,s.name),s=s.importJSON(l),l=l.children,Ze(s)&&Array.isArray(l))for(g=0;g<l.length;g++){let N=yo(l[g],i);s.append(N)}return s}function Da(l,i){let s=yn,g=vn,N=xn;yn=l,vn=!0,xn=null;try{return i()}finally{yn=s,vn=g,xn=N}}function Mr(l,i){let s=l._pendingEditorState,g=l._rootElement,N=l._headless||g===null;if(s!==null){var S=l._editorState,b=S._selection,X=s._selection,me=l._dirtyType!==0,Se=yn,Fe=vn,Ke=xn,Le=l._updating,be=l._observer,Xe=null;if(l._pendingEditorState=null,l._editorState=s,!N&&me&&be!==null){xn=l,yn=s,vn=!1,l._updating=!0;try{let nn=l._dirtyType,In=l._dirtyElements,pt=l._dirtyLeaves;be.disconnect();var ut=nn,Tt=In,Rt=pt;Ln=Or=On="",Ci=ut===2,_n=null,Hn=l,yi=l._config,Po=l._nodes,Es=Hn._listeners.mutation,Pr=Tt,En=Rt,Ni=S._nodeMap,_r=s._nodeMap,so=s._readOnly,Ts=new Map(l._keyToDOMMap);let Er=new Map;lo=Er,ao("root",null),lo=Ts=yi=_r=Ni=En=Pr=Po=Hn=void 0,Xe=Er}catch(nn){if(nn instanceof Error&&l._onError(nn),bl)throw nn;Al(l,null,g,s),Me(l),l._dirtyType=2,bl=!0,Mr(l,S),bl=!1;return}finally{be.observe(g,Rl),l._updating=Le,yn=Se,vn=Fe,xn=Ke}}s._readOnly||(s._readOnly=!0);var hn=l._dirtyLeaves,cr=l._dirtyElements,Kr=l._normalizedNodes,ai=l._updateTags,Di=l._deferred;me&&(l._dirtyType=0,l._cloneNotNeeded.clear(),l._dirtyLeaves=new Set,l._dirtyElements=new Map,l._normalizedNodes=new Set,l._updateTags=new Set);var bi=l._decorators,To=l._pendingDecorators||bi,kl=s._nodeMap,$s;for($s in To)kl.has($s)||(To===bi&&(To=Bi(l)),delete To[$s]);var Ur=N?null:Ir(l._window);if(l._editable&&Ur!==null&&(me||X===null||X.dirty)){xn=l,yn=s;try{if(be!==null&&be.disconnect(),me||X===null||X.dirty){let nn=l._blockCursorElement;nn!==null&&gl(nn,l,g);e:{let In=Ur.anchorNode,pt=Ur.focusNode,Er=Ur.anchorOffset,ji=Ur.focusOffset,er=document.activeElement;if(!(ai.has("collaboration")&&er!==g||er!==null&&je(er)))if(wt(X)){var xo=X.anchor,Fs=X.focus,es=xo.key,Yi=Fs.key,Pa=Bn(l,es),$a=Bn(l,Yi),ts=xo.offset,Fa=Fs.offset,Ll=X.format,Il=X.style,Ba=X.isCollapsed(),vo=Pa,Bs=$a,zr=!1;if(xo.type==="text"){vo=St(Pa);let ur=xo.getNode();zr=ur.getFormat()!==Ll||ur.getStyle()!==Il}else wt(b)&&b.anchor.type==="text"&&(zr=!0);if(Fs.type==="text"&&(Bs=St($a)),vo!==null&&Bs!==null){if(Ba&&(b===null||zr||wt(b)&&(b.format!==Ll||b.style!==Il))){var Un=performance.now();fa=[Ll,Il,ts,es,Un]}if(Er===ts&&ji===Fa&&In===vo&&pt===Bs&&(Ur.type!=="Range"||!Ba)&&(er!==null&&g.contains(er)||g.focus({preventScroll:!0}),xo.type!=="element"))break e;try{Ur.setBaseAndExtent(vo,ts,Bs,Fa)}catch{}if(!ai.has("skip-scroll-into-view")&&X.isCollapsed()&&g!==null&&g===document.activeElement){let ur=X instanceof Ui&&X.anchor.type==="element"?vo.childNodes[ts]||null:0<Ur.rangeCount?Ur.getRangeAt(0):null;if(ur!==null){let Pn;if(ur instanceof Text){let tr=document.createRange();tr.selectNode(ur),Pn=tr.getBoundingClientRect()}else Pn=ur.getBoundingClientRect();let Tr=g.ownerDocument,Ai=Tr.defaultView;if(Ai!==null)for(var{top:gt,bottom:Ri}=Pn,Vi,ns,Mi=g;Mi!==null;){let tr=Mi===Tr.body;if(tr)Vi=0,ns=Zn(l).innerHeight;else{let Hs=Mi.getBoundingClientRect();Vi=Hs.top,ns=Hs.bottom}let qi=0;if(gt<Vi?qi=-(Vi-gt):Ri>ns&&(qi=Ri-ns),qi!==0)if(tr)Ai.scrollBy(0,qi);else{let Hs=Mi.scrollTop;Mi.scrollTop+=qi;let Wa=Mi.scrollTop-Hs;gt-=Wa,Ri-=Wa}if(tr)break;Mi=mr(Mi)}}}Cl=!0}}else b!==null&&nt(l,In,pt)&&Ur.removeAllRanges()}}e:{let nn=l._blockCursorElement;if(wt(X)&&X.isCollapsed()&&X.anchor.type==="element"&&g.contains(document.activeElement)){let In=X.anchor,pt=In.getNode(),Er=In.offset,ji=pt.getChildrenSize(),er=!1,ur=null;if(Er===ji){let Pn=pt.getChildAtIndex(Er-1);hl(Pn)&&(er=!0)}else{let Pn=pt.getChildAtIndex(Er);if(hl(Pn)){let Tr=Pn.getPreviousSibling();(Tr===null||hl(Tr))&&(er=!0,ur=l.getElementByKey(Pn.__key))}}if(er){let Pn=l.getElementByKey(pt.__key);if(nn===null){let Tr=l._config.theme,Ai=document.createElement("div");Ai.contentEditable="false",Ai.setAttribute("data-lexical-cursor","true");let tr=Tr.blockCursor;if(tr!==void 0){if(typeof tr=="string"){let qi=tr.split(" ");tr=Tr.blockCursor=qi}tr!==void 0&&Ai.classList.add(...tr)}l._blockCursorElement=nn=Ai}g.style.caretColor="transparent",ur===null?Pn.appendChild(nn):Pn.insertBefore(nn,ur);break e}}nn!==null&&gl(nn,l,g)}be!==null&&be.observe(g,Rl)}finally{xn=Ke,yn=Se}}if(Xe!==null){var Gr=Xe;let nn=Array.from(l._listeners.mutation),In=nn.length;for(let pt=0;pt<In;pt++){let[Er,ji]=nn[pt],er=Gr.get(ji);er!==void 0&&Er(er,{dirtyLeaves:hn,prevEditorState:S,updateTags:ai})}}wt(X)||X===null||b!==null&&b.is(X)||l.dispatchCommand(t,void 0);var rs=l._pendingDecorators;rs!==null&&(l._decorators=rs,l._pendingDecorators=null,Co("decorator",l,!0,rs));var Ha=ms(i||S),Pl=ms(s);if(Ha!==Pl&&Co("textcontent",l,!0,Pl),Co("update",l,!0,{dirtyElements:cr,dirtyLeaves:hn,editorState:s,normalizedNodes:Kr,prevEditorState:i||S,tags:ai}),l._deferred=[],Di.length!==0){let nn=l._updating;l._updating=!0;try{for(let In=0;In<Di.length;In++)Di[In]()}finally{l._updating=nn}}var ci=l._updates;if(ci.length!==0){let nn=ci.shift();if(nn){let[In,pt]=nn;ba(l,In,pt)}}}}function Co(l,i,s,...g){let N=i._updating;i._updating=s;try{let S=Array.from(i._listeners[l]);for(l=0;l<S.length;l++)S[l].apply(null,g)}finally{i._updating=N}}function ot(l,i,s){if(l._updating===!1||xn!==l){let S=!1;return l.update(()=>{S=ot(l,i,s)}),S}let g=ye(l);for(let S=4;0<=S;S--)for(let b=0;b<g.length;b++){var N=g[b]._commands.get(i);if(N!==void 0&&(N=N[S],N!==void 0)){N=Array.from(N);let X=N.length;for(let me=0;me<X;me++)if(N[me](s,l)===!0)return!0}}return!1}function ks(l,i){let s=l._updates;for(i=i||!1;s.length!==0;){var g=s.shift();if(g){let[N,S]=g,b;S!==void 0&&(g=S.onUpdate,b=S.tag,S.skipTransforms&&(i=!0),g&&l._deferred.push(g),b&&l._updateTags.add(b)),N()}}return i}function ba(l,i,s){let g=l._updateTags;var N,S=N=!1;if(s!==void 0){var b=s.onUpdate;N=s.tag,N!=null&&g.add(N),N=s.skipTransforms||!1,S=s.discrete||!1}b&&l._deferred.push(b),s=l._editorState,b=l._pendingEditorState;let X=!1;(b===null||b._readOnly)&&(b=l._pendingEditorState=new Eo(new Map((b||s)._nodeMap)),X=!0),b._flushSync=S,S=yn;let me=vn,Se=xn,Fe=l._updating;yn=b,vn=!1,l._updating=!0,xn=l;try{X&&(l._headless?s._selection!=null&&(b._selection=s._selection.clone()):b._selection=vi(l));let Ke=l._compositionKey;i(),N=ks(l,N),Ms(b,l),l._dirtyType!==0&&(N?Oa(b,l):Ic(b,l),ks(l),pl(s,b,l._dirtyLeaves,l._dirtyElements)),Ke!==l._compositionKey&&(b._flushSync=!0);let Le=b._selection;if(wt(Le)){let be=b._nodeMap,Xe=Le.focus.key;be.get(Le.anchor.key)!==void 0&&be.get(Xe)!==void 0||Y(19)}else Vo(Le)&&Le._nodes.size===0&&(b._selection=null)}catch(Ke){Ke instanceof Error&&l._onError(Ke),l._pendingEditorState=s,l._dirtyType=2,l._cloneNotNeeded.clear(),l._dirtyLeaves=new Set,l._dirtyElements.clear(),Mr(l);return}finally{yn=S,vn=me,xn=Se,l._updating=Fe,_o=0}l._dirtyType!==0||Ma(b,l)?b._flushSync?(b._flushSync=!1,Mr(l)):X&&Ve(()=>{Mr(l)}):(b._flushSync=!1,X&&(g.clear(),l._deferred=[],l._pendingEditorState=null))}function lr(l,i,s){l._updating?l._updates.push([i,s]):ba(l,i,s)}class Ra extends ii{constructor(i){super(i)}decorate(){Y(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function an(l){return l instanceof Ra}class Qn extends ii{constructor(i){super(i),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let i=this.getFormat();return ke[i]||""}getIndent(){return this.getLatest().__indent}getChildren(){let i=[],s=this.getFirstChild();for(;s!==null;)i.push(s),s=s.getNextSibling();return i}getChildrenKeys(){let i=[],s=this.getFirstChild();for(;s!==null;)i.push(s.__key),s=s.getNextSibling();return i}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let i=ln()._dirtyElements;return i!==null&&i.has(this.__key)}isLastChild(){let i=this.getLatest(),s=this.getParentOrThrow().getLastChild();return s!==null&&s.is(i)}getAllTextNodes(){let i=[],s=this.getFirstChild();for(;s!==null;){if(ht(s)&&i.push(s),Ze(s)){let g=s.getAllTextNodes();i.push(...g)}s=s.getNextSibling()}return i}getFirstDescendant(){let i=this.getFirstChild();for(;i!==null;){if(Ze(i)){let s=i.getFirstChild();if(s!==null){i=s;continue}}break}return i}getLastDescendant(){let i=this.getLastChild();for(;i!==null;){if(Ze(i)){let s=i.getLastChild();if(s!==null){i=s;continue}}break}return i}getDescendantByIndex(i){let s=this.getChildren(),g=s.length;return i>=g?(i=s[g-1],Ze(i)&&i.getLastDescendant()||i||null):(i=s[i],Ze(i)&&i.getFirstDescendant()||i||null)}getFirstChild(){let i=this.getLatest().__first;return i===null?null:It(i)}getFirstChildOrThrow(){let i=this.getFirstChild();return i===null&&Y(45,this.__key),i}getLastChild(){let i=this.getLatest().__last;return i===null?null:It(i)}getLastChildOrThrow(){let i=this.getLastChild();return i===null&&Y(96,this.__key),i}getChildAtIndex(i){var s=this.getChildrenSize();let g;if(i<s/2){for(g=this.getFirstChild(),s=0;g!==null&&s<=i;){if(s===i)return g;g=g.getNextSibling(),s++}return null}for(g=this.getLastChild(),--s;g!==null&&s>=i;){if(s===i)return g;g=g.getPreviousSibling(),s--}return null}getTextContent(){let i="",s=this.getChildren(),g=s.length;for(let N=0;N<g;N++){let S=s[N];i+=S.getTextContent(),Ze(S)&&N!==g-1&&!S.isInline()&&(i+=`
64
-
65
- `)}return i}getTextContentSize(){let i=0,s=this.getChildren(),g=s.length;for(let N=0;N<g;N++){let S=s[N];i+=S.getTextContentSize(),Ze(S)&&N!==g-1&&!S.isInline()&&(i+=2)}return i}getDirection(){return this.getLatest().__dir}hasFormat(i){return i!==""?(i=we[i],(this.getFormat()&i)!==0):!1}select(i,s){Xn();let g=jt(),N=i,S=s;var b=this.getChildrenSize();if(!this.canBeEmpty()){if(i===0&&s===0){if(i=this.getFirstChild(),ht(i)||Ze(i))return i.select(0,0)}else if(!(i!==void 0&&i!==b||s!==void 0&&s!==b)&&(i=this.getLastChild(),ht(i)||Ze(i)))return i.select()}if(N===void 0&&(N=b),S===void 0&&(S=b),b=this.__key,wt(g))g.anchor.set(b,N,"element"),g.focus.set(b,S,"element"),g.dirty=!0;else return Vn(b,N,b,S,"element","element");return g}selectStart(){let i=this.getFirstDescendant();return i?i.selectStart():this.select()}selectEnd(){let i=this.getLastDescendant();return i?i.selectEnd():this.select()}clear(){let i=this.getWritable();return this.getChildren().forEach(s=>s.remove()),i}append(...i){return this.splice(this.getChildrenSize(),0,i)}setDirection(i){let s=this.getWritable();return s.__dir=i,s}setFormat(i){return this.getWritable().__format=i!==""?we[i]:0,this}setIndent(i){return this.getWritable().__indent=i,this}splice(i,s,g){let N=g.length,S=this.getChildrenSize(),b=this.getWritable(),X=b.__key;var me=[],Se=[];let Fe=this.getChildAtIndex(i+s),Ke=null,Le=S-s+N;if(i!==0)if(i===S)Ke=this.getLastChild();else{var be=this.getChildAtIndex(i);be!==null&&(Ke=be.getPreviousSibling())}if(0<s){var Xe=Ke===null?this.getFirstChild():Ke.getNextSibling();for(be=0;be<s;be++){Xe===null&&Y(100);var ut=Xe.getNextSibling(),Tt=Xe.__key;Xe=Xe.getWritable(),xt(Xe),Se.push(Tt),Xe=ut}}for(be=Ke,ut=0;ut<N;ut++){Tt=g[ut],be!==null&&Tt.is(be)&&(Ke=be=be.getPreviousSibling()),Xe=Tt.getWritable(),Xe.__parent===X&&Le--,xt(Xe);let Rt=Tt.__key;be===null?(b.__first=Rt,Xe.__prev=null):(be=be.getWritable(),be.__next=Rt,Xe.__prev=be.__key),Tt.__key===X&&Y(76),Xe.__parent=X,me.push(Rt),be=Tt}if(i+s===S?be!==null&&(be.getWritable().__next=null,b.__last=be.__key):Fe!==null&&(i=Fe.getWritable(),be!==null?(s=be.getWritable(),i.__prev=be.__key,s.__next=Fe.__key):i.__prev=null),b.__size=Le,Se.length&&(i=jt(),wt(i))){Se=new Set(Se),me=new Set(me);let{anchor:Rt,focus:hn}=i;Ls(Rt,Se,me)&&mo(Rt,Rt.getNode(),this,Ke,Fe),Ls(hn,Se,me)&&mo(hn,hn.getNode(),this,Ke,Fe),Le!==0||this.canBeEmpty()||ei(this)||this.remove()}return b}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function Ze(l){return l instanceof Qn}function Ls(l,i,s){for(l=l.getNode();l;){let g=l.__key;if(i.has(g)&&!s.has(g))return!0;l=l.getParent()}return!1}class Wr extends Qn{static getType(){return"root"}static clone(){return new Wr}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Y(51)}getTextContent(){let i=this.__cachedText;return!li()&&ln()._dirtyType!==0||i===null?super.getTextContent():i}remove(){Y(52)}replace(){Y(53)}insertBefore(){Y(54)}insertAfter(){Y(55)}updateDOM(){return!1}append(...i){for(let s=0;s<i.length;s++){let g=i[s];Ze(g)||an(g)||Y(56)}return super.append(...i)}static importJSON(i){let s=fn();return s.setFormat(i.format),s.setIndent(i.indent),s.setDirection(i.direction),s}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function nr(l){return l instanceof Wr}function Ma(l,i){if(i=i.getEditorState()._selection,l=l._selection,l!==null){if(l.dirty||!l.is(i))return!0}else if(i!==null)return!0;return!1}function wi(){return new Eo(new Map([["root",new Wr]]))}function No(l){let i=l.exportJSON();var s=l.constructor;i.type!==s.getType()&&Y(130,s.name);let g=i.children;if(Ze(l))for(Array.isArray(g)||Y(59,s.name),l=l.getChildren(),s=0;s<l.length;s++){let N=No(l[s]);g.push(N)}return i}class Eo{constructor(i,s){this._nodeMap=i,this._selection=s||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(i){return Da(this,i)}clone(i){return i=new Eo(this._nodeMap,i===void 0?this._selection:i),i._readOnly=!0,i}toJSON(){return Da(this,()=>({root:No(fn())}))}}class Oi extends Qn{static getType(){return"paragraph"}static clone(i){return new Oi(i.__key)}createDOM(i){let s=document.createElement("p");return i=Kt(i.theme,"paragraph"),i!==void 0&&s.classList.add(...i),s}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:Xo,priority:0})}}exportDOM(i){if({element:i}=super.exportDOM(i),i&&oo(i)){this.isEmpty()&&i.append(document.createElement("br"));var s=this.getFormatType();i.style.textAlign=s,(s=this.getDirection())&&(i.dir=s),s=this.getIndent(),0<s&&(i.style.textIndent=`${20*s}px`)}return{element:i}}static importJSON(i){let s=ar();return s.setFormat(i.format),s.setIndent(i.indent),s.setDirection(i.direction),s}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(i,s){i=ar();let g=this.getDirection();return i.setDirection(g),this.insertAfter(i,s),i}collapseAtStart(){let i=this.getChildren();if(i.length===0||ht(i[0])&&i[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 Xo(l){let i=ar();return l.style&&(i.setFormat(l.style.textAlign),l=parseInt(l.style.textIndent,10)/20,0<l&&i.setIndent(l)),{node:i}}function ar(){return Hi(new Oi)}function Al(l,i,s,g){let N=l._keyToDOMMap;N.clear(),l._editorState=wi(),l._pendingEditorState=g,l._compositionKey=null,l._dirtyType=0,l._cloneNotNeeded.clear(),l._dirtyLeaves=new Set,l._dirtyElements.clear(),l._normalizedNodes=new Set,l._updateTags=new Set,l._updates=[],l._blockCursorElement=null,g=l._observer,g!==null&&(g.disconnect(),l._observer=null),i!==null&&(i.textContent=""),s!==null&&(s.textContent="",N.set("root",s))}function Aa(l,i){let s=new Map,g=new Set,N=S=>{Object.keys(S).forEach(b=>{let X=s.get(b);X===void 0&&(X=[],s.set(b,X)),X.push(S[b])})};return l.forEach(S=>{S=S.klass.importDOM!=null?S.klass.importDOM.bind(S.klass):null,S==null||g.has(S)||(g.add(S),S=S(),S!==null&&N(S))}),i&&N(i),s}class ka{constructor(i,s,g,N,S,b,X){this._parentEditor=s,this._rootElement=null,this._editorState=i,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=N,this._nodes=g,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Ge(),this._onError=S,this._htmlConversions=b,this._editable=X,this._headless=s!==null&&s._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(i){let s=this._listeners.update;return s.add(i),()=>{s.delete(i)}}registerEditableListener(i){let s=this._listeners.editable;return s.add(i),()=>{s.delete(i)}}registerDecoratorListener(i){let s=this._listeners.decorator;return s.add(i),()=>{s.delete(i)}}registerTextContentListener(i){let s=this._listeners.textcontent;return s.add(i),()=>{s.delete(i)}}registerRootListener(i){let s=this._listeners.root;return i(this._rootElement,null),s.add(i),()=>{i(null,this._rootElement),s.delete(i)}}registerCommand(i,s,g){g===void 0&&Y(35);let N=this._commands;N.has(i)||N.set(i,[new Set,new Set,new Set,new Set,new Set]);let S=N.get(i);S===void 0&&Y(36,String(i));let b=S[g];return b.add(s),()=>{b.delete(s),S.every(X=>X.size===0)&&N.delete(i)}}registerMutationListener(i,s){this._nodes.get(i.getType())===void 0&&Y(37,i.name);let g=this._listeners.mutation;return g.set(s,i),()=>{g.delete(s)}}registerNodeTransformToKlass(i,s){var g=i.getType();return g=this._nodes.get(g),g===void 0&&Y(37,i.name),g.transforms.add(s),g}registerNodeTransform(i,s){var g=this.registerNodeTransformToKlass(i,s);let N=[g];return g=g.replaceWithKlass,g!=null&&(g=this.registerNodeTransformToKlass(g,s),N.push(g)),_s(this,i.getType()),()=>{N.forEach(S=>S.transforms.delete(s))}}hasNode(i){return this._nodes.has(i.getType())}hasNodes(i){return i.every(this.hasNode.bind(this))}dispatchCommand(i,s){return ot(this,i,s)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(i){let s=this._rootElement;if(i!==s){let b=Kt(this._config.theme,"root");var g=this._pendingEditorState||this._editorState;if(this._rootElement=i,Al(this,s,i,g),s!==null){if(!this._config.disableEvents){Ho!==0&&(Ho--,Ho===0&&s.ownerDocument.removeEventListener("selectionchange",Na));var N=s.__lexicalEditor;if(N!=null){if(N._parentEditor!==null){var S=ye(N);S=S[S.length-1]._key,uo.get(S)===N&&uo.delete(S)}else uo.delete(N._key);s.__lexicalEditor=null}for(N=Ca(s),S=0;S<N.length;S++)N[S]();s.__lexicalEventHandles=[]}b!=null&&s.classList.remove(...b)}i!==null?(g=(g=i.ownerDocument)&&g.defaultView||null,N=i.style,N.userSelect="text",N.whiteSpace="pre-wrap",N.wordBreak="break-word",i.setAttribute("data-lexical-editor","true"),this._window=g,this._dirtyType=2,Me(this),this._updateTags.add("history-merge"),Mr(this),this._config.disableEvents||Ac(i,this),b!=null&&i.classList.add(...b)):(this._editorState=g,this._window=this._pendingEditorState=null),Co("root",this,!1,i,s)}}getElementByKey(i){return this._keyToDOMMap.get(i)||null}getEditorState(){return this._editorState}setEditorState(i,s){i.isEmpty()&&Y(38),Oe(this);let g=this._pendingEditorState,N=this._updateTags;s=s!==void 0?s.tag:null,g===null||g.isEmpty()||(s!=null&&N.add(s),Mr(this)),this._pendingEditorState=i,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&N.add(s),Mr(this)}parseEditorState(i,s){i=typeof i=="string"?JSON.parse(i):i;let g=wi(),N=yn,S=vn,b=xn,X=this._dirtyElements,me=this._dirtyLeaves,Se=this._cloneNotNeeded,Fe=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,yn=g,vn=!1,xn=this;try{yo(i.root,this._nodes),s&&s(),g._readOnly=!0}catch(Ke){Ke instanceof Error&&this._onError(Ke)}finally{this._dirtyElements=X,this._dirtyLeaves=me,this._cloneNotNeeded=Se,this._dirtyType=Fe,yn=N,vn=S,xn=b}return g}update(i,s){lr(this,i,s)}focus(i,s={}){let g=this._rootElement;g!==null&&(g.setAttribute("autocapitalize","off"),lr(this,()=>{let N=jt(),S=fn();N!==null?N.dirty=!0:S.getChildrenSize()!==0&&(s.defaultSelection==="rootStart"?S.selectStart():S.selectEnd())},{onUpdate:()=>{g.removeAttribute("autocapitalize"),i&&i()},tag:"focus"}),this._pendingEditorState===null&&g.removeAttribute("autocapitalize"))}blur(){var i=this._rootElement;i!==null&&i.blur(),i=Ir(this._window),i!==null&&i.removeAllRanges()}isEditable(){return this._editable}setEditable(i){this._editable!==i&&(this._editable=i,Co("editable",this,!0,i))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Is extends Qn{constructor(i,s){super(s),this.__colSpan=i,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(i){return this.getWritable().__colSpan=i,this}getRowSpan(){return this.__rowSpan}setRowSpan(i){return this.getWritable().__rowSpan=i,this}}function Nr(l){return l instanceof Is}class La extends Qn{}function Ps(l){return l instanceof La}class Ia extends Qn{}function Qo(l){return l instanceof Ia}return $e.$INTERNAL_isPointSelection=Ol,$e.$addUpdateTag=function(l){Xn(),ln()._updateTags.add(l)},$e.$applyNodeReplacement=Hi,$e.$copyNode=fl,$e.$createLineBreakNode=Fr,$e.$createNodeSelection=Rr,$e.$createParagraphNode=ar,$e.$createRangeSelection=function(){let l=new br("root",0,"element"),i=new br("root",0,"element");return new Ui(l,i,0,"")},$e.$createTabNode=Ki,$e.$createTextNode=Wn,$e.$getAdjacentNode=mn,$e.$getNearestNodeFromDOMNode=wr,$e.$getNearestRootOrShadowRoot=dl,$e.$getNodeByKey=It,$e.$getPreviousSelection=Gi,$e.$getRoot=fn,$e.$getSelection=jt,$e.$getTextContent=function(){let l=jt();return l===null?"":l.getTextContent()},$e.$hasAncestor=_i,$e.$hasUpdateTag=function(l){return ln()._updateTags.has(l)},$e.$insertNodes=function(l){let i=jt()||Gi();i===null&&(i=fn().selectEnd()),i.insertNodes(l)},$e.$isBlockElementNode=function(l){return Ze(l)&&!l.isInline()},$e.$isDecoratorNode=an,$e.$isElementNode=Ze,$e.$isInlineElementOrDecoratorNode=function(l){return Ze(l)&&l.isInline()||an(l)&&l.isInline()},$e.$isLeafNode=function(l){return ht(l)||Ti(l)||an(l)},$e.$isLineBreakNode=Ti,$e.$isNodeSelection=Vo,$e.$isParagraphNode=function(l){return l instanceof Oi},$e.$isRangeSelection=wt,$e.$isRootNode=nr,$e.$isRootOrShadowRoot=ei,$e.$isTabNode=va,$e.$isTextNode=ht,$e.$nodesOfType=function(l){var i=Cr();let s=i._readOnly,g=l.getType();i=i._nodeMap;let N=[];for(let[,S]of i)S instanceof l&&S.__type===g&&(s||S.isAttached())&&N.push(S);return N},$e.$normalizeSelection__EXPERIMENTAL=Qe,$e.$parseSerializedNode=function(l){return yo(l,ln()._nodes)},$e.$selectAll=function(){var l=fn();l=l.select(0,l.getChildrenSize()),pr(Qe(l))},$e.$setCompositionKey=At,$e.$setSelection=pr,$e.$splitNode=function(l,i){let s=l.getChildAtIndex(i);s==null&&(s=l),ei(l)&&Y(102);let g=b=>{const X=b.getParentOrThrow(),me=ei(X),Se=b!==s||me?fl(b):b;if(me)return b.insertAfter(Se),[b,Se,Se];const[Fe,Ke,Le]=g(X);return b=b.getNextSiblings(),Le.append(Se,...b),[Fe,Ke,Se]},[N,S]=g(s);return[N,S]},$e.BLUR_COMMAND=V,$e.CAN_REDO_COMMAND={},$e.CAN_UNDO_COMMAND={},$e.CLEAR_EDITOR_COMMAND={},$e.CLEAR_HISTORY_COMMAND={},$e.CLICK_COMMAND=e,$e.COMMAND_PRIORITY_CRITICAL=4,$e.COMMAND_PRIORITY_EDITOR=0,$e.COMMAND_PRIORITY_HIGH=3,$e.COMMAND_PRIORITY_LOW=1,$e.COMMAND_PRIORITY_NORMAL=2,$e.CONTROLLED_TEXT_INSERTION_COMMAND=d,$e.COPY_COMMAND=J,$e.CUT_COMMAND=ee,$e.DELETE_CHARACTER_COMMAND=n,$e.DELETE_LINE_COMMAND=x,$e.DELETE_WORD_COMMAND=C,$e.DEPRECATED_$computeGridMap=Si,$e.DEPRECATED_$createGridSelection=function(){let l=new br("root",0,"element"),i=new br("root",0,"element");return new bs("root",l,i)},$e.DEPRECATED_$getGridCellNodeRect=yr,$e.DEPRECATED_$getNodeTriplet=si,$e.DEPRECATED_$isGridCellNode=Nr,$e.DEPRECATED_$isGridNode=Ps,$e.DEPRECATED_$isGridRowNode=Qo,$e.DEPRECATED_$isGridSelection=Yo,$e.DEPRECATED_GridCellNode=Is,$e.DEPRECATED_GridNode=La,$e.DEPRECATED_GridRowNode=Ia,$e.DRAGEND_COMMAND=pe,$e.DRAGOVER_COMMAND=_e,$e.DRAGSTART_COMMAND=j,$e.DROP_COMMAND=G,$e.DecoratorNode=Ra,$e.ElementNode=Qn,$e.FOCUS_COMMAND=D,$e.FORMAT_ELEMENT_COMMAND={},$e.FORMAT_TEXT_COMMAND=T,$e.INDENT_CONTENT_COMMAND={},$e.INSERT_LINE_BREAK_COMMAND=r,$e.INSERT_PARAGRAPH_COMMAND=c,$e.INSERT_TAB_COMMAND={},$e.KEY_ARROW_DOWN_COMMAND=W,$e.KEY_ARROW_LEFT_COMMAND=P,$e.KEY_ARROW_RIGHT_COMMAND=v,$e.KEY_ARROW_UP_COMMAND=$,$e.KEY_BACKSPACE_COMMAND=te,$e.KEY_DELETE_COMMAND=ce,$e.KEY_DOWN_COMMAND=A,$e.KEY_ENTER_COMMAND=H,$e.KEY_ESCAPE_COMMAND=re,$e.KEY_MODIFIER_COMMAND=ne,$e.KEY_SPACE_COMMAND=z,$e.KEY_TAB_COMMAND=q,$e.LineBreakNode=$r,$e.MOVE_TO_END=w,$e.MOVE_TO_START=K,$e.OUTDENT_CONTENT_COMMAND={},$e.PASTE_COMMAND=f,$e.ParagraphNode=Oi,$e.REDO_COMMAND=M,$e.REMOVE_TEXT_COMMAND=p,$e.RootNode=Wr,$e.SELECTION_CHANGE_COMMAND=t,$e.SELECT_ALL_COMMAND=F,$e.TabNode=fo,$e.TextNode=oi,$e.UNDO_COMMAND=O,$e.createCommand=function(){return{}},$e.createEditor=function(l){var i=l||{},s=xn,g=i.theme||{};let N=l===void 0?s:i.parentEditor||null,S=i.disableEvents||!1,b=wi(),X=i.namespace||(N!==null?N._config.namespace:Ge()),me=i.editorState,Se=[Wr,oi,$r,fo,Oi,...i.nodes||[]],{onError:Fe,html:Ke}=i;if(i=i.editable!==void 0?i.editable:!0,l===void 0&&s!==null)l=s._nodes;else for(l=new Map,s=0;s<Se.length;s++){let be=Se[s],Xe=null;var Le=null;typeof be!="function"&&(Le=be,be=Le.replace,Xe=Le.with,Le=Le.withKlass||null);let ut=be.getType(),Tt=be.transform(),Rt=new Set;Tt!==null&&Rt.add(Tt),l.set(ut,{exportDOM:Ke&&Ke.export?Ke.export.get(be):void 0,klass:be,replace:Xe,replaceWithKlass:Le,transforms:Rt})}return g=new ka(b,N,l,{disableEvents:S,namespace:X,theme:g},Fe||console.error,Aa(l,Ke?Ke.import:void 0),i),me!==void 0&&(g._pendingEditorState=me,g._dirtyType=2),g},$e.getNearestEditorFromDOMNode=_t,$e.isHTMLAnchorElement=function(l){return oo(l)&&l.tagName==="A"},$e.isHTMLElement=oo,$e.isSelectionCapturedInDecoratorInput=je,$e.isSelectionWithinEditor=nt,$e}var Xc,bf;function Ht(){return bf||(bf=1,Xc=process.env.NODE_ENV==="development"?dC():fC()),Xc}var Rf;function hC(){if(Rf)return Zc;Rf=1;var t=Yn(),e=Ht(),n=rt;const r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var d=r?n.useLayoutEffect:n.useEffect;const f={tag:"history-merge"};function p({initialConfig:x,children:T}){const O=n.useMemo(()=>{const{theme:M,namespace:A,editor__DEPRECATED:v,nodes:w,onError:P,editorState:K,html:$}=x,W=t.createLexicalComposerContext(null,M);let H=v||null;if(H===null){const z=e.createEditor({editable:x.editable,html:$,namespace:A,nodes:w,onError:te=>P(te,z),theme:M});C(z,K),H=z}return[H,W]},[]);return d(()=>{const M=x.editable,[A]=O;A.setEditable(M!==void 0?M:!0)},[]),n.createElement(t.LexicalComposerContext.Provider,{value:O},T)}function C(x,T){if(T!==null){if(T===void 0)x.update(()=>{const O=e.$getRoot();if(O.isEmpty()){const M=e.$createParagraphNode();O.append(M);const A=r?document.activeElement:null;(e.$getSelection()!==null||A!==null&&A===x.getRootElement())&&M.select()}},f);else if(T!==null)switch(typeof T){case"string":{const O=x.parseEditorState(T);x.setEditorState(O,f);break}case"object":{x.setEditorState(T,f);break}case"function":{x.update(()=>{e.$getRoot().isEmpty()&&T(x)},f);break}}}}return Zc.LexicalComposer=p,Zc}var Qc={},Mf;function gC(){if(Mf)return Qc;Mf=1;var t=Yn(),e=Ht(),n=rt;let r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var c=r?n.useLayoutEffect:n.useEffect;let d={tag:"history-merge"};function f(p,C){if(C!==null){if(C===void 0)p.update(()=>{var x=e.$getRoot();if(x.isEmpty()){let T=e.$createParagraphNode();x.append(T),x=r?document.activeElement:null,(e.$getSelection()!==null||x!==null&&x===p.getRootElement())&&T.select()}},d);else if(C!==null)switch(typeof C){case"string":let x=p.parseEditorState(C);p.setEditorState(x,d);break;case"object":p.setEditorState(C,d);break;case"function":p.update(()=>{e.$getRoot().isEmpty()&&C(p)},d)}}}return Qc.LexicalComposer=function({initialConfig:p,children:C}){let x=n.useMemo(()=>{const{theme:T,namespace:O,editor__DEPRECATED:M,nodes:A,onError:v,editorState:w,html:P}=p,K=t.createLexicalComposerContext(null,T);let $=M||null;if($===null){const W=e.createEditor({editable:p.editable,html:P,namespace:O,nodes:A,onError:H=>v(H,W),theme:T});f(W,w),$=W}return[$,K]},[]);return c(()=>{let T=p.editable,[O]=x;O.setEditable(T!==void 0?T:!0)},[]),n.createElement(t.LexicalComposerContext.Provider,{value:x},C)},Qc}const pC=process.env.NODE_ENV==="development"?hC():gC();var mC=pC,eu={},tu,Af;function _C(){if(Af)return tu;Af=1;var t=Yn(),e=rt,c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?e.useLayoutEffect:e.useEffect;function d(C){const[x]=t.useLexicalComposerContext(),T=e.useMemo(()=>C(x),[x,C]),O=e.useRef(T.initialValueFn()),[M,A]=e.useState(O.current);return c(()=>{const{initialValueFn:v,subscribe:w}=T,P=v();return O.current!==P&&(O.current=P,A(P)),w(K=>{O.current=K,A(K)})},[T,C]),M}function f(C){return{initialValueFn:()=>C.isEditable(),subscribe:x=>C.registerEditableListener(x)}}function p(){return d(f)}return tu=p,tu}var nu,kf;function yC(){if(kf)return nu;kf=1;var t=Yn(),e=rt,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?e.useLayoutEffect:e.useEffect;function r(d){let[f]=t.useLexicalComposerContext(),p=e.useMemo(()=>d(f),[f,d]),C=e.useRef(p.initialValueFn()),[x,T]=e.useState(C.current);return n(()=>{let{initialValueFn:O,subscribe:M}=p,A=O();return C.current!==A&&(C.current=A,T(A)),M(v=>{C.current=v,T(v)})},[p,d]),x}function c(d){return{initialValueFn:()=>d.isEditable(),subscribe:f=>d.registerEditableListener(f)}}return nu=function(){return r(c)},nu}var ru,Lf;function yp(){return Lf||(Lf=1,ru=process.env.NODE_ENV==="development"?_C():yC()),ru}var Qi={},If;function CC(){if(If)return Qi;If=1;var t=Ht();function e(C,x){let T=C.getFirstChild(),O=0;e:for(;T!==null;){if(t.$isElementNode(T)){const v=T.getFirstChild();if(v!==null){T=v;continue}}else if(t.$isTextNode(T)){const v=T.getTextContentSize();if(O+v>x)return{node:T,offset:x-O};O+=v}const M=T.getNextSibling();if(M!==null){T=M;continue}let A=T.getParent();for(;A!==null;){const v=A.getNextSibling();if(v!==null){T=v;continue e}A=A.getParent()}break}return null}function n(C,x=!0){if(C)return!1;let T=c();return x&&(T=T.trim()),T===""}function r(C,x){return()=>n(C,x)}function c(){return t.$getRoot().getTextContent()}function d(C){if(!n(C,!1))return!1;const T=t.$getRoot().getChildren(),O=T.length;if(O>1)return!1;for(let M=0;M<O;M++){const A=T[M];if(t.$isDecoratorNode(A))return!1;if(t.$isElementNode(A)){if(!t.$isParagraphNode(A)||A.__indent!==0)return!1;const v=A.getChildren(),w=v.length;for(let P=0;P<w;P++){const K=v[M];if(!t.$isTextNode(K))return!1}}}return!0}function f(C){return()=>d(C)}function p(C,x,T,O){const M=W=>W instanceof T,A=W=>{const H=t.$createTextNode(W.getTextContent());H.setFormat(W.getFormat()),W.replace(H)},v=W=>W.getLatest().__mode,w=W=>{if(!W.isSimpleText())return;const H=W.getPreviousSibling();let z=W.getTextContent(),te=W,re;if(t.$isTextNode(H)){const ce=H.getTextContent(),q=ce+z,G=x(q);if(M(H))if(G===null||v(H)!==0){A(H);return}else{const j=G.end-ce.length;if(j>0){const _e=z.slice(0,j),pe=ce+_e;if(H.select(),H.setTextContent(pe),j===z.length)W.remove();else{const J=z.slice(j);W.setTextContent(J)}return}}else if(G===null||G.start<ce.length)return}for(;;){re=x(z);let ce=re===null?"":z.slice(re.end);if(z=ce,ce===""){const j=te.getNextSibling();if(t.$isTextNode(j)){ce=te.getTextContent()+j.getTextContent();const _e=x(ce);if(_e===null){M(j)?A(j):j.markDirty();return}else if(_e.start!==0)return}}else{const j=x(ce);if(j!==null&&j.start===0)return}if(re===null)return;if(re.start===0&&t.$isTextNode(H)&&H.isTextEntity())continue;let q;re.start===0?[q,te]=te.splitText(re.end):[,q,te]=te.splitText(re.start,re.end);const G=O(q);if(G.setFormat(q.getFormat()),q.replace(G),te==null)return}},P=W=>{const H=W.getTextContent(),z=x(H);if(z===null||z.start!==0){A(W);return}if(H.length>z.end){W.splitText(z.end);return}const te=W.getPreviousSibling();t.$isTextNode(te)&&te.isTextEntity()&&(A(te),A(W));const re=W.getNextSibling();t.$isTextNode(re)&&re.isTextEntity()&&(A(re),M(W)&&A(W))},K=C.registerNodeTransform(t.TextNode,w),$=C.registerNodeTransform(T,P);return[K,$]}return Qi.$canShowPlaceholder=d,Qi.$canShowPlaceholderCurry=f,Qi.$findTextIntersectionFromCharacters=e,Qi.$isRootTextContentEmpty=n,Qi.$isRootTextContentEmptyCurry=r,Qi.$rootTextContent=c,Qi.registerLexicalTextEntity=p,Qi}var eo={},Pf;function NC(){if(Pf)return eo;Pf=1;var t=Ht();function e(c,d=!0){return c?!1:(c=n(),d&&(c=c.trim()),c==="")}function n(){return t.$getRoot().getTextContent()}function r(c){if(!e(c,!1))return!1;c=t.$getRoot().getChildren();let d=c.length;if(1<d)return!1;for(let p=0;p<d;p++){var f=c[p];if(t.$isDecoratorNode(f))return!1;if(t.$isElementNode(f)){if(!t.$isParagraphNode(f)||f.__indent!==0)return!1;f=f.getChildren();let C=f.length;for(let x=0;x<C;x++)if(!t.$isTextNode(f[p]))return!1}}return!0}return eo.$canShowPlaceholder=r,eo.$canShowPlaceholderCurry=function(c){return()=>r(c)},eo.$findTextIntersectionFromCharacters=function(c,d){var f=c.getFirstChild();c=0;e:for(;f!==null;){if(t.$isElementNode(f)){var p=f.getFirstChild();if(p!==null){f=p;continue}}else if(t.$isTextNode(f)){if(p=f.getTextContentSize(),c+p>d)return{node:f,offset:d-c};c+=p}if(p=f.getNextSibling(),p!==null)f=p;else{for(f=f.getParent();f!==null;){if(p=f.getNextSibling(),p!==null){f=p;continue e}f=f.getParent()}break}}return null},eo.$isRootTextContentEmpty=e,eo.$isRootTextContentEmptyCurry=function(c,d){return()=>e(c,d)},eo.$rootTextContent=n,eo.registerLexicalTextEntity=function(c,d,f,p){let C=T=>{const O=t.$createTextNode(T.getTextContent());O.setFormat(T.getFormat()),T.replace(O)},x=c.registerNodeTransform(t.TextNode,T=>{if(T.isSimpleText()){var O=T.getPreviousSibling(),M=T.getTextContent(),A=T;if(t.$isTextNode(O)){var v=O.getTextContent(),w=d(v+M);if(O instanceof f){if(w===null||O.getLatest().__mode!==0){C(O);return}if(w=w.end-v.length,0<w){A=M.slice(0,w),A=v+A,O.select(),O.setTextContent(A),w===M.length?T.remove():(O=M.slice(w),T.setTextContent(O));return}}else if(w===null||w.start<v.length)return}for(;;){if(T=d(M),M=w=T===null?"":M.slice(T.end),w===""){if(v=A.getNextSibling(),t.$isTextNode(v)){if(w=A.getTextContent()+v.getTextContent(),w=d(w),w===null){v instanceof f?C(v):v.markDirty();break}else if(w.start!==0)break}}else if(v=d(w),v!==null&&v.start===0)break;if(T===null)break;if(T.start===0&&t.$isTextNode(O)&&O.isTextEntity())continue;let P;if(T.start===0?[P,A]=A.splitText(T.end):[,P,A]=A.splitText(T.start,T.end),T=p(P),T.setFormat(P.getFormat()),P.replace(T),A==null)break}}});return c=c.registerNodeTransform(f,T=>{var O=T.getTextContent();const M=d(O);M===null||M.start!==0?C(T):O.length>M.end?T.splitText(M.end):(O=T.getPreviousSibling(),t.$isTextNode(O)&&O.isTextEntity()&&(C(O),C(T)),O=T.getNextSibling(),t.$isTextNode(O)&&O.isTextEntity()&&(C(O),T instanceof f&&C(T)))}),[x,c]},eo}var iu,$f;function Cp(){return $f||($f=1,iu=process.env.NODE_ENV==="development"?CC():NC()),iu}var Cn={},zn={},Ff;function EC(){if(Ff)return zn;Ff=1;var t=Ht();const e=new Map;function n(F){let D=F;for(;D!=null;){if(D.nodeType===Node.TEXT_NODE)return D;D=D.firstChild}return null}function r(F){const D=F.parentNode;if(D==null)throw new Error("Should never happen");return[D,Array.from(D.childNodes).indexOf(F)]}function c(F,D,V,ne,Y){const U=D.getKey(),Q=ne.getKey(),k=document.createRange();let m=F.getElementByKey(U),y=F.getElementByKey(Q),R=V,Z=Y;if(t.$isTextNode(D)&&(m=n(m)),t.$isTextNode(ne)&&(y=n(y)),D===void 0||ne===void 0||m===null||y===null)return null;m.nodeName==="BR"&&([m,R]=r(m)),y.nodeName==="BR"&&([y,Z]=r(y));const ue=m.firstChild;m===y&&ue!=null&&ue.nodeName==="BR"&&R===0&&Z===0&&(Z=1);try{k.setStart(m,R),k.setEnd(y,Z)}catch{return null}return k.collapsed&&(R!==Z||U!==Q)&&(k.setStart(y,Z),k.setEnd(m,R)),k}function d(F,D){const V=F.getRootElement();if(V===null)return[];const ne=V.getBoundingClientRect(),Y=getComputedStyle(V),U=parseFloat(Y.paddingLeft)+parseFloat(Y.paddingRight),Q=Array.from(D.getClientRects());let k=Q.length;Q.sort((y,R)=>{const Z=y.top-R.top;return Math.abs(Z)<=3?y.left-R.left:Z});let m;for(let y=0;y<k;y++){const R=Q[y],Z=m&&m.top<=R.top&&m.top+m.height>R.top&&m.left+m.width>R.left,ue=R.width+U===ne.width;if(Z||ue){Q.splice(y--,1),k--;continue}m=R}return Q}function f(F){const D={},V=F.split(";");for(const ne of V)if(ne!==""){const[Y,U]=ne.split(/:([^]+)/);Y&&U&&(D[Y.trim()]=U.trim())}return D}function p(F){let D=e.get(F);return D===void 0&&(D=f(F),e.set(F,D)),Object.freeze(D),D}function C(F){let D="";for(const V in F)V&&(D+=`${V}: ${F[V]};`);return D}function x(F,D){return F.__first=D.__first,F.__last=D.__last,F.__size=D.__size,F.__format=D.__format,F.__indent=D.__indent,F.__dir=D.__dir,F}function T(F,D){return F.__format=D.__format,F.__style=D.__style,F.__mode=D.__mode,F.__detail=D.__detail,F}function O(F){const V=F.constructor.clone(F);return V.__parent=F.__parent,V.__next=F.__next,V.__prev=F.__prev,t.$isElementNode(F)&&t.$isElementNode(V)?x(V,F):t.$isTextNode(F)&&t.$isTextNode(V)?T(V,F):V}function M(F,D){if(D.isSelected()&&!D.isSegmented()&&!D.isToken()&&t.$INTERNAL_isPointSelection(F)){const V=F.anchor.getNode(),ne=F.focus.getNode(),Y=D.is(V),U=D.is(ne);if(Y||U){const Q=F.isBackward(),[k,m]=F.getCharacterOffsets(),y=V.is(ne),R=D.is(Q?ne:V),Z=D.is(Q?V:ne);let ue=0,ge;if(y)ue=k>m?m:k,ge=k>m?k:m;else if(R)ue=Q?m:k,ge=void 0;else if(Z){const ae=Q?k:m;ue=0,ge=ae}return D.__text=D.__text.slice(ue,ge),D}}return D}function A(F){return F.type==="text"?F.offset===F.getNode().getTextContentSize():F.offset===F.getNode().getChildrenSize()}function v(F,D,V){let ne=D.getNode(),Y=V;if(t.$isElementNode(ne)){const U=ne.getDescendantByIndex(D.offset);U!==null&&(ne=U)}for(;Y>0&&ne!==null;){if(t.$isElementNode(ne)){const y=ne.getLastDescendant();y!==null&&(ne=y)}let U=ne.getPreviousSibling(),Q=0;if(U===null){let y=ne.getParentOrThrow(),R=y.getPreviousSibling();for(;R===null;){if(y=y.getParent(),y===null){U=null;break}R=y.getPreviousSibling()}y!==null&&(Q=y.isInline()?0:2,U=R)}let k=ne.getTextContent();k===""&&t.$isElementNode(ne)&&!ne.isInline()&&(k=`
66
-
67
- `);const m=k.length;if(!t.$isTextNode(ne)||Y>=m){const y=ne.getParent();ne.remove(),y!=null&&y.getChildrenSize()===0&&!t.$isRootNode(y)&&y.remove(),Y-=m+Q,ne=U}else{const y=ne.getKey(),R=F.getEditorState().read(()=>{const ge=t.$getNodeByKey(y);return t.$isTextNode(ge)&&ge.isSimpleText()?ge.getTextContent():null}),Z=m-Y,ue=k.slice(0,Z);if(R!==null&&R!==k){const ge=t.$getPreviousSelection();let ae=ne;if(ne.isSimpleText())ne.setTextContent(R);else{const Te=t.$createTextNode(R);ne.replace(Te),ae=Te}if(t.$isRangeSelection(ge)&&ge.isCollapsed()){const Te=ge.anchor.offset;ae.select(Te,Te)}}else if(ne.isSimpleText()){const ge=D.key===y;let ae=D.offset;ae<Y&&(ae=m);const Te=ge?ae-Y:0,Ae=ge?ae:Z;if(ge&&Te===0){const[ze]=ne.splitText(Te,Ae);ze.remove()}else{const[,ze]=ne.splitText(Te,Ae);ze.remove()}}else{const ge=t.$createTextNode(ue);ne.replace(ge)}Y=0}}}function w(F){const D=F.getStyle(),V=f(D);e.set(D,V)}function P(F,D){const V=p("getStyle"in F?F.getStyle():F.style),ne=Object.entries(D).reduce((U,[Q,k])=>(k===null?delete U[Q]:U[Q]=k,U),{...V}),Y=C(ne);F.setStyle(Y),e.set(Y,ne)}function K(F,D){const V=F.getNodes(),ne=V.length;if(t.DEPRECATED_$isGridSelection(F)){const ie=t.$createRangeSelection(),de=ie.anchor,we=ie.focus;for(let ke=0;ke<ne;ke++){const Be=V[ke];t.DEPRECATED_$isGridCellNode(Be)&&(de.set(Be.getKey(),0,"element"),we.set(Be.getKey(),Be.getChildrenSize(),"element"),K(t.$normalizeSelection__EXPERIMENTAL(ie),D))}t.$setSelection(F);return}const Y=ne-1;let U=V[0],Q=V[Y];if(F.isCollapsed()&&t.$isRangeSelection(F)){P(F,D);return}const k=F.anchor,m=F.focus,R=U.getTextContent().length,Z=m.offset;let ue=k.offset;const ge=k.isBefore(m);let ae=ge?ue:Z,Te=ge?Z:ue;const Ae=ge?k.type:m.type,ze=ge?m.type:k.type,oe=ge?m.key:k.key;if(t.$isTextNode(U)&&ae===R){const ie=U.getNextSibling();t.$isTextNode(ie)&&(ue=0,ae=0,U=ie)}if(V.length===1){if(t.$isTextNode(U)){if(ae=Ae==="element"?0:ue>Z?Z:ue,Te=ze==="element"?R:ue>Z?ue:Z,ae===Te)return;if(ae===0&&Te===R)P(U,D),U.select(ae,Te);else{const ie=U.splitText(ae,Te),de=ae===0?ie[0]:ie[1];P(de,D),de.select(0,Te-ae)}}}else{if(t.$isTextNode(U)&&ae<U.getTextContentSize()&&(ae!==0&&(U=U.splitText(ae)[1],ae=0,k.set(U.getKey(),ae,"text")),P(U,D)),t.$isTextNode(Q)){const de=Q.getTextContent().length;Q.__key!==oe&&Te!==0&&(Te=de),Te!==de&&([Q]=Q.splitText(Te)),Te!==0&&P(Q,D)}for(let ie=1;ie<Y;ie++){const de=V[ie],we=de.getKey();t.$isTextNode(de)&&we!==U.getKey()&&we!==Q.getKey()&&!de.isToken()&&P(de,D)}}}function $(F,D){if(F.anchor.key==="root"){const Y=D(),U=t.$getRoot(),Q=U.getFirstChild();Q?Q.replace(Y,!0):U.append(Y);return}const V=F.getNodes(),ne=ee(F.anchor.getNode(),J);ne&&V.indexOf(ne)===-1&&V.push(ne);for(let Y=0;Y<V.length;Y++){const U=V[Y];if(!J(U))continue;const Q=D();Q.setFormat(U.getFormatType()),Q.setIndent(U.getIndent()),U.replace(Q,!0)}}function W(F){return F.getNode().isAttached()}function H(F){let D=F;for(;D!==null&&!t.$isRootOrShadowRoot(D);){const V=D.getLatest(),ne=D.getParent();V.getChildrenSize()===0&&D.remove(!0),D=ne}}function z(F,D,V=null){const ne=F.getNodes(),Y=ne.length,U=F.anchor;if(Y===0||Y===1&&U.type==="element"&&U.getNode().getChildrenSize()===0){const m=U.type==="text"?U.getNode().getParentOrThrow():U.getNode(),y=m.getChildren();let R=D();R.setFormat(m.getFormatType()),R.setIndent(m.getIndent()),y.forEach(Z=>R.append(Z)),V&&(R=V.append(R)),m.replace(R);return}let Q=null,k=[];for(let m=0;m<Y;m++){const y=ne[m];t.$isRootOrShadowRoot(y)?(te(F,k,k.length,D,V),k=[],Q=y):Q===null||Q!==null&&t.$hasAncestor(y,Q)?k.push(y):(te(F,k,k.length,D,V),k=[y])}te(F,k,k.length,D,V)}function te(F,D,V,ne,Y=null){if(D.length===0)return;const U=D[0],Q=new Map,k=[];let m=t.$isElementNode(U)?U:U.getParentOrThrow();m.isInline()&&(m=m.getParentOrThrow());let y=!1;for(;m!==null;){const ae=m.getPreviousSibling();if(ae!==null){m=ae,y=!0;break}if(m=m.getParentOrThrow(),t.$isRootOrShadowRoot(m))break}const R=new Set;for(let ae=0;ae<V;ae++){const Te=D[ae];t.$isElementNode(Te)&&Te.getChildrenSize()===0&&R.add(Te.getKey())}const Z=new Set;for(let ae=0;ae<V;ae++){const Te=D[ae];let Ae=Te.getParent();if(Ae!==null&&Ae.isInline()&&(Ae=Ae.getParent()),Ae!==null&&t.$isLeafNode(Te)&&!Z.has(Te.getKey())){const ze=Ae.getKey();if(Q.get(ze)===void 0){const oe=ne();oe.setFormat(Ae.getFormatType()),oe.setIndent(Ae.getIndent()),k.push(oe),Q.set(ze,oe),Ae.getChildren().forEach(ie=>{oe.append(ie),Z.add(ie.getKey()),t.$isElementNode(ie)&&ie.getChildrenKeys().forEach(de=>Z.add(de))}),H(Ae)}}else if(R.has(Te.getKey())){const ze=ne();ze.setFormat(Te.getFormatType()),ze.setIndent(Te.getIndent()),k.push(ze),Te.remove(!0)}}if(Y!==null)for(let ae=0;ae<k.length;ae++){const Te=k[ae];Y.append(Te)}let ue=null;if(t.$isRootOrShadowRoot(m))if(y)if(Y!==null)m.insertAfter(Y);else for(let ae=k.length-1;ae>=0;ae--){const Te=k[ae];m.insertAfter(Te)}else{const ae=m.getFirstChild();if(t.$isElementNode(ae)&&(m=ae),ae===null)if(Y)m.append(Y);else for(let Te=0;Te<k.length;Te++){const Ae=k[Te];m.append(Ae),ue=Ae}else if(Y!==null)ae.insertBefore(Y);else for(let Te=0;Te<k.length;Te++){const Ae=k[Te];ae.insertBefore(Ae),ue=Ae}}else if(Y)m.insertAfter(Y);else for(let ae=k.length-1;ae>=0;ae--){const Te=k[ae];m.insertAfter(Te),ue=Te}const ge=t.$getPreviousSelection();t.$isRangeSelection(ge)&&W(ge.anchor)&&W(ge.focus)?t.$setSelection(ge.clone()):ue!==null?ue.selectEnd():F.dirty=!0}function re(F,D){const V=t.$getAdjacentNode(F.focus,D);return t.$isDecoratorNode(V)&&!V.isIsolated()||t.$isElementNode(V)&&!V.isInline()&&!V.canBeEmpty()}function ce(F,D,V,ne){F.modify(D?"extend":"move",V,ne)}function q(F){const D=F.anchor.getNode();return(t.$isRootNode(D)?D:D.getParentOrThrow()).getDirection()==="rtl"}function G(F,D,V){const ne=q(F);ce(F,D,V?!ne:ne,"character")}function j(F){const D=F.anchor,V=F.focus,U=D.getNode().getTopLevelElementOrThrow().getParentOrThrow();let Q=U.getFirstDescendant(),k=U.getLastDescendant(),m="element",y="element",R=0;t.$isTextNode(Q)?m="text":!t.$isElementNode(Q)&&Q!==null&&(Q=Q.getParentOrThrow()),t.$isTextNode(k)?(y="text",R=k.getTextContentSize()):!t.$isElementNode(k)&&k!==null&&(k=k.getParentOrThrow()),Q&&k&&(D.set(Q.getKey(),0,m),V.set(k.getKey(),R,y))}function _e(F,D,V){const ne=F.getStyle(),Y=p(ne);return Y!==null&&Y[D]||V}function pe(F,D,V=""){let ne=null;const Y=F.getNodes(),U=F.anchor,Q=F.focus,k=F.isBackward(),m=k?Q.offset:U.offset,y=k?Q.getNode():U.getNode();if(F.isCollapsed()&&F.style!==""){const R=F.style,Z=p(R);if(Z!==null&&D in Z)return Z[D]}for(let R=0;R<Y.length;R++){const Z=Y[R];if(!(R!==0&&m===0&&Z.is(y))&&t.$isTextNode(Z)){const ue=_e(Z,D,V);if(ne===null)ne=ue;else if(ne!==ue){ne="";break}}}return ne===null?V:ne}function J(F){if(t.$isDecoratorNode(F)&&!F.isInline())return!0;if(!t.$isElementNode(F)||t.$isRootOrShadowRoot(F))return!1;const D=F.getFirstChild(),V=D===null||t.$isLineBreakNode(D)||t.$isTextNode(D)||D.isInline();return!F.isInline()&&F.canBeEmpty()!==!1&&V}function ee(F,D){let V=F;for(;V!==null&&V.getParent()!==null&&!D(V);)V=V.getParentOrThrow();return D(V)?V:null}return zn.$addNodeStyle=w,zn.$cloneWithProperties=O,zn.$getSelectionStyleValueForProperty=pe,zn.$isAtNodeEnd=A,zn.$isParentElementRTL=q,zn.$moveCaretSelection=ce,zn.$moveCharacter=G,zn.$patchStyleText=K,zn.$selectAll=j,zn.$setBlocksType=$,zn.$shouldOverrideDefaultCharacterSelection=re,zn.$sliceSelectedTextNodeContent=M,zn.$wrapNodes=z,zn.createDOMRange=c,zn.createRectsFromDOMRange=d,zn.getStyleObjectFromCSS=p,zn.trimTextContentFromAnchor=v,zn}var Gn={},Bf;function TC(){if(Bf)return Gn;Bf=1;var t=Ht();let e=new Map;function n(v){for(;v!=null;){if(v.nodeType===Node.TEXT_NODE)return v;v=v.firstChild}return null}function r(v){let w=v.parentNode;if(w==null)throw Error("Should never happen");return[w,Array.from(w.childNodes).indexOf(v)]}function c(v){let w={};v=v.split(";");for(let P of v)if(P!==""){let[K,$]=P.split(/:([^]+)/);K&&$&&(w[K.trim()]=$.trim())}return w}function d(v){let w=e.get(v);return w===void 0&&(w=c(v),e.set(v,w)),w}function f(v){let w="";for(let P in v)P&&(w+=`${P}: ${v[P]};`);return w}function p(v,w){var P=d("getStyle"in v?v.getStyle():v.style);w=Object.entries(w).reduce((K,[$,W])=>(W===null?delete K[$]:K[$]=W,K),{...P}),P=f(w),v.setStyle(P),e.set(P,w)}function C(v,w){var P=v.getNodes(),K=P.length;if(t.DEPRECATED_$isGridSelection(v)){for(var $=t.$createRangeSelection(),W=$.anchor,H=$.focus,z=0;z<K;z++){var te=P[z];t.DEPRECATED_$isGridCellNode(te)&&(W.set(te.getKey(),0,"element"),H.set(te.getKey(),te.getChildrenSize(),"element"),C(t.$normalizeSelection__EXPERIMENTAL($),w))}t.$setSelection(v)}else if(--K,$=P[0],W=P[K],v.isCollapsed()&&t.$isRangeSelection(v))p(v,w);else{z=v.anchor;var re=v.focus;te=$.getTextContent().length;var ce=re.offset,q=z.offset,G=z.isBefore(re);H=G?q:ce,v=G?ce:q;var j=G?z.type:re.type,_e=G?re.type:z.type;if(re=G?re.key:z.key,t.$isTextNode($)&&H===te&&(G=$.getNextSibling(),t.$isTextNode(G)&&(H=q=0,$=G)),P.length===1)t.$isTextNode($)&&(H=j==="element"?0:q>ce?ce:q,v=_e==="element"?te:q>ce?q:ce,H!==v&&(H===0&&v===te?(p($,w),$.select(H,v)):(P=$.splitText(H,v),P=H===0?P[0]:P[1],p(P,w),P.select(0,v-H))));else for(t.$isTextNode($)&&H<$.getTextContentSize()&&(H!==0&&($=$.splitText(H)[1],H=0,z.set($.getKey(),H,"text")),p($,w)),t.$isTextNode(W)&&(H=W.getTextContent().length,W.__key!==re&&v!==0&&(v=H),v!==H&&([W]=W.splitText(v)),v!==0&&p(W,w)),v=1;v<K;v++)H=P[v],z=H.getKey(),t.$isTextNode(H)&&z!==$.getKey()&&z!==W.getKey()&&!H.isToken()&&p(H,w)}}function x(v){for(;v!==null&&!t.$isRootOrShadowRoot(v);){let w=v.getLatest(),P=v.getParent();w.getChildrenSize()===0&&v.remove(!0),v=P}}function T(v,w,P,K,$=null){if(w.length!==0){var W=w[0],H=new Map,z=[];W=t.$isElementNode(W)?W:W.getParentOrThrow(),W.isInline()&&(W=W.getParentOrThrow());for(var te=!1;W!==null;){var re=W.getPreviousSibling();if(re!==null){W=re,te=!0;break}if(W=W.getParentOrThrow(),t.$isRootOrShadowRoot(W))break}re=new Set;for(var ce=0;ce<P;ce++){var q=w[ce];t.$isElementNode(q)&&q.getChildrenSize()===0&&re.add(q.getKey())}var G=new Set;for(ce=0;ce<P;ce++){q=w[ce];var j=q.getParent();if(j!==null&&j.isInline()&&(j=j.getParent()),j!==null&&t.$isLeafNode(q)&&!G.has(q.getKey())){if(q=j.getKey(),H.get(q)===void 0){let _e=K();_e.setFormat(j.getFormatType()),_e.setIndent(j.getIndent()),z.push(_e),H.set(q,_e),j.getChildren().forEach(pe=>{_e.append(pe),G.add(pe.getKey()),t.$isElementNode(pe)&&pe.getChildrenKeys().forEach(J=>G.add(J))}),x(j)}}else re.has(q.getKey())&&(j=K(),j.setFormat(q.getFormatType()),j.setIndent(q.getIndent()),z.push(j),q.remove(!0))}if($!==null)for(w=0;w<z.length;w++)$.append(z[w]);if(w=null,t.$isRootOrShadowRoot(W))if(te)if($!==null)W.insertAfter($);else for($=z.length-1;0<=$;$--)W.insertAfter(z[$]);else if(te=W.getFirstChild(),t.$isElementNode(te)&&(W=te),te===null)if($)W.append($);else for($=0;$<z.length;$++)te=z[$],W.append(te),w=te;else if($!==null)te.insertBefore($);else for(W=0;W<z.length;W++)$=z[W],te.insertBefore($),w=$;else if($)W.insertAfter($);else for($=z.length-1;0<=$;$--)te=z[$],W.insertAfter(te),w=te;z=t.$getPreviousSelection(),t.$isRangeSelection(z)&&z.anchor.getNode().isAttached()&&z.focus.getNode().isAttached()?t.$setSelection(z.clone()):w!==null?w.selectEnd():v.dirty=!0}}function O(v,w,P,K){v.modify(w?"extend":"move",P,K)}function M(v){return v=v.anchor.getNode(),(t.$isRootNode(v)?v:v.getParentOrThrow()).getDirection()==="rtl"}function A(v){if(t.$isDecoratorNode(v)&&!v.isInline())return!0;if(!t.$isElementNode(v)||t.$isRootOrShadowRoot(v))return!1;var w=v.getFirstChild();return w=w===null||t.$isLineBreakNode(w)||t.$isTextNode(w)||w.isInline(),!v.isInline()&&v.canBeEmpty()!==!1&&w}return Gn.$addNodeStyle=function(v){v=v.getStyle();let w=c(v);e.set(v,w)},Gn.$cloneWithProperties=function(v){let w=v.constructor.clone(v);return w.__parent=v.__parent,w.__next=v.__next,w.__prev=v.__prev,t.$isElementNode(v)&&t.$isElementNode(w)?(w.__first=v.__first,w.__last=v.__last,w.__size=v.__size,w.__format=v.__format,w.__indent=v.__indent,w.__dir=v.__dir,w):(t.$isTextNode(v)&&t.$isTextNode(w)&&(w.__format=v.__format,w.__style=v.__style,w.__mode=v.__mode,w.__detail=v.__detail),w)},Gn.$getSelectionStyleValueForProperty=function(v,w,P=""){let K=null,$=v.getNodes();var W=v.anchor,H=v.focus,z=v.isBackward();let te=z?H.offset:W.offset;if(W=z?H.getNode():W.getNode(),v.isCollapsed()&&v.style!==""&&(v=d(v.style),v!==null&&w in v))return v[w];for(v=0;v<$.length;v++){var re=$[v];if((v===0||te!==0||!re.is(W))&&t.$isTextNode(re)){if(H=w,z=P,re=re.getStyle(),re=d(re),H=re!==null&&re[H]||z,K===null)K=H;else if(K!==H){K="";break}}}return K===null?P:K},Gn.$isAtNodeEnd=function(v){return v.type==="text"?v.offset===v.getNode().getTextContentSize():v.offset===v.getNode().getChildrenSize()},Gn.$isParentElementRTL=M,Gn.$moveCaretSelection=O,Gn.$moveCharacter=function(v,w,P){let K=M(v);O(v,w,P?!K:K,"character")},Gn.$patchStyleText=C,Gn.$selectAll=function(v){let w=v.anchor;v=v.focus;var P=w.getNode().getTopLevelElementOrThrow().getParentOrThrow();let K=P.getFirstDescendant();P=P.getLastDescendant();let $="element",W="element",H=0;t.$isTextNode(K)?$="text":t.$isElementNode(K)||K===null||(K=K.getParentOrThrow()),t.$isTextNode(P)?(W="text",H=P.getTextContentSize()):t.$isElementNode(P)||P===null||(P=P.getParentOrThrow()),K&&P&&(w.set(K.getKey(),0,$),v.set(P.getKey(),H,W))},Gn.$setBlocksType=function(v,w){if(v.anchor.key==="root"){w=w();var P=t.$getRoot();(v=P.getFirstChild())?v.replace(w,!0):P.append(w)}else{for(P=v.getNodes(),v=v.anchor.getNode();v!==null&&v.getParent()!==null&&!A(v);)v=v.getParentOrThrow();for((v=A(v)?v:null)&&P.indexOf(v)===-1&&P.push(v),v=0;v<P.length;v++){let K=P[v];if(!A(K))continue;let $=w();$.setFormat(K.getFormatType()),$.setIndent(K.getIndent()),K.replace($,!0)}}},Gn.$shouldOverrideDefaultCharacterSelection=function(v,w){return v=t.$getAdjacentNode(v.focus,w),t.$isDecoratorNode(v)&&!v.isIsolated()||t.$isElementNode(v)&&!v.isInline()&&!v.canBeEmpty()},Gn.$sliceSelectedTextNodeContent=function(v,w){if(w.isSelected()&&!w.isSegmented()&&!w.isToken()&&t.$INTERNAL_isPointSelection(v)){var P=v.anchor.getNode(),K=v.focus.getNode(),$=w.is(P),W=w.is(K);if($||W){$=v.isBackward();let[H,z]=v.getCharacterOffsets();v=P.is(K),W=w.is($?K:P),K=w.is($?P:K),P=0;let te;v?(P=H>z?z:H,te=H>z?H:z):W?(P=$?z:H,te=void 0):K&&($=$?H:z,P=0,te=$),w.__text=w.__text.slice(P,te)}}return w},Gn.$wrapNodes=function(v,w,P=null){var K=v.getNodes();let $=K.length;var W=v.anchor;if($===0||$===1&&W.type==="element"&&W.getNode().getChildrenSize()===0){v=W.type==="text"?W.getNode().getParentOrThrow():W.getNode(),K=v.getChildren();let z=w();z.setFormat(v.getFormatType()),z.setIndent(v.getIndent()),K.forEach(te=>z.append(te)),P&&(z=P.append(z)),v.replace(z)}else{W=null;var H=[];for(let z=0;z<$;z++){let te=K[z];t.$isRootOrShadowRoot(te)?(T(v,H,H.length,w,P),H=[],W=te):W===null||W!==null&&t.$hasAncestor(te,W)?H.push(te):(T(v,H,H.length,w,P),H=[te])}T(v,H,H.length,w,P)}},Gn.createDOMRange=function(v,w,P,K,$){let W=w.getKey(),H=K.getKey(),z=document.createRange(),te=v.getElementByKey(W);if(v=v.getElementByKey(H),t.$isTextNode(w)&&(te=n(te)),t.$isTextNode(K)&&(v=n(v)),w===void 0||K===void 0||te===null||v===null)return null;te.nodeName==="BR"&&([te,P]=r(te)),v.nodeName==="BR"&&([v,$]=r(v)),w=te.firstChild,te===v&&w!=null&&w.nodeName==="BR"&&P===0&&$===0&&($=1);try{z.setStart(te,P),z.setEnd(v,$)}catch{return null}return!z.collapsed||P===$&&W===H||(z.setStart(v,$),z.setEnd(te,P)),z},Gn.createRectsFromDOMRange=function(v,w){var P=v.getRootElement();if(P===null)return[];v=P.getBoundingClientRect(),P=getComputedStyle(P),P=parseFloat(P.paddingLeft)+parseFloat(P.paddingRight),w=Array.from(w.getClientRects());let K=w.length;w.sort((W,H)=>{let z=W.top-H.top;return 3>=Math.abs(z)?W.left-H.left:z});let $;for(let W=0;W<K;W++){let H=w[W],z=H.width+P===v.width;$&&$.top<=H.top&&$.top+$.height>H.top&&$.left+$.width>H.left||z?(w.splice(W--,1),K--):$=H}return w},Gn.getStyleObjectFromCSS=d,Gn.trimTextContentFromAnchor=function(v,w,P){let K=w.getNode();if(t.$isElementNode(K)){var $=K.getDescendantByIndex(w.offset);$!==null&&(K=$)}for(;0<P&&K!==null;){t.$isElementNode(K)&&($=K.getLastDescendant(),$!==null&&(K=$));var W=K.getPreviousSibling(),H=0;if(W===null){$=K.getParentOrThrow();for(var z=$.getPreviousSibling();z===null;){if($=$.getParent(),$===null){W=null;break}z=$.getPreviousSibling()}$!==null&&(H=$.isInline()?0:2,W=z)}if(z=K.getTextContent(),z===""&&t.$isElementNode(K)&&!K.isInline()&&(z=`
68
-
69
- `),$=z.length,!t.$isTextNode(K)||P>=$)z=K.getParent(),K.remove(),z==null||z.getChildrenSize()!==0||t.$isRootNode(z)||z.remove(),P-=$+H,K=W;else{let te=K.getKey();H=v.getEditorState().read(()=>{const ce=t.$getNodeByKey(te);return t.$isTextNode(ce)&&ce.isSimpleText()?ce.getTextContent():null}),W=$-P;let re=z.slice(0,W);H!==null&&H!==z?(P=t.$getPreviousSelection(),$=K,K.isSimpleText()?K.setTextContent(H):($=t.$createTextNode(H),K.replace($)),t.$isRangeSelection(P)&&P.isCollapsed()&&(P=P.anchor.offset,$.select(P,P))):K.isSimpleText()?(H=w.key===te,z=w.offset,z<P&&(z=$),P=H?z-P:0,$=H?z:W,H&&P===0?([P]=K.splitText(P,$),P.remove()):([,P]=K.splitText(P,$),P.remove())):(P=t.$createTextNode(re),K.replace(P)),P=0}}},Gn}var ou,Hf;function Ao(){return Hf||(Hf=1,ou=process.env.NODE_ENV==="development"?EC():TC()),ou}var Wf;function xC(){if(Wf)return Cn;Wf=1;var t=Ao(),e=Ht();function n(...re){return()=>{re.forEach(ce=>ce())}}function r(re){return`${re}px`}const c={attributes:!0,characterData:!0,childList:!0,subtree:!0};function d(re,ce,q){let G=null,j=null,_e=null,pe=[];const J=document.createElement("div");function ee(){if(G===null)throw Error("Unexpected null rootDOMNode");if(j===null)throw Error("Unexpected null parentDOMNode");const{left:ne,top:Y}=G.getBoundingClientRect(),U=j,Q=t.createRectsFromDOMRange(re,ce);J.isConnected||U.append(J);let k=!1;for(let m=0;m<Q.length;m++){const y=Q[m],R=pe[m]||document.createElement("div"),Z=R.style;Z.position!=="absolute"&&(Z.position="absolute",k=!0);const ue=r(y.left-ne);Z.left!==ue&&(Z.left=ue,k=!0);const ge=r(y.top-Y);Z.top!==ge&&(R.style.top=ge,k=!0);const ae=r(y.width);Z.width!==ae&&(R.style.width=ae,k=!0);const Te=r(y.height);Z.height!==Te&&(R.style.height=Te,k=!0),R.parentNode!==J&&(J.append(R),k=!0),pe[m]=R}for(;pe.length>Q.length;)pe.pop();k&&q(pe)}function F(){j=null,G=null,_e!==null&&_e.disconnect(),_e=null,J.remove();for(const ne of pe)ne.remove();pe=[]}function D(){const ne=re.getRootElement();if(ne===null)return F();const Y=ne.parentElement;if(!(Y instanceof HTMLElement))return F();F(),G=ne,j=Y,_e=new MutationObserver(U=>{const Q=re.getRootElement(),k=Q&&Q.parentElement;if(Q!==G||k!==j)return D();for(const m of U)if(!J.contains(m.target))return ee()}),_e.observe(Y,c),ee()}const V=re.registerRootListener(D);return()=>{V(),F()}}function f(re,ce){let q=null,G=null,j=null,_e=null,pe=()=>{};function J(ee){ee.read(()=>{const F=e.$getSelection();if(!e.$isRangeSelection(F)){q=null,G=null,j=null,_e=null,pe(),pe=()=>{};return}const{anchor:D,focus:V}=F,ne=D.getNode(),Y=ne.getKey(),U=D.offset,Q=V.getNode(),k=Q.getKey(),m=V.offset,y=re.getElementByKey(Y),R=re.getElementByKey(k),Z=q===null||y===null||U!==G||Y!==q.getKey()||ne!==q&&(!(q instanceof e.TextNode)||ne.updateDOM(q,y,re._config)),ue=j===null||R===null||m!==_e||k!==j.getKey()||Q!==j&&(!(j instanceof e.TextNode)||Q.updateDOM(j,R,re._config));if(Z||ue){const ge=re.getElementByKey(D.getNode().getKey()),ae=re.getElementByKey(V.getNode().getKey());if(ge!==null&&ae!==null&&ge.tagName==="SPAN"&&ae.tagName==="SPAN"){const Te=document.createRange();let Ae,ze,oe,ie;V.isBefore(D)?(Ae=ae,ze=V.offset,oe=ge,ie=D.offset):(Ae=ge,ze=D.offset,oe=ae,ie=V.offset);const de=Ae.firstChild;if(de===null)throw Error("Expected text node to be first child of span");const we=oe.firstChild;if(we===null)throw Error("Expected text node to be first child of span");Te.setStart(de,ze),Te.setEnd(we,ie),pe(),pe=d(re,Te,ke=>{for(const Be of ke){const Ye=Be.style;Ye.background!=="Highlight"&&(Ye.background="Highlight"),Ye.color!=="HighlightText"&&(Ye.color="HighlightText"),Ye.zIndex!=="-1"&&(Ye.zIndex="-1"),Ye.pointerEvents!=="none"&&(Ye.pointerEvents="none"),Ye.marginTop!==r(-1.5)&&(Ye.marginTop=r(-1.5)),Ye.paddingTop!==r(4)&&(Ye.paddingTop=r(4)),Ye.paddingBottom!==r(0)&&(Ye.paddingBottom=r(0))}ce!==void 0&&ce(ke)})}}q=ne,G=U,j=Q,_e=m})}return J(re.getEditorState()),n(re.registerUpdateListener(({editorState:ee})=>J(ee)),pe,()=>{pe()})}function p(re,...ce){ce.forEach(q=>{if(typeof q=="string"){const G=q.split(" ").filter(j=>j!=="");re.classList.add(...G)}})}function C(re,...ce){ce.forEach(q=>{typeof q=="string"&&re.classList.remove(...q.split(" "))})}function x(re,ce){for(const q of ce)if(re.type.startsWith(q))return!0;return!1}function T(re,ce){const q=re[Symbol.iterator]();return new Promise((G,j)=>{const _e=[],pe=()=>{const{done:J,value:ee}=q.next();if(J)return G(_e);const F=new FileReader;F.addEventListener("error",j),F.addEventListener("load",()=>{const D=F.result;typeof D=="string"&&_e.push({file:ee,result:D}),pe()}),x(ee,ce)?F.readAsDataURL(ee):pe()};pe()})}function O(re,ce){const q=[],G=(re||e.$getRoot()).getLatest(),j=ce||(e.$isElementNode(G)?G.getLastDescendant():G);let _e=G,pe=M(_e);for(;_e!==null&&!_e.is(j);)if(q.push({depth:pe,node:_e}),e.$isElementNode(_e)&&_e.getChildrenSize()>0)_e=_e.getFirstChild(),pe++;else{let J=null;for(;J===null&&_e!==null;)J=_e.getNextSibling(),J===null?(_e=_e.getParent(),pe--):_e=J}return _e!==null&&_e.is(j)&&q.push({depth:pe,node:_e}),q}function M(re){let ce=re,q=0;for(;(ce=ce.getParent())!==null;)q++;return q}function A(re,ce){let q=re;for(;q!=null;){if(q instanceof ce)return q;q=q.getParent()}return null}function v(re){const ce=w(re,q=>e.$isElementNode(q)&&!q.isInline());if(!e.$isElementNode(ce))throw Error(`Expected node ${re.__key} to have closest block element node.`);return ce}function w(re,ce){let q=re;for(;q!==e.$getRoot()&&q!=null;){if(ce(q))return q;q=q.getParent()}return null}function P(re,ce,q,G){const j=J=>J instanceof ce,_e=J=>{const ee=J.getChildren();for(let V=0;V<ee.length;V++){const ne=ee[V];if(j(ne))return null}let F=J,D=J;for(;F!==null;)if(D=F,F=F.getParent(),j(F))return{child:D,parent:F};return null},pe=J=>{const ee=_e(J);if(ee!==null){const{child:F,parent:D}=ee;if(F.is(J)){G(D,J);const V=F.getNextSiblings(),ne=V.length;if(D.insertAfter(F),ne!==0){const Y=q(D);F.insertAfter(Y);for(let U=0;U<ne;U++)Y.append(V[U])}!D.canBeEmpty()&&D.getChildrenSize()===0&&D.remove()}}};return re.registerNodeTransform(ce,pe)}function K(re,ce){const G=new Map,j=re._pendingEditorState;for(const[pe,J]of ce._nodeMap){const ee=t.$cloneWithProperties(J);e.$isTextNode(ee)&&(ee.__text=J.__text),G.set(pe,ee)}j&&(j._nodeMap=G),re._dirtyType=2;const _e=ce._selection;e.$setSelection(_e===null?null:_e.clone())}function $(re){const ce=e.$getSelection()||e.$getPreviousSelection();if(e.$isRangeSelection(ce)){const{focus:q}=ce,G=q.getNode(),j=q.offset;if(e.$isRootOrShadowRoot(G)){const _e=G.getChildAtIndex(j);_e==null?G.append(re):_e.insertBefore(re),re.selectNext()}else{let _e,pe;e.$isTextNode(G)?(_e=G.getParentOrThrow(),pe=G.getIndexWithinParent(),j>0&&(pe+=1,G.splitText(j))):(_e=G,pe=j);const[,J]=e.$splitNode(_e,pe);J.insertBefore(re),J.selectStart()}}else{if(ce!=null){const G=ce.getNodes();G[G.length-1].getTopLevelElementOrThrow().insertAfter(re)}else e.$getRoot().append(re);const q=e.$createParagraphNode();re.insertAfter(q),q.select()}return re.getLatest()}function W(re,ce){const q=ce();return re.replace(q),q.append(re),q}function H(re,ce){return re!==null?Object.getPrototypeOf(re).constructor.name===ce.name:!1}function z(re,ce){const q=[];for(let G=0;G<re.length;G++){const j=ce(re[G]);j!==null&&q.push(j)}return q}function te(re,ce){const q=re.getFirstChild();q!==null?q.insertBefore(ce):re.append(ce)}return Cn.$splitNode=e.$splitNode,Cn.isHTMLAnchorElement=e.isHTMLAnchorElement,Cn.isHTMLElement=e.isHTMLElement,Cn.$dfs=O,Cn.$filter=z,Cn.$findMatchingParent=w,Cn.$getNearestBlockElementAncestorOrThrow=v,Cn.$getNearestNodeOfType=A,Cn.$insertFirst=te,Cn.$insertNodeToNearestRoot=$,Cn.$restoreEditorState=K,Cn.$wrapNodeInElement=W,Cn.addClassNamesToElement=p,Cn.isMimeType=x,Cn.markSelection=f,Cn.mediaFileReader=T,Cn.mergeRegister=n,Cn.objectKlassEquals=H,Cn.positionNodeOnRange=d,Cn.registerNestedElementResolver=P,Cn.removeClassNamesFromElement=C,Cn}var Nn={},Kf;function vC(){if(Kf)return Nn;Kf=1;var t=Ao(),e=Ht();function n(C){let x=new URLSearchParams;x.append("code",C);for(let T=1;T<arguments.length;T++)x.append("v",arguments[T]);throw Error(`Minified Lexical error #${C}; visit https://lexical.dev/docs/error?${x} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(...C){return()=>{C.forEach(x=>x())}}let c={attributes:!0,characterData:!0,childList:!0,subtree:!0};function d(C,x,T){function O(){if(v===null)throw Error("Unexpected null rootDOMNode");if(w===null)throw Error("Unexpected null parentDOMNode");let{left:H,top:z}=v.getBoundingClientRect();var te=w;let re=t.createRectsFromDOMRange(C,x);$.isConnected||te.append($),te=!1;for(let G=0;G<re.length;G++){var ce=re[G];let j=K[G]||document.createElement("div"),_e=j.style;_e.position!=="absolute"&&(_e.position="absolute",te=!0);var q=`${ce.left-H}px`;_e.left!==q&&(_e.left=q,te=!0),q=`${ce.top-z}px`,_e.top!==q&&(j.style.top=q,te=!0),q=`${ce.width}px`,_e.width!==q&&(j.style.width=q,te=!0),ce=`${ce.height}px`,_e.height!==ce&&(j.style.height=ce,te=!0),j.parentNode!==$&&($.append(j),te=!0),K[G]=j}for(;K.length>re.length;)K.pop();te&&T(K)}function M(){v=w=null,P!==null&&P.disconnect(),P=null,$.remove();for(let H of K)H.remove();K=[]}function A(){let H=C.getRootElement();if(H===null)return M();let z=H.parentElement;if(!(z instanceof HTMLElement))return M();M(),v=H,w=z,P=new MutationObserver(te=>{let re=C.getRootElement(),ce=re&&re.parentElement;if(re!==v||ce!==w)return A();for(let q of te)if(!$.contains(q.target))return O()}),P.observe(z,c),O()}let v=null,w=null,P=null,K=[],$=document.createElement("div"),W=C.registerRootListener(A);return()=>{W(),M()}}function f(C,x){for(let T of x)if(C.type.startsWith(T))return!0;return!1}function p(C,x){for(;C!==e.$getRoot()&&C!=null;){if(x(C))return C;C=C.getParent()}return null}return Nn.$splitNode=e.$splitNode,Nn.isHTMLAnchorElement=e.isHTMLAnchorElement,Nn.isHTMLElement=e.isHTMLElement,Nn.$dfs=function(C,x){let T=[];C=(C||e.$getRoot()).getLatest(),x=x||(e.$isElementNode(C)?C.getLastDescendant():C);for(var O=C,M=0;(O=O.getParent())!==null;)M++;for(O=M;C!==null&&!C.is(x);)if(T.push({depth:O,node:C}),e.$isElementNode(C)&&0<C.getChildrenSize())C=C.getFirstChild(),O++;else for(M=null;M===null&&C!==null;)M=C.getNextSibling(),M===null?(C=C.getParent(),O--):C=M;return C!==null&&C.is(x)&&T.push({depth:O,node:C}),T},Nn.$filter=function(C,x){let T=[];for(let O=0;O<C.length;O++){let M=x(C[O]);M!==null&&T.push(M)}return T},Nn.$findMatchingParent=p,Nn.$getNearestBlockElementAncestorOrThrow=function(C){let x=p(C,T=>e.$isElementNode(T)&&!T.isInline());return e.$isElementNode(x)||n(4,C.__key),x},Nn.$getNearestNodeOfType=function(C,x){for(;C!=null;){if(C instanceof x)return C;C=C.getParent()}return null},Nn.$insertFirst=function(C,x){let T=C.getFirstChild();T!==null?T.insertBefore(x):C.append(x)},Nn.$insertNodeToNearestRoot=function(C){var x=e.$getSelection()||e.$getPreviousSelection();if(e.$isRangeSelection(x)){var{focus:T}=x;if(x=T.getNode(),T=T.offset,e.$isRootOrShadowRoot(x))T=x.getChildAtIndex(T),T==null?x.append(C):T.insertBefore(C),C.selectNext();else{let O,M;e.$isTextNode(x)?(O=x.getParentOrThrow(),M=x.getIndexWithinParent(),0<T&&(M+=1,x.splitText(T))):(O=x,M=T),[,x]=e.$splitNode(O,M),x.insertBefore(C),x.selectStart()}}else x!=null?(x=x.getNodes(),x[x.length-1].getTopLevelElementOrThrow().insertAfter(C)):e.$getRoot().append(C),x=e.$createParagraphNode(),C.insertAfter(x),x.select();return C.getLatest()},Nn.$restoreEditorState=function(C,x){let T=new Map,O=C._pendingEditorState;for(let[M,A]of x._nodeMap){let v=t.$cloneWithProperties(A);e.$isTextNode(v)&&(v.__text=A.__text),T.set(M,v)}O&&(O._nodeMap=T),C._dirtyType=2,C=x._selection,e.$setSelection(C===null?null:C.clone())},Nn.$wrapNodeInElement=function(C,x){return x=x(),C.replace(x),x.append(C),x},Nn.addClassNamesToElement=function(C,...x){x.forEach(T=>{typeof T=="string"&&(T=T.split(" ").filter(O=>O!==""),C.classList.add(...T))})},Nn.isMimeType=f,Nn.markSelection=function(C,x){function T(P){P.read(()=>{var K=e.$getSelection();if(e.$isRangeSelection(K)){var{anchor:$,focus:W}=K;K=$.getNode();var H=K.getKey(),z=$.offset,te=W.getNode(),re=te.getKey(),ce=W.offset,q=C.getElementByKey(H),G=C.getElementByKey(re);if(H=O===null||q===null||z!==M||H!==O.getKey()||K!==O&&(!(O instanceof e.TextNode)||K.updateDOM(O,q,C._config)),re=A===null||G===null||ce!==v||re!==A.getKey()||te!==A&&(!(A instanceof e.TextNode)||te.updateDOM(A,G,C._config)),H||re){q=C.getElementByKey($.getNode().getKey());var j=C.getElementByKey(W.getNode().getKey());if(q!==null&&j!==null&&q.tagName==="SPAN"&&j.tagName==="SPAN"){if(re=document.createRange(),W.isBefore($)?(H=j,G=W.offset,j=q,q=$.offset):(H=q,G=$.offset,q=W.offset),H=H.firstChild,H===null||(j=j.firstChild,j===null))throw Error("Expected text node to be first child of span");re.setStart(H,G),re.setEnd(j,q),w(),w=d(C,re,_e=>{for(let pe of _e){let J=pe.style;J.background!=="Highlight"&&(J.background="Highlight"),J.color!=="HighlightText"&&(J.color="HighlightText"),J.zIndex!=="-1"&&(J.zIndex="-1"),J.pointerEvents!=="none"&&(J.pointerEvents="none"),J.marginTop!=="-1.5px"&&(J.marginTop="-1.5px"),J.paddingTop!=="4px"&&(J.paddingTop="4px"),J.paddingBottom!=="0px"&&(J.paddingBottom="0px")}x!==void 0&&x(_e)})}}O=K,M=z,A=te,v=ce}else v=A=M=O=null,w(),w=()=>{}})}let O=null,M=null,A=null,v=null,w=()=>{};return T(C.getEditorState()),r(C.registerUpdateListener(({editorState:P})=>T(P)),w,()=>{w()})},Nn.mediaFileReader=function(C,x){let T=C[Symbol.iterator]();return new Promise((O,M)=>{let A=[],v=()=>{const{done:w,value:P}=T.next();if(w)return O(A);const K=new FileReader;K.addEventListener("error",M),K.addEventListener("load",()=>{const $=K.result;typeof $=="string"&&A.push({file:P,result:$}),v()}),f(P,x)?K.readAsDataURL(P):v()};v()})},Nn.mergeRegister=r,Nn.objectKlassEquals=function(C,x){return C!==null?Object.getPrototypeOf(C).constructor.name===x.name:!1},Nn.positionNodeOnRange=d,Nn.registerNestedElementResolver=function(C,x,T,O){return C.registerNodeTransform(x,M=>{e:{for(var A=M.getChildren(),v=0;v<A.length;v++)if(A[v]instanceof x){A=null;break e}for(A=M;A!==null;)if(v=A,A=A.getParent(),A instanceof x){A={child:v,parent:A};break e}A=null}if(A!==null){const{child:w,parent:P}=A;if(w.is(M)){if(O(P,M),M=w.getNextSiblings(),A=M.length,P.insertAfter(w),A!==0){v=T(P),w.insertAfter(v);for(let K=0;K<A;K++)v.append(M[K])}P.canBeEmpty()||P.getChildrenSize()!==0||P.remove()}}})},Nn.removeClassNamesFromElement=function(C,...x){x.forEach(T=>{typeof T=="string"&&C.classList.remove(...T.split(" "))})},Nn}var su,Uf;function on(){return Uf||(Uf=1,su=process.env.NODE_ENV==="development"?xC():vC()),su}var lu={},zf;function SC(){if(zf)return lu;zf=1;var t=Ht();function e(n){const r=window.location.origin,c=d=>{if(d.origin!==r)return;const f=n.getRootElement();if(document.activeElement!==f)return;const p=d.data;if(typeof p=="string"){let C;try{C=JSON.parse(p)}catch{return}if(C&&C.protocol==="nuanria_messaging"&&C.type==="request"){const x=C.payload;if(x&&x.functionId==="makeChanges"){const T=x.args;if(T){const[O,M,A,v,w,P]=T;n.update(()=>{const K=t.$getSelection();if(t.$isRangeSelection(K)){const $=K.anchor;let W=$.getNode(),H=0,z=0;if(t.$isTextNode(W)&&O>=0&&M>=0&&(H=O,z=O+M,K.setTextNodeRange(W,H,W,z)),(H!==z||A!=="")&&(K.insertRawText(A),W=$.getNode()),t.$isTextNode(W)){H=v,z=v+w;const te=W.getTextContentSize();H=H>te?te:H,z=z>te?te:z,K.setTextNodeRange(W,H,W,z)}d.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",c,!0),()=>{window.removeEventListener("message",c,!0)}}return lu.registerDragonSupport=e,lu}var au={},Gf;function wC(){if(Gf)return au;Gf=1;var t=Ht();return au.registerDragonSupport=function(e){let n=window.location.origin,r=c=>{if(c.origin===n){var d=e.getRootElement();if(document.activeElement===d&&(d=c.data,typeof d=="string")){try{var f=JSON.parse(d)}catch{return}if(f&&f.protocol==="nuanria_messaging"&&f.type==="request"&&(f=f.payload)&&f.functionId==="makeChanges"&&(f=f.args)){const[p,C,x,T,O]=f;e.update(()=>{const M=t.$getSelection();if(t.$isRangeSelection(M)){var A=M.anchor;let v=A.getNode(),w=0,P=0;t.$isTextNode(v)&&0<=p&&0<=C&&(w=p,P=p+C,M.setTextNodeRange(v,w,v,P)),(w!==P||x!=="")&&(M.insertRawText(x),v=A.getNode()),t.$isTextNode(v)&&(w=T,P=T+O,A=v.getTextContentSize(),w=w>A?A:w,P=P>A?A:P,M.setTextNodeRange(v,w,v,P)),c.stopImmediatePropagation()}})}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},au}var cu,Yf;function Np(){return Yf||(Yf=1,cu=process.env.NODE_ENV==="development"?SC():wC()),cu}var di={},Li={},Va={},Vf;function OC(){if(Vf)return Va;Vf=1;var t=Ao(),e=on(),n=Ht();function r(x,T){const O=T.body?T.body.childNodes:[];let M=[];for(let A=0;A<O.length;A++){const v=O[A];if(!p.has(v.nodeName)){const w=C(v,x);w!==null&&(M=M.concat(w))}}return M}function c(x,T){if(typeof document>"u"||typeof window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const O=document.createElement("div"),A=n.$getRoot().getChildren();for(let v=0;v<A.length;v++){const w=A[v];d(x,w,O,T)}return O.innerHTML}function d(x,T,O,M=null){let A=M!=null?T.isSelected(M):!0;const v=n.$isElementNode(T)&&T.excludeFromCopy("html");let w=T;if(M!==null){let te=t.$cloneWithProperties(T);te=n.$isTextNode(te)&&M!=null?t.$sliceSelectedTextNodeContent(M,te):te,w=te}const P=n.$isElementNode(w)?w.getChildren():[],K=x._nodes.get(w.getType());let $;K&&K.exportDOM!==void 0?$=K.exportDOM(x,w):$=w.exportDOM(x);const{element:W,after:H}=$;if(!W)return!1;const z=document.createDocumentFragment();for(let te=0;te<P.length;te++){const re=P[te],ce=d(x,re,z,M);!A&&n.$isElementNode(T)&&ce&&T.extractWithChild(re,M,"html")&&(A=!0)}if(A&&!v){if(e.isHTMLElement(W)&&W.append(z),O.append(W),H){const te=H.call(w,W);te&&W.replaceWith(te)}}else O.append(z);return A}function f(x,T){const{nodeName:O}=x,M=T._htmlConversions.get(O.toLowerCase());let A=null;if(M!==void 0)for(const v of M){const w=v(x);w!==null&&(A===null||A.priority<w.priority)&&(A=w)}return A!==null?A.conversion:null}const p=new Set(["STYLE","SCRIPT"]);function C(x,T,O=new Map,M){let A=[];if(p.has(x.nodeName))return A;let v=null;const w=f(x,T),P=w?w(x):null;let K=null;if(P!==null){K=P.after;const H=P.node;if(v=Array.isArray(H)?H[H.length-1]:H,v!==null){for(const[,z]of O)if(v=z(v,M),!v)break;v&&A.push(...Array.isArray(H)?H:[v])}P.forChild!=null&&O.set(x.nodeName,P.forChild)}const $=x.childNodes;let W=[];for(let H=0;H<$.length;H++)W.push(...C($[H],T,new Map(O),v));return K!=null&&(W=K(W)),v==null?A=A.concat(W):n.$isElementNode(v)&&v.append(...W),A}return Va.$generateHtmlFromNodes=c,Va.$generateNodesFromDOM=r,Va}var ja={},jf;function DC(){if(jf)return ja;jf=1;var t=Ao(),e=on(),n=Ht();function r(f,p,C,x=null){let T=x!=null?p.isSelected(x):!0,O=n.$isElementNode(p)&&p.excludeFromCopy("html");var M=p;x!==null&&(M=t.$cloneWithProperties(p),M=n.$isTextNode(M)&&x!=null?t.$sliceSelectedTextNodeContent(x,M):M);let A=n.$isElementNode(M)?M.getChildren():[];var v=f._nodes.get(M.getType());v=v&&v.exportDOM!==void 0?v.exportDOM(f,M):M.exportDOM(f);let{element:w,after:P}=v;if(!w)return!1;v=document.createDocumentFragment();for(let K=0;K<A.length;K++){let $=A[K],W=r(f,$,v,x);!T&&n.$isElementNode(p)&&W&&p.extractWithChild($,x,"html")&&(T=!0)}return T&&!O?(e.isHTMLElement(w)&&w.append(v),C.append(w),P&&(f=P.call(M,w))&&w.replaceWith(f)):C.append(v),T}let c=new Set(["STYLE","SCRIPT"]);function d(f,p,C=new Map,x){let T=[];if(c.has(f.nodeName))return T;let O=null;var M,{nodeName:A}=f,v=p._htmlConversions.get(A.toLowerCase());if(A=null,v!==void 0)for(M of v)v=M(f),v!==null&&(A===null||A.priority<v.priority)&&(A=v);if(A=(M=A!==null?A.conversion:null)?M(f):null,M=null,A!==null){if(M=A.after,v=A.node,O=Array.isArray(v)?v[v.length-1]:v,O!==null){for(var[,w]of C)if(O=w(O,x),!O)break;O&&T.push(...Array.isArray(v)?v:[O])}A.forChild!=null&&C.set(f.nodeName,A.forChild)}for(f=f.childNodes,x=[],w=0;w<f.length;w++)x.push(...d(f[w],p,new Map(C),O));return M!=null&&(x=M(x)),O==null?T=T.concat(x):n.$isElementNode(O)&&O.append(...x),T}return ja.$generateHtmlFromNodes=function(f,p){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let C=document.createElement("div"),x=n.$getRoot().getChildren();for(let T=0;T<x.length;T++)r(f,x[T],C,p);return C.innerHTML},ja.$generateNodesFromDOM=function(f,p){p=p.body?p.body.childNodes:[];let C=[];for(let T=0;T<p.length;T++){var x=p[T];c.has(x.nodeName)||(x=d(x,f),x!==null&&(C=C.concat(x)))}return C},ja}var uu,qf;function Ep(){return qf||(qf=1,uu=process.env.NODE_ENV==="development"?OC():DC()),uu}var Zf;function bC(){if(Zf)return Li;Zf=1;var t=Ep(),e=Ao(),n=on(),r=Ht();const c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",d=H=>c?(H||window).getSelection():null;function f(H){const z=r.$getSelection();if(z==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(z)&&z.isCollapsed()||z.getNodes().length===0?"":t.$generateHtmlFromNodes(H,z)}function p(H){const z=r.$getSelection();if(z==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(z)&&z.isCollapsed()||z.getNodes().length===0?null:JSON.stringify(v(H,z))}function C(H,z){const te=H.getData("text/plain")||H.getData("text/uri-list");te!=null&&z.insertRawText(te)}function x(H,z,te){const re=H.getData("application/x-lexical-editor");if(re)try{const G=JSON.parse(re);if(G.namespace===te._config.namespace&&Array.isArray(G.nodes)){const j=w(G.nodes);return T(te,j,z)}}catch{}const ce=H.getData("text/html");if(ce)try{const j=new DOMParser().parseFromString(ce,"text/html"),_e=t.$generateNodesFromDOM(te,j);return T(te,_e,z)}catch{}const q=H.getData("text/plain")||H.getData("text/uri-list");if(q!=null)if(r.$isRangeSelection(z)){const G=q.split(/(\r?\n|\t)/);G[G.length-1]===""&&G.pop();for(let j=0;j<G.length;j++){const _e=G[j];_e===`
70
- `||_e===`\r
71
- `?z.insertParagraph():_e===" "?z.insertNodes([r.$createTabNode()]):z.insertText(_e)}}else z.insertRawText(q)}function T(H,z,te){const re=r.DEPRECATED_$isGridSelection(te),ce=r.$isRangeSelection(te);if((re||ce&&n.$findMatchingParent(te.anchor.getNode(),G=>r.DEPRECATED_$isGridCellNode(G))!==null&&n.$findMatchingParent(te.focus.getNode(),G=>r.DEPRECATED_$isGridCellNode(G))!==null)&&z.length===1&&r.DEPRECATED_$isGridNode(z[0])){O(z,te,!1,H);return}te.insertNodes(z)}function O(H,z,te,re){if(H.length!==1||!r.DEPRECATED_$isGridNode(H[0]))throw Error("$mergeGridNodesStrategy: Expected Grid insertion.");const ce=H[0],q=ce.getChildren(),G=ce.getFirstChildOrThrow().getChildrenSize(),j=ce.getChildrenSize(),_e=n.$findMatchingParent(z.anchor.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z)),pe=_e&&n.$findMatchingParent(_e,Z=>r.DEPRECATED_$isGridRowNode(Z)),J=pe&&n.$findMatchingParent(pe,Z=>r.DEPRECATED_$isGridNode(Z));if(!r.DEPRECATED_$isGridCellNode(_e)||!r.DEPRECATED_$isGridRowNode(pe)||!r.DEPRECATED_$isGridNode(J))throw Error("$mergeGridNodesStrategy: Expected selection to be inside of a Grid.");const ee=pe.getIndexWithinParent(),F=Math.min(J.getChildrenSize()-1,ee+j-1),D=_e.getIndexWithinParent(),V=Math.min(pe.getChildrenSize()-1,D+G-1),ne=Math.min(D,V),Y=Math.min(ee,F),U=Math.max(D,V),Q=Math.max(ee,F),k=J.getChildren();let m=0,y,R;for(let Z=Y;Z<=Q;Z++){const ue=k[Z];if(!r.DEPRECATED_$isGridRowNode(ue))throw Error("getNodes: expected to find GridRowNode");const ge=q[m];if(!r.DEPRECATED_$isGridRowNode(ge))throw Error("getNodes: expected to find GridRowNode");const ae=ue.getChildren(),Te=ge.getChildren();let Ae=0;for(let ze=ne;ze<=U;ze++){const oe=ae[ze];if(!r.DEPRECATED_$isGridCellNode(oe))throw Error("getNodes: expected to find GridCellNode");const ie=Te[Ae];if(!r.DEPRECATED_$isGridCellNode(ie))throw Error("getNodes: expected to find GridCellNode");Z===Y&&ze===ne?y=oe.getKey():Z===Q&&ze===U&&(R=oe.getKey());const de=oe.getChildren();ie.getChildren().forEach(we=>{r.$isTextNode(we)&&r.$createParagraphNode().append(we),oe.append(we)}),de.forEach(we=>we.remove()),Ae++}m++}if(y&&R){const Z=r.DEPRECATED_$createGridSelection();Z.set(J.getKey(),y,R),r.$setSelection(Z),re.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}}function M(H){const z=H.exportJSON(),te=H.constructor;if(z.type!==te.getType())throw Error(`LexicalNode: Node ${te.name} does not implement .exportJSON().`);const re=z.children;if(r.$isElementNode(H)&&!Array.isArray(re))throw Error(`LexicalNode: Node ${te.name} is an element but .exportJSON() does not have a children array.`);return z}function A(H,z,te,re=[]){let ce=z!=null?te.isSelected(z):!0;const q=r.$isElementNode(te)&&te.excludeFromCopy("html");let G=te;if(z!==null){let pe=e.$cloneWithProperties(te);pe=r.$isTextNode(pe)&&z!=null?e.$sliceSelectedTextNodeContent(z,pe):pe,G=pe}const j=r.$isElementNode(G)?G.getChildren():[],_e=M(G);if(r.$isTextNode(G)){const pe=G.__text;pe.length>0?_e.text=pe:ce=!1}for(let pe=0;pe<j.length;pe++){const J=j[pe],ee=A(H,z,J,_e.children);!ce&&r.$isElementNode(te)&&ee&&te.extractWithChild(J,z,"clone")&&(ce=!0)}if(ce&&!q)re.push(_e);else if(Array.isArray(_e.children))for(let pe=0;pe<_e.children.length;pe++){const J=_e.children[pe];re.push(J)}return ce}function v(H,z){const te=[],ce=r.$getRoot().getChildren();for(let q=0;q<ce.length;q++){const G=ce[q];A(H,z,G,te)}return{namespace:H._config.namespace,nodes:te}}function w(H){const z=[];for(let te=0;te<H.length;te++){const re=H[te],ce=r.$parseSerializedNode(re);r.$isTextNode(ce)&&e.$addNodeStyle(ce),z.push(ce)}return z}const P=50;let K=null;async function $(H,z){if(K!==null)return!1;if(z!==null)return new Promise((j,_e)=>{H.update(()=>{j(W(H,z))})});const te=H.getRootElement(),re=H._window==null?window.document:H._window.document,ce=d(H._window);if(te===null||ce===null)return!1;const q=re.createElement("span");q.style.cssText="position: fixed; top: -1000px;",q.append(re.createTextNode("#")),te.append(q);const G=new Range;return G.setStart(q,0),G.setEnd(q,1),ce.removeAllRanges(),ce.addRange(G),new Promise((j,_e)=>{const pe=H.registerCommand(r.COPY_COMMAND,J=>(n.objectKlassEquals(J,ClipboardEvent)&&(pe(),K!==null&&(window.clearTimeout(K),K=null),j(W(H,J))),!0),r.COMMAND_PRIORITY_CRITICAL);K=window.setTimeout(()=>{pe(),K=null,j(!1)},P),re.execCommand("copy"),q.remove()})}function W(H,z){const te=d(H._window);if(!te)return!1;const re=te.anchorNode,ce=te.focusNode;if(re!==null&&ce!==null&&!r.isSelectionWithinEditor(H,re,ce))return!1;z.preventDefault();const q=z.clipboardData,G=r.$getSelection();if(q===null||G===null)return!1;const j=f(H),_e=p(H);let pe="";return G!==null&&(pe=G.getTextContent()),j!==null&&q.setData("text/html",j),_e!==null&&q.setData("application/x-lexical-editor",_e),q.setData("text/plain",pe),!0}return Li.$generateJSONFromSelectedNodes=v,Li.$generateNodesFromSerializedNodes=w,Li.$getHtmlContent=f,Li.$getLexicalContent=p,Li.$insertDataTransferForPlainText=C,Li.$insertDataTransferForRichText=x,Li.$insertGeneratedNodes=T,Li.copyToClipboard=$,Li}var Ii={},Jf;function RC(){if(Jf)return Ii;Jf=1;var t=Ep(),e=Ao(),n=on(),r=Ht();function c(w){let P=new URLSearchParams;P.append("code",w);for(let K=1;K<arguments.length;K++)P.append("v",arguments[K]);throw Error(`Minified Lexical error #${w}; visit https://lexical.dev/docs/error?${P} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function f(w){let P=r.$getSelection();if(P==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(P)&&P.isCollapsed()||P.getNodes().length===0?"":t.$generateHtmlFromNodes(w,P)}function p(w){let P=r.$getSelection();if(P==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(P)&&P.isCollapsed()||P.getNodes().length===0?null:JSON.stringify(O(w,P))}function C(w,P,K){let $=r.DEPRECATED_$isGridSelection(K),W=r.$isRangeSelection(K);($||W&&n.$findMatchingParent(K.anchor.getNode(),H=>r.DEPRECATED_$isGridCellNode(H))!==null&&n.$findMatchingParent(K.focus.getNode(),H=>r.DEPRECATED_$isGridCellNode(H))!==null)&&P.length===1&&r.DEPRECATED_$isGridNode(P[0])?x(P,K,!1,w):K.insertNodes(P)}function x(w,P,K,$){w.length===1&&r.DEPRECATED_$isGridNode(w[0])||c(42);var W=w[0];w=W.getChildren(),K=W.getFirstChildOrThrow().getChildrenSize();var H=W.getChildrenSize(),z=n.$findMatchingParent(P.anchor.getNode(),_e=>r.DEPRECATED_$isGridCellNode(_e));P=(W=z&&n.$findMatchingParent(z,_e=>r.DEPRECATED_$isGridRowNode(_e)))&&n.$findMatchingParent(W,_e=>r.DEPRECATED_$isGridNode(_e)),r.DEPRECATED_$isGridCellNode(z)&&r.DEPRECATED_$isGridRowNode(W)&&r.DEPRECATED_$isGridNode(P)||c(43);var te=W.getIndexWithinParent(),re=Math.min(P.getChildrenSize()-1,te+H-1);H=z.getIndexWithinParent(),z=Math.min(W.getChildrenSize()-1,H+K-1),K=Math.min(H,z),W=Math.min(te,re),H=Math.max(H,z),te=Math.max(te,re),re=P.getChildren(),z=0;let ce,q;for(let _e=W;_e<=te;_e++){var G=re[_e];r.DEPRECATED_$isGridRowNode(G)||c(24);var j=w[z];r.DEPRECATED_$isGridRowNode(j)||c(24),G=G.getChildren(),j=j.getChildren();let pe=0;for(let J=K;J<=H;J++){let ee=G[J];r.DEPRECATED_$isGridCellNode(ee)||c(25);let F=j[pe];r.DEPRECATED_$isGridCellNode(F)||c(25),_e===W&&J===K?ce=ee.getKey():_e===te&&J===H&&(q=ee.getKey());let D=ee.getChildren();F.getChildren().forEach(V=>{r.$isTextNode(V)&&r.$createParagraphNode().append(V),ee.append(V)}),D.forEach(V=>V.remove()),pe++}z++}ce&&q&&(w=r.DEPRECATED_$createGridSelection(),w.set(P.getKey(),ce,q),r.$setSelection(w),$.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}function T(w,P,K,$=[]){let W=P!=null?K.isSelected(P):!0,H=r.$isElementNode(K)&&K.excludeFromCopy("html");var z=K;if(P!==null){var te=e.$cloneWithProperties(K);z=te=r.$isTextNode(te)&&P!=null?e.$sliceSelectedTextNodeContent(P,te):te}let re=r.$isElementNode(z)?z.getChildren():[];var ce=z;te=ce.exportJSON();var q=ce.constructor;te.type!==q.getType()&&c(58,q.name);let G=te.children;for(r.$isElementNode(ce)&&(Array.isArray(G)||c(59,q.name)),r.$isTextNode(z)&&(z=z.__text,0<z.length?te.text=z:W=!1),z=0;z<re.length;z++)ce=re[z],q=T(w,P,ce,te.children),!W&&r.$isElementNode(K)&&q&&K.extractWithChild(ce,P,"clone")&&(W=!0);if(W&&!H)$.push(te);else if(Array.isArray(te.children))for(w=0;w<te.children.length;w++)$.push(te.children[w]);return W}function O(w,P){let K=[],$=r.$getRoot().getChildren();for(let W=0;W<$.length;W++)T(w,P,$[W],K);return{namespace:w._config.namespace,nodes:K}}function M(w){let P=[];for(let K=0;K<w.length;K++){let $=r.$parseSerializedNode(w[K]);r.$isTextNode($)&&e.$addNodeStyle($),P.push($)}return P}let A=null;function v(w,P){var K=d?(w._window||window).getSelection():null;if(!K)return!1;var $=K.anchorNode;if(K=K.focusNode,$!==null&&K!==null&&!r.isSelectionWithinEditor(w,$,K)||(P.preventDefault(),P=P.clipboardData,$=r.$getSelection(),P===null||$===null))return!1;K=f(w),w=p(w);let W="";return $!==null&&(W=$.getTextContent()),K!==null&&P.setData("text/html",K),w!==null&&P.setData("application/x-lexical-editor",w),P.setData("text/plain",W),!0}return Ii.$generateJSONFromSelectedNodes=O,Ii.$generateNodesFromSerializedNodes=M,Ii.$getHtmlContent=f,Ii.$getLexicalContent=p,Ii.$insertDataTransferForPlainText=function(w,P){w=w.getData("text/plain")||w.getData("text/uri-list"),w!=null&&P.insertRawText(w)},Ii.$insertDataTransferForRichText=function(w,P,K){var $=w.getData("application/x-lexical-editor");if($)try{let H=JSON.parse($);if(H.namespace===K._config.namespace&&Array.isArray(H.nodes)){let z=M(H.nodes);return C(K,z,P)}}catch{}if($=w.getData("text/html"))try{var W=new DOMParser().parseFromString($,"text/html");let H=t.$generateNodesFromDOM(K,W);return C(K,H,P)}catch{}if(w=w.getData("text/plain")||w.getData("text/uri-list"),w!=null)if(r.$isRangeSelection(P))for(w=w.split(/(\r?\n|\t)/),w[w.length-1]===""&&w.pop(),K=0;K<w.length;K++)W=w[K],W===`
72
- `||W===`\r
73
- `?P.insertParagraph():W===" "?P.insertNodes([r.$createTabNode()]):P.insertText(W);else P.insertRawText(w)},Ii.$insertGeneratedNodes=C,Ii.copyToClipboard=async function(w,P){if(A!==null)return!1;if(P!==null)return new Promise(z=>{w.update(()=>{z(v(w,P))})});var K=w.getRootElement();let $=w._window==null?window.document:w._window.document,W=d?(w._window||window).getSelection():null;if(K===null||W===null)return!1;let H=$.createElement("span");return H.style.cssText="position: fixed; top: -1000px;",H.append($.createTextNode("#")),K.append(H),K=new Range,K.setStart(H,0),K.setEnd(H,1),W.removeAllRanges(),W.addRange(K),new Promise(z=>{let te=w.registerCommand(r.COPY_COMMAND,re=>(n.objectKlassEquals(re,ClipboardEvent)&&(te(),A!==null&&(window.clearTimeout(A),A=null),z(v(w,re))),!0),r.COMMAND_PRIORITY_CRITICAL);A=window.setTimeout(()=>{te(),A=null,z(!1)},50),$.execCommand("copy"),H.remove()})},Ii}var du,Xf;function Tp(){return Xf||(Xf=1,du=process.env.NODE_ENV==="development"?bC():RC()),du}var Qf;function MC(){if(Qf)return di;Qf=1;var t=Tp(),e=Ao(),n=on(),r=Ht();function c(pe,J){if(typeof document.caretRangeFromPoint<"u"){const ee=document.caretRangeFromPoint(pe,J);return ee===null?null:{node:ee.startContainer,offset:ee.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const ee=document.caretPositionFromPoint(pe,J);return ee===null?null:{node:ee.offsetNode,offset:ee.offset}}else return null}const d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f=d&&"documentMode"in document?document.documentMode:null,p=d&&"InputEvent"in window&&!f?"getTargetRanges"in new window.InputEvent("input"):!1,C=d&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),x=d&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,T=d&&/^(?=.*Chrome).*/i.test(navigator.userAgent),O=d&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!T,M=r.createCommand("DRAG_DROP_PASTE_FILE");class A extends r.ElementNode{static getType(){return"quote"}static clone(J){return new A(J.__key)}constructor(J){super(J)}createDOM(J){const ee=document.createElement("blockquote");return n.addClassNamesToElement(ee,J.theme.quote),ee}updateDOM(J,ee){return!1}static importDOM(){return{blockquote:J=>({conversion:W,priority:0})}}exportDOM(J){const{element:ee}=super.exportDOM(J);if(ee&&n.isHTMLElement(ee)){this.isEmpty()&&ee.append(document.createElement("br"));const F=this.getFormatType();ee.style.textAlign=F;const D=this.getDirection();D&&(ee.dir=D)}return{element:ee}}static importJSON(J){const ee=v();return ee.setFormat(J.format),ee.setIndent(J.indent),ee.setDirection(J.direction),ee}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(J,ee){const F=r.$createParagraphNode(),D=this.getDirection();return F.setDirection(D),this.insertAfter(F,ee),F}collapseAtStart(){const J=r.$createParagraphNode();return this.getChildren().forEach(F=>J.append(F)),this.replace(J),!0}}function v(){return r.$applyNodeReplacement(new A)}function w(pe){return pe instanceof A}class P extends r.ElementNode{static getType(){return"heading"}static clone(J){return new P(J.__tag,J.__key)}constructor(J,ee){super(ee),this.__tag=J}getTag(){return this.__tag}createDOM(J){const ee=this.__tag,F=document.createElement(ee),V=J.theme.heading;if(V!==void 0){const ne=V[ee];n.addClassNamesToElement(F,ne)}return F}updateDOM(J,ee){return!1}static importDOM(){return{h1:J=>({conversion:$,priority:0}),h2:J=>({conversion:$,priority:0}),h3:J=>({conversion:$,priority:0}),h4:J=>({conversion:$,priority:0}),h5:J=>({conversion:$,priority:0}),h6:J=>({conversion:$,priority:0}),p:J=>{const F=J.firstChild;return F!==null&&K(F)?{conversion:()=>({node:null}),priority:3}:null},span:J=>K(J)?{conversion:ee=>({node:H("h1")}),priority:3}:null}}exportDOM(J){const{element:ee}=super.exportDOM(J);if(ee&&n.isHTMLElement(ee)){this.isEmpty()&&ee.append(document.createElement("br"));const F=this.getFormatType();ee.style.textAlign=F;const D=this.getDirection();D&&(ee.dir=D)}return{element:ee}}static importJSON(J){const ee=H(J.tag);return ee.setFormat(J.format),ee.setIndent(J.indent),ee.setDirection(J.direction),ee}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(J,ee=!0){const F=J?J.anchor.offset:0,D=F===this.getTextContentSize()||!J?r.$createParagraphNode():H(this.getTag()),V=this.getDirection();if(D.setDirection(V),this.insertAfter(D,ee),F===0&&!this.isEmpty()&&J){const ne=r.$createParagraphNode();ne.select(),this.replace(ne,!0)}return D}collapseAtStart(){const J=this.isEmpty()?r.$createParagraphNode():H(this.getTag());return this.getChildren().forEach(F=>J.append(F)),this.replace(J),!0}extractWithChild(){return!0}}function K(pe){return pe.nodeName.toLowerCase()==="span"?pe.style.fontSize==="26pt":!1}function $(pe){const J=pe.nodeName.toLowerCase();let ee=null;return(J==="h1"||J==="h2"||J==="h3"||J==="h4"||J==="h5"||J==="h6")&&(ee=H(J),pe.style!==null&&ee.setFormat(pe.style.textAlign)),{node:ee}}function W(pe){const J=v();return pe.style!==null&&J.setFormat(pe.style.textAlign),{node:J}}function H(pe){return r.$applyNodeReplacement(new P(pe))}function z(pe){return pe instanceof P}function te(pe,J){pe.preventDefault(),J.update(()=>{const ee=r.$getSelection(),F=pe instanceof InputEvent||pe instanceof KeyboardEvent?null:pe.clipboardData;F!=null&&r.$INTERNAL_isPointSelection(ee)&&t.$insertDataTransferForRichText(F,ee,J)},{tag:"paste"})}async function re(pe,J){await t.copyToClipboard(J,n.objectKlassEquals(pe,ClipboardEvent)?pe:null),J.update(()=>{const ee=r.$getSelection();r.$isRangeSelection(ee)?ee.removeText():r.$isNodeSelection(ee)&&ee.getNodes().forEach(F=>F.remove())})}function ce(pe){let J=null;if(pe instanceof DragEvent?J=pe.dataTransfer:pe instanceof ClipboardEvent&&(J=pe.clipboardData),J===null)return[!1,[],!1];const ee=J.types,F=ee.includes("Files"),D=ee.includes("text/html")||ee.includes("text/plain");return[F,Array.from(J.files),D]}function q(pe){const J=r.$getSelection();if(!r.$isRangeSelection(J))return!1;const ee=new Set,F=J.getNodes();for(let D=0;D<F.length;D++){const V=F[D],ne=V.getKey();if(ee.has(ne))continue;const Y=n.$getNearestBlockElementAncestorOrThrow(V),U=Y.getKey();Y.canIndent()&&!ee.has(U)&&(ee.add(U),pe(Y))}return ee.size>0}function G(pe){const J=r.$getNearestNodeFromDOMNode(pe);return r.$isDecoratorNode(J)}function j(pe){const J=pe.focus;return J.key==="root"&&J.offset===r.$getRoot().getChildrenSize()}function _e(pe){return n.mergeRegister(pe.registerCommand(r.CLICK_COMMAND,ee=>{const F=r.$getSelection();return r.$isNodeSelection(F)?(F.clear(),!0):!1},0),pe.registerCommand(r.DELETE_CHARACTER_COMMAND,ee=>{const F=r.$getSelection();return r.$isRangeSelection(F)?(F.deleteCharacter(ee),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_WORD_COMMAND,ee=>{const F=r.$getSelection();return r.$isRangeSelection(F)?(F.deleteWord(ee),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_LINE_COMMAND,ee=>{const F=r.$getSelection();return r.$isRangeSelection(F)?(F.deleteLine(ee),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,ee=>{const F=r.$getSelection();if(typeof ee=="string")r.$INTERNAL_isPointSelection(F)&&F.insertText(ee);else{if(!r.$INTERNAL_isPointSelection(F))return!1;const D=ee.dataTransfer;if(D!=null)t.$insertDataTransferForRichText(D,F,pe);else if(r.$isRangeSelection(F)){const V=ee.data;return V&&F.insertText(V),!0}}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const ee=r.$getSelection();return r.$isRangeSelection(ee)?(ee.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_TEXT_COMMAND,ee=>{const F=r.$getSelection();return r.$isRangeSelection(F)?(F.formatText(ee),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_ELEMENT_COMMAND,ee=>{const F=r.$getSelection();if(!r.$isRangeSelection(F)&&!r.$isNodeSelection(F))return!1;const D=F.getNodes();for(const V of D){const ne=n.$findMatchingParent(V,Y=>r.$isElementNode(Y)&&!Y.isInline());ne!==null&&ne.setFormat(ee)}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_LINE_BREAK_COMMAND,ee=>{const F=r.$getSelection();return r.$isRangeSelection(F)?(F.insertLineBreak(ee),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const ee=r.$getSelection();return r.$isRangeSelection(ee)?(ee.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INDENT_CONTENT_COMMAND,()=>q(ee=>{const F=ee.getIndent();ee.setIndent(F+1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>q(ee=>{const F=ee.getIndent();F>0&&ee.setIndent(F-1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_UP_COMMAND,ee=>{const F=r.$getSelection();if(r.$isNodeSelection(F)&&!G(ee.target)){const D=F.getNodes();if(D.length>0)return D[0].selectPrevious(),!0}else if(r.$isRangeSelection(F)){const D=r.$getAdjacentNode(F.focus,!0);if(!ee.shiftKey&&r.$isDecoratorNode(D)&&!D.isIsolated()&&!D.isInline())return D.selectPrevious(),ee.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_DOWN_COMMAND,ee=>{const F=r.$getSelection();if(r.$isNodeSelection(F)){const D=F.getNodes();if(D.length>0)return D[0].selectNext(0,0),!0}else if(r.$isRangeSelection(F)){if(j(F))return ee.preventDefault(),!0;const D=r.$getAdjacentNode(F.focus,!1);if(!ee.shiftKey&&r.$isDecoratorNode(D)&&!D.isIsolated()&&!D.isInline())return D.selectNext(),ee.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_LEFT_COMMAND,ee=>{const F=r.$getSelection();if(r.$isNodeSelection(F)){const D=F.getNodes();if(D.length>0)return ee.preventDefault(),D[0].selectPrevious(),!0}if(!r.$isRangeSelection(F))return!1;if(e.$shouldOverrideDefaultCharacterSelection(F,!0)){const D=ee.shiftKey;return ee.preventDefault(),e.$moveCharacter(F,D,!0),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,ee=>{const F=r.$getSelection();if(r.$isNodeSelection(F)&&!G(ee.target)){const V=F.getNodes();if(V.length>0)return ee.preventDefault(),V[0].selectNext(0,0),!0}if(!r.$isRangeSelection(F))return!1;const D=ee.shiftKey;return e.$shouldOverrideDefaultCharacterSelection(F,!1)?(ee.preventDefault(),e.$moveCharacter(F,D,!1),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_BACKSPACE_COMMAND,ee=>{if(G(ee.target))return!1;const F=r.$getSelection();if(!r.$isRangeSelection(F))return!1;ee.preventDefault();const{anchor:D}=F,V=D.getNode();return F.isCollapsed()&&D.offset===0&&!r.$isRootNode(V)&&n.$getNearestBlockElementAncestorOrThrow(V).getIndent()>0?pe.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_DELETE_COMMAND,ee=>{if(G(ee.target))return!1;const F=r.$getSelection();return r.$isRangeSelection(F)?(ee.preventDefault(),pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ENTER_COMMAND,ee=>{const F=r.$getSelection();if(!r.$isRangeSelection(F))return!1;if(ee!==null){if((x||C||O)&&p)return!1;if(ee.preventDefault(),ee.shiftKey)return pe.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return pe.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const ee=r.$getSelection();return r.$isRangeSelection(ee)?(pe.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DROP_COMMAND,ee=>{const[,F]=ce(ee);if(F.length>0){const V=ee.clientX,ne=ee.clientY,Y=c(V,ne);if(Y!==null){const{offset:U,node:Q}=Y,k=r.$getNearestNodeFromDOMNode(Q);if(k!==null){const m=r.$createRangeSelection();if(r.$isTextNode(k))m.anchor.set(k.getKey(),U,"text"),m.focus.set(k.getKey(),U,"text");else{const R=k.getParentOrThrow().getKey(),Z=k.getIndexWithinParent()+1;m.anchor.set(R,Z,"element"),m.focus.set(R,Z,"element")}const y=r.$normalizeSelection__EXPERIMENTAL(m);r.$setSelection(y)}pe.dispatchCommand(M,F)}return ee.preventDefault(),!0}const D=r.$getSelection();return!!r.$isRangeSelection(D)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGSTART_COMMAND,ee=>{const[F]=ce(ee),D=r.$getSelection();return!(F&&!r.$isRangeSelection(D))},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGOVER_COMMAND,ee=>{const[F]=ce(ee),D=r.$getSelection();if(F&&!r.$isRangeSelection(D))return!1;const V=ee.clientX,ne=ee.clientY,Y=c(V,ne);if(Y!==null){const U=r.$getNearestNodeFromDOMNode(Y.node);r.$isDecoratorNode(U)&&ee.preventDefault()}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.COPY_COMMAND,ee=>(t.copyToClipboard(pe,n.objectKlassEquals(ee,ClipboardEvent)?ee:null),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CUT_COMMAND,ee=>(re(ee,pe),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.PASTE_COMMAND,ee=>{const[,F,D]=ce(ee);if(F.length>0&&!D)return pe.dispatchCommand(M,F),!0;if(r.isSelectionCapturedInDecoratorInput(ee.target))return!1;const V=r.$getSelection();return r.$INTERNAL_isPointSelection(V)?(te(ee,pe),!0):!1},r.COMMAND_PRIORITY_EDITOR))}return di.$createHeadingNode=H,di.$createQuoteNode=v,di.$isHeadingNode=z,di.$isQuoteNode=w,di.DRAG_DROP_PASTE=M,di.HeadingNode=P,di.QuoteNode=A,di.eventFiles=ce,di.registerRichText=_e,di}var fi={},eh;function AC(){if(eh)return fi;eh=1;var t=Tp(),e=Ao(),n=on(),r=Ht();function c(q,G){return typeof document.caretRangeFromPoint<"u"?(q=document.caretRangeFromPoint(q,G),q===null?null:{node:q.startContainer,offset:q.startOffset}):document.caretPositionFromPoint!=="undefined"?(q=document.caretPositionFromPoint(q,G),q===null?null:{node:q.offsetNode,offset:q.offset}):null}let d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f=d&&"documentMode"in document?document.documentMode:null,p=d&&"InputEvent"in window&&!f?"getTargetRanges"in new window.InputEvent("input"):!1,C=d&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),x=d&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,T=d&&/^(?=.*Chrome).*/i.test(navigator.userAgent),O=d&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!T,M=r.createCommand("DRAG_DROP_PASTE_FILE");class A extends r.ElementNode{static getType(){return"quote"}static clone(G){return new A(G.__key)}constructor(G){super(G)}createDOM(G){let j=document.createElement("blockquote");return n.addClassNamesToElement(j,G.theme.quote),j}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:$,priority:0})}}exportDOM(G){if({element:G}=super.exportDOM(G),G&&n.isHTMLElement(G)){this.isEmpty()&&G.append(document.createElement("br"));var j=this.getFormatType();G.style.textAlign=j,(j=this.getDirection())&&(G.dir=j)}return{element:G}}static importJSON(G){let j=v();return j.setFormat(G.format),j.setIndent(G.indent),j.setDirection(G.direction),j}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(G,j){G=r.$createParagraphNode();let _e=this.getDirection();return G.setDirection(_e),this.insertAfter(G,j),G}collapseAtStart(){let G=r.$createParagraphNode();return this.getChildren().forEach(j=>G.append(j)),this.replace(G),!0}}function v(){return r.$applyNodeReplacement(new A)}class w extends r.ElementNode{static getType(){return"heading"}static clone(G){return new w(G.__tag,G.__key)}constructor(G,j){super(j),this.__tag=G}getTag(){return this.__tag}createDOM(G){let j=this.__tag,_e=document.createElement(j);return G=G.theme.heading,G!==void 0&&n.addClassNamesToElement(_e,G[j]),_e}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:K,priority:0}),h2:()=>({conversion:K,priority:0}),h3:()=>({conversion:K,priority:0}),h4:()=>({conversion:K,priority:0}),h5:()=>({conversion:K,priority:0}),h6:()=>({conversion:K,priority:0}),p:G=>(G=G.firstChild,G!==null&&P(G)?{conversion:()=>({node:null}),priority:3}:null),span:G=>P(G)?{conversion:()=>({node:W("h1")}),priority:3}:null}}exportDOM(G){if({element:G}=super.exportDOM(G),G&&n.isHTMLElement(G)){this.isEmpty()&&G.append(document.createElement("br"));var j=this.getFormatType();G.style.textAlign=j,(j=this.getDirection())&&(G.dir=j)}return{element:G}}static importJSON(G){let j=W(G.tag);return j.setFormat(G.format),j.setIndent(G.indent),j.setDirection(G.direction),j}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(G,j=!0){let _e=G?G.anchor.offset:0,pe=_e!==this.getTextContentSize()&&G?W(this.getTag()):r.$createParagraphNode(),J=this.getDirection();return pe.setDirection(J),this.insertAfter(pe,j),_e===0&&!this.isEmpty()&&G&&(G=r.$createParagraphNode(),G.select(),this.replace(G,!0)),pe}collapseAtStart(){let G=this.isEmpty()?r.$createParagraphNode():W(this.getTag());return this.getChildren().forEach(j=>G.append(j)),this.replace(G),!0}extractWithChild(){return!0}}function P(q){return q.nodeName.toLowerCase()==="span"?q.style.fontSize==="26pt":!1}function K(q){let G=q.nodeName.toLowerCase(),j=null;return(G==="h1"||G==="h2"||G==="h3"||G==="h4"||G==="h5"||G==="h6")&&(j=W(G),q.style!==null&&j.setFormat(q.style.textAlign)),{node:j}}function $(q){let G=v();return q.style!==null&&G.setFormat(q.style.textAlign),{node:G}}function W(q){return r.$applyNodeReplacement(new w(q))}function H(q,G){q.preventDefault(),G.update(()=>{let j=r.$getSelection(),_e=q instanceof InputEvent||q instanceof KeyboardEvent?null:q.clipboardData;_e!=null&&r.$INTERNAL_isPointSelection(j)&&t.$insertDataTransferForRichText(_e,j,G)},{tag:"paste"})}async function z(q,G){await t.copyToClipboard(G,n.objectKlassEquals(q,ClipboardEvent)?q:null),G.update(()=>{let j=r.$getSelection();r.$isRangeSelection(j)?j.removeText():r.$isNodeSelection(j)&&j.getNodes().forEach(_e=>_e.remove())})}function te(q){let G=null;if(q instanceof DragEvent?G=q.dataTransfer:q instanceof ClipboardEvent&&(G=q.clipboardData),G===null)return[!1,[],!1];var j=G.types;return q=j.includes("Files"),j=j.includes("text/html")||j.includes("text/plain"),[q,Array.from(G.files),j]}function re(q){var G=r.$getSelection();if(!r.$isRangeSelection(G))return!1;let j=new Set;G=G.getNodes();for(let J=0;J<G.length;J++){var _e=G[J],pe=_e.getKey();j.has(pe)||(_e=n.$getNearestBlockElementAncestorOrThrow(_e),pe=_e.getKey(),_e.canIndent()&&!j.has(pe)&&(j.add(pe),q(_e)))}return 0<j.size}function ce(q){return q=r.$getNearestNodeFromDOMNode(q),r.$isDecoratorNode(q)}return fi.$createHeadingNode=W,fi.$createQuoteNode=v,fi.$isHeadingNode=function(q){return q instanceof w},fi.$isQuoteNode=function(q){return q instanceof A},fi.DRAG_DROP_PASTE=M,fi.HeadingNode=w,fi.QuoteNode=A,fi.eventFiles=te,fi.registerRichText=function(q){return n.mergeRegister(q.registerCommand(r.CLICK_COMMAND,()=>{const G=r.$getSelection();return r.$isNodeSelection(G)?(G.clear(),!0):!1},0),q.registerCommand(r.DELETE_CHARACTER_COMMAND,G=>{const j=r.$getSelection();return r.$isRangeSelection(j)?(j.deleteCharacter(G),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.DELETE_WORD_COMMAND,G=>{const j=r.$getSelection();return r.$isRangeSelection(j)?(j.deleteWord(G),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.DELETE_LINE_COMMAND,G=>{const j=r.$getSelection();return r.$isRangeSelection(j)?(j.deleteLine(G),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,G=>{const j=r.$getSelection();if(typeof G=="string")r.$INTERNAL_isPointSelection(j)&&j.insertText(G);else{if(!r.$INTERNAL_isPointSelection(j))return!1;const _e=G.dataTransfer;_e!=null?t.$insertDataTransferForRichText(_e,j,q):r.$isRangeSelection(j)&&(G=G.data)&&j.insertText(G)}return!0},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const G=r.$getSelection();return r.$isRangeSelection(G)?(G.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.FORMAT_TEXT_COMMAND,G=>{const j=r.$getSelection();return r.$isRangeSelection(j)?(j.formatText(G),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.FORMAT_ELEMENT_COMMAND,G=>{var j=r.$getSelection();if(!r.$isRangeSelection(j)&&!r.$isNodeSelection(j))return!1;j=j.getNodes();for(const _e of j)j=n.$findMatchingParent(_e,pe=>r.$isElementNode(pe)&&!pe.isInline()),j!==null&&j.setFormat(G);return!0},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.INSERT_LINE_BREAK_COMMAND,G=>{const j=r.$getSelection();return r.$isRangeSelection(j)?(j.insertLineBreak(G),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const G=r.$getSelection();return r.$isRangeSelection(G)?(G.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.INDENT_CONTENT_COMMAND,()=>re(G=>{const j=G.getIndent();G.setIndent(j+1)}),r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>re(G=>{const j=G.getIndent();0<j&&G.setIndent(j-1)}),r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_ARROW_UP_COMMAND,G=>{var j=r.$getSelection();if(r.$isNodeSelection(j)&&!ce(G.target)){if(G=j.getNodes(),0<G.length)return G[0].selectPrevious(),!0}else if(r.$isRangeSelection(j)&&(j=r.$getAdjacentNode(j.focus,!0),!G.shiftKey&&r.$isDecoratorNode(j)&&!j.isIsolated()&&!j.isInline()))return j.selectPrevious(),G.preventDefault(),!0;return!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_ARROW_DOWN_COMMAND,G=>{var j=r.$getSelection();if(r.$isNodeSelection(j)){if(G=j.getNodes(),0<G.length)return G[0].selectNext(0,0),!0}else if(r.$isRangeSelection(j)){let _e=j.focus;if(_e.key==="root"&&_e.offset===r.$getRoot().getChildrenSize())return G.preventDefault(),!0;if(j=r.$getAdjacentNode(j.focus,!1),!G.shiftKey&&r.$isDecoratorNode(j)&&!j.isIsolated()&&!j.isInline())return j.selectNext(),G.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_ARROW_LEFT_COMMAND,G=>{const j=r.$getSelection();if(r.$isNodeSelection(j)){var _e=j.getNodes();if(0<_e.length)return G.preventDefault(),_e[0].selectPrevious(),!0}return r.$isRangeSelection(j)&&e.$shouldOverrideDefaultCharacterSelection(j,!0)?(_e=G.shiftKey,G.preventDefault(),e.$moveCharacter(j,_e,!0),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,G=>{const j=r.$getSelection();if(r.$isNodeSelection(j)&&!ce(G.target)){var _e=j.getNodes();if(0<_e.length)return G.preventDefault(),_e[0].selectNext(0,0),!0}return r.$isRangeSelection(j)?(_e=G.shiftKey,e.$shouldOverrideDefaultCharacterSelection(j,!1)?(G.preventDefault(),e.$moveCharacter(j,_e,!1),!0):!1):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_BACKSPACE_COMMAND,G=>{if(ce(G.target))return!1;const j=r.$getSelection();if(!r.$isRangeSelection(j))return!1;G.preventDefault(),{anchor:G}=j;const _e=G.getNode();return j.isCollapsed()&&G.offset===0&&!r.$isRootNode(_e)&&0<n.$getNearestBlockElementAncestorOrThrow(_e).getIndent()?q.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):q.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_DELETE_COMMAND,G=>{if(ce(G.target))return!1;const j=r.$getSelection();return r.$isRangeSelection(j)?(G.preventDefault(),q.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_ENTER_COMMAND,G=>{const j=r.$getSelection();if(!r.$isRangeSelection(j))return!1;if(G!==null){if((x||C||O)&&p)return!1;if(G.preventDefault(),G.shiftKey)return q.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return q.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const G=r.$getSelection();return r.$isRangeSelection(G)?(q.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.DROP_COMMAND,G=>{const[,j]=te(G);if(0<j.length){var _e=c(G.clientX,G.clientY);if(_e!==null){const{offset:J,node:ee}=_e;var pe=r.$getNearestNodeFromDOMNode(ee);if(pe!==null){if(_e=r.$createRangeSelection(),r.$isTextNode(pe))_e.anchor.set(pe.getKey(),J,"text"),_e.focus.set(pe.getKey(),J,"text");else{const F=pe.getParentOrThrow().getKey();pe=pe.getIndexWithinParent()+1,_e.anchor.set(F,pe,"element"),_e.focus.set(F,pe,"element")}_e=r.$normalizeSelection__EXPERIMENTAL(_e),r.$setSelection(_e)}q.dispatchCommand(M,j)}return G.preventDefault(),!0}return G=r.$getSelection(),!!r.$isRangeSelection(G)},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.DRAGSTART_COMMAND,G=>{[G]=te(G);const j=r.$getSelection();return!(G&&!r.$isRangeSelection(j))},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.DRAGOVER_COMMAND,G=>{var[j]=te(G);const _e=r.$getSelection();return j&&!r.$isRangeSelection(_e)?!1:(j=c(G.clientX,G.clientY),j!==null&&(j=r.$getNearestNodeFromDOMNode(j.node),r.$isDecoratorNode(j)&&G.preventDefault()),!0)},r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.COPY_COMMAND,G=>(t.copyToClipboard(q,n.objectKlassEquals(G,ClipboardEvent)?G:null),!0),r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.CUT_COMMAND,G=>(z(G,q),!0),r.COMMAND_PRIORITY_EDITOR),q.registerCommand(r.PASTE_COMMAND,G=>{const[,j,_e]=te(G);if(0<j.length&&!_e)return q.dispatchCommand(M,j),!0;if(r.isSelectionCapturedInDecoratorInput(G.target))return!1;const pe=r.$getSelection();return r.$INTERNAL_isPointSelection(pe)?(H(G,q),!0):!1},r.COMMAND_PRIORITY_EDITOR))},fi}var fu,th;function md(){return th||(th=1,fu=process.env.NODE_ENV==="development"?MC():AC()),fu}var nh;function kC(){if(nh)return eu;nh=1;var t=Yn(),e=yp(),n=rt,r=Cp(),c=on(),d=ld,f=Np(),p=md(),T=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function O(K){return K.getEditorState().read(r.$canShowPlaceholderCurry(K.isComposing()))}function M(K){const[$,W]=n.useState(()=>O(K));return T(()=>{function H(){const z=O(K);W(z)}return H(),c.mergeRegister(K.registerUpdateListener(()=>{H()}),K.registerEditableListener(()=>{H()}))},[K]),$}function A(K,$){const[W,H]=n.useState(()=>K.getDecorators());return T(()=>K.registerDecoratorListener(z=>{d.flushSync(()=>{H(z)})}),[K]),n.useEffect(()=>{H(K.getDecorators())},[K]),n.useMemo(()=>{const z=[],te=Object.keys(W);for(let re=0;re<te.length;re++){const ce=te[re],q=n.createElement($,{onError:j=>K._onError(j)},n.createElement(n.Suspense,{fallback:null},W[ce])),G=K.getElementByKey(ce);G!==null&&z.push(d.createPortal(q,G,ce))}return z},[$,W,K])}function v(K){T(()=>c.mergeRegister(p.registerRichText(K),f.registerDragonSupport(K)),[K])}function w({contentEditable:K,placeholder:$,ErrorBoundary:W}){const[H]=t.useLexicalComposerContext(),z=A(H,W);return v(H),n.createElement(n.Fragment,null,K,n.createElement(P,{content:$}),z)}function P({content:K}){const[$]=t.useLexicalComposerContext(),W=M($),H=e();return W?typeof K=="function"?K(H):K:null}return eu.RichTextPlugin=w,eu}var hu={},rh;function LC(){if(rh)return hu;rh=1;var t=Yn(),e=yp(),n=rt,r=Cp(),c=on(),d=ld,f=Np(),p=md(),C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function x(v){return v.getEditorState().read(r.$canShowPlaceholderCurry(v.isComposing()))}function T(v){let[w,P]=n.useState(()=>x(v));return C(()=>{function K(){let $=x(v);P($)}return K(),c.mergeRegister(v.registerUpdateListener(()=>{K()}),v.registerEditableListener(()=>{K()}))},[v]),w}function O(v,w){let[P,K]=n.useState(()=>v.getDecorators());return C(()=>v.registerDecoratorListener($=>{d.flushSync(()=>{K($)})}),[v]),n.useEffect(()=>{K(v.getDecorators())},[v]),n.useMemo(()=>{let $=[],W=Object.keys(P);for(let H=0;H<W.length;H++){let z=W[H],te=n.createElement(w,{onError:ce=>v._onError(ce)},n.createElement(n.Suspense,{fallback:null},P[z])),re=v.getElementByKey(z);re!==null&&$.push(d.createPortal(te,re,z))}return $},[w,P,v])}function M(v){C(()=>c.mergeRegister(p.registerRichText(v),f.registerDragonSupport(v)),[v])}function A({content:v}){var[w]=t.useLexicalComposerContext();w=T(w);let P=e();return w?typeof v=="function"?v(P):v:null}return hu.RichTextPlugin=function({contentEditable:v,placeholder:w,ErrorBoundary:P}){let[K]=t.useLexicalComposerContext();return P=O(K,P),M(K),n.createElement(n.Fragment,null,v,n.createElement(A,{content:w}),P)},hu}const IC=process.env.NODE_ENV==="development"?kC():LC();var PC=IC,gu={},ih;function $C(){if(ih)return gu;ih=1;var t=Yn(),e=rt;function n(){return n=Object.assign?Object.assign.bind():function(p){for(var C=1;C<arguments.length;C++){var x=arguments[C];for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(p[T]=x[T])}return p},n.apply(this,arguments)}var d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?e.useLayoutEffect:e.useEffect;function f({ariaActiveDescendant:p,ariaAutoComplete:C,ariaControls:x,ariaDescribedBy:T,ariaExpanded:O,ariaLabel:M,ariaLabelledBy:A,ariaMultiline:v,ariaOwns:w,ariaRequired:P,autoCapitalize:K,className:$,id:W,role:H="textbox",spellCheck:z=!0,style:te,tabIndex:re,"data-testid":ce,...q}){const[G]=t.useLexicalComposerContext(),[j,_e]=e.useState(!1),pe=e.useCallback(J=>{G.setRootElement(J)},[G]);return d(()=>(_e(G.isEditable()),G.registerEditableListener(J=>{_e(J)})),[G]),e.createElement("div",n({},q,{"aria-activedescendant":j?p:void 0,"aria-autocomplete":j?C:"none","aria-controls":j?x:void 0,"aria-describedby":T,"aria-expanded":j&&H==="combobox"?!!O:void 0,"aria-label":M,"aria-labelledby":A,"aria-multiline":v,"aria-owns":j?w:void 0,"aria-readonly":j?void 0:!0,"aria-required":P,autoCapitalize:K,className:$,contentEditable:j,"data-testid":ce,id:W,ref:pe,role:H,spellCheck:z,style:te,tabIndex:re}))}return gu.ContentEditable=f,gu}var pu={},oh;function FC(){if(oh)return pu;oh=1;var t=Yn(),e=rt;function n(){return n=Object.assign?Object.assign.bind():function(c){for(var d=1;d<arguments.length;d++){var f=arguments[d],p;for(p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p])}return c},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?e.useLayoutEffect:e.useEffect;return pu.ContentEditable=function({ariaActiveDescendant:c,ariaAutoComplete:d,ariaControls:f,ariaDescribedBy:p,ariaExpanded:C,ariaLabel:x,ariaLabelledBy:T,ariaMultiline:O,ariaOwns:M,ariaRequired:A,autoCapitalize:v,className:w,id:P,role:K="textbox",spellCheck:$=!0,style:W,tabIndex:H,"data-testid":z,...te}){let[re]=t.useLexicalComposerContext(),[ce,q]=e.useState(!1),G=e.useCallback(j=>{re.setRootElement(j)},[re]);return r(()=>(q(re.isEditable()),re.registerEditableListener(j=>{q(j)})),[re]),e.createElement("div",n({},te,{"aria-activedescendant":ce?c:void 0,"aria-autocomplete":ce?d:"none","aria-controls":ce?f:void 0,"aria-describedby":p,"aria-expanded":ce&&K==="combobox"?!!C:void 0,"aria-label":x,"aria-labelledby":T,"aria-multiline":O,"aria-owns":ce?M:void 0,"aria-readonly":ce?void 0:!0,"aria-required":A,autoCapitalize:v,className:w,contentEditable:ce,"data-testid":z,id:P,ref:G,role:K,spellCheck:$,style:W,tabIndex:H}))},pu}const BC=process.env.NODE_ENV==="development"?$C():FC();var HC=BC,mu,sh;function WC(){if(sh)return mu;sh=1;var t=rt;function e(p,C){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,O){return T.__proto__=O,T},e(p,C)}function n(p,C){p.prototype=Object.create(C.prototype),p.prototype.constructor=p,e(p,C)}var r=function(C,x){return C===void 0&&(C=[]),x===void 0&&(x=[]),C.length!==x.length||C.some(function(T,O){return!Object.is(T,x[O])})},c={error:null},d=function(p){n(C,p);function C(){for(var T,O=arguments.length,M=new Array(O),A=0;A<O;A++)M[A]=arguments[A];return T=p.call.apply(p,[this].concat(M))||this,T.state=c,T.resetErrorBoundary=function(){for(var v,w=arguments.length,P=new Array(w),K=0;K<w;K++)P[K]=arguments[K];T.props.onReset==null||(v=T.props).onReset.apply(v,P),T.reset()},T}C.getDerivedStateFromError=function(O){return{error:O}};var x=C.prototype;return x.reset=function(){this.setState(c)},x.componentDidCatch=function(O,M){var A,v;(A=(v=this.props).onError)==null||A.call(v,O,M)},x.componentDidUpdate=function(O,M){var A=this.state.error,v=this.props.resetKeys;if(A!==null&&M.error!==null&&r(O.resetKeys,v)){var w,P;(w=(P=this.props).onResetKeysChange)==null||w.call(P,O.resetKeys,v),this.reset()}},x.render=function(){var O=this.state.error,M=this.props,A=M.fallbackRender,v=M.FallbackComponent,w=M.fallback;if(O!==null){var P={error:O,resetErrorBoundary:this.resetErrorBoundary};if(t.isValidElement(w))return w;if(typeof A=="function")return A(P);if(v)return t.createElement(v,P);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},C}(t.Component);function f({children:p,onError:C}){return t.createElement(d,{fallback:t.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:C},p)}return mu=f,mu}var _u,lh;function KC(){if(lh)return _u;lh=1;var t=rt;function e(f,p){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,x){return C.__proto__=x,C},e(f,p)}function n(f,p){f.prototype=Object.create(p.prototype),f.prototype.constructor=f,e(f,p)}function r(f,p){return f===void 0&&(f=[]),p===void 0&&(p=[]),f.length!==p.length||f.some(function(C,x){return!Object.is(C,p[x])})}var c={error:null},d=function(f){function p(){for(var x,T=arguments.length,O=Array(T),M=0;M<T;M++)O[M]=arguments[M];return x=f.call.apply(f,[this].concat(O))||this,x.state=c,x.resetErrorBoundary=function(){for(var A,v=arguments.length,w=Array(v),P=0;P<v;P++)w[P]=arguments[P];x.props.onReset==null||(A=x.props).onReset.apply(A,w),x.reset()},x}n(p,f),p.getDerivedStateFromError=function(x){return{error:x}};var C=p.prototype;return C.reset=function(){this.setState(c)},C.componentDidCatch=function(x,T){var O,M;(O=(M=this.props).onError)==null||O.call(M,x,T)},C.componentDidUpdate=function(x,T){var O=this.props.resetKeys;if(this.state.error!==null&&T.error!==null&&r(x.resetKeys,O)){var M,A;(M=(A=this.props).onResetKeysChange)==null||M.call(A,x.resetKeys,O),this.reset()}},C.render=function(){var x=this.state.error,T=this.props,O=T.fallbackRender,M=T.FallbackComponent;if(T=T.fallback,x!==null){if(x={error:x,resetErrorBoundary:this.resetErrorBoundary},t.isValidElement(T))return T;if(typeof O=="function")return O(x);if(M)return t.createElement(M,x);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},p}(t.Component);return _u=function({children:f,onError:p}){return t.createElement(d,{fallback:t.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:p},f)},_u}const UC=process.env.NODE_ENV==="development"?WC():KC();var zC=UC;const GC=hc(zC);var yu={},ir={},ah;function YC(){if(ah)return ir;ah=1;var t=Ht(),e=on();function n(Y){let U=1,Q=Y.getParent();for(;Q!=null;){if(ce(Q)){const k=Q.getParent();if(ee(k)){U++,Q=k.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return U}return U}function r(Y){let U=Y.getParent();if(!ee(U))throw Error("A ListItemNode must have a ListNode for a parent.");let Q=U;for(;Q!==null;)Q=Q.getParent(),ee(Q)&&(U=Q);return U}function c(Y){let U=[];const Q=Y.getChildren().filter(ce);for(let k=0;k<Q.length;k++){const m=Q[k],y=m.getFirstChild();ee(y)?U=U.concat(c(y)):U.push(m)}return U}function d(Y){return ce(Y)&&ee(Y.getFirstChild())}function f(Y){let U=Y;for(;U.getNextSibling()==null&&U.getPreviousSibling()==null;){const Q=U.getParent();if(Q==null||!(ce(U)||ee(U)))break;U=Q}U.remove()}function p(Y){return re().append(Y)}function C(Y,U){return ce(Y)&&(U.length===0||U.length===1&&Y.is(U[0])&&Y.getChildrenSize()===0)}function x(Y){const U=Y.getParent();let Q=1;if(U!=null)if(ee(U))Q=U.getStart();else throw Error("$getListItemValue: list node is not parent of list item node");const k=Y.getPreviousSiblings();for(let m=0;m<k.length;m++){const y=k[m];ce(y)&&!ee(y.getFirstChild())&&Q++}return Q}function T(Y,U){Y.update(()=>{const Q=t.$getSelection();if(t.$INTERNAL_isPointSelection(Q)){const k=Q.getNodes(),y=Q.anchor.getNode(),R=y.getParent();if(C(y,k)){const Z=J(U);if(t.$isRootOrShadowRoot(R)){y.replace(Z);const ue=re();t.$isElementNode(y)&&(ue.setFormat(y.getFormatType()),ue.setIndent(y.getIndent())),Z.append(ue)}else if(ce(y)){const ue=y.getParentOrThrow();O(Z,ue.getChildren()),ue.replace(Z)}return}else{const Z=new Set;for(let ue=0;ue<k.length;ue++){const ge=k[ue];if(t.$isElementNode(ge)&&ge.isEmpty()&&!ce(ge)&&!Z.has(ge.getKey())){M(ge,U);continue}if(t.$isLeafNode(ge)){let ae=ge.getParent();for(;ae!=null;){const Te=ae.getKey();if(ee(ae)){if(!Z.has(Te)){const Ae=J(U);O(Ae,ae.getChildren()),ae.replace(Ae),w(Ae),Z.add(Te)}break}else{const Ae=ae.getParent();if(t.$isRootOrShadowRoot(Ae)&&!Z.has(Te)){Z.add(Te),M(ae,U);break}ae=Ae}}}}}}})}function O(Y,U){Y.splice(Y.getChildrenSize(),0,U)}function M(Y,U){if(ee(Y))return Y;const Q=Y.getPreviousSibling(),k=Y.getNextSibling(),m=re();if(m.setFormat(Y.getFormatType()),m.setIndent(Y.getIndent()),O(m,Y.getChildren()),ee(Q)&&U===Q.getListType())return Q.append(m),Y.remove(),ee(k)&&U===k.getListType()&&(O(Q,k.getChildren()),k.remove()),Q;if(ee(k)&&U===k.getListType())return k.getFirstChildOrThrow().insertBefore(m),Y.remove(),k;{const y=J(U);return y.append(m),Y.replace(y),w(y),y}}function A(Y,U){const Q=Y.getLastChild(),k=U.getFirstChild();Q&&k&&d(Q)&&d(k)&&(A(Q.getFirstChild(),k.getFirstChild()),k.remove());const m=U.getChildren();m.length>0&&(Y.append(...m),w(Y)),U.remove()}function v(Y){Y.update(()=>{const U=t.$getSelection();if(t.$isRangeSelection(U)){const Q=new Set,k=U.getNodes(),m=U.anchor.getNode();if(C(m,k))Q.add(r(m));else for(let y=0;y<k.length;y++){const R=k[y];if(t.$isLeafNode(R)){const Z=e.$getNearestNodeOfType(R,W);Z!=null&&Q.add(r(Z))}}for(const y of Q){let R=y;const Z=c(y);for(const ue of Z){const ge=t.$createParagraphNode();O(ge,ue.getChildren()),R.insertAfter(ge),R=ge,ue.__key===U.anchor.key&&U.anchor.set(ge.getKey(),0,"element"),ue.__key===U.focus.key&&U.focus.set(ge.getKey(),0,"element"),ue.remove()}y.remove()}}})}function w(Y,U){const Q=U||Y.getChildren();if(Q!==void 0)for(let k=0;k<Q.length;k++){const m=Q[k];if(ce(m)){const y=m.getValue(),R=x(m);y!==R&&m.setValue(R)}}}function P(Y){const U=new Set;if(d(Y)||U.has(Y.getKey()))return;const Q=Y.getParent(),k=Y.getNextSibling(),m=Y.getPreviousSibling();if(d(k)&&d(m)){const y=m.getFirstChild();if(ee(y)){y.append(Y);const R=k.getFirstChild();if(ee(R)){const Z=R.getChildren();O(y,Z),k.remove(),U.add(k.getKey())}w(y)}}else if(d(k)){const y=k.getFirstChild();if(ee(y)){const R=y.getFirstChild();R!==null&&R.insertBefore(Y),w(y)}}else if(d(m)){const y=m.getFirstChild();ee(y)&&(y.append(Y),w(y))}else if(ee(Q)){const y=re(),R=J(Q.getListType());y.append(R),R.append(Y),m?m.insertAfter(y):k?k.insertBefore(y):Q.append(y),w(R)}ee(Q)&&w(Q)}function K(Y){if(d(Y))return;const U=Y.getParent(),Q=U?U.getParent():void 0,k=Q?Q.getParent():void 0;if(ee(k)&&ce(Q)&&ee(U)){const m=U?U.getFirstChild():void 0,y=U?U.getLastChild():void 0;if(Y.is(m))Q.insertBefore(Y),U.isEmpty()&&Q.remove();else if(Y.is(y))Q.insertAfter(Y),U.isEmpty()&&Q.remove();else{const R=U.getListType(),Z=re(),ue=J(R);Z.append(ue),Y.getPreviousSiblings().forEach(Te=>ue.append(Te));const ge=re(),ae=J(R);ge.append(ae),O(ae,Y.getNextSiblings()),Q.insertBefore(Z),Q.insertAfter(ge),Q.replace(Y)}w(U),w(k)}}function $(){const Y=t.$getSelection();if(!t.$isRangeSelection(Y)||!Y.isCollapsed())return!1;const U=Y.anchor.getNode();if(!ce(U)||U.getChildrenSize()!==0)return!1;const Q=r(U),k=U.getParent();if(!ee(k))throw Error("A ListItemNode must have a ListNode for a parent.");const m=k.getParent();let y;if(t.$isRootOrShadowRoot(m))y=t.$createParagraphNode(),Q.insertAfter(y);else if(ce(m))y=re(),m.insertAfter(y);else return!1;y.select();const R=U.getNextSiblings();if(R.length>0){const Z=J(k.getListType());if(t.$isParagraphNode(y))y.insertAfter(Z);else{const ue=re();ue.append(Z),y.insertAfter(ue)}R.forEach(ue=>{ue.remove(),Z.append(ue)})}return f(U),!0}class W extends t.ElementNode{static getType(){return"listitem"}static clone(U){return new W(U.__value,U.__checked,U.__key)}constructor(U,Q,k){super(k),this.__value=U===void 0?1:U,this.__checked=Q}createDOM(U){const Q=document.createElement("li"),k=this.getParent();return ee(k)&&k.getListType()==="check"&&z(Q,this,null),Q.value=this.__value,H(Q,U.theme,this),Q}updateDOM(U,Q,k){const m=this.getParent();return ee(m)&&m.getListType()==="check"&&z(Q,this,U),Q.value=this.__value,H(Q,k.theme,this),!1}static transform(){return U=>{const Q=U.getParent();ee(Q)&&(w(Q),Q.getListType()!=="check"&&U.getChecked()!=null&&U.setChecked(void 0))}}static importDOM(){return{li:U=>({conversion:te,priority:0})}}static importJSON(U){const Q=re();return Q.setChecked(U.checked),Q.setValue(U.value),Q.setFormat(U.format),Q.setDirection(U.direction),Q}exportDOM(U){const Q=this.createDOM(U._config);return Q.style.textAlign=this.getFormatType(),{element:Q}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...U){for(let Q=0;Q<U.length;Q++){const k=U[Q];if(t.$isElementNode(k)&&this.canMergeWith(k)){const m=k.getChildren();this.append(...m),k.remove()}else super.append(k)}return this}replace(U,Q){if(ce(U))return super.replace(U);this.setIndent(0);const k=this.getParentOrThrow();if(!ee(k))return U;if(k.__first===this.getKey())k.insertBefore(U);else if(k.__last===this.getKey())k.insertAfter(U);else{const m=J(k.getListType());let y=this.getNextSibling();for(;y;){const R=y;y=y.getNextSibling(),m.append(R)}k.insertAfter(U),U.insertAfter(m)}return Q&&this.getChildren().forEach(m=>{U.append(m)}),this.remove(),k.getChildrenSize()===0&&k.remove(),U}insertAfter(U,Q=!0){const k=this.getParentOrThrow();if(!ee(k))throw Error("insertAfter: list node is not parent of list item node");const m=this.getNextSiblings();if(ce(U)){const y=super.insertAfter(U,Q),R=U.getParentOrThrow();return ee(R)&&w(R),y}if(ee(U)){let y=U;const R=U.getChildren();for(let Z=R.length-1;Z>=0;Z--)y=R[Z],this.insertAfter(y,Q);return y}if(k.insertAfter(U,Q),m.length!==0){const y=J(k.getListType());m.forEach(R=>y.append(R)),U.insertAfter(y,Q)}return U}remove(U){const Q=this.getPreviousSibling(),k=this.getNextSibling();if(super.remove(U),Q&&k&&d(Q)&&d(k))A(Q.getFirstChild(),k.getFirstChild()),k.remove();else if(k){const m=k.getParent();ee(m)&&w(m)}}insertNewAfter(U,Q=!0){const k=re(this.__checked==null?void 0:!1);return this.insertAfter(k,Q),k}collapseAtStart(U){const Q=t.$createParagraphNode();this.getChildren().forEach(Z=>Q.append(Z));const m=this.getParentOrThrow(),y=m.getParentOrThrow(),R=ce(y);if(m.getChildrenSize()===1)if(R)m.remove(),y.select();else{m.insertBefore(Q),m.remove();const Z=U.anchor,ue=U.focus,ge=Q.getKey();Z.type==="element"&&Z.getNode().is(this)&&Z.set(ge,Z.offset,"element"),ue.type==="element"&&ue.getNode().is(this)&&ue.set(ge,ue.offset,"element")}else m.insertBefore(Q),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(U){const Q=this.getWritable();Q.__value=U}getChecked(){return this.getLatest().__checked}setChecked(U){const Q=this.getWritable();Q.__checked=U}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const U=this.getParent();if(U===null)return this.getLatest().__indent;let Q=U.getParentOrThrow(),k=0;for(;ce(Q);)Q=Q.getParentOrThrow().getParentOrThrow(),k++;return k}setIndent(U){if(!(typeof U=="number"&&U>-1))throw Error("Invalid indent value.");let Q=this.getIndent();for(;Q!==U;)Q<U?(P(this),Q++):(K(this),Q--);return this}insertBefore(U){if(ce(U)){const Q=this.getParentOrThrow();if(ee(Q)){const k=this.getNextSiblings();w(Q,k)}}return super.insertBefore(U)}canInsertAfter(U){return ce(U)}canReplaceWith(U){return ce(U)}canMergeWith(U){return t.$isParagraphNode(U)||ce(U)}extractWithChild(U,Q){if(!t.$isRangeSelection(Q))return!1;const k=Q.anchor.getNode(),m=Q.focus.getNode();return this.isParentOf(k)&&this.isParentOf(m)&&this.getTextContent().length===Q.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return J("bullet")}}function H(Y,U,Q){const k=[],m=[],y=U.list,R=y?y.listitem:void 0;let Z;if(y&&y.nested&&(Z=y.nested.listitem),R!==void 0){const ue=R.split(" ");k.push(...ue)}if(y){const ue=Q.getParent(),ge=ee(ue)&&ue.getListType()==="check",ae=Q.getChecked();(!ge||ae)&&m.push(y.listitemUnchecked),(!ge||!ae)&&m.push(y.listitemChecked),ge&&k.push(ae?y.listitemChecked:y.listitemUnchecked)}if(Z!==void 0){const ue=Z.split(" ");Q.getChildren().some(ge=>ee(ge))?k.push(...ue):m.push(...ue)}m.length>0&&e.removeClassNamesFromElement(Y,...m),k.length>0&&e.addClassNamesToElement(Y,...k)}function z(Y,U,Q,k){ee(U.getFirstChild())?(Y.removeAttribute("role"),Y.removeAttribute("tabIndex"),Y.removeAttribute("aria-checked")):(Y.setAttribute("role","checkbox"),Y.setAttribute("tabIndex","-1"),(!Q||U.__checked!==Q.__checked)&&Y.setAttribute("aria-checked",U.getChecked()?"true":"false"))}function te(Y){const U=e.isHTMLElement(Y)&&Y.getAttribute("aria-checked")==="true";return{node:re(U)}}function re(Y){return t.$applyNodeReplacement(new W(void 0,Y))}function ce(Y){return Y instanceof W}class q extends t.ElementNode{static getType(){return"list"}static clone(U){const Q=U.__listType||pe[U.__tag];return new q(Q,U.__start,U.__key)}constructor(U,Q,k){super(k);const m=pe[U]||U;this.__listType=m,this.__tag=m==="number"?"ol":"ul",this.__start=Q}getTag(){return this.__tag}setListType(U){const Q=this.getWritable();Q.__listType=U,Q.__tag=U==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(U,Q){const k=this.__tag,m=document.createElement(k);return this.__start!==1&&m.setAttribute("start",String(this.__start)),m.__lexicalListType=this.__listType,G(m,U.theme,this),m}updateDOM(U,Q,k){return U.__tag!==this.__tag?!0:(G(Q,k.theme,this),!1)}static importDOM(){return{ol:U=>({conversion:_e,priority:0}),ul:U=>({conversion:_e,priority:0})}}static importJSON(U){const Q=J(U.listType,U.start);return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportDOM(U){const{element:Q}=super.exportDOM(U);return Q&&e.isHTMLElement(Q)&&(this.__start!==1&&Q.setAttribute("start",String(this.__start)),this.__listType==="check"&&Q.setAttribute("__lexicalListType","check")),{element:Q}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...U){for(let Q=0;Q<U.length;Q++){const k=U[Q];if(ce(k))super.append(k);else{const m=re();if(ee(k))m.append(k);else if(t.$isElementNode(k)){const y=t.$createTextNode(k.getTextContent());m.append(y)}else m.append(k);super.append(m)}}return w(this),this}extractWithChild(U){return ce(U)}}function G(Y,U,Q){const k=[],m=[],y=U.list;if(y!==void 0){const R=y[`${Q.__tag}Depth`]||[],Z=n(Q)-1,ue=Z%R.length,ge=R[ue],ae=y[Q.__tag];let Te;const Ae=y.nested;if(Ae!==void 0&&Ae.list&&(Te=Ae.list),ae!==void 0&&k.push(ae),ge!==void 0){const ze=ge.split(" ");k.push(...ze);for(let oe=0;oe<R.length;oe++)oe!==ue&&m.push(Q.__tag+oe)}if(Te!==void 0){const ze=Te.split(" ");Z>1?k.push(...ze):m.push(...ze)}}m.length>0&&e.removeClassNamesFromElement(Y,...m),k.length>0&&e.addClassNamesToElement(Y,...k)}function j(Y){const U=[];for(let Q=0;Q<Y.length;Q++){const k=Y[Q];if(ce(k)){U.push(k);const m=k.getChildren();m.length>1&&m.forEach(y=>{ee(y)&&U.push(p(y))})}else U.push(p(k))}return U}function _e(Y){const U=Y.nodeName.toLowerCase();let Q=null;if(U==="ol"){const k=Y.start;Q=J("number",k)}else U==="ul"&&(e.isHTMLElement(Y)&&Y.getAttribute("__lexicallisttype")==="check"?Q=J("check"):Q=J("bullet"));return{after:j,node:Q}}const pe={ol:"number",ul:"bullet"};function J(Y,U=1){return t.$applyNodeReplacement(new q(Y,U))}function ee(Y){return Y instanceof q}const F=t.createCommand("INSERT_UNORDERED_LIST_COMMAND"),D=t.createCommand("INSERT_ORDERED_LIST_COMMAND"),V=t.createCommand("INSERT_CHECK_LIST_COMMAND"),ne=t.createCommand("REMOVE_LIST_COMMAND");return ir.$createListItemNode=re,ir.$createListNode=J,ir.$getListDepth=n,ir.$handleListInsertParagraph=$,ir.$isListItemNode=ce,ir.$isListNode=ee,ir.INSERT_CHECK_LIST_COMMAND=V,ir.INSERT_ORDERED_LIST_COMMAND=D,ir.INSERT_UNORDERED_LIST_COMMAND=F,ir.ListItemNode=W,ir.ListNode=q,ir.REMOVE_LIST_COMMAND=ne,ir.insertList=T,ir.removeList=v,ir}var or={},ch;function VC(){if(ch)return or;ch=1;var t=Ht(),e=on();function n(F){let D=new URLSearchParams;D.append("code",F);for(let V=1;V<arguments.length;V++)D.append("v",arguments[V]);throw Error(`Minified Lexical error #${F}; visit https://lexical.dev/docs/error?${D} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(F){let D=1;for(F=F.getParent();F!=null;){if(H(F)){if(F=F.getParent(),j(F)){D++,F=F.getParent();continue}n(40)}break}return D}function c(F){F=F.getParent(),j(F)||n(40);let D=F;for(;D!==null;)D=D.getParent(),j(D)&&(F=D);return F}function d(F){let D=[];F=F.getChildren().filter(H);for(let V=0;V<F.length;V++){let ne=F[V],Y=ne.getFirstChild();j(Y)?D=D.concat(d(Y)):D.push(ne)}return D}function f(F){return H(F)&&j(F.getFirstChild())}function p(F){for(;F.getNextSibling()==null&&F.getPreviousSibling()==null;){let D=F.getParent();if(D==null||!H(F)&&!j(F))break;F=D}F.remove()}function C(F){return W().append(F)}function x(F,D){return H(F)&&(D.length===0||D.length===1&&F.is(D[0])&&F.getChildrenSize()===0)}function T(F,D){F.splice(F.getChildrenSize(),0,D)}function O(F,D){if(j(F))return F;let V=F.getPreviousSibling(),ne=F.getNextSibling(),Y=W();return Y.setFormat(F.getFormatType()),Y.setIndent(F.getIndent()),T(Y,F.getChildren()),j(V)&&D===V.getListType()?(V.append(Y),F.remove(),j(ne)&&D===ne.getListType()&&(T(V,ne.getChildren()),ne.remove()),V):j(ne)&&D===ne.getListType()?(ne.getFirstChildOrThrow().insertBefore(Y),F.remove(),ne):(D=G(D),D.append(Y),F.replace(D),A(D),D)}function M(F,D){var V=F.getLastChild();let ne=D.getFirstChild();V&&ne&&f(V)&&f(ne)&&(M(V.getFirstChild(),ne.getFirstChild()),ne.remove()),V=D.getChildren(),0<V.length&&(F.append(...V),A(F)),D.remove()}function A(F,D){if(F=D||F.getChildren(),F!==void 0)for(D=0;D<F.length;D++){let U=F[D];if(H(U)){let Q=U.getValue();var V=U,ne=V.getParent(),Y=1;for(ne!=null&&(j(ne)?Y=ne.getStart():n(44)),V=V.getPreviousSiblings(),ne=0;ne<V.length;ne++){let k=V[ne];H(k)&&!j(k.getFirstChild())&&Y++}Q!==Y&&U.setValue(Y)}}}function v(F){if(!f(F)){var D=F.getParent(),V=D?D.getParent():void 0,ne=V?V.getParent():void 0;if(j(ne)&&H(V)&&j(D)){var Y=D?D.getFirstChild():void 0,U=D?D.getLastChild():void 0;if(F.is(Y))V.insertBefore(F),D.isEmpty()&&V.remove();else if(F.is(U))V.insertAfter(F),D.isEmpty()&&V.remove();else{var Q=D.getListType();Y=W();let k=G(Q);Y.append(k),F.getPreviousSiblings().forEach(m=>k.append(m)),U=W(),Q=G(Q),U.append(Q),T(Q,F.getNextSiblings()),V.insertBefore(Y),V.insertAfter(U),V.replace(F)}A(D),A(ne)}}}class w extends t.ElementNode{static getType(){return"listitem"}static clone(D){return new w(D.__value,D.__checked,D.__key)}constructor(D,V,ne){super(ne),this.__value=D===void 0?1:D,this.__checked=V}createDOM(D){let V=document.createElement("li"),ne=this.getParent();return j(ne)&&ne.getListType()==="check"&&K(V,this,null),V.value=this.__value,P(V,D.theme,this),V}updateDOM(D,V,ne){let Y=this.getParent();return j(Y)&&Y.getListType()==="check"&&K(V,this,D),V.value=this.__value,P(V,ne.theme,this),!1}static transform(){return D=>{let V=D.getParent();j(V)&&(A(V),V.getListType()!=="check"&&D.getChecked()!=null&&D.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:$,priority:0})}}static importJSON(D){let V=W();return V.setChecked(D.checked),V.setValue(D.value),V.setFormat(D.format),V.setDirection(D.direction),V}exportDOM(D){return D=this.createDOM(D._config),D.style.textAlign=this.getFormatType(),{element:D}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...D){for(let V=0;V<D.length;V++){let ne=D[V];if(t.$isElementNode(ne)&&this.canMergeWith(ne)){let Y=ne.getChildren();this.append(...Y),ne.remove()}else super.append(ne)}return this}replace(D,V){if(H(D))return super.replace(D);this.setIndent(0);let ne=this.getParentOrThrow();if(!j(ne))return D;if(ne.__first===this.getKey())ne.insertBefore(D);else if(ne.__last===this.getKey())ne.insertAfter(D);else{let Y=G(ne.getListType()),U=this.getNextSibling();for(;U;){let Q=U;U=U.getNextSibling(),Y.append(Q)}ne.insertAfter(D),D.insertAfter(Y)}return V&&this.getChildren().forEach(Y=>{D.append(Y)}),this.remove(),ne.getChildrenSize()===0&&ne.remove(),D}insertAfter(D,V=!0){var ne=this.getParentOrThrow();j(ne)||n(39);var Y=this.getNextSiblings();if(H(D))return V=super.insertAfter(D,V),D=D.getParentOrThrow(),j(D)&&A(D),V;if(j(D)){for(ne=D,D=D.getChildren(),Y=D.length-1;0<=Y;Y--)ne=D[Y],this.insertAfter(ne,V);return ne}if(ne.insertAfter(D,V),Y.length!==0){let U=G(ne.getListType());Y.forEach(Q=>U.append(Q)),D.insertAfter(U,V)}return D}remove(D){let V=this.getPreviousSibling(),ne=this.getNextSibling();super.remove(D),V&&ne&&f(V)&&f(ne)?(M(V.getFirstChild(),ne.getFirstChild()),ne.remove()):ne&&(D=ne.getParent(),j(D)&&A(D))}insertNewAfter(D,V=!0){return D=W(this.__checked==null?void 0:!1),this.insertAfter(D,V),D}collapseAtStart(D){let V=t.$createParagraphNode();this.getChildren().forEach(Q=>V.append(Q));var ne=this.getParentOrThrow(),Y=ne.getParentOrThrow();let U=H(Y);return ne.getChildrenSize()===1?U?(ne.remove(),Y.select()):(ne.insertBefore(V),ne.remove(),ne=D.anchor,D=D.focus,Y=V.getKey(),ne.type==="element"&&ne.getNode().is(this)&&ne.set(Y,ne.offset,"element"),D.type==="element"&&D.getNode().is(this)&&D.set(Y,D.offset,"element")):(ne.insertBefore(V),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(D){this.getWritable().__value=D}getChecked(){return this.getLatest().__checked}setChecked(D){this.getWritable().__checked=D}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var D=this.getParent();if(D===null)return this.getLatest().__indent;D=D.getParentOrThrow();let V=0;for(;H(D);)D=D.getParentOrThrow().getParentOrThrow(),V++;return V}setIndent(D){typeof D=="number"&&-1<D||n(117);let V=this.getIndent();for(;V!==D;)if(V<D){e:{var ne=new Set;if(f(this)||ne.has(this.getKey()))break e;let k=this.getParent();var Y=this.getNextSibling(),U=this.getPreviousSibling();if(f(Y)&&f(U)){if(U=U.getFirstChild(),j(U)){U.append(this);var Q=Y.getFirstChild();j(Q)&&(Q=Q.getChildren(),T(U,Q),Y.remove(),ne.add(Y.getKey())),A(U)}}else f(Y)?(Y=Y.getFirstChild(),j(Y)&&(ne=Y.getFirstChild(),ne!==null&&ne.insertBefore(this),A(Y))):f(U)?(Y=U.getFirstChild(),j(Y)&&(Y.append(this),A(Y))):j(k)&&(ne=W(),Q=G(k.getListType()),ne.append(Q),Q.append(this),U?U.insertAfter(ne):Y?Y.insertBefore(ne):k.append(ne),A(Q));j(k)&&A(k)}V++}else v(this),V--;return this}insertBefore(D){if(H(D)){let V=this.getParentOrThrow();if(j(V)){let ne=this.getNextSiblings();A(V,ne)}}return super.insertBefore(D)}canInsertAfter(D){return H(D)}canReplaceWith(D){return H(D)}canMergeWith(D){return t.$isParagraphNode(D)||H(D)}extractWithChild(D,V){if(!t.$isRangeSelection(V))return!1;D=V.anchor.getNode();let ne=V.focus.getNode();return this.isParentOf(D)&&this.isParentOf(ne)&&this.getTextContent().length===V.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return G("bullet")}}function P(F,D,V){let ne=[],Y=[];var U=(D=D.list)?D.listitem:void 0;if(D&&D.nested)var Q=D.nested.listitem;if(U!==void 0&&(U=U.split(" "),ne.push(...U)),D){U=V.getParent(),U=j(U)&&U.getListType()==="check";let k=V.getChecked();U&&!k||Y.push(D.listitemUnchecked),U&&k||Y.push(D.listitemChecked),U&&ne.push(k?D.listitemChecked:D.listitemUnchecked)}Q!==void 0&&(Q=Q.split(" "),V.getChildren().some(k=>j(k))?ne.push(...Q):Y.push(...Q)),0<Y.length&&e.removeClassNamesFromElement(F,...Y),0<ne.length&&e.addClassNamesToElement(F,...ne)}function K(F,D,V){j(D.getFirstChild())?(F.removeAttribute("role"),F.removeAttribute("tabIndex"),F.removeAttribute("aria-checked")):(F.setAttribute("role","checkbox"),F.setAttribute("tabIndex","-1"),V&&D.__checked===V.__checked||F.setAttribute("aria-checked",D.getChecked()?"true":"false"))}function $(F){return F=e.isHTMLElement(F)&&F.getAttribute("aria-checked")==="true",{node:W(F)}}function W(F){return t.$applyNodeReplacement(new w(void 0,F))}function H(F){return F instanceof w}class z extends t.ElementNode{static getType(){return"list"}static clone(D){return new z(D.__listType||q[D.__tag],D.__start,D.__key)}constructor(D,V,ne){super(ne),this.__listType=D=q[D]||D,this.__tag=D==="number"?"ol":"ul",this.__start=V}getTag(){return this.__tag}setListType(D){let V=this.getWritable();V.__listType=D,V.__tag=D==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(D){let V=document.createElement(this.__tag);return this.__start!==1&&V.setAttribute("start",String(this.__start)),V.__lexicalListType=this.__listType,te(V,D.theme,this),V}updateDOM(D,V,ne){return D.__tag!==this.__tag?!0:(te(V,ne.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:ce,priority:0}),ul:()=>({conversion:ce,priority:0})}}static importJSON(D){let V=G(D.listType,D.start);return V.setFormat(D.format),V.setIndent(D.indent),V.setDirection(D.direction),V}exportDOM(D){return{element:D}=super.exportDOM(D),D&&e.isHTMLElement(D)&&(this.__start!==1&&D.setAttribute("start",String(this.__start)),this.__listType==="check"&&D.setAttribute("__lexicalListType","check")),{element:D}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...D){for(let ne=0;ne<D.length;ne++){var V=D[ne];if(H(V))super.append(V);else{let Y=W();j(V)||t.$isElementNode(V)&&(V=t.$createTextNode(V.getTextContent())),Y.append(V),super.append(Y)}}return A(this),this}extractWithChild(D){return H(D)}}function te(F,D,V){let ne=[],Y=[];var U=D.list;if(U!==void 0){let k=U[`${V.__tag}Depth`]||[];D=r(V)-1;let m=D%k.length;var Q=k[m];let y=U[V.__tag],R;if(U=U.nested,U!==void 0&&U.list&&(R=U.list),y!==void 0&&ne.push(y),Q!==void 0)for(Q=Q.split(" "),ne.push(...Q),Q=0;Q<k.length;Q++)Q!==m&&Y.push(V.__tag+Q);R!==void 0&&(V=R.split(" "),1<D?ne.push(...V):Y.push(...V))}0<Y.length&&e.removeClassNamesFromElement(F,...Y),0<ne.length&&e.addClassNamesToElement(F,...ne)}function re(F){let D=[];for(let ne=0;ne<F.length;ne++){var V=F[ne];H(V)?(D.push(V),V=V.getChildren(),1<V.length&&V.forEach(Y=>{j(Y)&&D.push(C(Y))})):D.push(C(V))}return D}function ce(F){let D=F.nodeName.toLowerCase(),V=null;return D==="ol"?V=G("number",F.start):D==="ul"&&(V=e.isHTMLElement(F)&&F.getAttribute("__lexicallisttype")==="check"?G("check"):G("bullet")),{after:re,node:V}}let q={ol:"number",ul:"bullet"};function G(F,D=1){return t.$applyNodeReplacement(new z(F,D))}function j(F){return F instanceof z}let _e=t.createCommand("INSERT_UNORDERED_LIST_COMMAND"),pe=t.createCommand("INSERT_ORDERED_LIST_COMMAND"),J=t.createCommand("INSERT_CHECK_LIST_COMMAND"),ee=t.createCommand("REMOVE_LIST_COMMAND");return or.$createListItemNode=W,or.$createListNode=G,or.$getListDepth=r,or.$handleListInsertParagraph=function(){var F=t.$getSelection();if(!t.$isRangeSelection(F)||!F.isCollapsed()||(F=F.anchor.getNode(),!H(F)||F.getChildrenSize()!==0))return!1;var D=c(F),V=F.getParent();j(V)||n(40);let ne=V.getParent(),Y;if(t.$isRootOrShadowRoot(ne))Y=t.$createParagraphNode(),D.insertAfter(Y);else if(H(ne))Y=W(),ne.insertAfter(Y);else return!1;if(Y.select(),D=F.getNextSiblings(),0<D.length){let U=G(V.getListType());t.$isParagraphNode(Y)?Y.insertAfter(U):(V=W(),V.append(U),Y.insertAfter(V)),D.forEach(Q=>{Q.remove(),U.append(Q)})}return p(F),!0},or.$isListItemNode=H,or.$isListNode=j,or.INSERT_CHECK_LIST_COMMAND=J,or.INSERT_ORDERED_LIST_COMMAND=pe,or.INSERT_UNORDERED_LIST_COMMAND=_e,or.ListItemNode=w,or.ListNode=z,or.REMOVE_LIST_COMMAND=ee,or.insertList=function(F,D){F.update(()=>{var V=t.$getSelection();if(t.$INTERNAL_isPointSelection(V)){var ne=V.getNodes();V=V.anchor.getNode();var Y=V.getParent();if(x(V,ne))ne=G(D),t.$isRootOrShadowRoot(Y)?(V.replace(ne),Y=W(),t.$isElementNode(V)&&(Y.setFormat(V.getFormatType()),Y.setIndent(V.getIndent())),ne.append(Y)):H(V)&&(V=V.getParentOrThrow(),T(ne,V.getChildren()),V.replace(ne));else for(V=new Set,Y=0;Y<ne.length;Y++){var U=ne[Y];if(t.$isElementNode(U)&&U.isEmpty()&&!H(U)&&!V.has(U.getKey()))O(U,D);else if(t.$isLeafNode(U))for(U=U.getParent();U!=null;){let k=U.getKey();if(j(U)){if(!V.has(k)){var Q=G(D);T(Q,U.getChildren()),U.replace(Q),A(Q),V.add(k)}break}else{if(Q=U.getParent(),t.$isRootOrShadowRoot(Q)&&!V.has(k)){V.add(k),O(U,D);break}U=Q}}}}})},or.removeList=function(F){F.update(()=>{let D=t.$getSelection();if(t.$isRangeSelection(D)){var V=new Set,ne=D.getNodes(),Y=D.anchor.getNode();if(x(Y,ne))V.add(c(Y));else for(Y=0;Y<ne.length;Y++){var U=ne[Y];t.$isLeafNode(U)&&(U=e.$getNearestNodeOfType(U,w),U!=null&&V.add(c(U)))}for(let Q of V){V=Q,ne=d(Q);for(let k of ne)ne=t.$createParagraphNode(),T(ne,k.getChildren()),V.insertAfter(ne),V=ne,k.__key===D.anchor.key&&D.anchor.set(ne.getKey(),0,"element"),k.__key===D.focus.key&&D.focus.set(ne.getKey(),0,"element"),k.remove();Q.remove()}}})},or}var Cu,uh;function _d(){return uh||(uh=1,Cu=process.env.NODE_ENV==="development"?YC():VC()),Cu}var dh;function jC(){if(dh)return yu;dh=1;var t=_d(),e=Yn(),n=rt,r=on(),c=Ht();function d(p){n.useEffect(()=>r.mergeRegister(p.registerCommand(t.INSERT_ORDERED_LIST_COMMAND,()=>(t.insertList(p,"number"),!0),c.COMMAND_PRIORITY_LOW),p.registerCommand(t.INSERT_UNORDERED_LIST_COMMAND,()=>(t.insertList(p,"bullet"),!0),c.COMMAND_PRIORITY_LOW),p.registerCommand(t.REMOVE_LIST_COMMAND,()=>(t.removeList(p),!0),c.COMMAND_PRIORITY_LOW),p.registerCommand(c.INSERT_PARAGRAPH_COMMAND,()=>!!t.$handleListInsertParagraph(),c.COMMAND_PRIORITY_LOW)),[p])}function f(){const[p]=e.useLexicalComposerContext();return n.useEffect(()=>{if(!p.hasNodes([t.ListNode,t.ListItemNode]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[p]),d(p),null}return yu.ListPlugin=f,yu}var Nu={},fh;function qC(){if(fh)return Nu;fh=1;var t=_d(),e=Yn(),n=rt,r=on(),c=Ht();function d(f){n.useEffect(()=>r.mergeRegister(f.registerCommand(t.INSERT_ORDERED_LIST_COMMAND,()=>(t.insertList(f,"number"),!0),c.COMMAND_PRIORITY_LOW),f.registerCommand(t.INSERT_UNORDERED_LIST_COMMAND,()=>(t.insertList(f,"bullet"),!0),c.COMMAND_PRIORITY_LOW),f.registerCommand(t.REMOVE_LIST_COMMAND,()=>(t.removeList(f),!0),c.COMMAND_PRIORITY_LOW),f.registerCommand(c.INSERT_PARAGRAPH_COMMAND,()=>!!t.$handleListInsertParagraph(),c.COMMAND_PRIORITY_LOW)),[f])}return Nu.ListPlugin=function(){let[f]=e.useLexicalComposerContext();return n.useEffect(()=>{if(!f.hasNodes([t.ListNode,t.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[f]),d(f),null},Nu}const ZC=process.env.NODE_ENV==="development"?jC():qC();var JC=ZC,Eu={},Pi={},hh;function XC(){if(hh)return Pi;hh=1;var t=on(),e=Ht();const n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends e.ElementNode{static getType(){return"link"}static clone(v){return new r(v.__url,{rel:v.__rel,target:v.__target,title:v.__title},v.__key)}constructor(v,w={},P){super(P);const{target:K=null,rel:$=null,title:W=null}=w;this.__url=v,this.__target=K,this.__rel=$,this.__title=W}createDOM(v){const w=document.createElement("a");return w.href=this.sanitizeUrl(this.__url),this.__target!==null&&(w.target=this.__target),this.__rel!==null&&(w.rel=this.__rel),this.__title!==null&&(w.title=this.__title),t.addClassNamesToElement(w,v.theme.link),w}updateDOM(v,w,P){const K=this.__url,$=this.__target,W=this.__rel,H=this.__title;return K!==v.__url&&(w.href=K),$!==v.__target&&($?w.target=$:w.removeAttribute("target")),W!==v.__rel&&(W?w.rel=W:w.removeAttribute("rel")),H!==v.__title&&(H?w.title=H:w.removeAttribute("title")),!1}static importDOM(){return{a:v=>({conversion:c,priority:1})}}static importJSON(v){const w=d(v.url,{rel:v.rel,target:v.target,title:v.title});return w.setFormat(v.format),w.setIndent(v.indent),w.setDirection(v.direction),w}sanitizeUrl(v){try{const w=new URL(v);if(!n.has(w.protocol))return"about:blank"}catch{return v}return v}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(v){const w=this.getWritable();w.__url=v}getTarget(){return this.getLatest().__target}setTarget(v){const w=this.getWritable();w.__target=v}getRel(){return this.getLatest().__rel}setRel(v){const w=this.getWritable();w.__rel=v}getTitle(){return this.getLatest().__title}setTitle(v){const w=this.getWritable();w.__title=v}insertNewAfter(v,w=!0){const P=d(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(P,w),P}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(v,w,P){if(!e.$isRangeSelection(w))return!1;const K=w.anchor.getNode(),$=w.focus.getNode();return this.isParentOf(K)&&this.isParentOf($)&&w.getTextContent().length>0}}function c(A){let v=null;if(t.isHTMLAnchorElement(A)){const w=A.textContent;(w!==null&&w!==""||A.children.length>0)&&(v=d(A.getAttribute("href")||"",{rel:A.getAttribute("rel"),target:A.getAttribute("target"),title:A.getAttribute("title")}))}return{node:v}}function d(A,v){return e.$applyNodeReplacement(new r(A,v))}function f(A){return A instanceof r}class p extends r{static getType(){return"autolink"}static clone(v){return new p(v.__url,{rel:v.__rel,target:v.__target,title:v.__title},v.__key)}static importJSON(v){const w=C(v.url,{rel:v.rel,target:v.target,title:v.title});return w.setFormat(v.format),w.setIndent(v.indent),w.setDirection(v.direction),w}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(v,w=!0){const P=this.getParentOrThrow().insertNewAfter(v,w);if(e.$isElementNode(P)){const K=C(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return P.append(K),K}return null}}function C(A,v){return e.$applyNodeReplacement(new p(A,v))}function x(A){return A instanceof p}const T=e.createCommand("TOGGLE_LINK_COMMAND");function O(A,v={}){const{target:w,title:P}=v,K=v.rel===void 0?"noreferrer":v.rel,$=e.$getSelection();if(!e.$isRangeSelection($))return;const W=$.extract();if(A===null)W.forEach(H=>{const z=H.getParent();if(f(z)){const te=z.getChildren();for(let re=0;re<te.length;re++)z.insertBefore(te[re]);z.remove()}});else{if(W.length===1){const te=W[0],re=M(te,f);if(re!==null){re.setURL(A),w!==void 0&&re.setTarget(w),K!==null&&re.setRel(K),P!==void 0&&re.setTitle(P);return}}let H=null,z=null;W.forEach(te=>{const re=te.getParent();if(!(re===z||re===null||e.$isElementNode(te)&&!te.isInline())){if(f(re)){z=re,re.setURL(A),w!==void 0&&re.setTarget(w),K!==null&&z.setRel(K),P!==void 0&&z.setTitle(P);return}if(re.is(H)||(H=re,z=d(A,{rel:K,target:w,title:P}),f(re)?te.getPreviousSibling()===null?re.insertBefore(z):re.insertAfter(z):te.insertBefore(z)),f(te)){if(te.is(z))return;if(z!==null){const ce=te.getChildren();for(let q=0;q<ce.length;q++)z.append(ce[q])}te.remove();return}z!==null&&z.append(te)}})}}function M(A,v){let w=A;for(;w!==null&&w.getParent()!==null&&!v(w);)w=w.getParentOrThrow();return v(w)?w:null}return Pi.$createAutoLinkNode=C,Pi.$createLinkNode=d,Pi.$isAutoLinkNode=x,Pi.$isLinkNode=f,Pi.AutoLinkNode=p,Pi.LinkNode=r,Pi.TOGGLE_LINK_COMMAND=T,Pi.toggleLink=O,Pi}var $i={},gh;function QC(){if(gh)return $i;gh=1;var t=on(),e=Ht();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends e.ElementNode{static getType(){return"link"}static clone(M){return new r(M.__url,{rel:M.__rel,target:M.__target,title:M.__title},M.__key)}constructor(M,A={},v){super(v);let{target:w=null,rel:P=null,title:K=null}=A;this.__url=M,this.__target=w,this.__rel=P,this.__title=K}createDOM(M){let A=document.createElement("a");return A.href=this.sanitizeUrl(this.__url),this.__target!==null&&(A.target=this.__target),this.__rel!==null&&(A.rel=this.__rel),this.__title!==null&&(A.title=this.__title),t.addClassNamesToElement(A,M.theme.link),A}updateDOM(M,A){let v=this.__url,w=this.__target,P=this.__rel,K=this.__title;return v!==M.__url&&(A.href=v),w!==M.__target&&(w?A.target=w:A.removeAttribute("target")),P!==M.__rel&&(P?A.rel=P:A.removeAttribute("rel")),K!==M.__title&&(K?A.title=K:A.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:c,priority:1})}}static importJSON(M){let A=d(M.url,{rel:M.rel,target:M.target,title:M.title});return A.setFormat(M.format),A.setIndent(M.indent),A.setDirection(M.direction),A}sanitizeUrl(M){try{let A=new URL(M);if(!n.has(A.protocol))return"about:blank"}catch{}return M}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(M){this.getWritable().__url=M}getTarget(){return this.getLatest().__target}setTarget(M){this.getWritable().__target=M}getRel(){return this.getLatest().__rel}setRel(M){this.getWritable().__rel=M}getTitle(){return this.getLatest().__title}setTitle(M){this.getWritable().__title=M}insertNewAfter(M,A=!0){return M=d(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(M,A),M}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(M,A){if(!e.$isRangeSelection(A))return!1;M=A.anchor.getNode();let v=A.focus.getNode();return this.isParentOf(M)&&this.isParentOf(v)&&0<A.getTextContent().length}}function c(O){let M=null;if(t.isHTMLAnchorElement(O)){let A=O.textContent;(A!==null&&A!==""||0<O.children.length)&&(M=d(O.getAttribute("href")||"",{rel:O.getAttribute("rel"),target:O.getAttribute("target"),title:O.getAttribute("title")}))}return{node:M}}function d(O,M){return e.$applyNodeReplacement(new r(O,M))}function f(O){return O instanceof r}class p extends r{static getType(){return"autolink"}static clone(M){return new p(M.__url,{rel:M.__rel,target:M.__target,title:M.__title},M.__key)}static importJSON(M){let A=C(M.url,{rel:M.rel,target:M.target,title:M.title});return A.setFormat(M.format),A.setIndent(M.indent),A.setDirection(M.direction),A}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(M,A=!0){return M=this.getParentOrThrow().insertNewAfter(M,A),e.$isElementNode(M)?(A=C(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),M.append(A),A):null}}function C(O,M){return e.$applyNodeReplacement(new p(O,M))}let x=e.createCommand("TOGGLE_LINK_COMMAND");function T(O,M){for(;O!==null&&O.getParent()!==null&&!M(O);)O=O.getParentOrThrow();return M(O)?O:null}return $i.$createAutoLinkNode=C,$i.$createLinkNode=d,$i.$isAutoLinkNode=function(O){return O instanceof p},$i.$isLinkNode=f,$i.AutoLinkNode=p,$i.LinkNode=r,$i.TOGGLE_LINK_COMMAND=x,$i.toggleLink=function(O,M={}){let{target:A,title:v}=M,w=M.rel===void 0?"noreferrer":M.rel;if(M=e.$getSelection(),e.$isRangeSelection(M))if(M=M.extract(),O===null)M.forEach(P=>{if(P=P.getParent(),f(P)){let K=P.getChildren();for(let $=0;$<K.length;$++)P.insertBefore(K[$]);P.remove()}});else{if(M.length===1){let $=T(M[0],f);if($!==null){$.setURL(O),A!==void 0&&$.setTarget(A),w!==null&&$.setRel(w),v!==void 0&&$.setTitle(v);return}}let P=null,K=null;M.forEach($=>{var W=$.getParent();if(W!==K&&W!==null&&(!e.$isElementNode($)||$.isInline()))if(f(W))K=W,W.setURL(O),A!==void 0&&W.setTarget(A),w!==null&&K.setRel(w),v!==void 0&&K.setTitle(v);else if(W.is(P)||(P=W,K=d(O,{rel:w,target:A,title:v}),f(W)?$.getPreviousSibling()===null?W.insertBefore(K):W.insertAfter(K):$.insertBefore(K)),f($)){if(!$.is(K)){if(K!==null){W=$.getChildren();for(let H=0;H<W.length;H++)K.append(W[H])}$.remove()}}else K!==null&&K.append($)})}},$i}var Tu,ph;function yd(){return ph||(ph=1,Tu=process.env.NODE_ENV==="development"?XC():QC()),Tu}var mh;function eN(){if(mh)return Eu;mh=1;var t=yd(),e=Yn(),n=on(),r=Ht(),c=rt;function d({validateUrl:f}){const[p]=e.useLexicalComposerContext();return c.useEffect(()=>{if(!p.hasNodes([t.LinkNode]))throw new Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(p.registerCommand(t.TOGGLE_LINK_COMMAND,C=>{if(C===null)return t.toggleLink(C),!0;if(typeof C=="string")return f===void 0||f(C)?(t.toggleLink(C),!0):!1;{const{url:x,target:T,rel:O,title:M}=C;return t.toggleLink(x,{rel:O,target:T,title:M}),!0}},r.COMMAND_PRIORITY_LOW),f!==void 0?p.registerCommand(r.PASTE_COMMAND,C=>{const x=r.$getSelection();if(!r.$isRangeSelection(x)||x.isCollapsed()||!(C instanceof ClipboardEvent)||C.clipboardData==null)return!1;const T=C.clipboardData.getData("text");return f(T)?x.getNodes().some(O=>r.$isElementNode(O))?!1:(p.dispatchCommand(t.TOGGLE_LINK_COMMAND,T),C.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[p,f]),null}return Eu.LinkPlugin=d,Eu}var xu={},_h;function tN(){if(_h)return xu;_h=1;var t=yd(),e=Yn(),n=on(),r=Ht(),c=rt;return xu.LinkPlugin=function({validateUrl:d}){let[f]=e.useLexicalComposerContext();return c.useEffect(()=>{if(!f.hasNodes([t.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(f.registerCommand(t.TOGGLE_LINK_COMMAND,p=>{if(p===null)return t.toggleLink(p),!0;if(typeof p=="string")return d===void 0||d(p)?(t.toggleLink(p),!0):!1;let{url:C,target:x,rel:T,title:O}=p;return t.toggleLink(C,{rel:T,target:x,title:O}),!0},r.COMMAND_PRIORITY_LOW),d!==void 0?f.registerCommand(r.PASTE_COMMAND,p=>{let C=r.$getSelection();if(!r.$isRangeSelection(C)||C.isCollapsed()||!(p instanceof ClipboardEvent)||p.clipboardData==null)return!1;let x=p.clipboardData.getData("text");return d(x)?C.getNodes().some(T=>r.$isElementNode(T))?!1:(f.dispatchCommand(t.TOGGLE_LINK_COMMAND,x),p.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[f,d]),null},xu}const nN=process.env.NODE_ENV==="development"?eN():tN();var rN=nN,vu={},Gt={},yh;function iN(){if(yh)return Gt;yh=1;var t=Ht(),e=on();const n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class c extends t.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(se){const he=new c(se.__headerState,se.__colSpan,se.__width,se.__key);return he.__rowSpan=se.__rowSpan,he.__backgroundColor=se.__backgroundColor,he}static importDOM(){return{td:se=>({conversion:d,priority:0}),th:se=>({conversion:d,priority:0})}}static importJSON(se){const he=se.colSpan||1,Oe=se.rowSpan||1,Me=f(se.headerState,he,se.width||void 0);return Me.__rowSpan=Oe,Me.__backgroundColor=se.backgroundColor||null,Me}constructor(se=r.NO_STATUS,he=1,Oe,Me){super(he,Me),this.__headerState=se,this.__width=Oe,this.__backgroundColor=null}createDOM(se){const he=document.createElement(this.getTag());return this.__width&&(he.style.width=`${this.__width}px`),this.__colSpan>1&&(he.colSpan=this.__colSpan),this.__rowSpan>1&&(he.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(he.style.backgroundColor=this.__backgroundColor),e.addClassNamesToElement(he,se.theme.tableCell,this.hasHeader()&&se.theme.tableCellHeader),he}exportDOM(se){const{element:he}=super.exportDOM(se);if(he){const Oe=he,Me=700,De=this.getParentOrThrow().getChildrenSize();Oe.style.border="1px solid black",this.__colSpan>1&&(Oe.colSpan=this.__colSpan),this.__rowSpan>1&&(Oe.rowSpan=this.__rowSpan),Oe.style.width=`${this.getWidth()||Math.max(90,Me/De)}px`,Oe.style.verticalAlign="top",Oe.style.textAlign="start";const We=this.getBackgroundColor();We!==null?Oe.style.backgroundColor=We:this.hasHeader()&&(Oe.style.backgroundColor="#f2f3f5")}return{element:he}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(se){const he=this.getWritable();return he.__headerState=se,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(se){const he=this.getWritable();return he.__width=se,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(se){this.getWritable().__backgroundColor=se}toggleHeaderStyle(se){const he=this.getWritable();return(he.__headerState&se)===se?he.__headerState-=se:he.__headerState+=se,he}hasHeaderState(se){return(this.getHeaderStyles()&se)===se}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(se){return se.__headerState!==this.__headerState||se.__width!==this.__width||se.__colSpan!==this.__colSpan||se.__rowSpan!==this.__rowSpan||se.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function d(ve){const se=ve,he=ve.nodeName.toLowerCase();let Oe;n.test(se.style.width)&&(Oe=parseFloat(se.style.width));const Me=f(he==="th"?r.ROW:r.NO_STATUS,se.colSpan,Oe);Me.__rowSpan=se.rowSpan;const De=se.style.backgroundColor;return De!==""&&(Me.__backgroundColor=De),{forChild:(We,qe)=>{if(p(qe)&&!t.$isElementNode(We)){const Qe=t.$createParagraphNode();return t.$isLineBreakNode(We)&&We.getTextContent()===`
74
- `?null:(Qe.append(We),Qe)}return We},node:Me}}function f(ve,se=1,he){return t.$applyNodeReplacement(new c(ve,se,he))}function p(ve){return ve instanceof c}class C extends t.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(se){return new C(se.__height,se.__key)}static importDOM(){return{tr:se=>({conversion:x,priority:0})}}static importJSON(se){return T(se.height)}constructor(se,he){super(he),this.__height=se}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(se){const he=document.createElement("tr");return this.__height&&(he.style.height=`${this.__height}px`),e.addClassNamesToElement(he,se.theme.tableRow),he}isShadowRoot(){return!0}setHeight(se){const he=this.getWritable();return he.__height=se,this.__height}getHeight(){return this.getLatest().__height}updateDOM(se){return se.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function x(ve){const se=ve;let he;return n.test(se.style.height)&&(he=parseFloat(se.style.height)),{node:T(he)}}function T(ve){return t.$applyNodeReplacement(new C(ve))}function O(ve){return ve instanceof C}const M=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",A=ve=>M?(ve||window).getSelection():null;class v{constructor(se,he){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=he,this.editor=se,this.grid={cells:[],columns:0,rows:0},this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(se=>se())}trackTableGrid(){const se=new MutationObserver(he=>{this.editor.update(()=>{let Oe=!1;for(let De=0;De<he.length;De++){const Qe=he[De].target.nodeName;if(Qe==="TABLE"||Qe==="TR"){Oe=!0;break}}if(!Oe)return;const Me=this.editor.getElementByKey(this.tableNodeKey);if(!Me)throw new Error("Expected to find TableElement in DOM");this.grid=H(Me)})});this.editor.update(()=>{const he=this.editor.getElementByKey(this.tableNodeKey);if(!he)throw new Error("Expected to find TableElement in DOM");this.grid=H(he),se.observe(he,{childList:!0,subtree:!0})})}clearHighlight(){const se=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),se.update(()=>{const he=t.$getNodeByKey(this.tableNodeKey);if(!m(he))throw new Error("Expected TableNode.");const Oe=se.getElementByKey(this.tableNodeKey);if(!Oe)throw new Error("Expected to find TableElement in DOM");const Me=H(Oe);z(se,Me,null),t.$setSelection(null),se.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){const se=this.editor;se.update(()=>{const he=se.getElementByKey(this.tableNodeKey);if(!he)throw new Error("Expected to find TableElement in DOM");e.removeClassNamesFromElement(he,se._config.theme.tableSelection),he.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const se=this.editor;se.update(()=>{const he=se.getElementByKey(this.tableNodeKey);if(!he)throw new Error("Expected to find TableElement in DOM");e.addClassNamesToElement(he,se._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(se){if(se!=null&&se.gridKey===this.tableNodeKey){const he=this.editor;this.gridSelection=se,this.isHighlightingCells=!0,this.disableHighlightStyle(),z(he,this.grid,this.gridSelection)}else se==null?this.clearHighlight():(this.tableNodeKey=se.gridKey,this.updateTableGridSelection(se))}setFocusCellForSelection(se,he=!1){const Oe=this.editor;Oe.update(()=>{const Me=t.$getNodeByKey(this.tableNodeKey);if(!m(Me))throw new Error("Expected TableNode.");if(!Oe.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const We=se.x,qe=se.y;if(this.focusCell=se,this.anchorCell!==null){const Qe=A(Oe._window);Qe&&Qe.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==We||this.anchorY!==qe||he))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(We===this.focusX&&qe===this.focusY)return;if(this.focusX=We,this.focusY=qe,this.isHighlightingCells){const Qe=t.$getNearestNodeFromDOMNode(se.elem);if(this.gridSelection!=null&&this.anchorCellNodeKey!=null&&p(Qe)){const ft=Qe.getKey();this.gridSelection=this.gridSelection.clone()||t.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ft,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),t.$setSelection(this.gridSelection),Oe.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0),z(Oe,this.grid,this.gridSelection)}}})}setAnchorCellForSelection(se){this.isHighlightingCells=!1,this.anchorCell=se,this.anchorX=se.x,this.anchorY=se.y,this.editor.update(()=>{const he=t.$getNearestNodeFromDOMNode(se.elem);if(p(he)){const Oe=he.getKey();this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():t.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=Oe}})}formatCells(se){this.editor.update(()=>{const he=t.$getSelection();if(!t.DEPRECATED_$isGridSelection(he))throw Error("Expected grid selection");const Oe=t.$createRangeSelection(),Me=Oe.anchor,De=Oe.focus;he.getNodes().forEach(We=>{p(We)&&We.getTextContentSize()!==0&&(Me.set(We.getKey(),0,"element"),De.set(We.getKey(),We.getChildrenSize(),"element"),Oe.formatText(se))}),t.$setSelection(he),this.editor.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){const se=this.editor;se.update(()=>{const he=t.$getNodeByKey(this.tableNodeKey);if(!m(he))throw new Error("Expected TableNode.");const Oe=t.$getSelection();if(!t.DEPRECATED_$isGridSelection(Oe))throw Error("Expected grid selection");const Me=Oe.getNodes().filter(p);if(Me.length===this.grid.columns*this.grid.rows){he.selectPrevious(),he.remove(),t.$getRoot().selectStart();return}Me.forEach(De=>{if(t.$isElementNode(De)){const We=t.$createParagraphNode(),qe=t.$createTextNode();We.append(qe),De.append(We),De.getChildren().forEach(Qe=>{Qe!==We&&Qe.remove()})}}),z(se,this.grid,null),t.$setSelection(null),se.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0)})}}const w="__lexicalTableSelection";function P(ve,se,he,Oe){const Me=he.getRootElement();if(Me===null)throw new Error("No root element.");const De=new v(he,ve.getKey()),We=he._window||window;K(se,De),se.addEventListener("mousedown",Ve=>{setTimeout(()=>{if(Ve.button!==0||!We)return;const je=W(Ve.target);je!==null&&(ne(Ve),De.setAnchorCellForSelection(je));const nt=()=>{We.removeEventListener("mouseup",nt),We.removeEventListener("mousemove",_t)},_t=Et=>{const St=W(Et.target);St!==null&&(De.anchorX!==St.x||De.anchorY!==St.y)&&(Et.preventDefault(),De.setFocusCellForSelection(St))};We.addEventListener("mouseup",nt),We.addEventListener("mousemove",_t)},0)});const qe=Ve=>{Ve.button===0&&he.update(()=>{const je=t.$getSelection(),nt=Ve.target;t.DEPRECATED_$isGridSelection(je)&&je.gridKey===De.tableNodeKey&&Me.contains(nt)&&De.clearHighlight()})};We.addEventListener("mousedown",qe),De.listenersToRemove.add(()=>We.removeEventListener("mousedown",qe)),De.listenersToRemove.add(he.registerCommand(t.KEY_ARROW_DOWN_COMMAND,Ve=>V(he,Ve,"down",ve,De),t.COMMAND_PRIORITY_HIGH)),De.listenersToRemove.add(he.registerCommand(t.KEY_ARROW_UP_COMMAND,Ve=>V(he,Ve,"up",ve,De),t.COMMAND_PRIORITY_HIGH)),De.listenersToRemove.add(he.registerCommand(t.KEY_ARROW_LEFT_COMMAND,Ve=>V(he,Ve,"backward",ve,De),t.COMMAND_PRIORITY_HIGH)),De.listenersToRemove.add(he.registerCommand(t.KEY_ARROW_RIGHT_COMMAND,Ve=>V(he,Ve,"forward",ve,De),t.COMMAND_PRIORITY_HIGH)),De.listenersToRemove.add(he.registerCommand(t.KEY_ESCAPE_COMMAND,Ve=>{const je=t.$getSelection();if(t.DEPRECATED_$isGridSelection(je)){const nt=e.$findMatchingParent(je.focus.getNode(),p);if(p(nt))return ne(Ve),nt.selectEnd(),!0}return!1},t.COMMAND_PRIORITY_HIGH));const Qe=Ve=>()=>{const je=t.$getSelection();if(!j(je,ve))return!1;if(t.DEPRECATED_$isGridSelection(je))return De.clearText(),!0;if(t.$isRangeSelection(je)){const nt=e.$findMatchingParent(je.anchor.getNode(),At=>p(At));if(!p(nt))return!1;const _t=je.anchor.getNode(),Et=je.focus.getNode(),St=ve.isParentOf(_t),Ot=ve.isParentOf(Et);if(St&&!Ot||Ot&&!St)return De.clearText(),!0;const xt=e.$findMatchingParent(je.anchor.getNode(),At=>t.$isElementNode(At)),Qt=xt&&e.$findMatchingParent(xt,At=>t.$isElementNode(At)&&p(At.getParent()));if(!t.$isElementNode(Qt)||!t.$isElementNode(xt))return!1;if(Ve===t.DELETE_LINE_COMMAND&&Qt.getPreviousSibling()===null)return!0;if((Ve===t.DELETE_CHARACTER_COMMAND||Ve===t.DELETE_WORD_COMMAND)&&je.isCollapsed()&&je.anchor.offset===0&&xt!==Qt){const At=xt.getChildren(),zt=t.$createParagraphNode();return At.forEach(It=>zt.append(It)),xt.replace(zt),xt.getWritable().__parent=nt.getKey(),!0}}return!1};[t.DELETE_WORD_COMMAND,t.DELETE_LINE_COMMAND,t.DELETE_CHARACTER_COMMAND].forEach(Ve=>{De.listenersToRemove.add(he.registerCommand(Ve,Qe(Ve),t.COMMAND_PRIORITY_CRITICAL))});const ft=Ve=>{const je=t.$getSelection();if(!j(je,ve))return!1;if(t.DEPRECATED_$isGridSelection(je))return Ve.preventDefault(),Ve.stopPropagation(),De.clearText(),!0;if(t.$isRangeSelection(je)){const nt=e.$findMatchingParent(je.anchor.getNode(),_t=>p(_t));if(!p(nt))return!1}return!1};De.listenersToRemove.add(he.registerCommand(t.KEY_BACKSPACE_COMMAND,ft,t.COMMAND_PRIORITY_CRITICAL)),De.listenersToRemove.add(he.registerCommand(t.KEY_DELETE_COMMAND,ft,t.COMMAND_PRIORITY_CRITICAL)),De.listenersToRemove.add(he.registerCommand(t.FORMAT_TEXT_COMMAND,Ve=>{const je=t.$getSelection();if(!j(je,ve))return!1;if(t.DEPRECATED_$isGridSelection(je))return De.formatCells(Ve),!0;if(t.$isRangeSelection(je)){const nt=e.$findMatchingParent(je.anchor.getNode(),_t=>p(_t));if(!p(nt))return!1}return!1},t.COMMAND_PRIORITY_CRITICAL)),De.listenersToRemove.add(he.registerCommand(t.CONTROLLED_TEXT_INSERTION_COMMAND,Ve=>{const je=t.$getSelection();if(!j(je,ve))return!1;if(t.DEPRECATED_$isGridSelection(je))return De.clearHighlight(),!1;if(t.$isRangeSelection(je)){const nt=e.$findMatchingParent(je.anchor.getNode(),_t=>p(_t));if(!p(nt))return!1}return!1},t.COMMAND_PRIORITY_CRITICAL)),Oe&&De.listenersToRemove.add(he.registerCommand(t.KEY_TAB_COMMAND,Ve=>{const je=t.$getSelection();if(!t.$isRangeSelection(je)||!je.isCollapsed()||!j(je,ve))return!1;const nt=F(je.anchor.getNode());if(nt===null)return!1;ne(Ve);const _t=ve.getCordsFromCellNode(nt,De.grid);return q(De,ve,_t.x,_t.y,Ve.shiftKey?"backward":"forward"),!0},t.COMMAND_PRIORITY_CRITICAL)),De.listenersToRemove.add(he.registerCommand(t.FOCUS_COMMAND,Ve=>ve.isSelected(),t.COMMAND_PRIORITY_HIGH));function Lt(Ve){const je=ve.getCordsFromCellNode(Ve,De.grid);return ve.getCellFromCordsOrThrow(je.x,je.y,De.grid)}return De.listenersToRemove.add(he.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>{const Ve=t.$getSelection(),je=t.$getPreviousSelection();if(t.$isRangeSelection(Ve)){const{anchor:nt,focus:_t}=Ve,Et=nt.getNode(),St=_t.getNode(),Ot=F(Et),bt=F(St),xt=Ot&&ve.is(D(Ot)),Qt=bt&&ve.is(D(bt)),At=xt!==Qt,zt=xt&&Qt,It=Ve.isBackward();if(At){const gr=Ve.clone();gr.focus.set(ve.getKey(),It?0:ve.getChildrenSize(),"element"),t.$setSelection(gr),re(he,De)}else zt&&(Ot.is(bt)||(De.setAnchorCellForSelection(Lt(Ot)),De.setFocusCellForSelection(Lt(bt),!0)))}return Ve&&!Ve.is(je)&&(t.DEPRECATED_$isGridSelection(Ve)||t.DEPRECATED_$isGridSelection(je))&&De.gridSelection&&!De.gridSelection.is(je)?(t.DEPRECATED_$isGridSelection(Ve)&&Ve.gridKey===De.tableNodeKey?De.updateTableGridSelection(Ve):!t.DEPRECATED_$isGridSelection(Ve)&&t.DEPRECATED_$isGridSelection(je)&&je.gridKey===De.tableNodeKey&&De.updateTableGridSelection(null),!1):(De.hasHijackedSelectionStyles&&!ve.isSelected()?ce(he,De):!De.hasHijackedSelectionStyles&&ve.isSelected()&&re(he,De),!1)},t.COMMAND_PRIORITY_CRITICAL)),De}function K(ve,se){ve[w]=se}function $(ve){return ve[w]}function W(ve){let se=ve;for(;se!=null;){const he=se.nodeName;if(he==="TD"||he==="TH"){const Oe=se._cell;return Oe===void 0?null:Oe}se=se.parentNode}return null}function H(ve){const se=[],he={cells:se,columns:0,rows:0};let Oe=ve.firstChild,Me=0,De=0;for(se.length=0;Oe!=null;){const We=Oe.nodeName;if(We==="TD"||We==="TH"){const ft=Oe,Lt={elem:ft,hasBackgroundColor:ft.style.backgroundColor!=="",highlighted:!1,x:Me,y:De};Oe._cell=Lt;let Ve=se[De];Ve===void 0&&(Ve=se[De]=[]),Ve[Me]=Lt}else{const ft=Oe.firstChild;if(ft!=null){Oe=ft;continue}}const qe=Oe.nextSibling;if(qe!=null){Me++,Oe=qe;continue}const Qe=Oe.parentNode;if(Qe!=null){const ft=Qe.nextSibling;if(ft==null)break;De++,Me=0,Oe=ft}}return he.columns=Me+1,he.rows=De+1,he}function z(ve,se,he){const Oe=new Set(he?he.getNodes():[]);te(se,(Me,De)=>{const We=Me.elem;Oe.has(De)?(Me.highlighted=!0,J(ve,Me)):(Me.highlighted=!1,ee(ve,Me),We.getAttribute("style")||We.removeAttribute("style"))})}function te(ve,se){const{cells:he}=ve;for(let Oe=0;Oe<he.length;Oe++){const Me=he[Oe];if(Me)for(let De=0;De<Me.length;De++){const We=Me[De];if(!We)continue;const qe=t.$getNearestNodeFromDOMNode(We.elem);qe!==null&&se(We,qe,{x:De,y:Oe})}}}function re(ve,se){se.disableHighlightStyle(),te(se.grid,he=>{he.highlighted=!0,J(ve,he)})}function ce(ve,se){se.enableHighlightStyle(),te(se.grid,he=>{const Oe=he.elem;he.highlighted=!1,ee(ve,he),Oe.getAttribute("style")||Oe.removeAttribute("style")})}const q=(ve,se,he,Oe,Me)=>{const De=Me==="forward";switch(Me){case"backward":case"forward":return he!==(De?ve.grid.columns-1:0)?_e(se.getCellNodeFromCordsOrThrow(he+(De?1:-1),Oe,ve.grid),De):Oe!==(De?ve.grid.rows-1:0)?_e(se.getCellNodeFromCordsOrThrow(De?0:ve.grid.columns-1,Oe+(De?1:-1),ve.grid),De):De?se.selectNext():se.selectPrevious(),!0;case"up":return Oe!==0?_e(se.getCellNodeFromCordsOrThrow(he,Oe-1,ve.grid),!1):se.selectPrevious(),!0;case"down":return Oe!==ve.grid.rows-1?_e(se.getCellNodeFromCordsOrThrow(he,Oe+1,ve.grid),!0):se.selectNext(),!0;default:return!1}},G=(ve,se,he,Oe,Me)=>{const De=Me==="forward";switch(Me){case"backward":case"forward":return he!==(De?ve.grid.columns-1:0)&&ve.setFocusCellForSelection(se.getCellFromCordsOrThrow(he+(De?1:-1),Oe,ve.grid)),!0;case"up":return Oe!==0?(ve.setFocusCellForSelection(se.getCellFromCordsOrThrow(he,Oe-1,ve.grid)),!0):!1;case"down":return Oe!==ve.grid.rows-1?(ve.setFocusCellForSelection(se.getCellFromCordsOrThrow(he,Oe+1,ve.grid)),!0):!1;default:return!1}};function j(ve,se){if(t.$isRangeSelection(ve)||t.DEPRECATED_$isGridSelection(ve)){const he=se.isParentOf(ve.anchor.getNode()),Oe=se.isParentOf(ve.focus.getNode());return he&&Oe}return!1}function _e(ve,se){se?ve.selectStart():ve.selectEnd()}const pe="172,206,247";function J(ve,se){const he=se.elem,Oe=t.$getNearestNodeFromDOMNode(he);if(!p(Oe))throw Error("Expected to find LexicalNode from Table Cell DOMNode");Oe.getBackgroundColor()===null?he.style.setProperty("background-color",`rgb(${pe})`):he.style.setProperty("background-image",`linear-gradient(to right, rgba(${pe},0.85), rgba(${pe},0.85))`),he.style.setProperty("caret-color","transparent")}function ee(ve,se){const he=se.elem,Oe=t.$getNearestNodeFromDOMNode(he);if(!p(Oe))throw Error("Expected to find LexicalNode from Table Cell DOMNode");Oe.getBackgroundColor()===null&&he.style.removeProperty("background-color"),he.style.removeProperty("background-image"),he.style.removeProperty("caret-color")}function F(ve){const se=e.$findMatchingParent(ve,p);return p(se)?se:null}function D(ve){const se=e.$findMatchingParent(ve,m);return m(se)?se:null}function V(ve,se,he,Oe,Me){const De=t.$getSelection();if(!j(De,Oe))return!1;if(t.$isRangeSelection(De)&&De.isCollapsed()){if(he==="backward"||he==="forward")return!1;const{anchor:We,focus:qe}=De,Qe=e.$findMatchingParent(We.getNode(),p),ft=e.$findMatchingParent(qe.getNode(),p);if(!p(Qe)||!Qe.is(ft))return!1;const Lt=D(Qe);if(Lt!==Oe&&Lt!=null){const bt=ve.getElementByKey(Lt.getKey());if(bt!=null)return Me.grid=H(bt),V(ve,se,he,Lt,Me)}const Ve=ve.getElementByKey(Qe.__key),je=ve.getElementByKey(We.key);if(je==null||Ve==null)return!1;let nt;if(We.type==="element")nt=je.getBoundingClientRect();else{const bt=window.getSelection();if(bt===null||bt.rangeCount===0)return!1;nt=bt.getRangeAt(0).getBoundingClientRect()}const _t=he==="up"?Qe.getFirstChild():Qe.getLastChild();if(_t==null)return!1;const Et=ve.getElementByKey(_t.__key);if(Et==null)return!1;const St=Et.getBoundingClientRect();if(he==="up"?St.top>nt.top-nt.height:nt.bottom+nt.height>St.bottom){ne(se);const bt=Oe.getCordsFromCellNode(Qe,Me.grid);if(se.shiftKey){const xt=Oe.getCellFromCordsOrThrow(bt.x,bt.y,Me.grid);Me.setAnchorCellForSelection(xt),Me.setFocusCellForSelection(xt,!0)}else return q(Me,Oe,bt.x,bt.y,he);return!0}}else if(t.DEPRECATED_$isGridSelection(De)){const{anchor:We,focus:qe}=De,Qe=e.$findMatchingParent(We.getNode(),p),ft=e.$findMatchingParent(qe.getNode(),p),[Lt]=De.getNodes(),Ve=ve.getElementByKey(Lt.getKey());if(!p(Qe)||!p(ft)||!m(Lt)||Ve==null)return!1;Me.updateTableGridSelection(De);const je=H(Ve),nt=Oe.getCordsFromCellNode(Qe,je),_t=Oe.getCellFromCordsOrThrow(nt.x,nt.y,je);if(Me.setAnchorCellForSelection(_t),ne(se),se.shiftKey){const Et=Oe.getCordsFromCellNode(ft,je);return G(Me,Lt,Et.x,Et.y,he)}else ft.selectEnd();return!0}return!1}function ne(ve){ve.preventDefault(),ve.stopImmediatePropagation(),ve.stopPropagation()}class Y extends t.DEPRECATED_GridNode{static getType(){return"table"}static clone(se){return new Y(se.__key)}static importDOM(){return{table:se=>({conversion:Q,priority:1})}}static importJSON(se){return k()}constructor(se){super(se)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(se,he){const Oe=document.createElement("table");return e.addClassNamesToElement(Oe,se.theme.table),Oe}updateDOM(){return!1}exportDOM(se){return{...super.exportDOM(se),after:he=>{if(he){const Oe=he.cloneNode(),Me=document.createElement("colgroup"),De=document.createElement("tbody");e.isHTMLElement(he)&&De.append(...he.children);const We=this.getFirstChildOrThrow();if(!O(We))throw new Error("Expected to find row node.");const qe=We.getChildrenSize();for(let Qe=0;Qe<qe;Qe++){const ft=document.createElement("col");Me.append(ft)}return Oe.replaceChildren(Me,De),Oe}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(se,he){const{rows:Oe,cells:Me}=he;for(let De=0;De<Oe;De++){const We=Me[De];if(We==null)continue;const qe=We.findIndex(Qe=>{if(!Qe)return;const{elem:ft}=Qe;return t.$getNearestNodeFromDOMNode(ft)===se});if(qe!==-1)return{x:qe,y:De}}throw new Error("Cell not found in table.")}getCellFromCords(se,he,Oe){const{cells:Me}=Oe,De=Me[he];if(De==null)return null;const We=De[se];return We??null}getCellFromCordsOrThrow(se,he,Oe){const Me=this.getCellFromCords(se,he,Oe);if(!Me)throw new Error("Cell not found at cords.");return Me}getCellNodeFromCords(se,he,Oe){const Me=this.getCellFromCords(se,he,Oe);if(Me==null)return null;const De=t.$getNearestNodeFromDOMNode(Me.elem);return p(De)?De:null}getCellNodeFromCordsOrThrow(se,he,Oe){const Me=this.getCellNodeFromCords(se,he,Oe);if(!Me)throw new Error("Node at cords not TableCellNode.");return Me}canSelectBefore(){return!0}canIndent(){return!1}}function U(ve,se){const he=ve.getElementByKey(se.getKey());if(he==null)throw new Error("Table Element Not Found");return H(he)}function Q(ve){return{node:k()}}function k(){return t.$applyNodeReplacement(new Y)}function m(ve){return ve instanceof Y}function y(ve,se,he=!0){const Oe=k();for(let Me=0;Me<ve;Me++){const De=T();for(let We=0;We<se;We++){let qe=r.NO_STATUS;typeof he=="object"?(Me===0&&he.rows&&(qe|=r.ROW),We===0&&he.columns&&(qe|=r.COLUMN)):he&&(Me===0&&(qe|=r.ROW),We===0&&(qe|=r.COLUMN));const Qe=f(qe),ft=t.$createParagraphNode();ft.append(t.$createTextNode()),Qe.append(ft),De.append(Qe)}Oe.append(De)}return Oe}function R(ve){const se=e.$findMatchingParent(ve,he=>p(he));return p(se)?se:null}function Z(ve){const se=e.$findMatchingParent(ve,he=>O(he));if(O(se))return se;throw new Error("Expected table cell to be inside of table row.")}function ue(ve){const se=e.$findMatchingParent(ve,he=>m(he));if(m(se))return se;throw new Error("Expected table cell to be inside of table.")}function ge(ve){const se=Z(ve);return ue(se).getChildren().findIndex(Oe=>Oe.is(se))}function ae(ve){return Z(ve).getChildren().findIndex(he=>he.is(ve))}function Te(ve,se){const he=ue(ve),{x:Oe,y:Me}=he.getCordsFromCellNode(ve,se);return{above:he.getCellNodeFromCords(Oe,Me-1,se),below:he.getCellNodeFromCords(Oe,Me+1,se),left:he.getCellNodeFromCords(Oe-1,Me,se),right:he.getCellNodeFromCords(Oe+1,Me,se)}}function Ae(ve,se){const he=ve.getChildren();if(se>=he.length||se<0)throw new Error("Expected table cell to be inside of table row.");return he[se].remove(),ve}function ze(ve,se,he=!0,Oe,Me){const De=ve.getChildren();if(se>=De.length||se<0)throw new Error("Table row target index out of range");const We=De[se];if(O(We))for(let qe=0;qe<Oe;qe++){const Qe=We.getChildren(),ft=Qe.length,Lt=T();for(let Ve=0;Ve<ft;Ve++){const je=Qe[Ve];if(!p(je))throw Error("Expected table cell");const{above:nt,below:_t}=Te(je,Me);let Et=r.NO_STATUS;const St=nt&&nt.getWidth()||_t&&_t.getWidth()||void 0;(nt&&nt.hasHeaderState(r.COLUMN)||_t&&_t.hasHeaderState(r.COLUMN))&&(Et|=r.COLUMN);const Ot=f(Et,1,St);Ot.append(t.$createParagraphNode()),Lt.append(Ot)}he?We.insertAfter(Lt):We.insertBefore(Lt)}else throw new Error("Row before insertion index does not exist.");return ve}function oe(ve=!0){const se=t.$getSelection();if(!t.$INTERNAL_isPointSelection(se))throw Error("Expected a INTERNAL_PointSelection");const he=se.focus.getNode(),[Oe,,Me]=t.DEPRECATED_$getNodeTriplet(he),[De,We]=t.DEPRECATED_$computeGridMap(Me,Oe,Oe),qe=De[0].length,{startRow:Qe}=We;if(ve){const ft=Qe+Oe.__rowSpan-1,Lt=De[ft],Ve=T();for(let nt=0;nt<qe;nt++){const{cell:_t,startRow:Et}=Lt[nt];Et+_t.__rowSpan-1<=ft?Ve.append(f(r.NO_STATUS)):_t.setRowSpan(_t.__rowSpan+1)}const je=Me.getChildAtIndex(ft);if(!t.DEPRECATED_$isGridRowNode(je))throw Error("focusEndRow is not a GridRowNode");je.insertAfter(Ve)}else{const ft=De[Qe],Lt=T();for(let je=0;je<qe;je++){const{cell:nt,startRow:_t}=ft[je];_t===Qe?Lt.append(f(r.NO_STATUS)):nt.setRowSpan(nt.__rowSpan+1)}const Ve=Me.getChildAtIndex(Qe);if(!t.DEPRECATED_$isGridRowNode(Ve))throw Error("focusEndRow is not a GridRowNode");Ve.insertBefore(Lt)}}function ie(ve,se,he=!0,Oe,Me){const De=ve.getChildren(),We=[];for(let qe=0;qe<De.length;qe++){const Qe=De[qe];if(O(Qe))for(let ft=0;ft<Oe;ft++){const Lt=Qe.getChildren();if(se>=Lt.length||se<0)throw new Error("Table column target index out of range");const Ve=Lt[se];if(!p(Ve))throw Error("Expected table cell");const{left:je,right:nt}=Te(Ve,Me);let _t=r.NO_STATUS;(je&&je.hasHeaderState(r.ROW)||nt&&nt.hasHeaderState(r.ROW))&&(_t|=r.ROW);const Et=f(_t);Et.append(t.$createParagraphNode()),We.push({newTableCell:Et,targetCell:Ve})}}return We.forEach(({newTableCell:qe,targetCell:Qe})=>{he?Qe.insertAfter(qe):Qe.insertBefore(qe)}),ve}function de(ve=!0){const se=t.$getSelection();if(!t.$INTERNAL_isPointSelection(se))throw Error("Expected a PointSeleciton");const he=se.anchor.getNode(),Oe=se.focus.getNode(),[Me]=t.DEPRECATED_$getNodeTriplet(he),[De,,We]=t.DEPRECATED_$getNodeTriplet(Oe),[qe,Qe,ft]=t.DEPRECATED_$computeGridMap(We,De,Me),Lt=qe.length,Ve=ve?Math.max(Qe.startColumn,ft.startColumn):Math.min(Qe.startColumn,ft.startColumn),je=ve?Ve+De.__colSpan-1:Ve-1,nt=We.getFirstChild();if(!t.DEPRECATED_$isGridRowNode(nt))throw Error("Expected firstTable child to be a row");let _t=null;function Et(){const Ot=f(r.NO_STATUS).append(t.$createParagraphNode());return _t===null&&(_t=Ot),Ot}let St=nt;e:for(let Ot=0;Ot<Lt;Ot++){if(Ot!==0){const zt=St.getNextSibling();if(!t.DEPRECATED_$isGridRowNode(zt))throw Error("Expected row nextSibling to be a row");St=zt}const bt=qe[Ot];if(je<0){ct(St,Et());continue}const{cell:xt,startColumn:Qt,startRow:At}=bt[je];if(Qt+xt.__colSpan-1<=je){let zt=xt,It=At,gr=je;for(;It!==Ot&&zt.__rowSpan>1;)if(gr-=xt.__colSpan,gr>=0){const{cell:wr,startRow:Bi}=bt[gr];zt=wr,It=Bi}else{St.append(Et());continue e}zt.insertAfter(Et())}else xt.setColSpan(xt.__colSpan+1)}_t!==null&&Ye(_t)}function we(ve,se){const he=ve.getChildren();for(let Oe=0;Oe<he.length;Oe++){const Me=he[Oe];if(O(Me)){const De=Me.getChildren();if(se>=De.length||se<0)throw new Error("Table column target index out of range");De[se].remove()}}return ve}function ke(){const ve=t.$getSelection();if(!t.$INTERNAL_isPointSelection(ve))throw Error("Expected a INTERNAL_PointSelection");const se=ve.anchor.getNode(),he=ve.focus.getNode(),[Oe,,Me]=t.DEPRECATED_$getNodeTriplet(se),[De]=t.DEPRECATED_$getNodeTriplet(he),[We,qe,Qe]=t.DEPRECATED_$computeGridMap(Me,Oe,De),{startRow:ft}=qe,{startRow:Lt}=Qe,Ve=Lt+De.__rowSpan-1;if(We.length===Ve-ft+1){Me.remove();return}const je=We[0].length,nt=We[Ve+1],_t=Me.getChildAtIndex(Ve+1);for(let Et=Ve;Et>=ft;Et--){for(let Ot=je-1;Ot>=0;Ot--){const{cell:bt,startRow:xt,startColumn:Qt}=We[Et][Ot];if(Qt===Ot&&(Et===ft&&xt<ft&&bt.setRowSpan(bt.__rowSpan-(xt-ft)),xt>=ft&&xt+bt.__rowSpan-1>Ve)){if(bt.setRowSpan(bt.__rowSpan-(Ve-xt+1)),_t===null)throw Error("Expected nextRowNode not to be null");if(Ot===0)ct(_t,bt);else{const{cell:At}=nt[Ot-1];At.insertAfter(bt)}}}const St=Me.getChildAtIndex(Et);if(!t.DEPRECATED_$isGridRowNode(St))throw Error(`Expected GridNode childAtIndex(${String(Et)}) to be RowNode`);St.remove()}if(nt!==void 0){const{cell:Et}=nt[0];Ye(Et)}else{const Et=We[ft-1],{cell:St}=Et[0];Ye(St)}}function Be(){const ve=t.$getSelection();if(!t.$INTERNAL_isPointSelection(ve))throw Error("Expected a INTERNAL_PointSelection");const se=ve.anchor.getNode(),he=ve.focus.getNode(),[Oe,,Me]=t.DEPRECATED_$getNodeTriplet(se),[De]=t.DEPRECATED_$getNodeTriplet(he),[We,qe,Qe]=t.DEPRECATED_$computeGridMap(Me,Oe,De),{startColumn:ft}=qe,{startRow:Lt,startColumn:Ve}=Qe,je=Math.min(ft,Ve),nt=Math.max(ft+Oe.__colSpan-1,Ve+De.__colSpan-1),_t=nt-je+1;if(We[0].length===nt-je+1){Me.selectPrevious(),Me.remove();return}const St=We.length;for(let xt=0;xt<St;xt++)for(let Qt=je;Qt<=nt;Qt++){const{cell:At,startColumn:zt}=We[xt][Qt];if(zt<je){if(Qt===je){const It=je-zt;At.setColSpan(At.__colSpan-Math.min(_t,At.__colSpan-It))}}else if(zt+At.__colSpan-1>nt){if(Qt===nt){const It=nt-zt+1;At.setColSpan(At.__colSpan-It)}}else At.remove()}const Ot=We[Lt],bt=Ot[Ve+De.__colSpan];if(bt!==void 0){const{cell:xt}=bt;Ye(xt)}else{const xt=Ot[Ve-1],{cell:Qt}=xt;Ye(Qt)}}function Ye(ve){const se=ve.getFirstDescendant();se==null?ve.selectStart():se.getParentOrThrow().selectStart()}function ct(ve,se){const he=ve.getFirstChild();he!==null?he.insertBefore(se):ve.append(se)}function yt(){const ve=t.$getSelection();if(!t.$INTERNAL_isPointSelection(ve))throw Error("Expected a INTERNAL_PointSelection");const se=ve.anchor.getNode(),[he,Oe,Me]=t.DEPRECATED_$getNodeTriplet(se),De=he.__colSpan,We=he.__rowSpan;if(De>1){for(let qe=1;qe<De;qe++)he.insertAfter(f(r.NO_STATUS));he.setColSpan(1)}if(We>1){const[qe,Qe]=t.DEPRECATED_$computeGridMap(Me,he,he),{startColumn:ft,startRow:Lt}=Qe;let Ve;for(let je=1;je<We;je++){const nt=Lt+je,_t=qe[nt];if(Ve=(Ve||Oe).getNextSibling(),!t.DEPRECATED_$isGridRowNode(Ve))throw Error("Expected row next sibling to be a row");let Et=null;for(let St=0;St<ft;St++){const Ot=_t[St],bt=Ot.cell;Ot.startRow===nt&&(Et=bt),bt.__colSpan>1&&(St+=bt.__colSpan-1)}if(Et===null)for(let St=0;St<De;St++)ct(Ve,f(r.NO_STATUS));else for(let St=0;St<De;St++)Et.insertAfter(f(r.NO_STATUS))}he.setRowSpan(1)}}const dt=t.createCommand("INSERT_TABLE_COMMAND");return Gt.$createTableCellNode=f,Gt.$createTableNode=k,Gt.$createTableNodeWithDimensions=y,Gt.$createTableRowNode=T,Gt.$deleteTableColumn=we,Gt.$deleteTableColumn__EXPERIMENTAL=Be,Gt.$deleteTableRow__EXPERIMENTAL=ke,Gt.$getElementGridForTableNode=U,Gt.$getTableCellNodeFromLexicalNode=R,Gt.$getTableColumnIndexFromTableCellNode=ae,Gt.$getTableNodeFromLexicalNodeOrThrow=ue,Gt.$getTableRowIndexFromTableCellNode=ge,Gt.$getTableRowNodeFromTableCellNodeOrThrow=Z,Gt.$insertTableColumn=ie,Gt.$insertTableColumn__EXPERIMENTAL=de,Gt.$insertTableRow=ze,Gt.$insertTableRow__EXPERIMENTAL=oe,Gt.$isTableCellNode=p,Gt.$isTableNode=m,Gt.$isTableRowNode=O,Gt.$removeTableRowAtIndex=Ae,Gt.$unmergeCell=yt,Gt.INSERT_TABLE_COMMAND=dt,Gt.TableCellHeaderStates=r,Gt.TableCellNode=c,Gt.TableNode=Y,Gt.TableRowNode=C,Gt.TableSelection=v,Gt.applyTableHandlers=P,Gt.getCellFromTarget=W,Gt.getTableSelectionFromTableElement=$,Gt}var Yt={},Ch;function oN(){if(Ch)return Yt;Ch=1;var t=Ht(),e=on();let n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class c extends t.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(y){let R=new c(y.__headerState,y.__colSpan,y.__width,y.__key);return R.__rowSpan=y.__rowSpan,R.__backgroundColor=y.__backgroundColor,R}static importDOM(){return{td:()=>({conversion:d,priority:0}),th:()=>({conversion:d,priority:0})}}static importJSON(y){let R=y.rowSpan||1,Z=f(y.headerState,y.colSpan||1,y.width||void 0);return Z.__rowSpan=R,Z.__backgroundColor=y.backgroundColor||null,Z}constructor(y=r.NO_STATUS,R=1,Z,ue){super(R,ue),this.__headerState=y,this.__width=Z,this.__backgroundColor=null}createDOM(y){let R=document.createElement(this.getTag());return this.__width&&(R.style.width=`${this.__width}px`),1<this.__colSpan&&(R.colSpan=this.__colSpan),1<this.__rowSpan&&(R.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(R.style.backgroundColor=this.__backgroundColor),e.addClassNamesToElement(R,y.theme.tableCell,this.hasHeader()&&y.theme.tableCellHeader),R}exportDOM(y){if({element:y}=super.exportDOM(y),y){var R=this.getParentOrThrow().getChildrenSize();y.style.border="1px solid black",1<this.__colSpan&&(y.colSpan=this.__colSpan),1<this.__rowSpan&&(y.rowSpan=this.__rowSpan),y.style.width=`${this.getWidth()||Math.max(90,700/R)}px`,y.style.verticalAlign="top",y.style.textAlign="start",R=this.getBackgroundColor(),R!==null?y.style.backgroundColor=R:this.hasHeader()&&(y.style.backgroundColor="#f2f3f5")}return{element:y}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(y){return this.getWritable().__headerState=y,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(y){return this.getWritable().__width=y,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(y){this.getWritable().__backgroundColor=y}toggleHeaderStyle(y){let R=this.getWritable();return R.__headerState=(R.__headerState&y)===y?R.__headerState-y:R.__headerState+y,R}hasHeaderState(y){return(this.getHeaderStyles()&y)===y}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(y){return y.__headerState!==this.__headerState||y.__width!==this.__width||y.__colSpan!==this.__colSpan||y.__rowSpan!==this.__rowSpan||y.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function d(m){var y=m.nodeName.toLowerCase();let R;return n.test(m.style.width)&&(R=parseFloat(m.style.width)),y=f(y==="th"?r.ROW:r.NO_STATUS,m.colSpan,R),y.__rowSpan=m.rowSpan,m=m.style.backgroundColor,m!==""&&(y.__backgroundColor=m),{forChild:(Z,ue)=>p(ue)&&!t.$isElementNode(Z)?(ue=t.$createParagraphNode(),t.$isLineBreakNode(Z)&&Z.getTextContent()===`
75
- `?null:(ue.append(Z),ue)):Z,node:y}}function f(m,y=1,R){return t.$applyNodeReplacement(new c(m,y,R))}function p(m){return m instanceof c}class C extends t.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(y){return new C(y.__height,y.__key)}static importDOM(){return{tr:()=>({conversion:x,priority:0})}}static importJSON(y){return T(y.height)}constructor(y,R){super(R),this.__height=y}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(y){let R=document.createElement("tr");return this.__height&&(R.style.height=`${this.__height}px`),e.addClassNamesToElement(R,y.theme.tableRow),R}isShadowRoot(){return!0}setHeight(y){return this.getWritable().__height=y,this.__height}getHeight(){return this.getLatest().__height}updateDOM(y){return y.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function x(m){let y;return n.test(m.style.height)&&(y=parseFloat(m.style.height)),{node:T(y)}}function T(m){return t.$applyNodeReplacement(new C(m))}function O(m){return m instanceof C}function M(m){let y=new URLSearchParams;y.append("code",m);for(let R=1;R<arguments.length;R++)y.append("v",arguments[R]);throw Error(`Minified Lexical error #${m}; visit https://lexical.dev/docs/error?${y} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let A=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class v{constructor(y,R){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=R,this.editor=y,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(y=>y())}trackTableGrid(){let y=new MutationObserver(R=>{this.editor.update(()=>{var Z=!1;for(let ue=0;ue<R.length;ue++){const ge=R[ue].target.nodeName;if(ge==="TABLE"||ge==="TR"){Z=!0;break}}if(Z){if(Z=this.editor.getElementByKey(this.tableNodeKey),!Z)throw Error("Expected to find TableElement in DOM");this.grid=P(Z)}})});this.editor.update(()=>{let R=this.editor.getElementByKey(this.tableNodeKey);if(!R)throw Error("Expected to find TableElement in DOM");this.grid=P(R),y.observe(R,{childList:!0,subtree:!0})})}clearHighlight(){let y=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),y.update(()=>{var R=t.$getNodeByKey(this.tableNodeKey);if(!D(R))throw Error("Expected TableNode.");if(R=y.getElementByKey(this.tableNodeKey),!R)throw Error("Expected to find TableElement in DOM");R=P(R),K(y,R,null),t.$setSelection(null),y.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){let y=this.editor;y.update(()=>{let R=y.getElementByKey(this.tableNodeKey);if(!R)throw Error("Expected to find TableElement in DOM");e.removeClassNamesFromElement(R,y._config.theme.tableSelection),R.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let y=this.editor;y.update(()=>{let R=y.getElementByKey(this.tableNodeKey);if(!R)throw Error("Expected to find TableElement in DOM");e.addClassNamesToElement(R,y._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(y){if(y!=null&&y.gridKey===this.tableNodeKey){let R=this.editor;this.gridSelection=y,this.isHighlightingCells=!0,this.disableHighlightStyle(),K(R,this.grid,this.gridSelection)}else y==null?this.clearHighlight():(this.tableNodeKey=y.gridKey,this.updateTableGridSelection(y))}setFocusCellForSelection(y,R=!1){let Z=this.editor;Z.update(()=>{var ue=t.$getNodeByKey(this.tableNodeKey);if(!D(ue))throw Error("Expected TableNode.");if(!Z.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");ue=y.x;let ge=y.y;if(this.focusCell=y,this.anchorCell!==null){let ae=A?(Z._window||window).getSelection():null;ae&&ae.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ue||this.anchorY!==ge||R))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ue===this.focusX&&ge===this.focusY)return;this.focusX=ue,this.focusY=ge,this.isHighlightingCells&&(ue=t.$getNearestNodeFromDOMNode(y.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&p(ue)&&(ue=ue.getKey(),this.gridSelection=this.gridSelection.clone()||t.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ue,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),t.$setSelection(this.gridSelection),Z.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0),K(Z,this.grid,this.gridSelection)))})}setAnchorCellForSelection(y){this.isHighlightingCells=!1,this.anchorCell=y,this.anchorX=y.x,this.anchorY=y.y,this.editor.update(()=>{var R=t.$getNearestNodeFromDOMNode(y.elem);p(R)&&(R=R.getKey(),this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():t.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=R)})}formatCells(y){this.editor.update(()=>{let R=t.$getSelection();t.DEPRECATED_$isGridSelection(R)||M(11);let Z=t.$createRangeSelection(),ue=Z.anchor,ge=Z.focus;R.getNodes().forEach(ae=>{p(ae)&&ae.getTextContentSize()!==0&&(ue.set(ae.getKey(),0,"element"),ge.set(ae.getKey(),ae.getChildrenSize(),"element"),Z.formatText(y))}),t.$setSelection(R),this.editor.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){let y=this.editor;y.update(()=>{let R=t.$getNodeByKey(this.tableNodeKey);if(!D(R))throw Error("Expected TableNode.");var Z=t.$getSelection();t.DEPRECATED_$isGridSelection(Z)||M(11),Z=Z.getNodes().filter(p),Z.length===this.grid.columns*this.grid.rows?(R.selectPrevious(),R.remove(),t.$getRoot().selectStart()):(Z.forEach(ue=>{if(t.$isElementNode(ue)){let ge=t.$createParagraphNode(),ae=t.$createTextNode();ge.append(ae),ue.append(ge),ue.getChildren().forEach(Te=>{Te!==ge&&Te.remove()})}}),K(y,this.grid,null),t.$setSelection(null),y.dispatchCommand(t.SELECTION_CHANGE_COMMAND,void 0))})}}function w(m){for(;m!=null;){let y=m.nodeName;if(y==="TD"||y==="TH"){if(m=m._cell,m===void 0)break;return m}m=m.parentNode}return null}function P(m){let y=[],R={cells:y,columns:0,rows:0};var Z=m.firstChild;let ue=m=0;for(y.length=0;Z!=null;){var ge=Z.nodeName;if(ge==="TD"||ge==="TH"){ge=Z,ge={elem:ge,hasBackgroundColor:ge.style.backgroundColor!=="",highlighted:!1,x:m,y:ue},Z._cell=ge;let ae=y[ue];ae===void 0&&(ae=y[ue]=[]),ae[m]=ge}else if(ge=Z.firstChild,ge!=null){Z=ge;continue}if(ge=Z.nextSibling,ge!=null)m++,Z=ge;else if(ge=Z.parentNode,ge!=null){if(Z=ge.nextSibling,Z==null)break;ue++,m=0}}return R.columns=m+1,R.rows=ue+1,R}function K(m,y,R){let Z=new Set(R?R.getNodes():[]);$(y,(ue,ge)=>{let ae=ue.elem;Z.has(ge)?(ue.highlighted=!0,ce(m,ue)):(ue.highlighted=!1,q(m,ue),ae.getAttribute("style")||ae.removeAttribute("style"))})}function $(m,y){({cells:m}=m);for(let R=0;R<m.length;R++){let Z=m[R];if(Z)for(let ue=0;ue<Z.length;ue++){let ge=Z[ue];if(!ge)continue;let ae=t.$getNearestNodeFromDOMNode(ge.elem);ae!==null&&y(ge,ae,{x:ue,y:R})}}}function W(m,y){y.disableHighlightStyle(),$(y.grid,R=>{R.highlighted=!0,ce(m,R)})}function H(m,y){y.enableHighlightStyle(),$(y.grid,R=>{let Z=R.elem;R.highlighted=!1,q(m,R),Z.getAttribute("style")||Z.removeAttribute("style")})}let z=(m,y,R,Z,ue)=>{const ge=ue==="forward";switch(ue){case"backward":case"forward":return R!==(ge?m.grid.columns-1:0)?(m=y.getCellNodeFromCordsOrThrow(R+(ge?1:-1),Z,m.grid),ge?m.selectStart():m.selectEnd()):Z!==(ge?m.grid.rows-1:0)?(m=y.getCellNodeFromCordsOrThrow(ge?0:m.grid.columns-1,Z+(ge?1:-1),m.grid),ge?m.selectStart():m.selectEnd()):ge?y.selectNext():y.selectPrevious(),!0;case"up":return Z!==0?y.getCellNodeFromCordsOrThrow(R,Z-1,m.grid).selectEnd():y.selectPrevious(),!0;case"down":return Z!==m.grid.rows-1?y.getCellNodeFromCordsOrThrow(R,Z+1,m.grid).selectStart():y.selectNext(),!0;default:return!1}},te=(m,y,R,Z,ue)=>{const ge=ue==="forward";switch(ue){case"backward":case"forward":return R!==(ge?m.grid.columns-1:0)&&m.setFocusCellForSelection(y.getCellFromCordsOrThrow(R+(ge?1:-1),Z,m.grid)),!0;case"up":return Z!==0?(m.setFocusCellForSelection(y.getCellFromCordsOrThrow(R,Z-1,m.grid)),!0):!1;case"down":return Z!==m.grid.rows-1?(m.setFocusCellForSelection(y.getCellFromCordsOrThrow(R,Z+1,m.grid)),!0):!1;default:return!1}};function re(m,y){if(t.$isRangeSelection(m)||t.DEPRECATED_$isGridSelection(m)){let R=y.isParentOf(m.anchor.getNode());return m=y.isParentOf(m.focus.getNode()),R&&m}return!1}function ce(m,y){m=y.elem,y=t.$getNearestNodeFromDOMNode(m),p(y)||M(131),y.getBackgroundColor()===null?m.style.setProperty("background-color","rgb(172,206,247)"):m.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),m.style.setProperty("caret-color","transparent")}function q(m,y){m=y.elem,y=t.$getNearestNodeFromDOMNode(m),p(y)||M(131),y.getBackgroundColor()===null&&m.style.removeProperty("background-color"),m.style.removeProperty("background-image"),m.style.removeProperty("caret-color")}function G(m){return m=e.$findMatchingParent(m,p),p(m)?m:null}function j(m){return m=e.$findMatchingParent(m,D),D(m)?m:null}function _e(m,y,R,Z,ue){let ge=t.$getSelection();if(!re(ge,Z))return!1;if(t.$isRangeSelection(ge)&&ge.isCollapsed()){if(R==="backward"||R==="forward")return!1;let{anchor:ze,focus:oe}=ge;var ae=e.$findMatchingParent(ze.getNode(),p),Te=e.$findMatchingParent(oe.getNode(),p);if(!p(ae)||!ae.is(Te))return!1;if(Te=j(ae),Te!==Z&&Te!=null){var Ae=m.getElementByKey(Te.getKey());if(Ae!=null)return ue.grid=P(Ae),_e(m,y,R,Te,ue)}if(Te=m.getElementByKey(ae.__key),Ae=m.getElementByKey(ze.key),Ae==null||Te==null)return!1;if(ze.type==="element")Te=Ae.getBoundingClientRect();else{if(Te=window.getSelection(),Te===null||Te.rangeCount===0)return!1;Te=Te.getRangeAt(0).getBoundingClientRect()}if(Ae=R==="up"?ae.getFirstChild():ae.getLastChild(),Ae==null||(m=m.getElementByKey(Ae.__key),m==null))return!1;if(m=m.getBoundingClientRect(),R==="up"?m.top>Te.top-Te.height:Te.bottom+Te.height>m.bottom){if(pe(y),m=Z.getCordsFromCellNode(ae,ue.grid),y.shiftKey)R=Z.getCellFromCordsOrThrow(m.x,m.y,ue.grid),ue.setAnchorCellForSelection(R),ue.setFocusCellForSelection(R,!0);else return z(ue,Z,m.x,m.y,R);return!0}}else if(t.DEPRECATED_$isGridSelection(ge)){let{anchor:ze,focus:oe}=ge;return Ae=e.$findMatchingParent(ze.getNode(),p),Te=e.$findMatchingParent(oe.getNode(),p),[ae]=ge.getNodes(),m=m.getElementByKey(ae.getKey()),!p(Ae)||!p(Te)||!D(ae)||m==null?!1:(ue.updateTableGridSelection(ge),m=P(m),Ae=Z.getCordsFromCellNode(Ae,m),Ae=Z.getCellFromCordsOrThrow(Ae.x,Ae.y,m),ue.setAnchorCellForSelection(Ae),pe(y),y.shiftKey?(y=Z.getCordsFromCellNode(Te,m),te(ue,ae,y.x,y.y,R)):(Te.selectEnd(),!0))}return!1}function pe(m){m.preventDefault(),m.stopImmediatePropagation(),m.stopPropagation()}class J extends t.DEPRECATED_GridNode{static getType(){return"table"}static clone(y){return new J(y.__key)}static importDOM(){return{table:()=>({conversion:ee,priority:1})}}static importJSON(){return F()}constructor(y){super(y)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(y){let R=document.createElement("table");return e.addClassNamesToElement(R,y.theme.table),R}updateDOM(){return!1}exportDOM(y){return{...super.exportDOM(y),after:R=>{if(R){let Z=R.cloneNode(),ue=document.createElement("colgroup"),ge=document.createElement("tbody");if(e.isHTMLElement(R)&&ge.append(...R.children),R=this.getFirstChildOrThrow(),!O(R))throw Error("Expected to find row node.");R=R.getChildrenSize();for(let ae=0;ae<R;ae++){let Te=document.createElement("col");ue.append(Te)}return Z.replaceChildren(ue,ge),Z}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(y,R){let{rows:Z,cells:ue}=R;for(R=0;R<Z;R++){var ge=ue[R];if(ge!=null&&(ge=ge.findIndex(ae=>{if(ae)return{elem:ae}=ae,t.$getNearestNodeFromDOMNode(ae)===y}),ge!==-1))return{x:ge,y:R}}throw Error("Cell not found in table.")}getCellFromCords(y,R,Z){return{cells:Z}=Z,R=Z[R],R==null?null:(y=R[y],y??null)}getCellFromCordsOrThrow(y,R,Z){if(y=this.getCellFromCords(y,R,Z),!y)throw Error("Cell not found at cords.");return y}getCellNodeFromCords(y,R,Z){return y=this.getCellFromCords(y,R,Z),y==null?null:(y=t.$getNearestNodeFromDOMNode(y.elem),p(y)?y:null)}getCellNodeFromCordsOrThrow(y,R,Z){if(y=this.getCellNodeFromCords(y,R,Z),!y)throw Error("Node at cords not TableCellNode.");return y}canSelectBefore(){return!0}canIndent(){return!1}}function ee(){return{node:F()}}function F(){return t.$applyNodeReplacement(new J)}function D(m){return m instanceof J}function V(m){if(m=e.$findMatchingParent(m,y=>O(y)),O(m))return m;throw Error("Expected table cell to be inside of table row.")}function ne(m){if(m=e.$findMatchingParent(m,y=>D(y)),D(m))return m;throw Error("Expected table cell to be inside of table.")}function Y(m,y){let R=ne(m),{x:Z,y:ue}=R.getCordsFromCellNode(m,y);return{above:R.getCellNodeFromCords(Z,ue-1,y),below:R.getCellNodeFromCords(Z,ue+1,y),left:R.getCellNodeFromCords(Z-1,ue,y),right:R.getCellNodeFromCords(Z+1,ue,y)}}function U(m){let y=m.getFirstDescendant();y==null?m.selectStart():y.getParentOrThrow().selectStart()}function Q(m,y){let R=m.getFirstChild();R!==null?R.insertBefore(y):m.append(y)}let k=t.createCommand("INSERT_TABLE_COMMAND");return Yt.$createTableCellNode=f,Yt.$createTableNode=F,Yt.$createTableNodeWithDimensions=function(m,y,R=!0){let Z=F();for(let ge=0;ge<m;ge++){let ae=T();for(let Te=0;Te<y;Te++){var ue=r.NO_STATUS;typeof R=="object"?(ge===0&&R.rows&&(ue|=r.ROW),Te===0&&R.columns&&(ue|=r.COLUMN)):R&&(ge===0&&(ue|=r.ROW),Te===0&&(ue|=r.COLUMN)),ue=f(ue);let Ae=t.$createParagraphNode();Ae.append(t.$createTextNode()),ue.append(Ae),ae.append(ue)}Z.append(ae)}return Z},Yt.$createTableRowNode=T,Yt.$deleteTableColumn=function(m,y){let R=m.getChildren();for(let ue=0;ue<R.length;ue++){var Z=R[ue];if(O(Z)){if(Z=Z.getChildren(),y>=Z.length||0>y)throw Error("Table column target index out of range");Z[y].remove()}}return m},Yt.$deleteTableColumn__EXPERIMENTAL=function(){var m=t.$getSelection();if(!t.$INTERNAL_isPointSelection(m))throw Error("Expected a INTERNAL_PointSelection");var y=m.anchor.getNode();m=m.focus.getNode();let[R,,Z]=t.DEPRECATED_$getNodeTriplet(y);[y]=t.DEPRECATED_$getNodeTriplet(m);let[ue,ge,ae]=t.DEPRECATED_$computeGridMap(Z,R,y);var{startColumn:Te}=ge;let{startRow:Ae,startColumn:ze}=ae;m=Math.min(Te,ze),Te=Math.max(Te+R.__colSpan-1,ze+y.__colSpan-1);let oe=Te-m+1;if(ue[0].length===Te-m+1)Z.selectPrevious(),Z.remove();else{var ie=ue.length;for(let de=0;de<ie;de++)for(let we=m;we<=Te;we++){let{cell:ke,startColumn:Be}=ue[de][we];Be<m?we===m&&ke.setColSpan(ke.__colSpan-Math.min(oe,ke.__colSpan-(m-Be))):Be+ke.__colSpan-1>Te?we===Te&&ke.setColSpan(ke.__colSpan-(Te-Be+1)):ke.remove()}m=ue[Ae],y=m[ze+y.__colSpan],y!==void 0?({cell:y}=y,U(y)):({cell:y}=m[ze-1],U(y))}},Yt.$deleteTableRow__EXPERIMENTAL=function(){var m=t.$getSelection();if(!t.$INTERNAL_isPointSelection(m))throw Error("Expected a INTERNAL_PointSelection");var y=m.anchor.getNode();m=m.focus.getNode();let[R,,Z]=t.DEPRECATED_$getNodeTriplet(y);[m]=t.DEPRECATED_$getNodeTriplet(m);let[ue,ge,ae]=t.DEPRECATED_$computeGridMap(Z,R,m);({startRow:y}=ge);var{startRow:Te}=ae;if(m=Te+m.__rowSpan-1,ue.length===m-y+1)Z.remove();else{Te=ue[0].length;var Ae=ue[m+1],ze=Z.getChildAtIndex(m+1);for(let ie=m;ie>=y;ie--){for(var oe=Te-1;0<=oe;oe--){let{cell:de,startRow:we,startColumn:ke}=ue[ie][oe];if(ke===oe&&(ie===y&&we<y&&de.setRowSpan(de.__rowSpan-(we-y)),we>=y&&we+de.__rowSpan-1>m))if(de.setRowSpan(de.__rowSpan-(m-we+1)),ze===null&&M(122),oe===0)Q(ze,de);else{let{cell:Be}=Ae[oe-1];Be.insertAfter(de)}}oe=Z.getChildAtIndex(ie),t.DEPRECATED_$isGridRowNode(oe)||M(123,String(ie)),oe.remove()}Ae!==void 0?({cell:y}=Ae[0],U(y)):({cell:y}=ue[y-1][0],U(y))}},Yt.$getElementGridForTableNode=function(m,y){if(m=m.getElementByKey(y.getKey()),m==null)throw Error("Table Element Not Found");return P(m)},Yt.$getTableCellNodeFromLexicalNode=function(m){return m=e.$findMatchingParent(m,y=>p(y)),p(m)?m:null},Yt.$getTableColumnIndexFromTableCellNode=function(m){return V(m).getChildren().findIndex(y=>y.is(m))},Yt.$getTableNodeFromLexicalNodeOrThrow=ne,Yt.$getTableRowIndexFromTableCellNode=function(m){let y=V(m);return ne(y).getChildren().findIndex(R=>R.is(y))},Yt.$getTableRowNodeFromTableCellNodeOrThrow=V,Yt.$insertTableColumn=function(m,y,R=!0,Z,ue){let ge=m.getChildren(),ae=[];for(let ze=0;ze<ge.length;ze++){let oe=ge[ze];if(O(oe))for(let ie=0;ie<Z;ie++){var Te=oe.getChildren();if(y>=Te.length||0>y)throw Error("Table column target index out of range");Te=Te[y],p(Te)||M(12);let{left:de,right:we}=Y(Te,ue);var Ae=r.NO_STATUS;(de&&de.hasHeaderState(r.ROW)||we&&we.hasHeaderState(r.ROW))&&(Ae|=r.ROW),Ae=f(Ae),Ae.append(t.$createParagraphNode()),ae.push({newTableCell:Ae,targetCell:Te})}}return ae.forEach(({newTableCell:ze,targetCell:oe})=>{R?oe.insertAfter(ze):oe.insertBefore(ze)}),m},Yt.$insertTableColumn__EXPERIMENTAL=function(m=!0){function y(){let ie=f(r.NO_STATUS).append(t.$createParagraphNode());return ze===null&&(ze=ie),ie}var R=t.$getSelection();if(!t.$INTERNAL_isPointSelection(R))throw Error("Expected a PointSeleciton");var Z=R.anchor.getNode();R=R.focus.getNode(),[Z]=t.DEPRECATED_$getNodeTriplet(Z);let[ue,,ge]=t.DEPRECATED_$getNodeTriplet(R),[ae,Te,Ae]=t.DEPRECATED_$computeGridMap(ge,ue,Z);Z=ae.length,R=m?Math.max(Te.startColumn,Ae.startColumn):Math.min(Te.startColumn,Ae.startColumn),m=m?R+ue.__colSpan-1:R-1,R=ge.getFirstChild(),t.DEPRECATED_$isGridRowNode(R)||M(120);let ze=null;var oe=R;e:for(R=0;R<Z;R++){R!==0&&(oe=oe.getNextSibling(),t.DEPRECATED_$isGridRowNode(oe)||M(121));let ie=ae[R];if(0>m){Q(oe,y());continue}let{cell:de,startColumn:we,startRow:ke}=ie[m];if(we+de.__colSpan-1<=m){let Be=de,Ye=ke,ct=m;for(;Ye!==R&&1<Be.__rowSpan;)if(ct-=de.__colSpan,0<=ct){let{cell:yt,startRow:dt}=ie[ct];Be=yt,Ye=dt}else{oe.append(y());continue e}Be.insertAfter(y())}else de.setColSpan(de.__colSpan+1)}ze!==null&&U(ze)},Yt.$insertTableRow=function(m,y,R=!0,Z,ue){var ge=m.getChildren();if(y>=ge.length||0>y)throw Error("Table row target index out of range");if(y=ge[y],O(y))for(ge=0;ge<Z;ge++){let Te=y.getChildren(),Ae=Te.length,ze=T();for(let oe=0;oe<Ae;oe++){var ae=Te[oe];p(ae)||M(12);let{above:ie,below:de}=Y(ae,ue);ae=r.NO_STATUS;let we=ie&&ie.getWidth()||de&&de.getWidth()||void 0;(ie&&ie.hasHeaderState(r.COLUMN)||de&&de.hasHeaderState(r.COLUMN))&&(ae|=r.COLUMN),ae=f(ae,1,we),ae.append(t.$createParagraphNode()),ze.append(ae)}R?y.insertAfter(ze):y.insertBefore(ze)}else throw Error("Row before insertion index does not exist.");return m},Yt.$insertTableRow__EXPERIMENTAL=function(m=!0){var y=t.$getSelection();if(!t.$INTERNAL_isPointSelection(y))throw Error("Expected a INTERNAL_PointSelection");y=y.focus.getNode();let[R,,Z]=t.DEPRECATED_$getNodeTriplet(y),[ue,ge]=t.DEPRECATED_$computeGridMap(Z,R,R);y=ue[0].length;var{startRow:ae}=ge;if(m){m=ae+R.__rowSpan-1;var Te=ue[m];ae=T();for(var Ae=0;Ae<y;Ae++){let{cell:ze,startRow:oe}=Te[Ae];oe+ze.__rowSpan-1<=m?ae.append(f(r.NO_STATUS)):ze.setRowSpan(ze.__rowSpan+1)}y=Z.getChildAtIndex(m),t.DEPRECATED_$isGridRowNode(y)||M(119),y.insertAfter(ae)}else{for(Te=ue[ae],m=T(),Ae=0;Ae<y;Ae++){let{cell:ze,startRow:oe}=Te[Ae];oe===ae?m.append(f(r.NO_STATUS)):ze.setRowSpan(ze.__rowSpan+1)}y=Z.getChildAtIndex(ae),t.DEPRECATED_$isGridRowNode(y)||M(119),y.insertBefore(m)}},Yt.$isTableCellNode=p,Yt.$isTableNode=D,Yt.$isTableRowNode=O,Yt.$removeTableRowAtIndex=function(m,y){let R=m.getChildren();if(y>=R.length||0>y)throw Error("Expected table cell to be inside of table row.");return R[y].remove(),m},Yt.$unmergeCell=function(){var m=t.$getSelection();if(!t.$INTERNAL_isPointSelection(m))throw Error("Expected a INTERNAL_PointSelection");m=m.anchor.getNode();let[y,R,Z]=t.DEPRECATED_$getNodeTriplet(m);m=y.__colSpan;let ue=y.__rowSpan;if(1<m){for(var ge=1;ge<m;ge++)y.insertAfter(f(r.NO_STATUS));y.setColSpan(1)}if(1<ue){let[Ae,ze]=t.DEPRECATED_$computeGridMap(Z,y,y),{startColumn:oe,startRow:ie}=ze,de;for(ge=1;ge<ue;ge++){var ae=ie+ge;let we=Ae[ae];de=(de||R).getNextSibling(),t.DEPRECATED_$isGridRowNode(de)||M(125);var Te=null;for(let ke=0;ke<oe;ke++){let Be=we[ke],Ye=Be.cell;Be.startRow===ae&&(Te=Ye),1<Ye.__colSpan&&(ke+=Ye.__colSpan-1)}if(Te===null)for(Te=0;Te<m;Te++)Q(de,f(r.NO_STATUS));else for(ae=0;ae<m;ae++)Te.insertAfter(f(r.NO_STATUS))}y.setRowSpan(1)}},Yt.INSERT_TABLE_COMMAND=k,Yt.TableCellHeaderStates=r,Yt.TableCellNode=c,Yt.TableNode=J,Yt.TableRowNode=C,Yt.TableSelection=v,Yt.applyTableHandlers=function(m,y,R,Z){function ue(oe){return oe=m.getCordsFromCellNode(oe,ae.grid),m.getCellFromCordsOrThrow(oe.x,oe.y,ae.grid)}let ge=R.getRootElement();if(ge===null)throw Error("No root element.");let ae=new v(R,m.getKey()),Te=R._window||window;y.__lexicalTableSelection=ae,y.addEventListener("mousedown",oe=>{setTimeout(()=>{if(oe.button===0&&Te){var ie=w(oe.target);ie!==null&&(pe(oe),ae.setAnchorCellForSelection(ie));var de=()=>{Te.removeEventListener("mouseup",de),Te.removeEventListener("mousemove",we)},we=ke=>{const Be=w(ke.target);Be===null||ae.anchorX===Be.x&&ae.anchorY===Be.y||(ke.preventDefault(),ae.setFocusCellForSelection(Be))};Te.addEventListener("mouseup",de),Te.addEventListener("mousemove",we)}},0)});let Ae=oe=>{oe.button===0&&R.update(()=>{const ie=t.$getSelection(),de=oe.target;t.DEPRECATED_$isGridSelection(ie)&&ie.gridKey===ae.tableNodeKey&&ge.contains(de)&&ae.clearHighlight()})};Te.addEventListener("mousedown",Ae),ae.listenersToRemove.add(()=>Te.removeEventListener("mousedown",Ae)),ae.listenersToRemove.add(R.registerCommand(t.KEY_ARROW_DOWN_COMMAND,oe=>_e(R,oe,"down",m,ae),t.COMMAND_PRIORITY_HIGH)),ae.listenersToRemove.add(R.registerCommand(t.KEY_ARROW_UP_COMMAND,oe=>_e(R,oe,"up",m,ae),t.COMMAND_PRIORITY_HIGH)),ae.listenersToRemove.add(R.registerCommand(t.KEY_ARROW_LEFT_COMMAND,oe=>_e(R,oe,"backward",m,ae),t.COMMAND_PRIORITY_HIGH)),ae.listenersToRemove.add(R.registerCommand(t.KEY_ARROW_RIGHT_COMMAND,oe=>_e(R,oe,"forward",m,ae),t.COMMAND_PRIORITY_HIGH)),ae.listenersToRemove.add(R.registerCommand(t.KEY_ESCAPE_COMMAND,oe=>{var ie=t.$getSelection();return t.DEPRECATED_$isGridSelection(ie)&&(ie=e.$findMatchingParent(ie.focus.getNode(),p),p(ie))?(pe(oe),ie.selectEnd(),!0):!1},t.COMMAND_PRIORITY_HIGH));let ze=oe=>()=>{var ie=t.$getSelection();if(!re(ie,m))return!1;if(t.DEPRECATED_$isGridSelection(ie))return ae.clearText(),!0;if(t.$isRangeSelection(ie)){const ke=e.$findMatchingParent(ie.anchor.getNode(),Be=>p(Be));if(!p(ke))return!1;var de=ie.anchor.getNode(),we=ie.focus.getNode();if(de=m.isParentOf(de),we=m.isParentOf(we),de&&!we||we&&!de)return ae.clearText(),!0;if(de=(we=e.$findMatchingParent(ie.anchor.getNode(),Be=>t.$isElementNode(Be)))&&e.$findMatchingParent(we,Be=>t.$isElementNode(Be)&&p(Be.getParent())),!t.$isElementNode(de)||!t.$isElementNode(we))return!1;if(oe===t.DELETE_LINE_COMMAND&&de.getPreviousSibling()===null)return!0;if((oe===t.DELETE_CHARACTER_COMMAND||oe===t.DELETE_WORD_COMMAND)&&ie.isCollapsed()&&ie.anchor.offset===0&&we!==de){ie=we.getChildren();const Be=t.$createParagraphNode();return ie.forEach(Ye=>Be.append(Ye)),we.replace(Be),we.getWritable().__parent=ke.getKey(),!0}}return!1};return[t.DELETE_WORD_COMMAND,t.DELETE_LINE_COMMAND,t.DELETE_CHARACTER_COMMAND].forEach(oe=>{ae.listenersToRemove.add(R.registerCommand(oe,ze(oe),t.COMMAND_PRIORITY_CRITICAL))}),y=oe=>{const ie=t.$getSelection();return re(ie,m)?t.DEPRECATED_$isGridSelection(ie)?(oe.preventDefault(),oe.stopPropagation(),ae.clearText(),!0):(t.$isRangeSelection(ie)&&(oe=e.$findMatchingParent(ie.anchor.getNode(),de=>p(de)),p(oe)),!1):!1},ae.listenersToRemove.add(R.registerCommand(t.KEY_BACKSPACE_COMMAND,y,t.COMMAND_PRIORITY_CRITICAL)),ae.listenersToRemove.add(R.registerCommand(t.KEY_DELETE_COMMAND,y,t.COMMAND_PRIORITY_CRITICAL)),ae.listenersToRemove.add(R.registerCommand(t.FORMAT_TEXT_COMMAND,oe=>{let ie=t.$getSelection();return re(ie,m)?t.DEPRECATED_$isGridSelection(ie)?(ae.formatCells(oe),!0):(t.$isRangeSelection(ie)&&(oe=e.$findMatchingParent(ie.anchor.getNode(),de=>p(de)),p(oe)),!1):!1},t.COMMAND_PRIORITY_CRITICAL)),ae.listenersToRemove.add(R.registerCommand(t.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var oe=t.$getSelection();return re(oe,m)&&(t.DEPRECATED_$isGridSelection(oe)?ae.clearHighlight():t.$isRangeSelection(oe)&&(oe=e.$findMatchingParent(oe.anchor.getNode(),ie=>p(ie)),p(oe))),!1},t.COMMAND_PRIORITY_CRITICAL)),Z&&ae.listenersToRemove.add(R.registerCommand(t.KEY_TAB_COMMAND,oe=>{var ie=t.$getSelection();return!t.$isRangeSelection(ie)||!ie.isCollapsed()||!re(ie,m)||(ie=G(ie.anchor.getNode()),ie===null)?!1:(pe(oe),ie=m.getCordsFromCellNode(ie,ae.grid),z(ae,m,ie.x,ie.y,oe.shiftKey?"backward":"forward"),!0)},t.COMMAND_PRIORITY_CRITICAL)),ae.listenersToRemove.add(R.registerCommand(t.FOCUS_COMMAND,()=>m.isSelected(),t.COMMAND_PRIORITY_HIGH)),ae.listenersToRemove.add(R.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>{let oe=t.$getSelection(),ie=t.$getPreviousSelection();if(t.$isRangeSelection(oe)){let{anchor:Ye,focus:ct}=oe;var de=Ye.getNode(),we=ct.getNode();de=G(de),we=G(we);var ke=de&&m.is(j(de)),Be=we&&m.is(j(we));let yt=ke!==Be;Be=ke&&Be,ke=oe.isBackward(),yt?(de=oe.clone(),de.focus.set(m.getKey(),ke?0:m.getChildrenSize(),"element"),t.$setSelection(de),W(R,ae)):Be&&!de.is(we)&&(ae.setAnchorCellForSelection(ue(de)),ae.setFocusCellForSelection(ue(we),!0))}return oe&&!oe.is(ie)&&(t.DEPRECATED_$isGridSelection(oe)||t.DEPRECATED_$isGridSelection(ie))&&ae.gridSelection&&!ae.gridSelection.is(ie)?(t.DEPRECATED_$isGridSelection(oe)&&oe.gridKey===ae.tableNodeKey?ae.updateTableGridSelection(oe):!t.DEPRECATED_$isGridSelection(oe)&&t.DEPRECATED_$isGridSelection(ie)&&ie.gridKey===ae.tableNodeKey&&ae.updateTableGridSelection(null),!1):(ae.hasHijackedSelectionStyles&&!m.isSelected()?H(R,ae):!ae.hasHijackedSelectionStyles&&m.isSelected()&&W(R,ae),!1)},t.COMMAND_PRIORITY_CRITICAL)),ae},Yt.getCellFromTarget=w,Yt.getTableSelectionFromTableElement=function(m){return m.__lexicalTableSelection},Yt}var Su,Nh;function Cd(){return Nh||(Nh=1,Su=process.env.NODE_ENV==="development"?iN():oN()),Su}var Eh;function sN(){if(Eh)return vu;Eh=1;var t=Yn(),e=Cd(),n=on(),r=Ht(),c=rt;function d({hasCellMerge:f=!0,hasCellBackgroundColor:p=!0,hasTabHandler:C=!0}){const[x]=t.useLexicalComposerContext();return c.useEffect(()=>{if(!x.hasNodes([e.TableNode,e.TableCellNode,e.TableRowNode]))throw Error("TablePlugin: TableNode, TableCellNode or TableRowNode not registered on editor");return x.registerCommand(e.INSERT_TABLE_COMMAND,({columns:T,rows:O,includeHeaders:M})=>{const A=e.$createTableNodeWithDimensions(Number(O),Number(T),M);n.$insertNodeToNearestRoot(A);const v=A.getFirstDescendant();return r.$isTextNode(v)&&v.select(),!0},r.COMMAND_PRIORITY_EDITOR)},[x]),c.useEffect(()=>{const T=new Map,O=A=>{const v=A.getKey(),w=x.getElementByKey(v);if(w&&!T.has(v)){const P=e.applyTableHandlers(A,w,x,C);T.set(v,P)}};x.getEditorState().read(()=>{const A=r.$nodesOfType(e.TableNode);for(const v of A)e.$isTableNode(v)&&O(v)});const M=x.registerMutationListener(e.TableNode,A=>{for(const[v,w]of A)if(w==="created")x.getEditorState().read(()=>{const P=r.$getNodeByKey(v);e.$isTableNode(P)&&O(P)});else if(w==="destroyed"){const P=T.get(v);P!==void 0&&(P.removeListeners(),T.delete(v))}});return()=>{M();for(const[,A]of T)A.removeListeners()}},[x,C]),c.useEffect(()=>{if(!f)return x.registerNodeTransform(e.TableCellNode,T=>{if(T.getColSpan()>1||T.getRowSpan()>1){const[,,O]=r.DEPRECATED_$getNodeTriplet(T),[M]=r.DEPRECATED_$computeGridMap(O,T,T),A=M.length,v=M[0].length;let w=O.getFirstChild();if(!r.DEPRECATED_$isGridRowNode(w))throw Error("Expected TableNode first child to be a RowNode");const P=[];for(let K=0;K<A;K++){if(K!==0&&(w=w.getNextSibling(),!r.DEPRECATED_$isGridRowNode(w)))throw Error("Expected TableNode first child to be a RowNode");let $=null;for(let W=0;W<v;W++){const H=M[K][W],z=H.cell;if(H.startRow===K&&H.startColumn===W)$=z,P.push(z);else if(z.getColSpan()>1||z.getRowSpan()>1){const te=e.$createTableCellNode(z.__headerState);$!==null?$.insertAfter(te):n.$insertFirst(w,te)}}}for(const K of P)K.setColSpan(1),K.setRowSpan(1)}})},[x,f]),c.useEffect(()=>{if(!p)return x.registerNodeTransform(e.TableCellNode,T=>{T.getBackgroundColor()!==null&&T.setBackgroundColor(null)})},[x,p,f]),null}return vu.TablePlugin=d,vu}var wu={},Th;function lN(){if(Th)return wu;Th=1;var t=Yn(),e=Cd(),n=on(),r=Ht(),c=rt;function d(f){let p=new URLSearchParams;p.append("code",f);for(let C=1;C<arguments.length;C++)p.append("v",arguments[C]);throw Error(`Minified Lexical error #${f}; visit https://lexical.dev/docs/error?${p} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}return wu.TablePlugin=function({hasCellMerge:f=!0,hasCellBackgroundColor:p=!0,hasTabHandler:C=!0}){let[x]=t.useLexicalComposerContext();return c.useEffect(()=>(x.hasNodes([e.TableNode,e.TableCellNode,e.TableRowNode])||d(10),x.registerCommand(e.INSERT_TABLE_COMMAND,({columns:T,rows:O,includeHeaders:M})=>(T=e.$createTableNodeWithDimensions(Number(O),Number(T),M),n.$insertNodeToNearestRoot(T),T=T.getFirstDescendant(),r.$isTextNode(T)&&T.select(),!0),r.COMMAND_PRIORITY_EDITOR)),[x]),c.useEffect(()=>{let T=new Map,O=A=>{const v=A.getKey(),w=x.getElementByKey(v);w&&!T.has(v)&&(A=e.applyTableHandlers(A,w,x,C),T.set(v,A))};x.getEditorState().read(()=>{let A=r.$nodesOfType(e.TableNode);for(let v of A)e.$isTableNode(v)&&O(v)});let M=x.registerMutationListener(e.TableNode,A=>{for(const[v,w]of A)w==="created"?x.getEditorState().read(()=>{const P=r.$getNodeByKey(v);e.$isTableNode(P)&&O(P)}):w==="destroyed"&&(A=T.get(v),A!==void 0&&(A.removeListeners(),T.delete(v)))});return()=>{M();for(let[,A]of T)A.removeListeners()}},[x,C]),c.useEffect(()=>{if(!f)return x.registerNodeTransform(e.TableCellNode,T=>{if(1<T.getColSpan()||1<T.getRowSpan()){var[,,O]=r.DEPRECATED_$getNodeTriplet(T);[T]=r.DEPRECATED_$computeGridMap(O,T,T);let A=T.length,v=T[0].length;if(O=O.getFirstChild(),!r.DEPRECATED_$isGridRowNode(O))throw Error("Expected TableNode first child to be a RowNode");let w=[];for(let P=0;P<A;P++){if(P!==0&&(O=O.getNextSibling(),!r.DEPRECATED_$isGridRowNode(O)))throw Error("Expected TableNode first child to be a RowNode");let K=null;for(let $=0;$<v;$++){var M=T[P][$];let W=M.cell;M.startRow===P&&M.startColumn===$?(K=W,w.push(W)):(1<W.getColSpan()||1<W.getRowSpan())&&(M=e.$createTableCellNode(W.__headerState),K!==null?K.insertAfter(M):n.$insertFirst(O,M))}}for(let P of w)P.setColSpan(1),P.setRowSpan(1)}})},[x,f]),c.useEffect(()=>{if(!p)return x.registerNodeTransform(e.TableCellNode,T=>{T.getBackgroundColor()!==null&&T.setBackgroundColor(null)})},[x,p,f]),null},wu}const aN=process.env.NODE_ENV==="development"?sN():lN();var cN=aN,bn={},Ou={exports:{}},xh;function xp(){return xh||(xh=1,function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
76
- * Prism: Lightweight, robust, elegant syntax highlighting
77
- *
78
- * @license MIT <https://opensource.org/licenses/MIT>
79
- * @author Lea Verou <https://lea.verou.me>
80
- * @namespace
81
- * @public
82
- */var n=function(r){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,f={},p={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function $(W){return W instanceof C?new C(W.type,$(W.content),W.alias):Array.isArray(W)?W.map($):W.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function($){return Object.prototype.toString.call($).slice(8,-1)},objId:function($){return $.__id||Object.defineProperty($,"__id",{value:++d}),$.__id},clone:function $(W,H){H=H||{};var z,te;switch(p.util.type(W)){case"Object":if(te=p.util.objId(W),H[te])return H[te];z={},H[te]=z;for(var re in W)W.hasOwnProperty(re)&&(z[re]=$(W[re],H));return z;case"Array":return te=p.util.objId(W),H[te]?H[te]:(z=[],H[te]=z,W.forEach(function(ce,q){z[q]=$(ce,H)}),z);default:return W}},getLanguage:function($){for(;$;){var W=c.exec($.className);if(W)return W[1].toLowerCase();$=$.parentElement}return"none"},setLanguage:function($,W){$.className=$.className.replace(RegExp(c,"gi"),""),$.classList.add("language-"+W)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(z){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(z.stack)||[])[1];if($){var W=document.getElementsByTagName("script");for(var H in W)if(W[H].src==$)return W[H]}return null}},isActive:function($,W,H){for(var z="no-"+W;$;){var te=$.classList;if(te.contains(W))return!0;if(te.contains(z))return!1;$=$.parentElement}return!!H}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function($,W){var H=p.util.clone(p.languages[$]);for(var z in W)H[z]=W[z];return H},insertBefore:function($,W,H,z){z=z||p.languages;var te=z[$],re={};for(var ce in te)if(te.hasOwnProperty(ce)){if(ce==W)for(var q in H)H.hasOwnProperty(q)&&(re[q]=H[q]);H.hasOwnProperty(ce)||(re[ce]=te[ce])}var G=z[$];return z[$]=re,p.languages.DFS(p.languages,function(j,_e){_e===G&&j!=$&&(this[j]=re)}),re},DFS:function $(W,H,z,te){te=te||{};var re=p.util.objId;for(var ce in W)if(W.hasOwnProperty(ce)){H.call(W,ce,W[ce],z||ce);var q=W[ce],G=p.util.type(q);G==="Object"&&!te[re(q)]?(te[re(q)]=!0,$(q,H,null,te)):G==="Array"&&!te[re(q)]&&(te[re(q)]=!0,$(q,H,ce,te))}}},plugins:{},highlightAll:function($,W){p.highlightAllUnder(document,$,W)},highlightAllUnder:function($,W,H){var z={callback:H,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};p.hooks.run("before-highlightall",z),z.elements=Array.prototype.slice.apply(z.container.querySelectorAll(z.selector)),p.hooks.run("before-all-elements-highlight",z);for(var te=0,re;re=z.elements[te++];)p.highlightElement(re,W===!0,z.callback)},highlightElement:function($,W,H){var z=p.util.getLanguage($),te=p.languages[z];p.util.setLanguage($,z);var re=$.parentElement;re&&re.nodeName.toLowerCase()==="pre"&&p.util.setLanguage(re,z);var ce=$.textContent,q={element:$,language:z,grammar:te,code:ce};function G(_e){q.highlightedCode=_e,p.hooks.run("before-insert",q),q.element.innerHTML=q.highlightedCode,p.hooks.run("after-highlight",q),p.hooks.run("complete",q),H&&H.call(q.element)}if(p.hooks.run("before-sanity-check",q),re=q.element.parentElement,re&&re.nodeName.toLowerCase()==="pre"&&!re.hasAttribute("tabindex")&&re.setAttribute("tabindex","0"),!q.code){p.hooks.run("complete",q),H&&H.call(q.element);return}if(p.hooks.run("before-highlight",q),!q.grammar){G(p.util.encode(q.code));return}if(W&&r.Worker){var j=new Worker(p.filename);j.onmessage=function(_e){G(_e.data)},j.postMessage(JSON.stringify({language:q.language,code:q.code,immediateClose:!0}))}else G(p.highlight(q.code,q.grammar,q.language))},highlight:function($,W,H){var z={code:$,grammar:W,language:H};if(p.hooks.run("before-tokenize",z),!z.grammar)throw new Error('The language "'+z.language+'" has no grammar.');return z.tokens=p.tokenize(z.code,z.grammar),p.hooks.run("after-tokenize",z),C.stringify(p.util.encode(z.tokens),z.language)},tokenize:function($,W){var H=W.rest;if(H){for(var z in H)W[z]=H[z];delete W.rest}var te=new O;return M(te,te.head,$),T($,te,W,te.head,0),v(te)},hooks:{all:{},add:function($,W){var H=p.hooks.all;H[$]=H[$]||[],H[$].push(W)},run:function($,W){var H=p.hooks.all[$];if(!(!H||!H.length))for(var z=0,te;te=H[z++];)te(W)}},Token:C};r.Prism=p;function C($,W,H,z){this.type=$,this.content=W,this.alias=H,this.length=(z||"").length|0}C.stringify=function $(W,H){if(typeof W=="string")return W;if(Array.isArray(W)){var z="";return W.forEach(function(G){z+=$(G,H)}),z}var te={type:W.type,content:$(W.content,H),tag:"span",classes:["token",W.type],attributes:{},language:H},re=W.alias;re&&(Array.isArray(re)?Array.prototype.push.apply(te.classes,re):te.classes.push(re)),p.hooks.run("wrap",te);var ce="";for(var q in te.attributes)ce+=" "+q+'="'+(te.attributes[q]||"").replace(/"/g,"&quot;")+'"';return"<"+te.tag+' class="'+te.classes.join(" ")+'"'+ce+">"+te.content+"</"+te.tag+">"};function x($,W,H,z){$.lastIndex=W;var te=$.exec(H);if(te&&z&&te[1]){var re=te[1].length;te.index+=re,te[0]=te[0].slice(re)}return te}function T($,W,H,z,te,re){for(var ce in H)if(!(!H.hasOwnProperty(ce)||!H[ce])){var q=H[ce];q=Array.isArray(q)?q:[q];for(var G=0;G<q.length;++G){if(re&&re.cause==ce+","+G)return;var j=q[G],_e=j.inside,pe=!!j.lookbehind,J=!!j.greedy,ee=j.alias;if(J&&!j.pattern.global){var F=j.pattern.toString().match(/[imsuy]*$/)[0];j.pattern=RegExp(j.pattern.source,F+"g")}for(var D=j.pattern||j,V=z.next,ne=te;V!==W.tail&&!(re&&ne>=re.reach);ne+=V.value.length,V=V.next){var Y=V.value;if(W.length>$.length)return;if(!(Y instanceof C)){var U=1,Q;if(J){if(Q=x(D,ne,$,pe),!Q||Q.index>=$.length)break;var R=Q.index,k=Q.index+Q[0].length,m=ne;for(m+=V.value.length;R>=m;)V=V.next,m+=V.value.length;if(m-=V.value.length,ne=m,V.value instanceof C)continue;for(var y=V;y!==W.tail&&(m<k||typeof y.value=="string");y=y.next)U++,m+=y.value.length;U--,Y=$.slice(ne,m),Q.index-=ne}else if(Q=x(D,0,Y,pe),!Q)continue;var R=Q.index,Z=Q[0],ue=Y.slice(0,R),ge=Y.slice(R+Z.length),ae=ne+Y.length;re&&ae>re.reach&&(re.reach=ae);var Te=V.prev;ue&&(Te=M(W,Te,ue),ne+=ue.length),A(W,Te,U);var Ae=new C(ce,_e?p.tokenize(Z,_e):Z,ee,Z);if(V=M(W,Te,Ae),ge&&M(W,V,ge),U>1){var ze={cause:ce+","+G,reach:ae};T($,W,H,V.prev,ne,ze),re&&ze.reach>re.reach&&(re.reach=ze.reach)}}}}}}function O(){var $={value:null,prev:null,next:null},W={value:null,prev:$,next:null};$.next=W,this.head=$,this.tail=W,this.length=0}function M($,W,H){var z=W.next,te={value:H,prev:W,next:z};return W.next=te,z.prev=te,$.length++,te}function A($,W,H){for(var z=W.next,te=0;te<H&&z!==$.tail;te++)z=z.next;W.next=z,z.prev=W,$.length-=te}function v($){for(var W=[],H=$.head.next;H!==$.tail;)W.push(H.value),H=H.next;return W}if(!r.document)return r.addEventListener&&(p.disableWorkerMessageHandler||r.addEventListener("message",function($){var W=JSON.parse($.data),H=W.language,z=W.code,te=W.immediateClose;r.postMessage(p.highlight(z,p.languages[H],H)),te&&r.close()},!1)),p;var w=p.util.currentScript();w&&(p.filename=w.src,w.hasAttribute("data-manual")&&(p.manual=!0));function P(){p.manual||p.highlightAll()}if(!p.manual){var K=document.readyState;K==="loading"||K==="interactive"&&w&&w.defer?document.addEventListener("DOMContentLoaded",P):window.requestAnimationFrame?window.requestAnimationFrame(P):window.setTimeout(P,16)}return p}(e);t.exports&&(t.exports=n),typeof Wu<"u"&&(Wu.Prism=n),n.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]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(c,d){var f={};f["language-"+d]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[d]},f.cdata=/^<!\[CDATA\[|\]\]>$/i;var p={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:f}};p["language-"+d]={pattern:/[\s\S]+/,inside:n.languages[d]};var C={};C[c]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return c}),"i"),lookbehind:!0,greedy:!0,inside:p},n.languages.insertBefore("markup","cdata",C)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,c){n.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:[c,"language-"+c],inside:n.languages[c]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var c=/(?:"(?:\\(?:\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+"|"+c.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\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,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 d=r.languages.markup;d&&(d.tag.addInlined("style","css"),d.tag.addAttribute("style","css"))}(n),n.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:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.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}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.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:n.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:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.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:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.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:n.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"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.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")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",c=function(w,P){return"✖ Error "+w+" while fetching file: "+P},d="✖ Error: File does not exist or is empty",f={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},p="data-src-status",C="loading",x="loaded",T="failed",O="pre[data-src]:not(["+p+'="'+x+'"]):not(['+p+'="'+C+'"])';function M(w,P,K){var $=new XMLHttpRequest;$.open("GET",w,!0),$.onreadystatechange=function(){$.readyState==4&&($.status<400&&$.responseText?P($.responseText):$.status>=400?K(c($.status,$.statusText)):K(d))},$.send(null)}function A(w){var P=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(w||"");if(P){var K=Number(P[1]),$=P[2],W=P[3];return $?W?[K,Number(W)]:[K,void 0]:[K,K]}}n.hooks.add("before-highlightall",function(w){w.selector+=", "+O}),n.hooks.add("before-sanity-check",function(w){var P=w.element;if(P.matches(O)){w.code="",P.setAttribute(p,C);var K=P.appendChild(document.createElement("CODE"));K.textContent=r;var $=P.getAttribute("data-src"),W=w.language;if(W==="none"){var H=(/\.(\w+)$/.exec($)||[,"none"])[1];W=f[H]||H}n.util.setLanguage(K,W),n.util.setLanguage(P,W);var z=n.plugins.autoloader;z&&z.loadLanguages(W),M($,function(te){P.setAttribute(p,x);var re=A(P.getAttribute("data-range"));if(re){var ce=te.split(/\r\n?|\n/g),q=re[0],G=re[1]==null?ce.length:re[1];q<0&&(q+=ce.length),q=Math.max(0,Math.min(q-1,ce.length)),G<0&&(G+=ce.length),G=Math.max(0,Math.min(G,ce.length)),te=ce.slice(q,G).join(`
83
- `),P.hasAttribute("data-start")||P.setAttribute("data-start",String(q+1))}K.textContent=te,n.highlightElement(K)},function(te){P.setAttribute(p,T),K.textContent=te})}}),n.plugins.fileHighlight={highlight:function(P){for(var K=(P||document).querySelectorAll(O),$=0,W;W=K[$++];)n.highlightElement(W)}};var v=!1;n.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(Ou)),Ou.exports}var vh={},Sh;function vp(){return Sh||(Sh=1,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:/[{}[\];(),.:]/}),vh}var wh={},Oh;function Sp(){return Oh||(Oh=1,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),wh}var Dh={},bh;function wp(){return bh||(bh=1,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(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};c["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var d={};d[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:c},Prism.languages.insertBefore("markup","cdata",d)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\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),Dh}var Rh={},Mh;function Op(){return Mh||(Mh=1,function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(T){return T=T.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+T+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,c=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),d=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.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:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+c+d+"(?:"+c+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+c+d+")(?:"+c+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+c+")"+d+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+c+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.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:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<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:n(/!?\[(?:(?!\])<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(T){["url","bold","italic","strike","code-snippet"].forEach(function(O){T!==O&&(t.languages.markdown[T].inside.content.inside[O]=t.languages.markdown[O])})}),t.hooks.add("after-tokenize",function(T){if(T.language!=="markdown"&&T.language!=="md")return;function O(M){if(!(!M||typeof M=="string"))for(var A=0,v=M.length;A<v;A++){var w=M[A];if(w.type!=="code"){O(w.content);continue}var P=w.content[1],K=w.content[3];if(P&&K&&P.type==="code-language"&&K.type==="code-block"&&typeof P.content=="string"){var $=P.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");$=(/[a-z][\w-]*/i.exec($)||[""])[0].toLowerCase();var W="language-"+$;K.alias?typeof K.alias=="string"?K.alias=[K.alias,W]:K.alias.push(W):K.alias=[W]}}}O(T.tokens)}),t.hooks.add("wrap",function(T){if(T.type==="code-block"){for(var O="",M=0,A=T.classes.length;M<A;M++){var v=T.classes[M],w=/language-(.+)/.exec(v);if(w){O=w[1];break}}var P=t.languages[O];if(P)T.content=t.highlight(x(T.content),P,O);else if(O&&O!=="none"&&t.plugins.autoloader){var K="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);T.attributes.id=K,t.plugins.autoloader.loadLanguages(O,function(){var $=document.getElementById(K);$&&($.innerHTML=t.highlight($.textContent,t.languages[O],O))})}}});var f=RegExp(t.languages.markup.tag.pattern.source,"gi"),p={amp:"&",lt:"<",gt:">",quot:'"'},C=String.fromCodePoint||String.fromCharCode;function x(T){var O=T.replace(f,"");return O=O.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(M,A){if(A=A.toLowerCase(),A[0]==="#"){var v;return A[1]==="x"?v=parseInt(A.slice(2),16):v=Number(A.slice(1)),C(v)}else{var w=p[A];return w||M}}),O}t.languages.md=t.languages.markdown}(Prism)),Rh}var Ah={},kh;function Dp(){return kh||(kh=1,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),Ah}var Lh={},Ih;function bp(){return Ih||(Ih=1,function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.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:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),Lh}var Ph={},$h;function Rp(){return $h||($h=1,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),Ph}var Fh={},Bh;function Mp(){return Bh||(Bh=1,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:/[;[\]()`,.]/}),Fh}var Hh={},Wh;function Ap(){return Wh||(Wh=1,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),Hh}var Kh={},Uh;function kp(){return Uh||(Uh=1,function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string}(Prism)),Kh}var zh={},Gh;function Lp(){return Gh||(Gh=1,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(t){t.inside.interpolation.inside=Prism.languages.swift})),zh}var Yh={},Vh;function Ip(){return Vh||(Vh=1,function(t){t.languages.typescript=t.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/}),t.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 t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.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}}}}),t.languages.ts=t.languages.typescript}(Prism)),Yh}var jh={},qh;function Pp(){return qh||(qh=1,function(t){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/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[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:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[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+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.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/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.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+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\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)),jh}var Zh={},Jh;function $p(){return Jh||(Jh=1,function(t){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/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.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/}),t.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 n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.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:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])}(Prism)),Zh}var Xh;function uN(){if(Xh)return bn;Xh=1;var t=xp();vp(),Sp(),wp(),Op(),Dp(),bp(),Rp(),Mp(),Ap(),kp(),Lp(),Ip(),Pp(),$p();var e=on(),n=Ht();const r=oe=>oe!=null&&t.languages.hasOwnProperty(oe)?oe:void 0;function c(oe,ie){for(const de of oe.childNodes){if(e.isHTMLElement(de)&&de.tagName===ie)return!0;c(de,ie)}return!1}const d="data-highlight-language";class f extends n.ElementNode{static getType(){return"code"}static clone(ie){return new f(ie.__language,ie.__key)}constructor(ie,de){super(de),this.__language=r(ie)}createDOM(ie){const de=document.createElement("code");e.addClassNamesToElement(de,ie.theme.code),de.setAttribute("spellcheck","false");const we=this.getLanguage();return we&&de.setAttribute(d,we),de}updateDOM(ie,de,we){const ke=this.__language,Be=ie.__language;return ke?ke!==Be&&de.setAttribute(d,ke):Be&&de.removeAttribute(d),!1}exportDOM(){const ie=document.createElement("pre");ie.setAttribute("spellcheck","false");const de=this.getLanguage();return de&&ie.setAttribute(d,de),{element:ie}}static importDOM(){return{code:ie=>ie.textContent!=null&&(/\r?\n/.test(ie.textContent)||c(ie,"BR"))?{conversion:x,priority:1}:null,div:ie=>({conversion:T,priority:1}),pre:ie=>({conversion:x,priority:0}),table:ie=>K(ie)?{conversion:O,priority:3}:null,td:ie=>{const de=ie,we=de.closest("table");return P(de)?{conversion:A,priority:3}:we&&K(we)?{conversion:M,priority:3}:null},tr:ie=>{const we=ie.closest("table");return we&&K(we)?{conversion:M,priority:3}:null}}}static importJSON(ie){const de=p(ie.language);return de.setFormat(ie.format),de.setIndent(ie.indent),de.setDirection(ie.direction),de}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(ie,de=!0){const we=this.getChildren(),ke=we.length;if(ke>=2&&we[ke-1].getTextContent()===`
84
- `&&we[ke-2].getTextContent()===`
85
- `&&ie.isCollapsed()&&ie.anchor.key===this.__key&&ie.anchor.offset===ke){we[ke-1].remove(),we[ke-2].remove();const dt=n.$createParagraphNode();return this.insertAfter(dt,de),dt}const{anchor:Be,focus:Ye}=ie,yt=(Be.isBefore(Ye)?Be:Ye).getNode();if(n.$isTextNode(yt)){let dt=pe(yt);const ve=[];for(;;)if(n.$isTabNode(dt))ve.push(n.$createTabNode()),dt=dt.getNextSibling();else if(_e(dt)){let qe=0;const Qe=dt.getTextContent(),ft=dt.getTextContentSize();for(;qe<ft&&Qe[qe]===" ";qe++);if(qe!==0&&ve.push(j(" ".repeat(qe))),qe!==ft)break;dt=dt.getNextSibling()}else break;const se=yt.splitText(Be.offset)[0],he=Be.offset===0?0:1,Oe=se.getIndexWithinParent()+he,Me=yt.getParentOrThrow(),De=[n.$createLineBreakNode(),...ve];Me.splice(Oe,0,De);const We=ve[ve.length-1];We?We.select():Be.offset===0?se.selectPrevious():se.getNextSibling().selectNext(0,0)}if(C(yt)){const{offset:dt}=ie.anchor;yt.splice(dt,0,[n.$createLineBreakNode()]),yt.select(dt+1,dt+1)}return null}canIndent(){return!1}collapseAtStart(){const ie=n.$createParagraphNode();return this.getChildren().forEach(we=>ie.append(we)),this.replace(ie),!0}setLanguage(ie){const de=this.getWritable();de.__language=r(ie)}getLanguage(){return this.getLatest().__language}}function p(oe){return n.$applyNodeReplacement(new f(oe))}function C(oe){return oe instanceof f}function x(oe){let ie;return e.isHTMLElement(oe)&&(ie=oe.getAttribute(d)),{node:p(ie)}}function T(oe){const ie=oe,de=v(ie);return!de&&!w(ie)?{node:null}:{after:we=>{const ke=oe.parentNode;return ke!=null&&oe!==ke.lastChild&&we.push(n.$createLineBreakNode()),we},node:de?p():null}}function O(){return{node:p()}}function M(){return{node:null}}function A(oe){const ie=oe;return{after:de=>(ie.parentNode&&ie.parentNode.nextSibling&&de.push(n.$createLineBreakNode()),de),node:null}}function v(oe){return oe.style.fontFamily.match("monospace")!==null}function w(oe){let ie=oe.parentElement;for(;ie!==null;){if(v(ie))return!0;ie=ie.parentElement}return!1}function P(oe){return oe.classList.contains("js-file-line")}function K(oe){return oe.classList.contains("js-file-line-container")}const $="javascript",W={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},H={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function z(oe){return H[oe]||oe}function te(oe){const ie=z(oe);return W[ie]||ie}const re=()=>$,ce=()=>Object.keys(t.languages).filter(oe=>typeof t.languages[oe]!="function").sort();class q extends n.TextNode{constructor(ie,de,we){super(ie,we),this.__highlightType=de}static getType(){return"code-highlight"}static clone(ie){return new q(ie.__text,ie.__highlightType||void 0,ie.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(ie){const de=super.createDOM(ie),we=G(ie.theme,this.__highlightType);return e.addClassNamesToElement(de,we),de}updateDOM(ie,de,we){const ke=super.updateDOM(ie,de,we),Be=G(we.theme,ie.__highlightType),Ye=G(we.theme,this.__highlightType);return Be!==Ye&&(Be&&e.removeClassNamesFromElement(de,Be),Ye&&e.addClassNamesToElement(de,Ye)),ke}static importJSON(ie){const de=j(ie.text,ie.highlightType);return de.setFormat(ie.format),de.setDetail(ie.detail),de.setMode(ie.mode),de.setStyle(ie.style),de}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(ie){return this}isParentRequired(){return!0}createParentElementNode(){return p()}}function G(oe,ie){return ie&&oe&&oe.codeHighlight&&oe.codeHighlight[ie]}function j(oe,ie){return n.$applyNodeReplacement(new q(oe,ie))}function _e(oe){return oe instanceof q}function pe(oe){let ie=oe,de=oe;for(;_e(de)||n.$isTabNode(de);)ie=de,de=de.getPreviousSibling();return ie}function J(oe){let ie=oe,de=oe;for(;_e(de)||n.$isTabNode(de);)ie=de,de=de.getNextSibling();return ie}const ee={defaultLanguage:$,tokenize(oe,ie){return t.tokenize(oe,t.languages[ie||""]||t.languages[this.defaultLanguage])}};function F(oe,ie){let de=null,we=null,ke=oe,Be=ie,Ye=oe.getTextContent();for(;;){if(Be===0){if(ke=ke.getPreviousSibling(),ke===null)break;if(!(_e(ke)||n.$isTabNode(ke)||n.$isLineBreakNode(ke)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(ke)){de={node:ke,offset:1};break}Be=Math.max(0,ke.getTextContentSize()-1),Ye=ke.getTextContent()}else Be--;const yt=Ye[Be];_e(ke)&&yt!==" "&&(we={node:ke,offset:Be})}if(we!==null)return we;let ct=null;if(ie<oe.getTextContentSize())_e(oe)&&(ct=oe.getTextContent()[ie]);else{const yt=oe.getNextSibling();_e(yt)&&(ct=yt.getTextContent()[0])}if(ct!==null&&ct!==" ")return de;{const yt=D(oe,ie);return yt!==null?yt:de}}function D(oe,ie){let de=oe,we=ie,ke=oe.getTextContent(),Be=oe.getTextContentSize();for(;;){if(!_e(de)||we===Be){if(de=de.getNextSibling(),de===null||n.$isLineBreakNode(de))return null;_e(de)&&(we=0,ke=de.getTextContent(),Be=de.getTextContentSize())}if(_e(de)){if(ke[we]!==" ")return{node:de,offset:we};we++}}}function V(oe){const ie=J(oe);if(n.$isLineBreakNode(ie))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return ie}function ne(oe,ie,de){const we=oe.getParent();C(we)?Q(we,ie,de):_e(oe)&&oe.replace(n.$createTextNode(oe.__text))}function Y(oe,ie){const de=ie.getElementByKey(oe.getKey());if(de===null)return;const we=oe.getChildren(),ke=we.length;if(ke===de.__cachedChildrenLength)return;de.__cachedChildrenLength=ke;let Be="1",Ye=1;for(let ct=0;ct<ke;ct++)n.$isLineBreakNode(we[ct])&&(Be+=`
86
- `+ ++Ye);de.setAttribute("data-gutter",Be)}const U=new Set;function Q(oe,ie,de){const we=oe.getKey();U.has(we)||(U.add(we),oe.getLanguage()===void 0&&oe.setLanguage(de.defaultLanguage),ie.update(()=>{m(we,()=>{const ke=n.$getNodeByKey(we);if(!C(ke)||!ke.isAttached())return!1;const Be=ke.getTextContent(),Ye=de.tokenize(Be,ke.getLanguage()||de.defaultLanguage),ct=k(Ye),yt=y(ke.getChildren(),ct),{from:dt,to:ve,nodesForReplacement:se}=yt;return dt!==ve||se.length?(oe.splice(dt,ve-dt,se),!0):!1})},{onUpdate:()=>{U.delete(we)},skipTransforms:!0}))}function k(oe,ie){const de=[];for(const we of oe)if(typeof we=="string"){const ke=we.split(/(\n|\t)/),Be=ke.length;for(let Ye=0;Ye<Be;Ye++){const ct=ke[Ye];ct===`
87
- `||ct===`\r
88
- `?de.push(n.$createLineBreakNode()):ct===" "?de.push(n.$createTabNode()):ct.length>0&&de.push(j(ct,ie))}}else{const{content:ke}=we;typeof ke=="string"?de.push(...k([ke],we.type)):Array.isArray(ke)&&de.push(...k(ke,we.type))}return de}function m(oe,ie){const de=n.$getNodeByKey(oe);if(!C(de)||!de.isAttached())return;const we=n.$getSelection();if(!n.$isRangeSelection(we)){ie();return}const ke=we.anchor,Be=ke.offset,Ye=ke.type==="element"&&n.$isLineBreakNode(de.getChildAtIndex(ke.offset-1));let ct=0;if(!Ye){const dt=ke.getNode();ct=Be+dt.getPreviousSiblings().reduce((ve,se)=>ve+se.getTextContentSize(),0)}if(ie()){if(Ye){ke.getNode().select(Be,Be);return}de.getChildren().some(dt=>{const ve=n.$isTextNode(dt);if(ve||n.$isLineBreakNode(dt)){const se=dt.getTextContentSize();if(ve&&se>=ct)return dt.select(ct,ct),!0;ct-=se}return!1})}}function y(oe,ie){let de=0;for(;de<oe.length&&R(oe[de],ie[de]);)de++;const we=oe.length,ke=ie.length,Be=Math.min(we,ke)-de;let Ye=0;for(;Ye<Be;)if(Ye++,!R(oe[we-Ye],ie[ke-Ye])){Ye--;break}const ct=de,yt=we-Ye,dt=ie.slice(de,ke-Ye);return{from:ct,nodesForReplacement:dt,to:yt}}function R(oe,ie){return _e(oe)&&_e(ie)&&oe.__text===ie.__text&&oe.__highlightType===ie.__highlightType||n.$isTabNode(oe)&&n.$isTabNode(ie)||n.$isLineBreakNode(oe)&&n.$isLineBreakNode(ie)}function Z(oe){if(!n.$isRangeSelection(oe))return!1;const ie=oe.anchor.getNode(),de=oe.focus.getNode();if(ie.is(de)&&C(ie))return!0;const we=ie.getParent();return C(we)&&we.is(de.getParent())}function ue(oe){const ie=oe.getNodes(),de=[[]];if(ie.length===1&&C(ie[0]))return de;let we=de[0];for(let ke=0;ke<ie.length;ke++){const Be=ie[ke];if(!(_e(Be)||n.$isTabNode(Be)||n.$isLineBreakNode(Be)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(Be)?ke!==0&&we.length>0&&(we=[],de.push(we)):we.push(Be)}return de}function ge(oe){const ie=n.$getSelection();if(!n.$isRangeSelection(ie)||!Z(ie))return null;const de=oe?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND,we=oe?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND;if(ue(ie).length>1)return de;const Ye=ie.getNodes()[0];if(!(C(Ye)||_e(Ye)||n.$isTabNode(Ye)||n.$isLineBreakNode(Ye)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(C(Ye))return de;const ct=pe(Ye),yt=J(Ye),dt=ie.anchor,ve=ie.focus;let se,he;return ve.isBefore(dt)?(se=ve,he=dt):(se=dt,he=ve),ct!==null&&yt!==null&&se.key===ct.getKey()&&se.offset===0&&he.key===yt.getKey()&&he.offset===yt.getTextContentSize()?de:we}function ae(oe){const ie=n.$getSelection();if(!n.$isRangeSelection(ie)||!Z(ie))return!1;const de=ue(ie),we=de.length;if(de.length>1){for(let ct=0;ct<we;ct++){const yt=de[ct];if(yt.length>0){let dt=yt[0];ct===0&&(dt=pe(dt)),dt!==null&&(oe===n.INDENT_CONTENT_COMMAND?dt.insertBefore(n.$createTabNode()):n.$isTabNode(dt)&&dt.remove())}}return!0}const Be=ie.getNodes()[0];if(!(C(Be)||_e(Be)||n.$isTabNode(Be)||n.$isLineBreakNode(Be)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(C(Be))return oe===n.INDENT_CONTENT_COMMAND&&ie.insertNodes([n.$createTabNode()]),!0;const Ye=pe(Be);if(Ye===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return oe===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(Ye)?Ye.insertAfter(n.$createTabNode()):Ye.insertBefore(n.$createTabNode()):n.$isTabNode(Ye)&&Ye.remove(),!0}function Te(oe,ie){const de=n.$getSelection();if(!n.$isRangeSelection(de))return!1;const{anchor:we,focus:ke}=de,Be=we.offset,Ye=ke.offset,ct=we.getNode(),yt=ke.getNode(),dt=oe===n.KEY_ARROW_UP_COMMAND;if(!Z(de)||!(_e(ct)||n.$isTabNode(ct))||!(_e(yt)||n.$isTabNode(yt)))return!1;if(!ie.altKey){if(de.isCollapsed()){const qe=ct.getParentOrThrow();if(dt&&Be===0&&ct.getPreviousSibling()===null){if(qe.getPreviousSibling()===null)return qe.selectPrevious(),ie.preventDefault(),!0}else if(!dt&&Be===ct.getTextContentSize()&&ct.getNextSibling()===null&&qe.getNextSibling()===null)return qe.selectNext(),ie.preventDefault(),!0}return!1}let ve,se;if(ct.isBefore(yt)?(ve=pe(ct),se=J(yt)):(ve=pe(yt),se=J(ct)),ve==null||se==null)return!1;const he=ve.getNodesBetween(se);for(let qe=0;qe<he.length;qe++){const Qe=he[qe];if(!_e(Qe)&&!n.$isTabNode(Qe)&&!n.$isLineBreakNode(Qe))return!1}ie.preventDefault(),ie.stopPropagation();const Oe=dt?ve.getPreviousSibling():se.getNextSibling();if(!n.$isLineBreakNode(Oe))return!0;const Me=dt?Oe.getPreviousSibling():Oe.getNextSibling();if(Me==null)return!0;const De=_e(Me)||n.$isTabNode(Me)||n.$isLineBreakNode(Me)?dt?pe(Me):J(Me):null;let We=De??Me;return Oe.remove(),he.forEach(qe=>qe.remove()),oe===n.KEY_ARROW_UP_COMMAND?(he.forEach(qe=>We.insertBefore(qe)),We.insertBefore(Oe)):(We.insertAfter(Oe),We=Oe,he.forEach(qe=>{We.insertAfter(qe),We=qe})),de.setTextNodeRange(ct,Be,yt,Ye),!0}function Ae(oe,ie){const de=n.$getSelection();if(!n.$isRangeSelection(de))return!1;const{anchor:we,focus:ke}=de,Be=we.getNode(),Ye=ke.getNode(),ct=oe===n.MOVE_TO_START;if(!(_e(Be)||n.$isTabNode(Be))||!(_e(Ye)||n.$isTabNode(Ye)))return!1;if(ct){const yt=F(Ye,ke.offset);if(yt!==null){const{node:dt,offset:ve}=yt;n.$isLineBreakNode(dt)?dt.selectNext(0,0):de.setTextNodeRange(dt,ve,dt,ve)}else Ye.getParentOrThrow().selectStart()}else V(Ye).select();return ie.preventDefault(),ie.stopPropagation(),!0}function ze(oe,ie){if(!oe.hasNodes([f,q]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return ie==null&&(ie=ee),e.mergeRegister(oe.registerMutationListener(f,de=>{oe.update(()=>{for(const[we,ke]of de)if(ke!=="destroyed"){const Be=n.$getNodeByKey(we);Be!==null&&Y(Be,oe)}})}),oe.registerNodeTransform(f,de=>Q(de,oe,ie)),oe.registerNodeTransform(n.TextNode,de=>ne(de,oe,ie)),oe.registerNodeTransform(q,de=>ne(de,oe,ie)),oe.registerCommand(n.KEY_TAB_COMMAND,de=>{const we=ge(de.shiftKey);return we===null?!1:(de.preventDefault(),oe.dispatchCommand(we,void 0),!0)},n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.INSERT_TAB_COMMAND,()=>{const de=n.$getSelection();return Z(de)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.INDENT_CONTENT_COMMAND,de=>ae(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.OUTDENT_CONTENT_COMMAND,de=>ae(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.KEY_ARROW_UP_COMMAND,de=>Te(n.KEY_ARROW_UP_COMMAND,de),n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.KEY_ARROW_DOWN_COMMAND,de=>Te(n.KEY_ARROW_DOWN_COMMAND,de),n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.MOVE_TO_END,de=>Ae(n.MOVE_TO_END,de),n.COMMAND_PRIORITY_LOW),oe.registerCommand(n.MOVE_TO_START,de=>Ae(n.MOVE_TO_START,de),n.COMMAND_PRIORITY_LOW))}return bn.$createCodeHighlightNode=j,bn.$createCodeNode=p,bn.$isCodeHighlightNode=_e,bn.$isCodeNode=C,bn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=W,bn.CODE_LANGUAGE_MAP=H,bn.CodeHighlightNode=q,bn.CodeNode=f,bn.DEFAULT_CODE_LANGUAGE=$,bn.PrismTokenizer=ee,bn.getCodeLanguages=ce,bn.getDefaultCodeLanguage=re,bn.getEndOfCodeInLine=V,bn.getFirstCodeNodeOfLine=pe,bn.getLanguageFriendlyName=te,bn.getLastCodeNodeOfLine=J,bn.getStartOfCodeInLine=F,bn.normalizeCodeLang=z,bn.registerCodeHighlighting=ze,bn}var Rn={},Qh;function dN(){if(Qh)return Rn;Qh=1;var t=xp();vp(),Sp(),wp(),Op(),Dp(),bp(),Rp(),Mp(),Ap(),kp(),Lp(),Ip(),Pp(),$p();var e=on(),n=Ht();let r=k=>k!=null&&t.languages.hasOwnProperty(k)?k:void 0;function c(k,m){for(let y of k.childNodes){if(e.isHTMLElement(y)&&y.tagName===m)return!0;c(y,m)}return!1}class d extends n.ElementNode{static getType(){return"code"}static clone(m){return new d(m.__language,m.__key)}constructor(m,y){super(y),this.__language=r(m)}createDOM(m){let y=document.createElement("code");return e.addClassNamesToElement(y,m.theme.code),y.setAttribute("spellcheck","false"),(m=this.getLanguage())&&y.setAttribute("data-highlight-language",m),y}updateDOM(m,y){let R=this.__language;return m=m.__language,R?R!==m&&y.setAttribute("data-highlight-language",R):m&&y.removeAttribute("data-highlight-language"),!1}exportDOM(){let m=document.createElement("pre");m.setAttribute("spellcheck","false");let y=this.getLanguage();return y&&m.setAttribute("data-highlight-language",y),{element:m}}static importDOM(){return{code:m=>m.textContent!=null&&(/\r?\n/.test(m.textContent)||c(m,"BR"))?{conversion:C,priority:1}:null,div:()=>({conversion:x,priority:1}),pre:()=>({conversion:C,priority:0}),table:m=>v(m)?{conversion:T,priority:3}:null,td:m=>{let y=m.closest("table");return m.classList.contains("js-file-line")?{conversion:M,priority:3}:y&&v(y)?{conversion:O,priority:3}:null},tr:m=>(m=m.closest("table"))&&v(m)?{conversion:O,priority:3}:null}}static importJSON(m){let y=f(m.language);return y.setFormat(m.format),y.setIndent(m.indent),y.setDirection(m.direction),y}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(m,y=!0){var R=this.getChildren(),Z=R.length;if(2<=Z&&R[Z-1].getTextContent()===`
89
- `&&R[Z-2].getTextContent()===`
90
- `&&m.isCollapsed()&&m.anchor.key===this.__key&&m.anchor.offset===Z)return R[Z-1].remove(),R[Z-2].remove(),m=n.$createParagraphNode(),this.insertAfter(m,y),m;let{anchor:ue,focus:ge}=m;if(y=(ue.isBefore(ge)?ue:ge).getNode(),n.$isTextNode(y)){for(Z=te(y),R=[];;)if(n.$isTabNode(Z))R.push(n.$createTabNode()),Z=Z.getNextSibling();else if(z(Z)){for(var ae=0,Te=Z.getTextContent(),Ae=Z.getTextContentSize();ae<Ae&&Te[ae]===" ";ae++);if(ae!==0&&R.push(H(" ".repeat(ae))),ae!==Ae)break;Z=Z.getNextSibling()}else break;Z=y.splitText(ue.offset)[0],ae=ue.offset===0?0:1,ae=Z.getIndexWithinParent()+ae,Te=y.getParentOrThrow(),Ae=[n.$createLineBreakNode(),...R],Te.splice(ae,0,Ae),(R=R[R.length-1])?R.select():ue.offset===0?Z.selectPrevious():Z.getNextSibling().selectNext(0,0)}return p(y)&&({offset:m}=m.anchor,y.splice(m,0,[n.$createLineBreakNode()]),y.select(m+1,m+1)),null}canIndent(){return!1}collapseAtStart(){let m=n.$createParagraphNode();return this.getChildren().forEach(y=>m.append(y)),this.replace(m),!0}setLanguage(m){this.getWritable().__language=r(m)}getLanguage(){return this.getLatest().__language}}function f(k){return n.$applyNodeReplacement(new d(k))}function p(k){return k instanceof d}function C(k){let m;return e.isHTMLElement(k)&&(m=k.getAttribute("data-highlight-language")),{node:f(m)}}function x(k){let m=k.style.fontFamily.match("monospace")!==null;return m||A(k)?{after:y=>{let R=k.parentNode;return R!=null&&k!==R.lastChild&&y.push(n.$createLineBreakNode()),y},node:m?f():null}:{node:null}}function T(){return{node:f()}}function O(){return{node:null}}function M(k){return{after:m=>(k.parentNode&&k.parentNode.nextSibling&&m.push(n.$createLineBreakNode()),m),node:null}}function A(k){for(k=k.parentElement;k!==null;){if(k.style.fontFamily.match("monospace")!==null)return!0;k=k.parentElement}return!1}function v(k){return k.classList.contains("js-file-line-container")}let w={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},P={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function K(k){return P[k]||k}class $ extends n.TextNode{constructor(m,y,R){super(m,R),this.__highlightType=y}static getType(){return"code-highlight"}static clone(m){return new $(m.__text,m.__highlightType||void 0,m.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(m){let y=super.createDOM(m);return m=W(m.theme,this.__highlightType),e.addClassNamesToElement(y,m),y}updateDOM(m,y,R){let Z=super.updateDOM(m,y,R);return m=W(R.theme,m.__highlightType),R=W(R.theme,this.__highlightType),m!==R&&(m&&e.removeClassNamesFromElement(y,m),R&&e.addClassNamesToElement(y,R)),Z}static importJSON(m){let y=H(m.text,m.highlightType);return y.setFormat(m.format),y.setDetail(m.detail),y.setMode(m.mode),y.setStyle(m.style),y}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return f()}}function W(k,m){return m&&k&&k.codeHighlight&&k.codeHighlight[m]}function H(k,m){return n.$applyNodeReplacement(new $(k,m))}function z(k){return k instanceof $}function te(k){let m=k;for(;z(k)||n.$isTabNode(k);)m=k,k=k.getPreviousSibling();return m}function re(k){let m=k;for(;z(k)||n.$isTabNode(k);)m=k,k=k.getNextSibling();return m}let ce={defaultLanguage:"javascript",tokenize(k,m){return t.tokenize(k,t.languages[m||""]||t.languages[this.defaultLanguage])}};function q(k,m){let y=null;var R=null,Z=k;let ue=m,ge=k.getTextContent();for(;;){if(ue===0){if(Z=Z.getPreviousSibling(),Z===null)break;if(!(z(Z)||n.$isTabNode(Z)||n.$isLineBreakNode(Z)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(Z)){y={node:Z,offset:1};break}ue=Math.max(0,Z.getTextContentSize()-1),ge=Z.getTextContent()}else ue--;let ae=ge[ue];z(Z)&&ae!==" "&&(R={node:Z,offset:ue})}if(R!==null)return R;if(R=null,m<k.getTextContentSize()?z(k)&&(R=k.getTextContent()[m]):(Z=k.getNextSibling(),z(Z)&&(R=Z.getTextContent()[0])),R!==null&&R!==" ")return y;e:for(R=k,Z=k.getTextContent(),k=k.getTextContentSize();;){if(!z(R)||m===k){if(R=R.getNextSibling(),R===null||n.$isLineBreakNode(R)){k=null;break e}z(R)&&(m=0,Z=R.getTextContent(),k=R.getTextContentSize())}if(z(R)){if(Z[m]!==" "){k={node:R,offset:m};break e}m++}}return k!==null?k:y}function G(k){if(k=re(k),n.$isLineBreakNode(k))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return k}function j(k,m,y){let R=k.getParent();p(R)?pe(R,m,y):z(k)&&k.replace(n.$createTextNode(k.__text))}let _e=new Set;function pe(k,m,y){let R=k.getKey();_e.has(R)||(_e.add(R),k.getLanguage()===void 0&&k.setLanguage(y.defaultLanguage),m.update(()=>{ee(R,()=>{var Z=n.$getNodeByKey(R);if(!p(Z)||!Z.isAttached())return!1;var ue=Z.getTextContent();ue=y.tokenize(ue,Z.getLanguage()||y.defaultLanguage),ue=J(ue);var ge=Z.getChildren();for(Z=0;Z<ge.length&&F(ge[Z],ue[Z]);)Z++;var ae=ge.length;let Te=ue.length,Ae=Math.min(ae,Te)-Z,ze=0;for(;ze<Ae;)if(ze++,!F(ge[ae-ze],ue[Te-ze])){ze--;break}ge=Z,ae-=ze,ue=ue.slice(Z,Te-ze);let{from:oe,to:ie,nodesForReplacement:de}={from:ge,nodesForReplacement:ue,to:ae};return oe!==ie||de.length?(k.splice(oe,ie-oe,de),!0):!1})},{onUpdate:()=>{_e.delete(R)},skipTransforms:!0}))}function J(k,m){let y=[];for(let R of k)if(typeof R=="string"){k=R.split(/(\n|\t)/);let Z=k.length;for(let ue=0;ue<Z;ue++){let ge=k[ue];ge===`
91
- `||ge===`\r
92
- `?y.push(n.$createLineBreakNode()):ge===" "?y.push(n.$createTabNode()):0<ge.length&&y.push(H(ge,m))}}else({content:k}=R),typeof k=="string"?y.push(...J([k],R.type)):Array.isArray(k)&&y.push(...J(k,R.type));return y}function ee(k,m){if(k=n.$getNodeByKey(k),p(k)&&k.isAttached()){var y=n.$getSelection();if(n.$isRangeSelection(y)){y=y.anchor;var R=y.offset,Z=y.type==="element"&&n.$isLineBreakNode(k.getChildAtIndex(y.offset-1)),ue=0;if(!Z){let ge=y.getNode();ue=R+ge.getPreviousSiblings().reduce((ae,Te)=>ae+Te.getTextContentSize(),0)}m()&&(Z?y.getNode().select(R,R):k.getChildren().some(ge=>{let ae=n.$isTextNode(ge);if(ae||n.$isLineBreakNode(ge)){let Te=ge.getTextContentSize();if(ae&&Te>=ue)return ge.select(ue,ue),!0;ue-=Te}return!1}))}else m()}}function F(k,m){return z(k)&&z(m)&&k.__text===m.__text&&k.__highlightType===m.__highlightType||n.$isTabNode(k)&&n.$isTabNode(m)||n.$isLineBreakNode(k)&&n.$isLineBreakNode(m)}function D(k){if(!n.$isRangeSelection(k))return!1;var m=k.anchor.getNode();return k=k.focus.getNode(),m.is(k)&&p(m)?!0:(m=m.getParent(),p(m)&&m.is(k.getParent()))}function V(k){k=k.getNodes();let m=[[]];if(k.length===1&&p(k[0]))return m;let y=m[0];for(let R=0;R<k.length;R++){let Z=k[R];if(!(z(Z)||n.$isTabNode(Z)||n.$isLineBreakNode(Z)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(Z)?R!==0&&0<y.length&&(y=[],m.push(y)):y.push(Z)}return m}function ne(k){var m=n.$getSelection();if(!n.$isRangeSelection(m)||!D(m))return null;let y=k?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(k=k?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<V(m).length)return y;var R=m.getNodes()[0];if(!(p(R)||z(R)||n.$isTabNode(R)||n.$isLineBreakNode(R)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(p(R))return y;let Z=te(R);R=re(R);var ue=m.anchor;let ge=m.focus;return ge.isBefore(ue)?m=ge:(m=ue,ue=ge),Z!==null&&R!==null&&m.key===Z.getKey()&&m.offset===0&&ue.key===R.getKey()&&ue.offset===R.getTextContentSize()?y:k}function Y(k){var m=n.$getSelection();if(!n.$isRangeSelection(m)||!D(m))return!1;var y=V(m);let R=y.length;if(1<y.length){for(m=0;m<R;m++){var Z=y[m];0<Z.length&&(Z=Z[0],m===0&&(Z=te(Z)),Z!==null&&(k===n.INDENT_CONTENT_COMMAND?Z.insertBefore(n.$createTabNode()):n.$isTabNode(Z)&&Z.remove()))}return!0}if(y=m.getNodes()[0],!(p(y)||z(y)||n.$isTabNode(y)||n.$isLineBreakNode(y)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(p(y))return k===n.INDENT_CONTENT_COMMAND&&m.insertNodes([n.$createTabNode()]),!0;if(y=te(y),y===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return k===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(y)?y.insertAfter(n.$createTabNode()):y.insertBefore(n.$createTabNode()):n.$isTabNode(y)&&y.remove(),!0}function U(k,m){let y=n.$getSelection();if(!n.$isRangeSelection(y))return!1;let{anchor:R,focus:Z}=y,ue=R.offset,ge=Z.offset,ae=R.getNode(),Te=Z.getNode();var Ae=k===n.KEY_ARROW_UP_COMMAND;if(!D(y)||!z(ae)&&!n.$isTabNode(ae)||!z(Te)&&!n.$isTabNode(Te))return!1;if(!m.altKey){if(y.isCollapsed()){if(k=ae.getParentOrThrow(),Ae&&ue===0&&ae.getPreviousSibling()===null){if(k.getPreviousSibling()===null)return k.selectPrevious(),m.preventDefault(),!0}else if(!Ae&&ue===ae.getTextContentSize()&&ae.getNextSibling()===null&&k.getNextSibling()===null)return k.selectNext(),m.preventDefault(),!0}return!1}let ze;if(ae.isBefore(Te)){var oe=te(ae);ze=re(Te)}else oe=te(Te),ze=re(ae);if(oe==null||ze==null)return!1;let ie=oe.getNodesBetween(ze);for(let we=0;we<ie.length;we++){let ke=ie[we];if(!z(ke)&&!n.$isTabNode(ke)&&!n.$isLineBreakNode(ke))return!1}if(m.preventDefault(),m.stopPropagation(),m=Ae?oe.getPreviousSibling():ze.getNextSibling(),!n.$isLineBreakNode(m)||(oe=Ae?m.getPreviousSibling():m.getNextSibling(),oe==null))return!0;Ae=z(oe)||n.$isTabNode(oe)||n.$isLineBreakNode(oe)?Ae?te(oe):re(oe):null;let de=Ae??oe;return m.remove(),ie.forEach(we=>we.remove()),k===n.KEY_ARROW_UP_COMMAND?(ie.forEach(we=>de.insertBefore(we)),de.insertBefore(m)):(de.insertAfter(m),de=m,ie.forEach(we=>{de.insertAfter(we),de=we})),y.setTextNodeRange(ae,ue,Te,ge),!0}function Q(k,m){let y=n.$getSelection();if(!n.$isRangeSelection(y))return!1;let{anchor:R,focus:Z}=y;var ue=R.getNode();let ge=Z.getNode();if(k=k===n.MOVE_TO_START,!z(ue)&&!n.$isTabNode(ue)||!z(ge)&&!n.$isTabNode(ge))return!1;if(k)if(ue=q(ge,Z.offset),ue!==null){let{node:ae,offset:Te}=ue;n.$isLineBreakNode(ae)?ae.selectNext(0,0):y.setTextNodeRange(ae,Te,ae,Te)}else ge.getParentOrThrow().selectStart();else G(ge).select();return m.preventDefault(),m.stopPropagation(),!0}return Rn.$createCodeHighlightNode=H,Rn.$createCodeNode=f,Rn.$isCodeHighlightNode=z,Rn.$isCodeNode=p,Rn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=w,Rn.CODE_LANGUAGE_MAP=P,Rn.CodeHighlightNode=$,Rn.CodeNode=d,Rn.DEFAULT_CODE_LANGUAGE="javascript",Rn.PrismTokenizer=ce,Rn.getCodeLanguages=()=>Object.keys(t.languages).filter(k=>typeof t.languages[k]!="function").sort(),Rn.getDefaultCodeLanguage=()=>"javascript",Rn.getEndOfCodeInLine=G,Rn.getFirstCodeNodeOfLine=te,Rn.getLanguageFriendlyName=function(k){return k=K(k),w[k]||k},Rn.getLastCodeNodeOfLine=re,Rn.getStartOfCodeInLine=q,Rn.normalizeCodeLang=K,Rn.registerCodeHighlighting=function(k,m){if(!k.hasNodes([d,$]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return m==null&&(m=ce),e.mergeRegister(k.registerMutationListener(d,y=>{k.update(()=>{for(let[ue,ge]of y)if(ge!=="destroyed"){var R=n.$getNodeByKey(ue);if(R!==null)e:{var Z=R;if(R=k.getElementByKey(Z.getKey()),R===null)break e;Z=Z.getChildren();let ae=Z.length;if(ae===R.__cachedChildrenLength)break e;R.__cachedChildrenLength=ae;let Te="1",Ae=1;for(let ze=0;ze<ae;ze++)n.$isLineBreakNode(Z[ze])&&(Te+=`
93
- `+ ++Ae);R.setAttribute("data-gutter",Te)}}})}),k.registerNodeTransform(d,y=>pe(y,k,m)),k.registerNodeTransform(n.TextNode,y=>j(y,k,m)),k.registerNodeTransform($,y=>j(y,k,m)),k.registerCommand(n.KEY_TAB_COMMAND,y=>{let R=ne(y.shiftKey);return R===null?!1:(y.preventDefault(),k.dispatchCommand(R,void 0),!0)},n.COMMAND_PRIORITY_LOW),k.registerCommand(n.INSERT_TAB_COMMAND,()=>{let y=n.$getSelection();return D(y)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),k.registerCommand(n.INDENT_CONTENT_COMMAND,()=>Y(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),k.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>Y(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),k.registerCommand(n.KEY_ARROW_UP_COMMAND,y=>U(n.KEY_ARROW_UP_COMMAND,y),n.COMMAND_PRIORITY_LOW),k.registerCommand(n.KEY_ARROW_DOWN_COMMAND,y=>U(n.KEY_ARROW_DOWN_COMMAND,y),n.COMMAND_PRIORITY_LOW),k.registerCommand(n.MOVE_TO_END,y=>Q(n.MOVE_TO_END,y),n.COMMAND_PRIORITY_LOW),k.registerCommand(n.MOVE_TO_START,y=>Q(n.MOVE_TO_START,y),n.COMMAND_PRIORITY_LOW))},Rn}const fN=process.env.NODE_ENV==="development"?uN():dN();var ju=fN,Nd=Yn();function hN(){const[t]=Nd.useLexicalComposerContext();return rt.useEffect(()=>ju.registerCodeHighlighting(t),[t]),null}var eg=on(),An=Ht();function gN({src:t,altText:e,width:n,height:r,maxWidth:c}){const d=rt.useMemo(()=>({height:r,width:n,maxWidth:c}),[r,n,c]);return at.jsx("img",{src:t,alt:e,style:d})}function Fp({altText:t,height:e,maxWidth:n=500,src:r,width:c,key:d}){return An.$applyNodeReplacement(new ol(r,t,n,c,e,d))}function pN(t){return t instanceof ol}class ol extends An.DecoratorNode{constructor(n,r,c,d,f,p){super(p);$n(this,"__src");$n(this,"__altText");$n(this,"__width");$n(this,"__height");$n(this,"__maxWidth");this.__src=n,this.__altText=r,this.__maxWidth=c,this.__width=d||"inherit",this.__height=f||"inherit"}static getType(){return"image"}static clone(n){return new ol(n.__src,n.__altText,n.__maxWidth,n.__width,n.__height,n.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(n){return Fp(n)}createDOM(n){const r=document.createElement("span"),c=n.theme.image;return c&&(r.className=c),r}updateDOM(){return!1}decorate(){return at.jsx(gN,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}const mN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_N=t=>mN?(t||window).getSelection():null,Bp=An.createCommand("INSERT_IMAGE_COMMAND");function yN(){const[t]=Nd.useLexicalComposerContext();return rt.useEffect(()=>{if(!t.hasNodes([ol]))throw new Error("ImagePlugin: ImageNode not registered on editor");return eg.mergeRegister(t.registerCommand(Bp,e=>{const n=Fp(e);return An.$insertNodes([n]),An.$isRootOrShadowRoot(n.getParentOrThrow())&&eg.$wrapNodeInElement(n,An.$createParagraphNode).selectEnd(),!0},An.COMMAND_PRIORITY_EDITOR),t.registerCommand(An.DRAGSTART_COMMAND,e=>CN(e),An.COMMAND_PRIORITY_HIGH),t.registerCommand(An.DRAGOVER_COMMAND,e=>NN(e),An.COMMAND_PRIORITY_LOW),t.registerCommand(An.DROP_COMMAND,e=>EN(e,t),An.COMMAND_PRIORITY_HIGH))},[t]),null}function CN(t){const e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n=document.createElement("img");n.src=e;const r=Ed();if(!r)return!1;const c=t.dataTransfer;return c?(c.setData("text/plain","_"),c.setDragImage(n,0,0),c.setData("application/x-lexical-drag",JSON.stringify({data:{altText:r.__altText,height:r.__height,key:r.getKey(),maxWidth:r.__maxWidth,src:r.__src,width:r.__width},type:"image"})),!0):!1}function NN(t){return Ed()?(Hp(t)||t.preventDefault(),!0):!1}function EN(t,e){const n=Ed();if(!n)return!1;const r=TN(t);if(!r)return!1;if(t.preventDefault(),Hp(t)){const c=xN(t);n.remove();const d=An.$createRangeSelection();c!=null&&d.applyDOMRange(c),An.$setSelection(d),e.dispatchCommand(Bp,r)}return!0}function Ed(){const t=An.$getSelection();if(!An.$isNodeSelection(t))return null;const n=t.getNodes()[0];return pN(n)?n:null}function TN(t){var c;const e=(c=t.dataTransfer)==null?void 0:c.getData("application/x-lexical-drag");if(!e)return null;const{type:n,data:r}=JSON.parse(e);return n!=="image"?null:r}function Hp(t){const e=t.target;return!!(e&&e instanceof HTMLElement&&!e.closest("code, span.yext-default-richtextv2-theme__image")&&e.parentElement)}function xN(t){let e;const n=t.target,r=n===null||!(n instanceof Node)?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,c=_N(r);if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t.clientX,t.clientY);else if(t.rangeParent&&c!==null)c.collapse(t.rangeParent,t.rangeOffset||0),e=c.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return e}var cs=_d();function vN(t){const e=t.getNodes();return e.length===0?new Set([t.anchor.getNode().getParentOrThrow(),t.focus.getNode().getParentOrThrow()]):new Set(e.map(n=>An.$isElementNode(n)?n:n.getParentOrThrow()))}const SN=3;function wN(t){const e=An.$getSelection();if(!An.$isRangeSelection(e))return!1;const n=vN(e);let r=0;for(const c of n)if(cs.$isListNode(c))r=Math.max(cs.$getListDepth(c)+1,r);else if(cs.$isListItemNode(c)){const d=c.getParent();if(!cs.$isListNode(d))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(cs.$getListDepth(d)+1,r)}return r<=t}function ON({maxDepth:t}){const[e]=Nd.useLexicalComposerContext();return rt.useEffect(()=>e.registerCommand(An.INDENT_CONTENT_COMMAND,()=>!wN(t||7),SN),[e,t]),null}var Du=Cd(),tg=yd(),ng=md(),Ul={},rg;function DN(){if(rg)return Ul;rg=1;var t=on(),e=Ht();class n extends e.TextNode{static getType(){return"hashtag"}static clone(f){return new n(f.__text,f.__key)}constructor(f,p){super(f,p)}createDOM(f){const p=super.createDOM(f);return t.addClassNamesToElement(p,f.theme.hashtag),p}static importJSON(f){const p=r(f.text);return p.setFormat(f.format),p.setDetail(f.detail),p.setMode(f.mode),p.setStyle(f.style),p}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(d=""){return e.$applyNodeReplacement(new n(d))}function c(d){return d instanceof n}return Ul.$createHashtagNode=r,Ul.$isHashtagNode=c,Ul.HashtagNode=n,Ul}var zl={},ig;function bN(){if(ig)return zl;ig=1;var t=on(),e=Ht();class n extends e.TextNode{static getType(){return"hashtag"}static clone(d){return new n(d.__text,d.__key)}constructor(d,f){super(d,f)}createDOM(d){let f=super.createDOM(d);return t.addClassNamesToElement(f,d.theme.hashtag),f}static importJSON(d){let f=r(d.text);return f.setFormat(d.format),f.setDetail(d.detail),f.setMode(d.mode),f.setStyle(d.style),f}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(c=""){return e.$applyNodeReplacement(new n(c))}return zl.$createHashtagNode=r,zl.$isHashtagNode=function(c){return c instanceof n},zl.HashtagNode=n,zl}const RN=process.env.NODE_ENV==="development"?DN():bN();var MN=RN;const AN="_rtl_13v3w_295",kN="_selected_13v3w_370",lt={"yext-default-richtextv2-theme__ul1":"_yext-default-richtextv2-theme__ul1_13v3w_17","yext-default-richtextv2-theme__ul2":"_yext-default-richtextv2-theme__ul2_13v3w_25","yext-default-richtextv2-theme__ul3":"_yext-default-richtextv2-theme__ul3_13v3w_33","yext-default-richtextv2-theme__ltr":"_yext-default-richtextv2-theme__ltr_13v3w_55","yext-default-richtextv2-theme__rtl":"_yext-default-richtextv2-theme__rtl_13v3w_58","yext-default-richtextv2-theme__paragraph":"_yext-default-richtextv2-theme__paragraph_13v3w_61","yext-default-richtextv2-theme__quote":"_yext-default-richtextv2-theme__quote_13v3w_70","yext-default-richtextv2-theme__h1":"_yext-default-richtextv2-theme__h1_13v3w_81","yext-default-richtextv2-theme__h2":"_yext-default-richtextv2-theme__h2_13v3w_89","yext-default-richtextv2-theme__h3":"_yext-default-richtextv2-theme__h3_13v3w_97","yext-default-richtextv2-theme__h4":"_yext-default-richtextv2-theme__h4_13v3w_105","yext-default-richtextv2-theme__h5":"_yext-default-richtextv2-theme__h5_13v3w_113","yext-default-richtextv2-theme__h6":"_yext-default-richtextv2-theme__h6_13v3w_121","yext-default-richtextv2-theme__textBold":"_yext-default-richtextv2-theme__textBold_13v3w_130","yext-default-richtextv2-theme__textItalic":"_yext-default-richtextv2-theme__textItalic_13v3w_133","yext-default-richtextv2-theme__textUnderline":"_yext-default-richtextv2-theme__textUnderline_13v3w_136","yext-default-richtextv2-theme__textStrikethrough":"_yext-default-richtextv2-theme__textStrikethrough_13v3w_139","yext-default-richtextv2-theme__textUnderlineStrikethrough":"_yext-default-richtextv2-theme__textUnderlineStrikethrough_13v3w_142","yext-default-richtextv2-theme__textSubscript":"_yext-default-richtextv2-theme__textSubscript_13v3w_145","yext-default-richtextv2-theme__textSuperscript":"_yext-default-richtextv2-theme__textSuperscript_13v3w_149","yext-default-richtextv2-theme__textCode":"_yext-default-richtextv2-theme__textCode_13v3w_153","yext-default-richtextv2-theme__hashtag":"_yext-default-richtextv2-theme__hashtag_13v3w_159","yext-default-richtextv2-theme__link":"_yext-default-richtextv2-theme__link_13v3w_163","yext-default-richtextv2-theme__code":"_yext-default-richtextv2-theme__code_13v3w_171","yext-default-richtextv2-theme__table":"_yext-default-richtextv2-theme__table_13v3w_199","yext-default-richtextv2-theme__tableCell":"_yext-default-richtextv2-theme__tableCell_13v3w_208","yext-default-richtextv2-theme__tableCellHeader":"_yext-default-richtextv2-theme__tableCellHeader_13v3w_218","yext-default-richtextv2-theme__characterLimit":"_yext-default-richtextv2-theme__characterLimit_13v3w_222","yext-default-richtextv2-theme__ol1":"_yext-default-richtextv2-theme__ol1_13v3w_226","yext-default-richtextv2-theme__ol2":"_yext-default-richtextv2-theme__ol2_13v3w_233","yext-default-richtextv2-theme__ol3":"_yext-default-richtextv2-theme__ol3_13v3w_240","yext-default-richtextv2-theme__ol4":"_yext-default-richtextv2-theme__ol4_13v3w_247","yext-default-richtextv2-theme__ol5":"_yext-default-richtextv2-theme__ol5_13v3w_254","yext-default-richtextv2-theme__ul":"_yext-default-richtextv2-theme__ul_13v3w_17","yext-default-richtextv2-theme__listItem":"_yext-default-richtextv2-theme__listItem_13v3w_267","yext-default-richtextv2-theme__listItemChecked":"_yext-default-richtextv2-theme__listItemChecked_13v3w_270","yext-default-richtextv2-theme__listItemUnchecked":"_yext-default-richtextv2-theme__listItemUnchecked_13v3w_271",rtl:AN,"yext-default-richtextv2-theme__nestedListItem":"_yext-default-richtextv2-theme__nestedListItem_13v3w_330","yext-default-richtextv2-theme__tokenComment":"_yext-default-richtextv2-theme__tokenComment_13v3w_337","yext-default-richtextv2-theme__tokenPunctuation":"_yext-default-richtextv2-theme__tokenPunctuation_13v3w_340","yext-default-richtextv2-theme__tokenProperty":"_yext-default-richtextv2-theme__tokenProperty_13v3w_343","yext-default-richtextv2-theme__tokenSelector":"_yext-default-richtextv2-theme__tokenSelector_13v3w_346","yext-default-richtextv2-theme__tokenOperator":"_yext-default-richtextv2-theme__tokenOperator_13v3w_349","yext-default-richtextv2-theme__tokenAttr":"_yext-default-richtextv2-theme__tokenAttr_13v3w_352","yext-default-richtextv2-theme__tokenVariable":"_yext-default-richtextv2-theme__tokenVariable_13v3w_355","yext-default-richtextv2-theme__tokenFunction":"_yext-default-richtextv2-theme__tokenFunction_13v3w_358","yext-default-richtextv2-theme__mark":"_yext-default-richtextv2-theme__mark_13v3w_361","yext-default-richtextv2-theme__markOverlap":"_yext-default-richtextv2-theme__markOverlap_13v3w_366",selected:kN,"yext-default-richtextv2-theme__embedBlock":"_yext-default-richtextv2-theme__embedBlock_13v3w_378","yext-default-richtextv2-theme__embedBlockFocus":"_yext-default-richtextv2-theme__embedBlockFocus_13v3w_381","yext-default-richtextv2-theme__image":"_yext-default-richtextv2-theme__image_13v3w_385"},LN={characterLimit:lt["yext-default-richtextv2-theme__characterLimit"],code:lt["yext-default-richtextv2-theme__code"],codeHighlight:{atrule:lt["yext-default-richtextv2-theme__tokenAttr"],attr:lt["yext-default-richtextv2-theme__tokenAttr"],boolean:lt["yext-default-richtextv2-theme__tokenProperty"],builtin:lt["yext-default-richtextv2-theme__tokenSelector"],cdata:lt["yext-default-richtextv2-theme__tokenComment"],char:lt["yext-default-richtextv2-theme__tokenSelector"],class:lt["yext-default-richtextv2-theme__tokenFunction"],"class-name":lt["yext-default-richtextv2-theme__tokenFunction"],comment:lt["yext-default-richtextv2-theme__tokenComment"],constant:lt["yext-default-richtextv2-theme__tokenProperty"],deleted:lt["yext-default-richtextv2-theme__tokenProperty"],doctype:lt["yext-default-richtextv2-theme__tokenComment"],entity:lt["yext-default-richtextv2-theme__tokenOperator"],function:lt["yext-default-richtextv2-theme__tokenFunction"],important:lt["yext-default-richtextv2-theme__tokenVariable"],inserted:lt["yext-default-richtextv2-theme__tokenSelector"],keyword:lt["yext-default-richtextv2-theme__tokenAttr"],namespace:lt["yext-default-richtextv2-theme__tokenVariable"],number:lt["yext-default-richtextv2-theme__tokenProperty"],operator:lt["yext-default-richtextv2-theme__tokenOperator"],prolog:lt["yext-default-richtextv2-theme__tokenComment"],property:lt["yext-default-richtextv2-theme__tokenProperty"],punctuation:lt["yext-default-richtextv2-theme__tokenPunctuation"],regex:lt["yext-default-richtextv2-theme__tokenVariable"],selector:lt["yext-default-richtextv2-theme__tokenSelector"],string:lt["yext-default-richtextv2-theme__tokenSelector"],symbol:lt["yext-default-richtextv2-theme__tokenProperty"],tag:lt["yext-default-richtextv2-theme__tokenProperty"],url:lt["yext-default-richtextv2-theme__tokenOperator"],variable:lt["yext-default-richtextv2-theme__tokenVariable"]},embedBlock:{base:lt["yext-default-richtextv2-theme__embedBlock"],focus:lt["yext-default-richtextv2-theme__embedBlockFocus"]},hashtag:lt["yext-default-richtextv2-theme__hashtag"],heading:{h1:lt["yext-default-richtextv2-theme__h1"],h2:lt["yext-default-richtextv2-theme__h2"],h3:lt["yext-default-richtextv2-theme__h3"],h4:lt["yext-default-richtextv2-theme__h4"],h5:lt["yext-default-richtextv2-theme__h5"],h6:lt["yext-default-richtextv2-theme__h6"]},image:lt["yext-default-richtextv2-theme__image"],link:lt["yext-default-richtextv2-theme__link"],list:{listitem:lt["yext-default-richtextv2-theme__listItem"],listitemChecked:lt["yext-default-richtextv2-theme__listItemChecked"],listitemUnchecked:lt["yext-default-richtextv2-theme__listItemUnchecked"],nested:{listitem:lt["yext-default-richtextv2-theme__nestedListItem"]},olDepth:[lt["yext-default-richtextv2-theme__ol1"],lt["yext-default-richtextv2-theme__ol2"],lt["yext-default-richtextv2-theme__ol3"],lt["yext-default-richtextv2-theme__ol4"],lt["yext-default-richtextv2-theme__ol5"]],ulDepth:[lt["yext-default-richtextv2-theme__ul1"],lt["yext-default-richtextv2-theme__ul2"],lt["yext-default-richtextv2-theme__ul3"]]},ltr:lt["yext-default-richtextv2-theme__ltr"],mark:lt["yext-default-richtextv2-theme__mark"],markOverlap:lt["yext-default-richtextv2-theme__markOverlap"],paragraph:lt["yext-default-richtextv2-theme__paragraph"],quote:lt["yext-default-richtextv2-theme__quote"],rtl:lt["yext-default-richtextv2-theme__rtl"],table:lt["yext-default-richtextv2-theme__table"],tableCell:lt["yext-default-richtextv2-theme__tableCell"],tableCellHeader:lt["yext-default-richtextv2-theme__tableCellHeader"],text:{bold:lt["yext-default-richtextv2-theme__textBold"],code:lt["yext-default-richtextv2-theme__textCode"],italic:lt["yext-default-richtextv2-theme__textItalic"],strikethrough:lt["yext-default-richtextv2-theme__textStrikethrough"],subscript:lt["yext-default-richtextv2-theme__textSubscript"],superscript:lt["yext-default-richtextv2-theme__textSuperscript"],underline:lt["yext-default-richtextv2-theme__textUnderline"],underlineStrikethrough:lt["yext-default-richtextv2-theme__textUnderlineStrikethrough"]}},IN=LN;var Gs={},bu={},og;function PN(){if(og)return bu;og=1;var t=Yn(),e=Ht(),n=rt;function r(d,f){return d.getEditorState().read(()=>{const p=e.$getNodeByKey(f);return p===null?!1:p.isSelected()})}function c(d){const[f]=t.useLexicalComposerContext(),[p,C]=n.useState(()=>r(f,d));n.useEffect(()=>{let O=!0;const M=f.registerUpdateListener(()=>{O&&C(r(f,d))});return()=>{O=!1,M()}},[f,d]);const x=n.useCallback(O=>{f.update(()=>{let M=e.$getSelection();e.$isNodeSelection(M)||(M=e.$createNodeSelection(),e.$setSelection(M)),e.$isNodeSelection(M)&&(O?M.add(d):M.delete(d))})},[f,d]),T=n.useCallback(()=>{f.update(()=>{const O=e.$getSelection();e.$isNodeSelection(O)&&O.clear()})},[f]);return[p,x,T]}return bu.useLexicalNodeSelection=c,bu}var Ru={},sg;function $N(){if(sg)return Ru;sg=1;var t=Yn(),e=Ht(),n=rt;function r(c,d){return c.getEditorState().read(()=>{let f=e.$getNodeByKey(d);return f===null?!1:f.isSelected()})}return Ru.useLexicalNodeSelection=function(c){let[d]=t.useLexicalComposerContext(),[f,p]=n.useState(()=>r(d,c));n.useEffect(()=>{let T=!0,O=d.registerUpdateListener(()=>{T&&p(r(d,c))});return()=>{T=!1,O()}},[d,c]);let C=n.useCallback(T=>{d.update(()=>{let O=e.$getSelection();e.$isNodeSelection(O)||(O=e.$createNodeSelection(),e.$setSelection(O)),e.$isNodeSelection(O)&&(T?O.add(c):O.delete(c))})},[d,c]),x=n.useCallback(()=>{d.update(()=>{const T=e.$getSelection();e.$isNodeSelection(T)&&T.clear()})},[d]);return[f,C,x]},Ru}var Mu,lg;function Wp(){return lg||(lg=1,Mu=process.env.NODE_ENV==="development"?PN():$N()),Mu}var ag;function FN(){if(ag)return Gs;ag=1;var t=Yn(),e=Wp(),n=on(),r=Ht(),c=rt;const d=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function f({nodeKey:O}){const[M]=t.useLexicalComposerContext(),[A,v,w]=e.useLexicalNodeSelection(O),P=c.useCallback(K=>{if(A&&r.$isNodeSelection(r.$getSelection())){K.preventDefault();const $=r.$getNodeByKey(O);T($)&&$.remove()}return!1},[A,O]);return c.useEffect(()=>n.mergeRegister(M.registerCommand(r.CLICK_COMMAND,K=>{const $=M.getElementByKey(O);return K.target===$?(K.shiftKey||w(),v(!A),!0):!1},r.COMMAND_PRIORITY_LOW),M.registerCommand(r.KEY_DELETE_COMMAND,P,r.COMMAND_PRIORITY_LOW),M.registerCommand(r.KEY_BACKSPACE_COMMAND,P,r.COMMAND_PRIORITY_LOW)),[w,M,A,O,P,v]),c.useEffect(()=>{const K=M.getElementByKey(O);K!==null&&(K.className=A?"selected":"")},[M,A,O]),null}class p extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(M){return new p(M.__key)}static importJSON(M){return x()}static importDOM(){return{hr:()=>({conversion:C,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
94
- `}isInline(){return!1}updateDOM(){return!1}decorate(){return c.createElement(f,{nodeKey:this.__key})}}function C(){return{node:x()}}function x(){return r.$applyNodeReplacement(new p)}function T(O){return O instanceof p}return Gs.$createHorizontalRuleNode=x,Gs.$isHorizontalRuleNode=T,Gs.HorizontalRuleNode=p,Gs.INSERT_HORIZONTAL_RULE_COMMAND=d,Gs}var Ys={},cg;function BN(){if(cg)return Ys;cg=1;var t=Yn(),e=Wp(),n=on(),r=Ht(),c=rt;let d=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function f({nodeKey:O}){let[M]=t.useLexicalComposerContext(),[A,v,w]=e.useLexicalNodeSelection(O),P=c.useCallback(K=>(A&&r.$isNodeSelection(r.$getSelection())&&(K.preventDefault(),K=r.$getNodeByKey(O),T(K)&&K.remove()),!1),[A,O]);return c.useEffect(()=>n.mergeRegister(M.registerCommand(r.CLICK_COMMAND,K=>{let $=M.getElementByKey(O);return K.target===$?(K.shiftKey||w(),v(!A),!0):!1},r.COMMAND_PRIORITY_LOW),M.registerCommand(r.KEY_DELETE_COMMAND,P,r.COMMAND_PRIORITY_LOW),M.registerCommand(r.KEY_BACKSPACE_COMMAND,P,r.COMMAND_PRIORITY_LOW)),[w,M,A,O,P,v]),c.useEffect(()=>{let K=M.getElementByKey(O);K!==null&&(K.className=A?"selected":"")},[M,A,O]),null}class p extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(M){return new p(M.__key)}static importJSON(){return x()}static importDOM(){return{hr:()=>({conversion:C,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
95
- `}isInline(){return!1}updateDOM(){return!1}decorate(){return c.createElement(f,{nodeKey:this.__key})}}function C(){return{node:x()}}function x(){return r.$applyNodeReplacement(new p)}function T(O){return O instanceof p}return Ys.$createHorizontalRuleNode=x,Ys.$isHorizontalRuleNode=T,Ys.HorizontalRuleNode=p,Ys.INSERT_HORIZONTAL_RULE_COMMAND=d,Ys}const HN=process.env.NODE_ENV==="development"?FN():BN();var WN=HN;function KN(t,e){return{namespace:"",editable:!1,onError:n=>{throw n},editorState:t,theme:e??IN,nodes:[ng.HeadingNode,MN.HashtagNode,ol,cs.ListNode,cs.ListItemNode,ng.QuoteNode,ju.CodeNode,ju.CodeHighlightNode,Du.TableNode,Du.TableCellNode,Du.TableRowNode,tg.AutoLinkNode,tg.LinkNode,WN.HorizontalRuleNode]}}const Au={"editor-inner":"_editor-inner_1mmqo_6","no-border":"_no-border_1mmqo_10"};function UN({serializedAST:t,nodeClassNames:e}){return at.jsx(mC.LexicalComposer,{initialConfig:KN(t,e),children:at.jsx("div",{className:`${Au["editor-inner"]} ${Au["no-border"]}`,children:at.jsxs("div",{className:Au["editor-inner"],children:[at.jsx(PC.RichTextPlugin,{contentEditable:at.jsx(HC.ContentEditable,{className:"editor-input",ariaLabel:"Lexical Rich Text"}),ErrorBoundary:GC,placeholder:at.jsx("div",{})}),at.jsx(hN,{}),at.jsx(JC.ListPlugin,{}),at.jsx(rN.LinkPlugin,{}),at.jsx(cN.TablePlugin,{}),at.jsx(yN,{}),at.jsx(ON,{maxDepth:7})]})})})}function _c(t,e,n,r){const c=t.length;let d=0,f;if(e<0?e=-e>c?0:c+e:e=e>c?c:e,n=n>0?n:0,r.length<1e4)f=Array.from(r),f.unshift(e,n),[].splice.apply(t,f);else for(n&&[].splice.apply(t,[e,n]);d<r.length;)f=r.slice(d,d+1e4),f.unshift(e,0),[].splice.apply(t,f),d+=1e4,e+=1e4}function qs(t,e){return t.length>0?(_c(t,t.length,0,e),t):e}const ug={}.hasOwnProperty;function Kp(t){const e={};let n=-1;for(;++n<t.length;)zN(e,t[n]);return e}function zN(t,e){let n;for(n in e){const c=(ug.call(t,n)?t[n]:void 0)||(t[n]={}),d=e[n];let f;for(f in d){ug.call(c,f)||(c[f]=[]);const p=d[f];GN(c[f],Array.isArray(p)?p:p?[p]:[])}}}function GN(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);_c(t,0,0,r)}const to={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};var dg=Object.prototype.hasOwnProperty;function fg(t,e,n){for(n of t.keys())if(Zl(n,e))return n}function Zl(t,e){var n,r,c;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Zl(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(c=r,c&&typeof c=="object"&&(c=fg(e,c),!c)||!e.has(c))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(c=r[0],c&&typeof c=="object"&&(c=fg(e,c),!c)||!Zl(r[1],e.get(c)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(dg.call(t,n)&&++r&&!dg.call(e,n)||!(n in e)||!Zl(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}let qu,Up,zp,Gp,Yp=!0;typeof process<"u"&&({FORCE_COLOR:qu,NODE_DISABLE_COLORS:Up,NO_COLOR:zp,TERM:Gp}=process.env||{},Yp=process.stdout&&process.stdout.isTTY);const Ut={enabled:!Up&&zp==null&&Gp!=="dumb"&&(qu!=null&&qu!=="0"||Yp),reset:un(0,0),bold:un(1,22),dim:un(2,22),italic:un(3,23),underline:un(4,24),inverse:un(7,27),hidden:un(8,28),strikethrough:un(9,29),black:un(30,39),red:un(31,39),green:un(32,39),yellow:un(33,39),blue:un(34,39),magenta:un(35,39),cyan:un(36,39),white:un(37,39),gray:un(90,39),grey:un(90,39),bgBlack:un(40,49),bgRed:un(41,49),bgGreen:un(42,49),bgYellow:un(43,49),bgBlue:un(44,49),bgMagenta:un(45,49),bgCyan:un(46,49),bgWhite:un(47,49)};function hg(t,e){let n=0,r,c="",d="";for(;n<t.length;n++)r=t[n],c+=r.open,d+=r.close,~e.indexOf(r.close)&&(e=e.replace(r.rgx,r.close+r.open));return c+e+d}function YN(t,e){let n={has:t,keys:e};return n.reset=Ut.reset.bind(n),n.bold=Ut.bold.bind(n),n.dim=Ut.dim.bind(n),n.italic=Ut.italic.bind(n),n.underline=Ut.underline.bind(n),n.inverse=Ut.inverse.bind(n),n.hidden=Ut.hidden.bind(n),n.strikethrough=Ut.strikethrough.bind(n),n.black=Ut.black.bind(n),n.red=Ut.red.bind(n),n.green=Ut.green.bind(n),n.yellow=Ut.yellow.bind(n),n.blue=Ut.blue.bind(n),n.magenta=Ut.magenta.bind(n),n.cyan=Ut.cyan.bind(n),n.white=Ut.white.bind(n),n.gray=Ut.gray.bind(n),n.grey=Ut.grey.bind(n),n.bgBlack=Ut.bgBlack.bind(n),n.bgRed=Ut.bgRed.bind(n),n.bgGreen=Ut.bgGreen.bind(n),n.bgYellow=Ut.bgYellow.bind(n),n.bgBlue=Ut.bgBlue.bind(n),n.bgMagenta=Ut.bgMagenta.bind(n),n.bgCyan=Ut.bgCyan.bind(n),n.bgWhite=Ut.bgWhite.bind(n),n}function un(t,e){let n={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(t)||(this.has.push(t),this.keys.push(n)),r===void 0?this:Ut.enabled?hg(this.keys,r+""):r+""):r===void 0?YN([t],[n]):Ut.enabled?hg([n],r+""):r+""}}function ko(){}ko.prototype={diff:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=r.callback;typeof r=="function"&&(c=r,r={}),this.options=r;var d=this;function f(w){return c?(setTimeout(function(){c(void 0,w)},0),!0):w}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var p=n.length,C=e.length,x=1,T=p+C;r.maxEditLength&&(T=Math.min(T,r.maxEditLength));var O=[{newPos:-1,components:[]}],M=this.extractCommon(O[0],n,e,0);if(O[0].newPos+1>=p&&M+1>=C)return f([{value:this.join(n),count:n.length}]);function A(){for(var w=-1*x;w<=x;w+=2){var P=void 0,K=O[w-1],$=O[w+1],W=($?$.newPos:0)-w;K&&(O[w-1]=void 0);var H=K&&K.newPos+1<p,z=$&&0<=W&&W<C;if(!H&&!z){O[w]=void 0;continue}if(!H||z&&K.newPos<$.newPos?(P=jN($),d.pushComponent(P.components,void 0,!0)):(P=K,P.newPos++,d.pushComponent(P.components,!0,void 0)),W=d.extractCommon(P,n,e,w),P.newPos+1>=p&&W+1>=C)return f(VN(d,P.components,n,e,d.useLongestToken));O[w]=P}x++}if(c)(function w(){setTimeout(function(){if(x>T)return c();A()||w()},0)})();else for(;x<=T;){var v=A();if(v)return v}},pushComponent:function(e,n,r){var c=e[e.length-1];c&&c.added===n&&c.removed===r?e[e.length-1]={count:c.count+1,added:n,removed:r}:e.push({count:1,added:n,removed:r})},extractCommon:function(e,n,r,c){for(var d=n.length,f=r.length,p=e.newPos,C=p-c,x=0;p+1<d&&C+1<f&&this.equals(n[p+1],r[C+1]);)p++,C++,x++;return x&&e.components.push({count:x}),e.newPos=p,C},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function VN(t,e,n,r,c){for(var d=0,f=e.length,p=0,C=0;d<f;d++){var x=e[d];if(x.removed){if(x.value=t.join(r.slice(C,C+x.count)),C+=x.count,d&&e[d-1].added){var O=e[d-1];e[d-1]=e[d],e[d]=O}}else{if(!x.added&&c){var T=n.slice(p,p+x.count);T=T.map(function(A,v){var w=r[C+v];return w.length>A.length?w:A}),x.value=t.join(T)}else x.value=t.join(n.slice(p,p+x.count));p+=x.count,x.added||(C+=x.count)}}var M=e[f-1];return f>1&&typeof M.value=="string"&&(M.added||M.removed)&&t.equals("",M.value)&&(e[f-2].value+=M.value,e.pop()),e}function jN(t){return{newPos:t.newPos,components:t.components.slice(0)}}var gg=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,pg=/\S/,Vp=new ko;Vp.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!pg.test(t)&&!pg.test(e)};Vp.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&gg.test(e[n])&&gg.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var jp=new ko;jp.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var c=n[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),e.push(c))}return e};var qN=new ko;qN.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var ZN=new ko;ZN.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function rc(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rc=function(e){return typeof e}:rc=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rc(t)}var JN=Object.prototype.toString,Xl=new ko;Xl.useLongestToken=!0;Xl.tokenize=jp.tokenize;Xl.castInput=function(t){var e=this.options,n=e.undefinedReplacement,r=e.stringifyReplacer,c=r===void 0?function(d,f){return typeof f>"u"?n:f}:r;return typeof t=="string"?t:JSON.stringify(Zu(t,null,null,c),c," ")};Xl.equals=function(t,e){return ko.prototype.equals.call(Xl,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function Zu(t,e,n,r,c){e=e||[],n=n||[],r&&(t=r(c,t));var d;for(d=0;d<e.length;d+=1)if(e[d]===t)return n[d];var f;if(JN.call(t)==="[object Array]"){for(e.push(t),f=new Array(t.length),n.push(f),d=0;d<t.length;d+=1)f[d]=Zu(t[d],e,n,r,c);return e.pop(),n.pop(),f}if(t&&t.toJSON&&(t=t.toJSON()),rc(t)==="object"&&t!==null){e.push(t),f={},n.push(f);var p=[],C;for(C in t)t.hasOwnProperty(C)&&p.push(C);for(p.sort(),d=0;d<p.length;d+=1)C=p[d],f[C]=Zu(t[C],e,n,r,C);e.pop(),n.pop()}else f=t;return f}var Ju=new ko;Ju.tokenize=function(t){return t.slice()};Ju.join=Ju.removeEmpty=function(t){return t};Ut.red,Ut.grey,Ut.green;Ut.dim().italic;Ut.dim("→");Ut.dim("·");Ut.dim("↵");function sc(t){t=t.replace(/\r?\n/g,`
96
- `);let e=t.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,c=(e||[]).length;for(;n<c;n++)r=Math.min(r,e[n].length);return c&&r?t.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):t}class XN extends Error{constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}}function Jr(t,e,n,r,c,d,f){if(t)return;let p=f||d;if(f instanceof Error)throw f;let C=c&&c(e,n);throw new XN({actual:e,expects:n,operator:r,message:p,details:C,generated:!f})}function yc(t,e){Jr(!!t,!1,!0,"ok",!1,"Expected value to be truthy",e)}function no(t,e){Jr(!t,!0,!1,"not",!1,"Expected value to be falsey",e)}no.ok=no;no.equal=function(t,e,n){Jr(!Zl(t,e),t,e,"not.equal",!1,"Expected values not to be deeply equal",n)};no.type=function(t,e,n){let r=typeof t;Jr(r!==e,r,e,"not.type",!1,`Expected "${r}" not to be "${e}"`,n)};no.instance=function(t,e,n){let r="`"+(e.name||e.constructor.name)+"`";Jr(!(t instanceof e),t,e,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};no.snapshot=function(t,e,n){t=sc(t),e=sc(e),Jr(t!==e,t,e,"not.snapshot",!1,"Expected value not to match snapshot",n)};no.fixture=function(t,e,n){t=sc(t),e=sc(e),Jr(t!==e,t,e,"not.fixture",!1,"Expected value not to match fixture",n)};no.match=function(t,e,n){typeof e=="string"?Jr(!t.includes(e),t,e,"not.match",!1,`Expected value not to include "${e}" substring`,n):Jr(!e.test(t),t,e,"not.match",!1,`Expected value not to match \`${String(e)}\` pattern`,n)};no.throws=function(t,e,n){!n&&typeof e=="string"&&(n=e,e=null);try{t()}catch(r){typeof e=="function"?Jr(!e(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):e instanceof RegExp?Jr(!e.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(e)}\` pattern`,n):e||Jr(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const QN=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,eE=Lo(/[A-Za-z]/),Xu=Lo(/[\dA-Za-z]/),tE=Lo(/[#-'*+\--9=?A-Z^-~]/);function nE(t){return t!==null&&(t<32||t===127)}const rE=Lo(/\d/),iE=Lo(/[\dA-Fa-f]/),oE=Lo(/[!-/:-@[-`{-~]/);function sE(t){return t!==null&&t<-2}function qp(t){return t!==null&&(t<0||t===32)}function lE(t){return t===-2||t===-1||t===32}const aE=Lo(QN),cE=Lo(/\s/);function Lo(t){return e;function e(n){return n!==null&&t.test(String.fromCharCode(n))}}function Ql(t){if(t===null||qp(t)||cE(t))return 1;if(aE(t))return 2}const lc={attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4};function uE(t,e){const n=this.previous,r=Ql(n);return c;function c(f){return yc(f===to.tilde,"expected `~`"),t.enter("tildeSequenceTemporary"),d(f)}function d(f){if(f===to.tilde)return t.consume(f),d;const p=t.exit("tildeSequenceTemporary"),C=Ql(f);return p._open=!C||C===lc.characterGroupPunctuation&&!!r,p._close=!r||r===lc.characterGroupPunctuation&&!!C,e(f)}}function Zp(t,e,n){const r=[];let c=-1;for(;++c<t.length;){const d=t[c].resolveAll;d&&!r.includes(d)&&(e=d(e,n),r.push(d))}return e}const dE={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"};function Td(t,e){return!!(t[0]==="enter"&&t[1].type===`${e}SequenceTemporary`&&t[1]._close)}function xd(t,e){return!!(t[0]==="exit"&&t[1].type===`${e}SequenceTemporary`&&t[1]._open)}function vd(t,e,n,r,c,d){const[f,p,C,x]=fE(t[e],t[n],c,d);t[e][1].end=Object.assign({},f.start),t[n][1].start=Object.assign({},p.end);let T=[];t[e][1].end.offset-t[e][1].start.offset&&(T=qs(T,[["enter",t[e][1],r],["exit",t[e][1],r]])),T=qs(T,[["enter",x,r],["enter",f,r],["exit",f,r],["enter",C,r]]),T=qs(T,Zp(r.parser.constructs.insideSpan.null,t.slice(e+1,n),r)),T=qs(T,[["exit",C,r],["enter",p,r],["exit",p,r],["exit",x,r]]);let O=0;return t[n][1].end.offset-t[n][1].start.offset&&(O=2,T=qs(T,[["enter",t[n][1],r],["exit",t[n][1],r]])),_c(t,e-1,n-e+3,T),e+T.length-O-2}function fE(t,e,n,r){const c=Object.assign({},t[1].end),d=Object.assign({},e[1].start);mg(c,-r),mg(d,r);const f={type:`${n}Sequence`,start:c,end:Object.assign({},t[1].end)},p={type:`${n}Sequence`,start:Object.assign({},e[1].start),end:d},C={type:`${n}Text`,start:Object.assign({},t[1].end),end:Object.assign({},e[1].start)},x={type:`${n}`,start:Object.assign({},f.start),end:Object.assign({},p.end)};return[f,p,C,x]}function mg(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}function Sd(t,e){t.forEach(n=>{n[1].type===`${e}SequenceTemporary`&&(n[1].type=dE.data)})}function hE(t,e){let n=-1;for(;++n<t.length;)if(Td(t[n],"tilde")){let r=n;for(;r--;)if(xd(t[r],"tilde")){const c=gE(t[r],t[n]);n=vd(t,r,n,e,c===1?"subscript":"strikethrough",c);break}}return Sd(t,"tilde"),t}function gE(t,e){const n=t[1].end.offset-t[1].start.offset,r=e[1].end.offset-e[1].start.offset;return n<3||r<3?r<n?r:n:r%2===0?2:1}function pE(){const t={tokenize:uE,resolveAll:hE};return{text:{[to.tilde]:t},insideSpan:{null:[t]}}}function mE(t,e){let n=-1;for(;++n<t.length;)if(Td(t[n],"superscript")){let r=n;for(;r--;)if(xd(t[r],"superscript")){n=vd(t,r,n,e,"superscript",1);break}}return Sd(t,"superscript"),t}function _E(t,e){return n;function n(c){return yc(c===to.caret,"expected `^`"),t.enter("superscriptSequenceTemporary"),r(c)}function r(c){if(c===to.caret)return t.consume(c),r;const d=t.exit("superscriptSequenceTemporary");return d._open=!0,d._close=!0,e(c)}}function yE(){const t={tokenize:_E,resolveAll:mE};return{text:{[to.caret]:t},insideSpan:{null:[t]}}}function CE(t,e,n){const r=this.previous,c=Ql(r);let d=0;return f;function f(C){return yc(C===to.plusSign,"expected `+`"),t.enter("underlineSequenceTemporary"),p(C)}function p(C){if(C===to.plusSign)return t.consume(C),d++,p;if(d<2)return n(C);const x=t.exit("underlineSequenceTemporary"),T=Ql(C);return x._open=!T||T===lc.characterGroupPunctuation&&!!c,x._close=!c||c===lc.characterGroupPunctuation&&!!T,e(C)}}function NE(t,e){let n=-1;for(;++n<t.length;)if(Td(t[n],"underline")&&t[n][1].end.offset-t[n][1].start.offset>1){let r=n;for(;r--;)if(xd(t[r],"underline")&&t[r][1].end.offset-t[r][1].start.offset>1){n=vd(t,r,n,e,"underline",2);break}}return Sd(t,"underline"),t}function EE(){const t={tokenize:CE,resolveAll:NE};return{text:{[to.plusSign]:t},insideSpan:{null:[t]}}}function TE(){return Kp([EE(),yE(),pE()])}const xE={canContainEols:["strikethrough"],enter:{strikethrough:vE},exit:{strikethrough:SE}};function vE(t){this.enter({type:"strikethrough",children:[]},t)}function SE(t){this.exit(t)}const wE={canContainEols:["subscript"],enter:{subscript:OE},exit:{subscript:DE}};function OE(t){this.enter({type:"subscript",children:[]},t)}function DE(t){this.exit(t)}const bE={canContainEols:["superscript"],enter:{superscript:RE},exit:{superscript:ME}};function RE(t){this.enter({type:"superscript",children:[]},t)}function ME(t){this.exit(t)}const AE={canContainEols:["underline"],enter:{underline:kE},exit:{underline:LE}};function kE(t){this.enter({type:"underline",children:[]},t)}function LE(t){this.exit(t)}function IE(){return[AE,xE,wE,bE]}function PE(){const t=this.data();e("micromarkExtensions",TE()),e("fromMarkdownExtensions",IE());function e(n,r){const c=t[n];c?(yc(Array.isArray(c)),c.push(r)):t[n]=[r]}}function $E(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function FE(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
97
- `}]}function BE(t,e){const n=e.value?e.value+`
98
- `:"",r=e.lang?e.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,c={};r&&(c.className=["language-"+r]);let d={type:"element",tagName:"code",properties:c,children:[{type:"text",value:n}]};return e.meta&&(d.data={meta:e.meta}),t.patch(e,d),d=t.applyData(e,d),d={type:"element",tagName:"pre",properties:{},children:[d]},t.patch(e,d),d}function HE(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function WE(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function sl(t){const e=[];let n=-1,r=0,c=0;for(;++n<t.length;){const d=t.charCodeAt(n);let f="";if(d===37&&Xu(t.charCodeAt(n+1))&&Xu(t.charCodeAt(n+2)))c=2;else if(d<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(d))||(f=String.fromCharCode(d));else if(d>55295&&d<57344){const p=t.charCodeAt(n+1);d<56320&&p>56319&&p<57344?(f=String.fromCharCode(d,p),c=1):f="�"}else f=String.fromCharCode(d);f&&(e.push(t.slice(r,n),encodeURIComponent(f)),r=n+c+1,f=""),c&&(n+=c,c=0)}return e.join("")+t.slice(r)}function Jp(t,e){const n=String(e.identifier).toUpperCase(),r=sl(n.toLowerCase()),c=t.footnoteOrder.indexOf(n);let d;c===-1?(t.footnoteOrder.push(n),t.footnoteCounts[n]=1,d=t.footnoteOrder.length):(t.footnoteCounts[n]++,d=c+1);const f=t.footnoteCounts[n],p={type:"element",tagName:"a",properties:{href:"#"+t.clobberPrefix+"fn-"+r,id:t.clobberPrefix+"fnref-"+r+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};t.patch(e,p);const C={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(e,C),t.applyData(e,C)}function KE(t,e){const n=t.footnoteById;let r=1;for(;r in n;)r++;const c=String(r);return n[c]={type:"footnoteDefinition",identifier:c,children:[{type:"paragraph",children:e.children}],position:e.position},Jp(t,{type:"footnoteReference",identifier:c,position:e.position})}function UE(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function zE(t,e){if(t.dangerous){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}return null}function Xp(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return{type:"text",value:"!["+e.alt+r};const c=t.all(e),d=c[0];d&&d.type==="text"?d.value="["+d.value:c.unshift({type:"text",value:"["});const f=c[c.length-1];return f&&f.type==="text"?f.value+=r:c.push({type:"text",value:r}),c}function GE(t,e){const n=t.definition(e.identifier);if(!n)return Xp(t,e);const r={src:sl(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const c={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,c),t.applyData(e,c)}function YE(t,e){const n={src:sl(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function VE(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function jE(t,e){const n=t.definition(e.identifier);if(!n)return Xp(t,e);const r={href:sl(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const c={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,c),t.applyData(e,c)}function qE(t,e){const n={href:sl(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function ZE(t,e,n){const r=t.all(e),c=n?JE(n):Qp(e),d={},f=[];if(typeof e.checked=="boolean"){const T=r[0];let O;T&&T.type==="element"&&T.tagName==="p"?O=T:(O={type:"element",tagName:"p",properties:{},children:[]},r.unshift(O)),O.children.length>0&&O.children.unshift({type:"text",value:" "}),O.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),d.className=["task-list-item"]}let p=-1;for(;++p<r.length;){const T=r[p];(c||p!==0||T.type!=="element"||T.tagName!=="p")&&f.push({type:"text",value:`
99
- `}),T.type==="element"&&T.tagName==="p"&&!c?f.push(...T.children):f.push(T)}const C=r[r.length-1];C&&(c||C.type!=="element"||C.tagName!=="p")&&f.push({type:"text",value:`
100
- `});const x={type:"element",tagName:"li",properties:d,children:f};return t.patch(e,x),t.applyData(e,x)}function JE(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=Qp(n[r])}return e}function Qp(t){const e=t.spread;return e??t.children.length>1}function XE(t,e){const n={},r=t.all(e);let c=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++c<r.length;){const f=r[c];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const d={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,d),t.applyData(e,d)}function QE(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function eT(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function tT(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const wd=em("start"),Od=em("end");function nT(t){return{start:wd(t),end:Od(t)}}function em(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function rT(t,e){const n=t.all(e),r=n.shift(),c=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],f),c.push(f)}if(n.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},p=wd(e.children[1]),C=Od(e.children[e.children.length-1]);p.line&&C.line&&(f.position={start:p,end:C}),c.push(f)}const d={type:"element",tagName:"table",properties:{},children:t.wrap(c,!0)};return t.patch(e,d),t.applyData(e,d)}function iT(t,e,n){const r=n?n.children:void 0,d=(r?r.indexOf(e):1)===0?"th":"td",f=n&&n.type==="table"?n.align:void 0,p=f?f.length:e.children.length;let C=-1;const x=[];for(;++C<p;){const O=e.children[C],M={},A=f?f[C]:void 0;A&&(M.align=A);let v={type:"element",tagName:d,properties:M,children:[]};O&&(v.children=t.all(O),t.patch(O,v),v=t.applyData(e,v)),x.push(v)}const T={type:"element",tagName:"tr",properties:{},children:t.wrap(x,!0)};return t.patch(e,T),t.applyData(e,T)}function oT(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const _g=9,yg=32;function sT(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),c=0;const d=[];for(;r;)d.push(Cg(e.slice(c,r.index),c>0,!0),r[0]),c=r.index+r[0].length,r=n.exec(e);return d.push(Cg(e.slice(c),c>0,!1)),d.join("")}function Cg(t,e,n){let r=0,c=t.length;if(e){let d=t.codePointAt(r);for(;d===_g||d===yg;)r++,d=t.codePointAt(r)}if(n){let d=t.codePointAt(c-1);for(;d===_g||d===yg;)c--,d=t.codePointAt(c-1)}return c>r?t.slice(r,c):""}function lT(t,e){const n={type:"text",value:sT(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function aT(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const cT={blockquote:$E,break:FE,code:BE,delete:HE,emphasis:WE,footnoteReference:Jp,footnote:KE,heading:UE,html:zE,imageReference:GE,image:YE,inlineCode:VE,linkReference:jE,link:qE,listItem:ZE,list:XE,paragraph:QE,root:eT,strong:tT,table:rT,tableCell:oT,tableRow:iT,text:lT,thematicBreak:aT,toml:qa,yaml:qa,definition:qa,footnoteDefinition:qa};function qa(){return null}const tm=function(t){if(t==null)return hT;if(typeof t=="string")return fT(t);if(typeof t=="object")return Array.isArray(t)?uT(t):dT(t);if(typeof t=="function")return Cc(t);throw new Error("Expected function, string, or object as test")};function uT(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=tm(t[n]);return Cc(r);function r(...c){let d=-1;for(;++d<e.length;)if(e[d].call(this,...c))return!0;return!1}}function dT(t){return Cc(e);function e(n){let r;for(r in t)if(n[r]!==t[r])return!1;return!0}}function fT(t){return Cc(e);function e(n){return n&&n.type===t}}function Cc(t){return e;function e(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&t.call(this,n,...r))}}function hT(){return!0}const gT=!0,Ng=!1,pT="skip",mT=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null);const c=tm(e),d=r?-1:1;f(t,void 0,[])();function f(p,C,x){const T=p&&typeof p=="object"?p:{};if(typeof T.type=="string"){const M=typeof T.tagName=="string"?T.tagName:typeof T.name=="string"?T.name:void 0;Object.defineProperty(O,"name",{value:"node ("+(p.type+(M?"<"+M+">":""))+")"})}return O;function O(){let M=[],A,v,w;if((!e||c(p,C,x[x.length-1]||null))&&(M=_T(n(p,x)),M[0]===Ng))return M;if(p.children&&M[0]!==pT)for(v=(r?p.children.length:-1)+d,w=x.concat(p);v>-1&&v<p.children.length;){if(A=f(p.children[v],v,w)(),A[0]===Ng)return A;v=typeof A[1]=="number"?A[1]:v+d}return M}}};function _T(t){return Array.isArray(t)?t:typeof t=="number"?[gT,t]:[t]}const Dd=function(t,e,n,r){typeof e=="function"&&typeof n!="function"&&(r=n,n=e,e=null),mT(t,e,c,r);function c(d,f){const p=f[f.length-1];return n(d,p?p.children.indexOf(d):null,p)}};function yT(t){return!t||!t.position||!t.position.start||!t.position.start.line||!t.position.start.column||!t.position.end||!t.position.end.line||!t.position.end.column}const Eg={}.hasOwnProperty;function CT(t){const e=Object.create(null);if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Dd(t,"definition",r=>{const c=Tg(r.identifier);c&&!Eg.call(e,c)&&(e[c]=r)}),n;function n(r){const c=Tg(r);return c&&Eg.call(e,c)?e[c]:null}}function Tg(t){return String(t||"").toUpperCase()}const ac={}.hasOwnProperty;function NT(t,e){const n=e||{},r=n.allowDangerousHtml||!1,c={};return f.dangerous=r,f.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,f.footnoteLabel=n.footnoteLabel||"Footnotes",f.footnoteLabelTagName=n.footnoteLabelTagName||"h2",f.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},f.footnoteBackLabel=n.footnoteBackLabel||"Back to content",f.unknownHandler=n.unknownHandler,f.passThrough=n.passThrough,f.handlers={...cT,...n.handlers},f.definition=CT(t),f.footnoteById=c,f.footnoteOrder=[],f.footnoteCounts={},f.patch=ET,f.applyData=TT,f.one=p,f.all=C,f.wrap=vT,f.augment=d,Dd(t,"footnoteDefinition",x=>{const T=String(x.identifier).toUpperCase();ac.call(c,T)||(c[T]=x)}),f;function d(x,T){if(x&&"data"in x&&x.data){const O=x.data;O.hName&&(T.type!=="element"&&(T={type:"element",tagName:"",properties:{},children:[]}),T.tagName=O.hName),T.type==="element"&&O.hProperties&&(T.properties={...T.properties,...O.hProperties}),"children"in T&&T.children&&O.hChildren&&(T.children=O.hChildren)}if(x){const O="type"in x?x:{position:x};yT(O)||(T.position={start:wd(O),end:Od(O)})}return T}function f(x,T,O,M){return Array.isArray(O)&&(M=O,O={}),d(x,{type:"element",tagName:T,properties:O||{},children:M||[]})}function p(x,T){return nm(f,x,T)}function C(x){return io(f,x)}}function ET(t,e){t.position&&(e.position=nT(t))}function TT(t,e){let n=e;if(t&&t.data){const r=t.data.hName,c=t.data.hChildren,d=t.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&d&&(n.properties={...n.properties,...d}),"children"in n&&n.children&&c!==null&&c!==void 0&&(n.children=c)}return n}function nm(t,e,n){const r=e&&e.type;if(!r)throw new Error("Expected node, got `"+e+"`");return ac.call(t.handlers,r)?t.handlers[r](t,e,n):t.passThrough&&t.passThrough.includes(r)?"children"in e?{...e,children:io(t,e)}:e:t.unknownHandler?t.unknownHandler(t,e,n):xT(t,e)}function io(t,e){const n=[];if("children"in e){const r=e.children;let c=-1;for(;++c<r.length;){const d=nm(t,r[c],e);if(d){if(c&&r[c-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=d.value.replace(/^\s+/,"")),!Array.isArray(d)&&d.type==="element")){const f=d.children[0];f&&f.type==="text"&&(f.value=f.value.replace(/^\s+/,""))}Array.isArray(d)?n.push(...d):n.push(d)}}}return n}function xT(t,e){const n=e.data||{},r="value"in e&&!(ac.call(n,"hProperties")||ac.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:io(t,e)};return t.patch(e,r),t.applyData(e,r)}function vT(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
101
- `});++r<t.length;)r&&n.push({type:"text",value:`
102
- `}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
103
- `}),n}const ST=(t,e)=>t(e,"i",io(t,e)),wT=(t,e)=>t(e,"b",io(t,e)),OT=(t,e)=>t(e,"u",io(t,e)),DT=(t,e)=>t(e,"s",io(t,e)),bT=(t,e)=>t(e,"sub",io(t,e)),RT=(t,e)=>t(e,"sup",io(t,e)),MT={emphasis:ST,strong:wT,underline:OT,strikethrough:DT,subscript:bT,superscript:RT},AT=t=>{const[e,n]=rt.useState();let r;return rt.useEffect(()=>{(async()=>{if(!r)try{r=(await Promise.resolve().then(()=>require("./index-5cVqTMnt.cjs"))).default}catch{throw new Error("Failed to import React Markdown, cannot properly render LegacyRichText.")}const d=r({children:t.markdown,remarkPlugins:[PE],remarkRehypeOptions:{handlers:MT}});n(d)})()},[t.markdown]),e||null};class ps extends Error{}class kT extends ps{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class LT extends ps{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class IT extends ps{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Zs extends ps{}class rm extends ps{constructor(e){super(`Invalid unit ${e}`)}}class vr extends ps{}class wo extends ps{constructor(){super("Zone is an abstract class")}}const it="numeric",mi="short",Lr="long",cc={year:it,month:it,day:it},im={year:it,month:mi,day:it},PT={year:it,month:mi,day:it,weekday:mi},om={year:it,month:Lr,day:it},sm={year:it,month:Lr,day:it,weekday:Lr},lm={hour:it,minute:it},am={hour:it,minute:it,second:it},cm={hour:it,minute:it,second:it,timeZoneName:mi},um={hour:it,minute:it,second:it,timeZoneName:Lr},dm={hour:it,minute:it,hourCycle:"h23"},fm={hour:it,minute:it,second:it,hourCycle:"h23"},hm={hour:it,minute:it,second:it,hourCycle:"h23",timeZoneName:mi},gm={hour:it,minute:it,second:it,hourCycle:"h23",timeZoneName:Lr},pm={year:it,month:it,day:it,hour:it,minute:it},mm={year:it,month:it,day:it,hour:it,minute:it,second:it},_m={year:it,month:mi,day:it,hour:it,minute:it},ym={year:it,month:mi,day:it,hour:it,minute:it,second:it},$T={year:it,month:mi,day:it,weekday:mi,hour:it,minute:it},Cm={year:it,month:Lr,day:it,hour:it,minute:it,timeZoneName:mi},Nm={year:it,month:Lr,day:it,hour:it,minute:it,second:it,timeZoneName:mi},Em={year:it,month:Lr,day:it,weekday:Lr,hour:it,minute:it,timeZoneName:Lr},Tm={year:it,month:Lr,day:it,weekday:Lr,hour:it,minute:it,second:it,timeZoneName:Lr};class ta{get type(){throw new wo}get name(){throw new wo}get ianaName(){return this.name}get isUniversal(){throw new wo}offsetName(e,n){throw new wo}formatOffset(e,n){throw new wo}offset(e){throw new wo}equals(e){throw new wo}get isValid(){throw new wo}}let ku=null;class Nc extends ta{static get instance(){return ku===null&&(ku=new Nc),ku}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Mm(e,n,r)}formatOffset(e,n){return Jl(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ic={};function FT(t){return ic[t]||(ic[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),ic[t]}const BT={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function HT(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,c,d,f,p,C,x,T]=r;return[f,c,d,p,C,x,T]}function WT(t,e){const n=t.formatToParts(e),r=[];for(let c=0;c<n.length;c++){const{type:d,value:f}=n[c],p=BT[d];d==="era"?r[p]=f:kt(p)||(r[p]=parseInt(f,10))}return r}let Za={};class ro extends ta{static create(e){return Za[e]||(Za[e]=new ro(e)),Za[e]}static resetCache(){Za={},ic={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ro.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Mm(e,n,r,this.name)}formatOffset(e,n){return Jl(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=FT(this.name);let[c,d,f,p,C,x,T]=r.formatToParts?WT(r,n):HT(r,n);p==="BC"&&(c=-Math.abs(c)+1);const M=Tc({year:c,month:d,day:f,hour:C===24?0:C,minute:x,second:T,millisecond:0});let A=+n;const v=A%1e3;return A-=v>=0?v:1e3+v,(M-A)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let xg={};function KT(t,e={}){const n=JSON.stringify([t,e]);let r=xg[n];return r||(r=new Intl.ListFormat(t,e),xg[n]=r),r}let Qu={};function ed(t,e={}){const n=JSON.stringify([t,e]);let r=Qu[n];return r||(r=new Intl.DateTimeFormat(t,e),Qu[n]=r),r}let td={};function UT(t,e={}){const n=JSON.stringify([t,e]);let r=td[n];return r||(r=new Intl.NumberFormat(t,e),td[n]=r),r}let nd={};function zT(t,e={}){const{base:n,...r}=e,c=JSON.stringify([t,r]);let d=nd[c];return d||(d=new Intl.RelativeTimeFormat(t,e),nd[c]=d),d}let jl=null;function GT(){return jl||(jl=new Intl.DateTimeFormat().resolvedOptions().locale,jl)}let vg={};function YT(t){let e=vg[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,vg[t]=e}return e}function VT(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,c;try{r=ed(t).resolvedOptions(),c=t}catch{const C=t.substring(0,n);r=ed(C).resolvedOptions(),c=C}const{numberingSystem:d,calendar:f}=r;return[c,d,f]}}function jT(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function qT(t){const e=[];for(let n=1;n<=12;n++){const r=Dt.utc(2009,n,1);e.push(t(r))}return e}function ZT(t){const e=[];for(let n=1;n<=7;n++){const r=Dt.utc(2016,11,13+n);e.push(t(r))}return e}function Ja(t,e,n,r){const c=t.listingMode();return c==="error"?null:c==="en"?n(e):r(e)}function JT(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class XT{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:c,floor:d,...f}=r;if(!n||Object.keys(f).length>0){const p={useGrouping:!1,...r};r.padTo>0&&(p.minimumIntegerDigits=r.padTo),this.inf=UT(e,p)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Ad(e,3);return Fn(n,this.padTo)}}}class QT{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let c;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const f=-1*(e.offset/60),p=f>=0?`Etc/GMT+${f}`:`Etc/GMT${f}`;e.offset!==0&&ro.create(p).valid?(c=p,this.dt=e):(c="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,c=e.zone.name):(c="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const d={...this.opts};d.timeZone=d.timeZone||c,this.dtf=ed(n,d)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ex{constructor(e,n,r){this.opts={style:"long",...r},!n&&bm()&&(this.rtf=zT(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):Nx(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const tx={firstDay:1,minimalDays:4,weekend:[6,7]};class en{static fromOpts(e){return en.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,c,d=!1){const f=e||kn.defaultLocale,p=f||(d?"en-US":GT()),C=n||kn.defaultNumberingSystem,x=r||kn.defaultOutputCalendar,T=rd(c)||kn.defaultWeekSettings;return new en(p,C,x,T,f)}static resetCache(){jl=null,Qu={},td={},nd={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:c}={}){return en.create(e,n,r,c)}constructor(e,n,r,c,d){const[f,p,C]=VT(e);this.locale=f,this.numberingSystem=n||p||null,this.outputCalendar=r||C||null,this.weekSettings=c,this.intl=jT(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=d,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=JT(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:en.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,rd(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return Ja(this,e,Lm,()=>{const r=n?{month:e,day:"numeric"}:{month:e},c=n?"format":"standalone";return this.monthsCache[c][e]||(this.monthsCache[c][e]=qT(d=>this.extract(d,r,"month"))),this.monthsCache[c][e]})}weekdays(e,n=!1){return Ja(this,e,$m,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},c=n?"format":"standalone";return this.weekdaysCache[c][e]||(this.weekdaysCache[c][e]=ZT(d=>this.extract(d,r,"weekday"))),this.weekdaysCache[c][e]})}meridiems(){return Ja(this,void 0,()=>Fm,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Dt.utc(2016,11,13,9),Dt.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Ja(this,e,Bm,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[Dt.utc(-40,1,1),Dt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const c=this.dtFormatter(e,n),d=c.formatToParts(),f=d.find(p=>p.type.toLowerCase()===r);return f?f.value:null}numberFormatter(e={}){return new XT(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new QT(e,this.intl,n)}relFormatter(e={}){return new ex(this.intl,this.isEnglish(),e)}listFormatter(e={}){return KT(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Rm()?YT(this.locale):tx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let Lu=null;class dr extends ta{static get utcInstance(){return Lu===null&&(Lu=new dr(0)),Lu}static instance(e){return e===0?dr.utcInstance:new dr(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new dr(xc(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Jl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Jl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Jl(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class nx extends ta{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function bo(t,e){if(kt(t)||t===null)return e;if(t instanceof ta)return t;if(ox(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?Nc.instance:n==="utc"||n==="gmt"?dr.utcInstance:dr.parseSpecifier(n)||ro.create(t)}else return fs(t)?dr.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new nx(t)}let Sg=()=>Date.now(),wg="system",Og=null,Dg=null,bg=null,Rg=60,Mg,Ag=null;class kn{static get now(){return Sg}static set now(e){Sg=e}static set defaultZone(e){wg=e}static get defaultZone(){return bo(wg,Nc.instance)}static get defaultLocale(){return Og}static set defaultLocale(e){Og=e}static get defaultNumberingSystem(){return Dg}static set defaultNumberingSystem(e){Dg=e}static get defaultOutputCalendar(){return bg}static set defaultOutputCalendar(e){bg=e}static get defaultWeekSettings(){return Ag}static set defaultWeekSettings(e){Ag=rd(e)}static get twoDigitCutoffYear(){return Rg}static set twoDigitCutoffYear(e){Rg=e%100}static get throwOnInvalid(){return Mg}static set throwOnInvalid(e){Mg=e}static resetCaches(){en.resetCache(),ro.resetCache()}}class pi{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const xm=[0,31,59,90,120,151,181,212,243,273,304,334],vm=[0,31,60,91,121,152,182,213,244,274,305,335];function qr(t,e){return new pi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function bd(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const c=r.getUTCDay();return c===0?7:c}function Sm(t,e,n){return n+(na(t)?vm:xm)[e-1]}function wm(t,e){const n=na(t)?vm:xm,r=n.findIndex(d=>d<e),c=e-n[r];return{month:r+1,day:c}}function Rd(t,e){return(t-e+7)%7+1}function uc(t,e=4,n=1){const{year:r,month:c,day:d}=t,f=Sm(r,c,d),p=Rd(bd(r,c,d),n);let C=Math.floor((f-p+14-e)/7),x;return C<1?(x=r-1,C=ea(x,e,n)):C>ea(r,e,n)?(x=r+1,C=1):x=r,{weekYear:x,weekNumber:C,weekday:p,...vc(t)}}function kg(t,e=4,n=1){const{weekYear:r,weekNumber:c,weekday:d}=t,f=Rd(bd(r,1,e),n),p=Js(r);let C=c*7+d-f-7+e,x;C<1?(x=r-1,C+=Js(x)):C>p?(x=r+1,C-=Js(r)):x=r;const{month:T,day:O}=wm(x,C);return{year:x,month:T,day:O,...vc(t)}}function Iu(t){const{year:e,month:n,day:r}=t,c=Sm(e,n,r);return{year:e,ordinal:c,...vc(t)}}function Lg(t){const{year:e,ordinal:n}=t,{month:r,day:c}=wm(e,n);return{year:e,month:r,day:c,...vc(t)}}function Ig(t,e){if(!kt(t.localWeekday)||!kt(t.localWeekNumber)||!kt(t.localWeekYear)){if(!kt(t.weekday)||!kt(t.weekNumber)||!kt(t.weekYear))throw new Zs("Cannot mix locale-based week fields with ISO-based week fields");return kt(t.localWeekday)||(t.weekday=t.localWeekday),kt(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),kt(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function rx(t,e=4,n=1){const r=Ec(t.weekYear),c=Zr(t.weekNumber,1,ea(t.weekYear,e,n)),d=Zr(t.weekday,1,7);return r?c?d?!1:qr("weekday",t.weekday):qr("week",t.weekNumber):qr("weekYear",t.weekYear)}function ix(t){const e=Ec(t.year),n=Zr(t.ordinal,1,Js(t.year));return e?n?!1:qr("ordinal",t.ordinal):qr("year",t.year)}function Om(t){const e=Ec(t.year),n=Zr(t.month,1,12),r=Zr(t.day,1,dc(t.year,t.month));return e?n?r?!1:qr("day",t.day):qr("month",t.month):qr("year",t.year)}function Dm(t){const{hour:e,minute:n,second:r,millisecond:c}=t,d=Zr(e,0,23)||e===24&&n===0&&r===0&&c===0,f=Zr(n,0,59),p=Zr(r,0,59),C=Zr(c,0,999);return d?f?p?C?!1:qr("millisecond",c):qr("second",r):qr("minute",n):qr("hour",e)}function kt(t){return typeof t>"u"}function fs(t){return typeof t=="number"}function Ec(t){return typeof t=="number"&&t%1===0}function ox(t){return typeof t=="string"}function sx(t){return Object.prototype.toString.call(t)==="[object Date]"}function bm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Rm(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function lx(t){return Array.isArray(t)?t:[t]}function Pg(t,e,n){if(t.length!==0)return t.reduce((r,c)=>{const d=[e(c),c];return r&&n(r[0],d[0])===r[0]?r:d},null)[1]}function ax(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function el(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function rd(t){if(t==null)return null;if(typeof t!="object")throw new vr("Week settings must be an object");if(!Zr(t.firstDay,1,7)||!Zr(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Zr(e,1,7)))throw new vr("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Zr(t,e,n){return Ec(t)&&t>=e&&t<=n}function cx(t,e){return t-e*Math.floor(t/e)}function Fn(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Do(t){if(!(kt(t)||t===null||t===""))return parseInt(t,10)}function ss(t){if(!(kt(t)||t===null||t===""))return parseFloat(t)}function Md(t){if(!(kt(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Ad(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function na(t){return t%4===0&&(t%100!==0||t%400===0)}function Js(t){return na(t)?366:365}function dc(t,e){const n=cx(e-1,12)+1,r=t+(e-n)/12;return n===2?na(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Tc(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function $g(t,e,n){return-Rd(bd(t,1,e),n)+e-1}function ea(t,e=4,n=1){const r=$g(t,e,n),c=$g(t+1,e,n);return(Js(t)-r+c)/7}function id(t){return t>99?t:t>kn.twoDigitCutoffYear?1900+t:2e3+t}function Mm(t,e,n,r=null){const c=new Date(t),d={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(d.timeZone=r);const f={timeZoneName:e,...d},p=new Intl.DateTimeFormat(n,f).formatToParts(c).find(C=>C.type.toLowerCase()==="timezonename");return p?p.value:null}function xc(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,c=n<0||Object.is(n,-0)?-r:r;return n*60+c}function Am(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new vr(`Invalid unit value ${t}`);return e}function fc(t,e){const n={};for(const r in t)if(el(t,r)){const c=t[r];if(c==null)continue;n[e(r)]=Am(c)}return n}function Jl(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),c=t>=0?"+":"-";switch(e){case"short":return`${c}${Fn(n,2)}:${Fn(r,2)}`;case"narrow":return`${c}${n}${r>0?`:${r}`:""}`;case"techie":return`${c}${Fn(n,2)}${Fn(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function vc(t){return ax(t,["hour","minute","second","millisecond"])}const ux=["January","February","March","April","May","June","July","August","September","October","November","December"],km=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dx=["J","F","M","A","M","J","J","A","S","O","N","D"];function Lm(t){switch(t){case"narrow":return[...dx];case"short":return[...km];case"long":return[...ux];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Im=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],fx=["M","T","W","T","F","S","S"];function $m(t){switch(t){case"narrow":return[...fx];case"short":return[...Pm];case"long":return[...Im];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Fm=["AM","PM"],hx=["Before Christ","Anno Domini"],gx=["BC","AD"],px=["B","A"];function Bm(t){switch(t){case"narrow":return[...px];case"short":return[...gx];case"long":return[...hx];default:return null}}function mx(t){return Fm[t.hour<12?0:1]}function _x(t,e){return $m(e)[t.weekday-1]}function yx(t,e){return Lm(e)[t.month-1]}function Cx(t,e){return Bm(e)[t.year<0?0:1]}function Nx(t,e,n="always",r=!1){const c={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},d=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&d){const O=t==="days";switch(e){case 1:return O?"tomorrow":`next ${c[t][0]}`;case-1:return O?"yesterday":`last ${c[t][0]}`;case 0:return O?"today":`this ${c[t][0]}`}}const f=Object.is(e,-0)||e<0,p=Math.abs(e),C=p===1,x=c[t],T=r?C?x[1]:x[2]||x[1]:C?c[t][0]:t;return f?`${p} ${T} ago`:`in ${p} ${T}`}function Fg(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const Ex={D:cc,DD:im,DDD:om,DDDD:sm,t:lm,tt:am,ttt:cm,tttt:um,T:dm,TT:fm,TTT:hm,TTTT:gm,f:pm,ff:_m,fff:Cm,ffff:Em,F:mm,FF:ym,FFF:Nm,FFFF:Tm};class sr{static create(e,n={}){return new sr(e,n)}static parseFormat(e){let n=null,r="",c=!1;const d=[];for(let f=0;f<e.length;f++){const p=e.charAt(f);p==="'"?(r.length>0&&d.push({literal:c||/^\s+$/.test(r),val:r}),n=null,r="",c=!c):c||p===n?r+=p:(r.length>0&&d.push({literal:/^\s+$/.test(r),val:r}),r=p,n=p)}return r.length>0&&d.push({literal:c||/^\s+$/.test(r),val:r}),d}static macroTokenToFormatOpts(e){return Ex[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Fn(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",c=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",d=(A,v)=>this.loc.extract(e,A,v),f=A=>e.isOffsetFixed&&e.offset===0&&A.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,A.format):"",p=()=>r?mx(e):d({hour:"numeric",hourCycle:"h12"},"dayperiod"),C=(A,v)=>r?yx(e,A):d(v?{month:A}:{month:A,day:"numeric"},"month"),x=(A,v)=>r?_x(e,A):d(v?{weekday:A}:{weekday:A,month:"long",day:"numeric"},"weekday"),T=A=>{const v=sr.macroTokenToFormatOpts(A);return v?this.formatWithSystemDefault(e,v):A},O=A=>r?Cx(e,A):d({era:A},"era"),M=A=>{switch(A){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return f({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return f({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return f({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return p();case"d":return c?d({day:"numeric"},"day"):this.num(e.day);case"dd":return c?d({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return x("short",!0);case"cccc":return x("long",!0);case"ccccc":return x("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return x("short",!1);case"EEEE":return x("long",!1);case"EEEEE":return x("narrow",!1);case"L":return c?d({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return c?d({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return C("short",!0);case"LLLL":return C("long",!0);case"LLLLL":return C("narrow",!0);case"M":return c?d({month:"numeric"},"month"):this.num(e.month);case"MM":return c?d({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return C("short",!1);case"MMMM":return C("long",!1);case"MMMMM":return C("narrow",!1);case"y":return c?d({year:"numeric"},"year"):this.num(e.year);case"yy":return c?d({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return c?d({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return c?d({year:"numeric"},"year"):this.num(e.year,6);case"G":return O("short");case"GG":return O("long");case"GGGGG":return O("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return T(A)}};return Fg(sr.parseFormat(n),M)}formatDurationFromString(e,n){const r=C=>{switch(C[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},c=C=>x=>{const T=r(x);return T?this.num(C.get(T),x.length):x},d=sr.parseFormat(n),f=d.reduce((C,{literal:x,val:T})=>x?C:C.concat(T),[]),p=e.shiftTo(...f.map(r).filter(C=>C));return Fg(d,c(p))}}const Hm=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ll(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function al(...t){return e=>t.reduce(([n,r,c],d)=>{const[f,p,C]=d(e,c);return[{...n,...f},p||r,C]},[{},null,1]).slice(0,2)}function cl(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const c=n.exec(t);if(c)return r(c)}return[null,null]}function Wm(...t){return(e,n)=>{const r={};let c;for(c=0;c<t.length;c++)r[t[c]]=Do(e[n+c]);return[r,null,n+c]}}const Km=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Tx=`(?:${Km.source}?(?:\\[(${Hm.source})\\])?)?`,kd=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Um=RegExp(`${kd.source}${Tx}`),Ld=RegExp(`(?:T${Um.source})?`),xx=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,vx=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Sx=/(\d{4})-?(\d{3})/,wx=Wm("weekYear","weekNumber","weekDay"),Ox=Wm("year","ordinal"),Dx=/(\d{4})-(\d\d)-(\d\d)/,zm=RegExp(`${kd.source} ?(?:${Km.source}|(${Hm.source}))?`),bx=RegExp(`(?: ${zm.source})?`);function Xs(t,e,n){const r=t[e];return kt(r)?n:Do(r)}function Rx(t,e){return[{year:Xs(t,e),month:Xs(t,e+1,1),day:Xs(t,e+2,1)},null,e+3]}function ul(t,e){return[{hours:Xs(t,e,0),minutes:Xs(t,e+1,0),seconds:Xs(t,e+2,0),milliseconds:Md(t[e+3])},null,e+4]}function ra(t,e){const n=!t[e]&&!t[e+1],r=xc(t[e+1],t[e+2]),c=n?null:dr.instance(r);return[{},c,e+3]}function ia(t,e){const n=t[e]?ro.create(t[e]):null;return[{},n,e+1]}const Mx=RegExp(`^T?${kd.source}$`),Ax=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function kx(t){const[e,n,r,c,d,f,p,C,x]=t,T=e[0]==="-",O=C&&C[0]==="-",M=(A,v=!1)=>A!==void 0&&(v||A&&T)?-A:A;return[{years:M(ss(n)),months:M(ss(r)),weeks:M(ss(c)),days:M(ss(d)),hours:M(ss(f)),minutes:M(ss(p)),seconds:M(ss(C),C==="-0"),milliseconds:M(Md(x),O)}]}const Lx={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Id(t,e,n,r,c,d,f){const p={year:e.length===2?id(Do(e)):Do(e),month:km.indexOf(n)+1,day:Do(r),hour:Do(c),minute:Do(d)};return f&&(p.second=Do(f)),t&&(p.weekday=t.length>3?Im.indexOf(t)+1:Pm.indexOf(t)+1),p}const Ix=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Px(t){const[,e,n,r,c,d,f,p,C,x,T,O]=t,M=Id(e,c,r,n,d,f,p);let A;return C?A=Lx[C]:x?A=0:A=xc(T,O),[M,new dr(A)]}function $x(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Fx=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Bx=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Hx=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Bg(t){const[,e,n,r,c,d,f,p]=t;return[Id(e,c,r,n,d,f,p),dr.utcInstance]}function Wx(t){const[,e,n,r,c,d,f,p]=t;return[Id(e,p,n,r,c,d,f),dr.utcInstance]}const Kx=ll(xx,Ld),Ux=ll(vx,Ld),zx=ll(Sx,Ld),Gx=ll(Um),Gm=al(Rx,ul,ra,ia),Yx=al(wx,ul,ra,ia),Vx=al(Ox,ul,ra,ia),jx=al(ul,ra,ia);function qx(t){return cl(t,[Kx,Gm],[Ux,Yx],[zx,Vx],[Gx,jx])}function Zx(t){return cl($x(t),[Ix,Px])}function Jx(t){return cl(t,[Fx,Bg],[Bx,Bg],[Hx,Wx])}function Xx(t){return cl(t,[Ax,kx])}const Qx=al(ul);function ev(t){return cl(t,[Mx,Qx])}const tv=ll(Dx,bx),nv=ll(zm),rv=al(ul,ra,ia);function iv(t){return cl(t,[tv,Gm],[nv,rv])}const Hg="Invalid Duration",Ym={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},ov={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Ym},Vr=146097/400,Vs=146097/4800,sv={years:{quarters:4,months:12,weeks:Vr/7,days:Vr,hours:Vr*24,minutes:Vr*24*60,seconds:Vr*24*60*60,milliseconds:Vr*24*60*60*1e3},quarters:{months:3,weeks:Vr/28,days:Vr/4,hours:Vr*24/4,minutes:Vr*24*60/4,seconds:Vr*24*60*60/4,milliseconds:Vr*24*60*60*1e3/4},months:{weeks:Vs/7,days:Vs,hours:Vs*24,minutes:Vs*24*60,seconds:Vs*24*60*60,milliseconds:Vs*24*60*60*1e3},...Ym},ds=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],lv=ds.slice(0).reverse();function Oo(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Vt(r)}function Vm(t,e){let n=e.milliseconds??0;for(const r of lv.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function Wg(t,e){const n=Vm(t,e)<0?-1:1;ds.reduceRight((r,c)=>{if(kt(e[c]))return r;if(r){const d=e[r]*n,f=t[c][r],p=Math.floor(d/f);e[c]+=p*n,e[r]-=p*f*n}return c},null),ds.reduce((r,c)=>{if(kt(e[c]))return r;if(r){const d=e[r]%1;e[r]-=d,e[c]+=d*t[r][c]}return c},null)}function av(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class Vt{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?sv:ov;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||en.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return Vt.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new vr(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Vt({values:fc(e,Vt.normalizeUnit),loc:en.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(fs(e))return Vt.fromMillis(e);if(Vt.isDuration(e))return e;if(typeof e=="object")return Vt.fromObject(e);throw new vr(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=Xx(e);return r?Vt.fromObject(r,n):Vt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=ev(e);return r?Vt.fromObject(r,n):Vt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new vr("need to specify a reason the Duration is invalid");const r=e instanceof pi?e:new pi(e,n);if(kn.throwOnInvalid)throw new IT(r);return new Vt({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new rm(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?sr.create(this.loc,r).formatDurationFromString(this,e):Hg}toHuman(e={}){if(!this.isValid)return Hg;const n=ds.map(r=>{const c=this.values[r];return kt(c)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(c)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Ad(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Dt.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Vm(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Vt.fromDurationLike(e),r={};for(const c of ds)(el(n.values,c)||el(this.values,c))&&(r[c]=n.get(c)+this.get(c));return Oo(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=Vt.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Am(e(this.values[r],r));return Oo(this,{values:n},!0)}get(e){return this[Vt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...fc(e,Vt.normalizeUnit)};return Oo(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:c}={}){const f={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:c,conversionAccuracy:r};return Oo(this,f)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Wg(this.matrix,e),Oo(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=av(this.normalize().shiftToAll().toObject());return Oo(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(f=>Vt.normalizeUnit(f));const n={},r={},c=this.toObject();let d;for(const f of ds)if(e.indexOf(f)>=0){d=f;let p=0;for(const x in r)p+=this.matrix[x][f]*r[x],r[x]=0;fs(c[f])&&(p+=c[f]);const C=Math.trunc(p);n[f]=C,r[f]=(p*1e3-C*1e3)/1e3}else fs(c[f])&&(r[f]=c[f]);for(const f in r)r[f]!==0&&(n[d]+=f===d?r[f]:r[f]/this.matrix[d][f]);return Wg(this.matrix,n),Oo(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Oo(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,c){return r===void 0||r===0?c===void 0||c===0:r===c}for(const r of ds)if(!n(this.values[r],e.values[r]))return!1;return!0}}const js="Invalid Interval";function cv(t,e){return!t||!t.isValid?wn.invalid("missing or invalid start"):!e||!e.isValid?wn.invalid("missing or invalid end"):e<t?wn.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class wn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new vr("need to specify a reason the Interval is invalid");const r=e instanceof pi?e:new pi(e,n);if(kn.throwOnInvalid)throw new LT(r);return new wn({invalid:r})}static fromDateTimes(e,n){const r=Yl(e),c=Yl(n),d=cv(r,c);return d??new wn({start:r,end:c})}static after(e,n){const r=Vt.fromDurationLike(n),c=Yl(e);return wn.fromDateTimes(c,c.plus(r))}static before(e,n){const r=Vt.fromDurationLike(n),c=Yl(e);return wn.fromDateTimes(c.minus(r),c)}static fromISO(e,n){const[r,c]=(e||"").split("/",2);if(r&&c){let d,f;try{d=Dt.fromISO(r,n),f=d.isValid}catch{f=!1}let p,C;try{p=Dt.fromISO(c,n),C=p.isValid}catch{C=!1}if(f&&C)return wn.fromDateTimes(d,p);if(f){const x=Vt.fromISO(c,n);if(x.isValid)return wn.after(d,x)}else if(C){const x=Vt.fromISO(r,n);if(x.isValid)return wn.before(p,x)}}return wn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let c;return n!=null&&n.useLocaleWeeks?c=this.end.reconfigure({locale:r.locale}):c=this.end,c=c.startOf(e,n),Math.floor(c.diff(r,e).get(e))+(c.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?wn.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Yl).filter(f=>this.contains(f)).sort((f,p)=>f.toMillis()-p.toMillis()),r=[];let{s:c}=this,d=0;for(;c<this.e;){const f=n[d]||this.e,p=+f>+this.e?this.e:f;r.push(wn.fromDateTimes(c,p)),c=p,d+=1}return r}splitBy(e){const n=Vt.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,c=1,d;const f=[];for(;r<this.e;){const p=this.start.plus(n.mapUnits(C=>C*c));d=+p>+this.e?this.e:p,f.push(wn.fromDateTimes(r,d)),r=d,c+=1}return f}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:wn.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return wn.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((c,d)=>c.s-d.s).reduce(([c,d],f)=>d?d.overlaps(f)||d.abutsStart(f)?[c,d.union(f)]:[c.concat([d]),f]:[c,f],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const c=[],d=e.map(C=>[{time:C.s,type:"s"},{time:C.e,type:"e"}]),f=Array.prototype.concat(...d),p=f.sort((C,x)=>C.time-x.time);for(const C of p)r+=C.type==="s"?1:-1,r===1?n=C.time:(n&&+n!=+C.time&&c.push(wn.fromDateTimes(n,C.time)),n=null);return wn.merge(c)}difference(...e){return wn.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:js}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=cc,n={}){return this.isValid?sr.create(this.s.loc.clone(n),e).formatInterval(this):js}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:js}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:js}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:js}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:js}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Vt.invalid(this.invalidReason)}mapEndpoints(e){return wn.fromDateTimes(e(this.s),e(this.e))}}class Xa{static hasDST(e=kn.defaultZone){const n=Dt.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return ro.isValidZone(e)}static normalizeZone(e){return bo(e,kn.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||en.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||en.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||en.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:c=null,outputCalendar:d="gregory"}={}){return(c||en.create(n,r,d)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:c=null,outputCalendar:d="gregory"}={}){return(c||en.create(n,r,d)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:c=null}={}){return(c||en.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:c=null}={}){return(c||en.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return en.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return en.create(n,null,"gregory").eras(e)}static features(){return{relative:bm(),localeWeek:Rm()}}}function Kg(t,e){const n=c=>c.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Vt.fromMillis(r).as("days"))}function uv(t,e,n){const r=[["years",(C,x)=>x.year-C.year],["quarters",(C,x)=>x.quarter-C.quarter+(x.year-C.year)*4],["months",(C,x)=>x.month-C.month+(x.year-C.year)*12],["weeks",(C,x)=>{const T=Kg(C,x);return(T-T%7)/7}],["days",Kg]],c={},d=t;let f,p;for(const[C,x]of r)n.indexOf(C)>=0&&(f=C,c[C]=x(t,e),p=d.plus(c),p>e?(c[C]--,t=d.plus(c),t>e&&(p=t,c[C]--,t=d.plus(c))):t=p);return[t,c,p,f]}function dv(t,e,n,r){let[c,d,f,p]=uv(t,e,n);const C=e-c,x=n.filter(O=>["hours","minutes","seconds","milliseconds"].indexOf(O)>=0);x.length===0&&(f<e&&(f=c.plus({[p]:1})),f!==c&&(d[p]=(d[p]||0)+C/(f-c)));const T=Vt.fromObject(d,r);return x.length>0?Vt.fromMillis(C,r).shiftTo(...x).plus(T):T}const Pd={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ug={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},fv=Pd.hanidec.replace(/[\[|\]]/g,"").split("");function hv(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(Pd.hanidec)!==-1)e+=fv.indexOf(t[n]);else for(const c in Ug){const[d,f]=Ug[c];r>=d&&r<=f&&(e+=r-d)}}return parseInt(e,10)}else return e}function hi({numberingSystem:t},e=""){return new RegExp(`${Pd[t||"latn"]}${e}`)}const gv="missing Intl.DateTimeFormat.formatToParts support";function Jt(t,e=n=>n){return{regex:t,deser:([n])=>e(hv(n))}}const pv=" ",jm=`[ ${pv}]`,qm=new RegExp(jm,"g");function mv(t){return t.replace(/\./g,"\\.?").replace(qm,jm)}function zg(t){return t.replace(/\./g,"").replace(qm," ").toLowerCase()}function gi(t,e){return t===null?null:{regex:RegExp(t.map(mv).join("|")),deser:([n])=>t.findIndex(r=>zg(n)===zg(r))+e}}function Gg(t,e){return{regex:t,deser:([,n,r])=>xc(n,r),groups:e}}function Qa(t){return{regex:t,deser:([e])=>e}}function _v(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function yv(t,e){const n=hi(e),r=hi(e,"{2}"),c=hi(e,"{3}"),d=hi(e,"{4}"),f=hi(e,"{6}"),p=hi(e,"{1,2}"),C=hi(e,"{1,3}"),x=hi(e,"{1,6}"),T=hi(e,"{1,9}"),O=hi(e,"{2,4}"),M=hi(e,"{4,6}"),A=P=>({regex:RegExp(_v(P.val)),deser:([K])=>K,literal:!0}),w=(P=>{if(t.literal)return A(P);switch(P.val){case"G":return gi(e.eras("short"),0);case"GG":return gi(e.eras("long"),0);case"y":return Jt(x);case"yy":return Jt(O,id);case"yyyy":return Jt(d);case"yyyyy":return Jt(M);case"yyyyyy":return Jt(f);case"M":return Jt(p);case"MM":return Jt(r);case"MMM":return gi(e.months("short",!0),1);case"MMMM":return gi(e.months("long",!0),1);case"L":return Jt(p);case"LL":return Jt(r);case"LLL":return gi(e.months("short",!1),1);case"LLLL":return gi(e.months("long",!1),1);case"d":return Jt(p);case"dd":return Jt(r);case"o":return Jt(C);case"ooo":return Jt(c);case"HH":return Jt(r);case"H":return Jt(p);case"hh":return Jt(r);case"h":return Jt(p);case"mm":return Jt(r);case"m":return Jt(p);case"q":return Jt(p);case"qq":return Jt(r);case"s":return Jt(p);case"ss":return Jt(r);case"S":return Jt(C);case"SSS":return Jt(c);case"u":return Qa(T);case"uu":return Qa(p);case"uuu":return Jt(n);case"a":return gi(e.meridiems(),0);case"kkkk":return Jt(d);case"kk":return Jt(O,id);case"W":return Jt(p);case"WW":return Jt(r);case"E":case"c":return Jt(n);case"EEE":return gi(e.weekdays("short",!1),1);case"EEEE":return gi(e.weekdays("long",!1),1);case"ccc":return gi(e.weekdays("short",!0),1);case"cccc":return gi(e.weekdays("long",!0),1);case"Z":case"ZZ":return Gg(new RegExp(`([+-]${p.source})(?::(${r.source}))?`),2);case"ZZZ":return Gg(new RegExp(`([+-]${p.source})(${r.source})?`),2);case"z":return Qa(/[a-z_+-/]{1,256}?/i);case" ":return Qa(/[^\S\n\r]/);default:return A(P)}})(t)||{invalidReason:gv};return w.token=t,w}const Cv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Nv(t,e,n){const{type:r,value:c}=t;if(r==="literal"){const C=/^\s+$/.test(c);return{literal:!C,val:C?" ":c}}const d=e[r];let f=r;r==="hour"&&(e.hour12!=null?f=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?f="hour12":f="hour24":f=n.hour12?"hour12":"hour24");let p=Cv[f];if(typeof p=="object"&&(p=p[d]),p)return{literal:!1,val:p}}function Ev(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function Tv(t,e,n){const r=t.match(e);if(r){const c={};let d=1;for(const f in n)if(el(n,f)){const p=n[f],C=p.groups?p.groups+1:1;!p.literal&&p.token&&(c[p.token.val[0]]=p.deser(r.slice(d,d+C))),d+=C}return[r,c]}else return[r,{}]}function xv(t){const e=d=>{switch(d){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return kt(t.z)||(n=ro.create(t.z)),kt(t.Z)||(n||(n=new dr(t.Z)),r=t.Z),kt(t.q)||(t.M=(t.q-1)*3+1),kt(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),kt(t.u)||(t.S=Md(t.u)),[Object.keys(t).reduce((d,f)=>{const p=e(f);return p&&(d[p]=t[f]),d},{}),n,r]}let Pu=null;function vv(){return Pu||(Pu=Dt.fromMillis(1555555555555)),Pu}function Sv(t,e){if(t.literal)return t;const n=sr.macroTokenToFormatOpts(t.val),r=Xm(n,e);return r==null||r.includes(void 0)?t:r}function Zm(t,e){return Array.prototype.concat(...t.map(n=>Sv(n,e)))}function Jm(t,e,n){const r=Zm(sr.parseFormat(n),t),c=r.map(f=>yv(f,t)),d=c.find(f=>f.invalidReason);if(d)return{input:e,tokens:r,invalidReason:d.invalidReason};{const[f,p]=Ev(c),C=RegExp(f,"i"),[x,T]=Tv(e,C,p),[O,M,A]=T?xv(T):[null,null,void 0];if(el(T,"a")&&el(T,"H"))throw new Zs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:C,rawMatches:x,matches:T,result:O,zone:M,specificOffset:A}}}function wv(t,e,n){const{result:r,zone:c,specificOffset:d,invalidReason:f}=Jm(t,e,n);return[r,c,d,f]}function Xm(t,e){if(!t)return null;const r=sr.create(e,t).dtFormatter(vv()),c=r.formatToParts(),d=r.resolvedOptions();return c.map(f=>Nv(f,t,d))}const $u="Invalid DateTime",Yg=864e13;function ec(t){return new pi("unsupported zone",`the zone "${t.name}" is not supported`)}function Fu(t){return t.weekData===null&&(t.weekData=uc(t.c)),t.weekData}function Bu(t){return t.localWeekData===null&&(t.localWeekData=uc(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function ls(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Dt({...n,...e,old:n})}function Qm(t,e,n){let r=t-e*60*1e3;const c=n.offset(r);if(e===c)return[r,e];r-=(c-e)*60*1e3;const d=n.offset(r);return c===d?[r,c]:[t-Math.min(c,d)*60*1e3,Math.max(c,d)]}function tc(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function oc(t,e,n){return Qm(Tc(t),e,n)}function Vg(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),c=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,d={...t.c,year:r,month:c,day:Math.min(t.c.day,dc(r,c))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},f=Vt.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),p=Tc(d);let[C,x]=Qm(p,n,t.zone);return f!==0&&(C+=f,x=t.zone.offset(C)),{ts:C,o:x}}function Gl(t,e,n,r,c,d){const{setZone:f,zone:p}=n;if(t&&Object.keys(t).length!==0||e){const C=e||p,x=Dt.fromObject(t,{...n,zone:C,specificOffset:d});return f?x:x.setZone(p)}else return Dt.invalid(new pi("unparsable",`the input "${c}" can't be parsed as ${r}`))}function nc(t,e,n=!0){return t.isValid?sr.create(en.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Hu(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=Fn(t.c.year,n?6:4),e?(r+="-",r+=Fn(t.c.month),r+="-",r+=Fn(t.c.day)):(r+=Fn(t.c.month),r+=Fn(t.c.day)),r}function jg(t,e,n,r,c,d){let f=Fn(t.c.hour);return e?(f+=":",f+=Fn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(f+=":")):f+=Fn(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(f+=Fn(t.c.second),(t.c.millisecond!==0||!r)&&(f+=".",f+=Fn(t.c.millisecond,3))),c&&(t.isOffsetFixed&&t.offset===0&&!d?f+="Z":t.o<0?(f+="-",f+=Fn(Math.trunc(-t.o/60)),f+=":",f+=Fn(Math.trunc(-t.o%60))):(f+="+",f+=Fn(Math.trunc(t.o/60)),f+=":",f+=Fn(Math.trunc(t.o%60)))),d&&(f+="["+t.zone.ianaName+"]"),f}const e_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Ov={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Dv={ordinal:1,hour:0,minute:0,second:0,millisecond:0},t_=["year","month","day","hour","minute","second","millisecond"],bv=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Rv=["year","ordinal","hour","minute","second","millisecond"];function Mv(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new rm(t);return e}function qg(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Mv(t)}}function Zg(t,e){const n=bo(e.zone,kn.defaultZone),r=en.fromObject(e),c=kn.now();let d,f;if(kt(t.year))d=c;else{for(const x of t_)kt(t[x])&&(t[x]=e_[x]);const p=Om(t)||Dm(t);if(p)return Dt.invalid(p);const C=n.offset(c);[d,f]=oc(t,C,n)}return new Dt({ts:d,zone:n,loc:r,o:f})}function Jg(t,e,n){const r=kt(n.round)?!0:n.round,c=(f,p)=>(f=Ad(f,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(f,p)),d=f=>n.calendary?e.hasSame(t,f)?0:e.startOf(f).diff(t.startOf(f),f).get(f):e.diff(t,f).get(f);if(n.unit)return c(d(n.unit),n.unit);for(const f of n.units){const p=d(f);if(Math.abs(p)>=1)return c(p,f)}return c(t>e?-0:0,n.units[n.units.length-1])}function Xg(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class Dt{constructor(e){const n=e.zone||kn.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new pi("invalid input"):null)||(n.isValid?null:ec(n));this.ts=kt(e.ts)?kn.now():e.ts;let c=null,d=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[c,d]=[e.old.c,e.old.o];else{const p=n.offset(this.ts);c=tc(this.ts,p),r=Number.isNaN(c.year)?new pi("invalid input"):null,c=r?null:c,d=r?null:p}this._zone=n,this.loc=e.loc||en.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=c,this.o=d,this.isLuxonDateTime=!0}static now(){return new Dt({})}static local(){const[e,n]=Xg(arguments),[r,c,d,f,p,C,x]=n;return Zg({year:r,month:c,day:d,hour:f,minute:p,second:C,millisecond:x},e)}static utc(){const[e,n]=Xg(arguments),[r,c,d,f,p,C,x]=n;return e.zone=dr.utcInstance,Zg({year:r,month:c,day:d,hour:f,minute:p,second:C,millisecond:x},e)}static fromJSDate(e,n={}){const r=sx(e)?e.valueOf():NaN;if(Number.isNaN(r))return Dt.invalid("invalid input");const c=bo(n.zone,kn.defaultZone);return c.isValid?new Dt({ts:r,zone:c,loc:en.fromObject(n)}):Dt.invalid(ec(c))}static fromMillis(e,n={}){if(fs(e))return e<-Yg||e>Yg?Dt.invalid("Timestamp out of range"):new Dt({ts:e,zone:bo(n.zone,kn.defaultZone),loc:en.fromObject(n)});throw new vr(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(fs(e))return new Dt({ts:e*1e3,zone:bo(n.zone,kn.defaultZone),loc:en.fromObject(n)});throw new vr("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=bo(n.zone,kn.defaultZone);if(!r.isValid)return Dt.invalid(ec(r));const c=en.fromObject(n),d=fc(e,qg),{minDaysInFirstWeek:f,startOfWeek:p}=Ig(d,c),C=kn.now(),x=kt(n.specificOffset)?r.offset(C):n.specificOffset,T=!kt(d.ordinal),O=!kt(d.year),M=!kt(d.month)||!kt(d.day),A=O||M,v=d.weekYear||d.weekNumber;if((A||T)&&v)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(M&&T)throw new Zs("Can't mix ordinal dates with month/day");const w=v||d.weekday&&!A;let P,K,$=tc(C,x);w?(P=bv,K=Ov,$=uc($,f,p)):T?(P=Rv,K=Dv,$=Iu($)):(P=t_,K=e_);let W=!1;for(const G of P){const j=d[G];kt(j)?W?d[G]=K[G]:d[G]=$[G]:W=!0}const H=w?rx(d,f,p):T?ix(d):Om(d),z=H||Dm(d);if(z)return Dt.invalid(z);const te=w?kg(d,f,p):T?Lg(d):d,[re,ce]=oc(te,x,r),q=new Dt({ts:re,zone:r,o:ce,loc:c});return d.weekday&&A&&e.weekday!==q.weekday?Dt.invalid("mismatched weekday",`you can't specify both a weekday of ${d.weekday} and a date of ${q.toISO()}`):q}static fromISO(e,n={}){const[r,c]=qx(e);return Gl(r,c,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,c]=Zx(e);return Gl(r,c,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,c]=Jx(e);return Gl(r,c,n,"HTTP",n)}static fromFormat(e,n,r={}){if(kt(e)||kt(n))throw new vr("fromFormat requires an input string and a format");const{locale:c=null,numberingSystem:d=null}=r,f=en.fromOpts({locale:c,numberingSystem:d,defaultToEN:!0}),[p,C,x,T]=wv(f,e,n);return T?Dt.invalid(T):Gl(p,C,r,`format ${n}`,e,x)}static fromString(e,n,r={}){return Dt.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,c]=iv(e);return Gl(r,c,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new vr("need to specify a reason the DateTime is invalid");const r=e instanceof pi?e:new pi(e,n);if(kn.throwOnInvalid)throw new kT(r);return new Dt({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=Xm(e,en.fromObject(n));return r?r.map(c=>c?c.val:null).join(""):null}static expandFormat(e,n={}){return Zm(sr.parseFormat(e),en.fromObject(n)).map(c=>c.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Fu(this).weekYear:NaN}get weekNumber(){return this.isValid?Fu(this).weekNumber:NaN}get weekday(){return this.isValid?Fu(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Bu(this).weekday:NaN}get localWeekNumber(){return this.isValid?Bu(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Bu(this).weekYear:NaN}get ordinal(){return this.isValid?Iu(this.c).ordinal:NaN}get monthShort(){return this.isValid?Xa.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Xa.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Xa.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Xa.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=Tc(this.c),c=this.zone.offset(r-e),d=this.zone.offset(r+e),f=this.zone.offset(r-c*n),p=this.zone.offset(r-d*n);if(f===p)return[this];const C=r-f*n,x=r-p*n,T=tc(C,f),O=tc(x,p);return T.hour===O.hour&&T.minute===O.minute&&T.second===O.second&&T.millisecond===O.millisecond?[ls(this,{ts:C}),ls(this,{ts:x})]:[this]}get isInLeapYear(){return na(this.year)}get daysInMonth(){return dc(this.year,this.month)}get daysInYear(){return this.isValid?Js(this.year):NaN}get weeksInWeekYear(){return this.isValid?ea(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ea(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:c}=sr.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:c}}toUTC(e=0,n={}){return this.setZone(dr.instance(e),n)}toLocal(){return this.setZone(kn.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=bo(e,kn.defaultZone),e.equals(this.zone))return this;if(e.isValid){let c=this.ts;if(n||r){const d=e.offset(this.ts),f=this.toObject();[c]=oc(f,d,e)}return ls(this,{ts:c,zone:e})}else return Dt.invalid(ec(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const c=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return ls(this,{loc:c})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=fc(e,qg),{minDaysInFirstWeek:r,startOfWeek:c}=Ig(n,this.loc),d=!kt(n.weekYear)||!kt(n.weekNumber)||!kt(n.weekday),f=!kt(n.ordinal),p=!kt(n.year),C=!kt(n.month)||!kt(n.day),x=p||C,T=n.weekYear||n.weekNumber;if((x||f)&&T)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(C&&f)throw new Zs("Can't mix ordinal dates with month/day");let O;d?O=kg({...uc(this.c,r,c),...n},r,c):kt(n.ordinal)?(O={...this.toObject(),...n},kt(n.day)&&(O.day=Math.min(dc(O.year,O.month),O.day))):O=Lg({...Iu(this.c),...n});const[M,A]=oc(O,this.o,this.zone);return ls(this,{ts:M,o:A})}plus(e){if(!this.isValid)return this;const n=Vt.fromDurationLike(e);return ls(this,Vg(this,n))}minus(e){if(!this.isValid)return this;const n=Vt.fromDurationLike(e).negate();return ls(this,Vg(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},c=Vt.normalizeUnit(e);switch(c){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(c==="weeks")if(n){const d=this.loc.getStartOfWeek(),{weekday:f}=this;f<d&&(r.weekNumber=this.weekNumber-1),r.weekday=d}else r.weekday=1;if(c==="quarters"){const d=Math.ceil(this.month/3);r.month=(d-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?sr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):$u}toLocaleString(e=cc,n={}){return this.isValid?sr.create(this.loc.clone(n),e).formatDateTime(this):$u}toLocaleParts(e={}){return this.isValid?sr.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:c=!0,extendedZone:d=!1}={}){if(!this.isValid)return null;const f=e==="extended";let p=Hu(this,f);return p+="T",p+=jg(this,f,n,r,c,d),p}toISODate({format:e="extended"}={}){return this.isValid?Hu(this,e==="extended"):null}toISOWeekDate(){return nc(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:c=!1,extendedZone:d=!1,format:f="extended"}={}){return this.isValid?(c?"T":"")+jg(this,f==="extended",n,e,r,d):null}toRFC2822(){return nc(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return nc(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Hu(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let c="HH:mm:ss.SSS";return(n||e)&&(r&&(c+=" "),n?c+="z":e&&(c+="ZZ")),nc(this,c,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():$u}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Vt.invalid("created by diffing an invalid DateTime");const c={locale:this.locale,numberingSystem:this.numberingSystem,...r},d=lx(n).map(Vt.normalizeUnit),f=e.valueOf()>this.valueOf(),p=f?this:e,C=f?e:this,x=dv(p,C,d,c);return f?x.negate():x}diffNow(e="milliseconds",n={}){return this.diff(Dt.now(),e,n)}until(e){return this.isValid?wn.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const c=e.valueOf(),d=this.setZone(e.zone,{keepLocalTime:!0});return d.startOf(n,r)<=c&&c<=d.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||Dt.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let c=["years","months","days","hours","minutes","seconds"],d=e.unit;return Array.isArray(e.unit)&&(c=e.unit,d=void 0),Jg(n,this.plus(r),{...e,numeric:"always",units:c,unit:d})}toRelativeCalendar(e={}){return this.isValid?Jg(e.base||Dt.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Dt.isDateTime))throw new vr("min requires all arguments be DateTimes");return Pg(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(Dt.isDateTime))throw new vr("max requires all arguments be DateTimes");return Pg(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:c=null,numberingSystem:d=null}=r,f=en.fromOpts({locale:c,numberingSystem:d,defaultToEN:!0});return Jm(f,e,n)}static fromStringExplain(e,n,r={}){return Dt.fromFormatExplain(e,n,r)}static get DATE_SHORT(){return cc}static get DATE_MED(){return im}static get DATE_MED_WITH_WEEKDAY(){return PT}static get DATE_FULL(){return om}static get DATE_HUGE(){return sm}static get TIME_SIMPLE(){return lm}static get TIME_WITH_SECONDS(){return am}static get TIME_WITH_SHORT_OFFSET(){return cm}static get TIME_WITH_LONG_OFFSET(){return um}static get TIME_24_SIMPLE(){return dm}static get TIME_24_WITH_SECONDS(){return fm}static get TIME_24_WITH_SHORT_OFFSET(){return hm}static get TIME_24_WITH_LONG_OFFSET(){return gm}static get DATETIME_SHORT(){return pm}static get DATETIME_SHORT_WITH_SECONDS(){return mm}static get DATETIME_MED(){return _m}static get DATETIME_MED_WITH_SECONDS(){return ym}static get DATETIME_MED_WITH_WEEKDAY(){return $T}static get DATETIME_FULL(){return Cm}static get DATETIME_FULL_WITH_SECONDS(){return Nm}static get DATETIME_HUGE(){return Em}static get DATETIME_HUGE_WITH_SECONDS(){return Tm}}function Yl(t){if(Dt.isDateTime(t))return t;if(t&&t.valueOf&&fs(t.valueOf()))return Dt.fromJSDate(t);if(t&&typeof t=="object")return Dt.fromObject(t);throw new vr(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var Xt=(t=>(t.Monday="MONDAY",t.Tuesday="TUESDAY",t.Wednesday="WEDNESDAY",t.Thursday="THURSDAY",t.Friday="FRIDAY",t.Saturday="SATURDAY",t.Sunday="SUNDAY",t))(Xt||{});function $d(t){const e={1:Xt.Monday,2:Xt.Tuesday,3:Xt.Wednesday,4:Xt.Thursday,5:Xt.Friday,6:Xt.Saturday,7:Xt.Sunday};if(t.weekday in e)return e[t.weekday];throw new Error(`Invalid DateTime.weekday property: ${t}, ${t.weekday}`)}function Fi(t){return{[Xt.Monday]:"Monday",[Xt.Tuesday]:"Tuesday",[Xt.Wednesday]:"Wednesday",[Xt.Thursday]:"Thursday",[Xt.Friday]:"Friday",[Xt.Saturday]:"Saturday",[Xt.Sunday]:"Sunday"}[t]}class Qg{constructor(e,n,r){$n(this,"end");$n(this,"start");this.end=e.setZone(r),this.start=e.setZone(r),[n.start,n.end].forEach(C=>{if(C.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[c,d]=n.start.split(":"),[f,p]=n.end.split(":");this.end=this.end.set({hour:Number(f),minute:Number(p)}),this.start=this.start.set({hour:Number(c),minute:Number(d)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(e){return this.start<=e&&e<this.end}getStartTime(e,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(e||"en-US").toLocaleString(r)}getEndTime(e,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(e||"en-US").toLocaleString(r)}timeIsEqualTo(e){const n=this.getStartTime()===e.getStartTime(),r=this.getEndTime()===e.getEndTime();return n&&r}is24h(){const e=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return e&&n&&r}}class n_{constructor(e,n){$n(this,"holidayHoursByDate");$n(this,"hours");$n(this,"timezone");this.holidayHoursByDate=Object.fromEntries((e.holidayHours||[]).map(r=>[r.date,r])),this.hours=e,this.timezone=n}getInterval(e){if(this.isTemporarilyClosedAt(e))return null;let n=e;n=n.minus({days:1});for(const r of[n,e]){const c=this.getHours(r);if(c&&!c.isClosed)for(const d of c.openIntervals||[]){const f=new Qg(r,d,this.timezone);if(f.contains(e))return f}}return null}getCurrentInterval(){return this.getInterval(Dt.now())}getIntervalAfter(e){const n=this.getIntervalsForNDays(8,e),r=(d,f)=>d.start===f.start?0:d.start>f.start?1:-1,c=n.sort(r);for(const[d,f]of c.entries())if(f.contains(e)&&c.length>d+1)return c[d+1];for(const d of c)if(d.start>e)return d;return null}getIntervalsForNDays(e,n){const r=[];for(let c=0;c<e;c++){let d=n;d=d.plus({days:c});const f=this.getHours(d);f&&!f.isClosed&&r.push(...f.openIntervals.map(p=>new Qg(d,p,this.timezone)))}return r}getHolidayHours(e){return this.isTemporarilyClosedAt(e)?null:this.holidayHoursByDate[(e.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(e){if(this.isTemporarilyClosedAt(e))return null;const n=Fi($d(e)).toLowerCase();return this.hours[n]}getHours(e){const n=this.getHolidayHours(e);return!n||n.isRegularHours?this.getNormalHours(e):n}getNextInterval(){return this.getIntervalAfter(Dt.now())}isHoliday(e){return!!this.getHolidayHours(e)}isTemporarilyClosedAt(e){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,c,d]=n,f=Dt.fromObject({year:Number(r),month:Number(c),day:Number(d)},{zone:this.timezone});if(e<f)return!0}return!1}isOpenAt(e){return this.isTemporarilyClosedAt(e)?!1:!!this.getInterval(e)}isOpenNow(){return this.isOpenAt(Dt.now())}}function Av(t,e){const n=[...t];return e=e%n.length,n.concat(n.splice(0,n.length-e))}function kv(t,e){if(t.length!=e.length)return!1;for(const[n,r]of t.entries())if(!r.timeIsEqualTo(e[n]))return!1;return!0}function oa(t){var e,n;return((n=(e=t==null?void 0:t.currentInterval)==null?void 0:e.is24h)==null?void 0:n.call(e))||!1}function sa(t){return!t.futureInterval}function Lv(t){return oa(t)?at.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):sa(t)?at.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):at.jsx("span",{className:"HoursStatus-current",children:t.isOpen?"Open Now":"Closed"})}function Iv(t){return oa(t)||sa(t)?null:at.jsx("span",{className:"HoursStatus-separator",children:" • "})}function Pv(t){return oa(t)||sa(t)?null:at.jsx("span",{className:"HoursStatus-future",children:t.isOpen?"Closes at":"Opens at"})}function $v(t){if(oa(t)||sa(t))return null;let e="";if(t.isOpen){const n=t.currentInterval;e+=n?n.getEndTime("en-US",t.timeOptions):""}else{const n=t.futureInterval;e+=n?n.getStartTime("en-US",t.timeOptions):""}return at.jsxs("span",{className:"HoursStatus-time",children:[" ",e]})}function Fv(t){var r,c;if(oa(t)||sa(t))return null;const e={weekday:"long",...t.dayOptions??{}};let n="";if(t.isOpen){const d=t.currentInterval;n+=((r=d==null?void 0:d.end)==null?void 0:r.setLocale("en-US").toLocaleString(e))||""}else{const d=t.futureInterval;n+=((c=d==null?void 0:d.start)==null?void 0:c.setLocale("en-US").toLocaleString(e))||""}return at.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",n]})}function Bv(t,e){const n=t.currentTemplate||Lv,r=t.separatorTemplate||Iv,c=t.futureTemplate||Pv,d=t.timeTemplate||$v,f=t.dayOfWeekTemplate||Fv;return at.jsxs("div",{className:Qs("HoursStatus",(e==null?void 0:e.className)||""),children:[n(t),r(t),c(t),d(t),f(t)]})}const Hv=t=>{const[e,n]=rt.useState(!1),[r,c]=rt.useState(!1);rt.useEffect(()=>{c(!0)},[]);const d=t.statusTemplate||Bv,f=new n_(t.hours,t.timezone),p=f.isOpenNow(),C=f.getCurrentInterval(),x=f.getNextInterval(),T=(C==null?void 0:C.end)||(x==null?void 0:x.start);if(T&&!e){n(!0);const M=T.toMillis()-Dt.now().toMillis();setTimeout(()=>n(!1),M)}const O={isOpen:p,currentInterval:C,futureInterval:x,...t};return at.jsx(at.Fragment,{children:r&&d(O,t)})};function Wv(t,e){const n=[];return t.forEach(r=>{const c=n[n.length-1];c?kv(c.intervals,r.intervals)?(c.endDay=r.endDay,c.isToday=c.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const c=e&&Fi(r.startDay)in e?e[Fi(r.startDay)]||"":Fi(r.startDay),d=e&&Fi(r.endDay)in e?e[Fi(r.endDay)]||"":Fi(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${c}`:`${c} - ${d}`}})}function Kv(t,e){const n=[],r=t.intervals.length>0&&t.intervals[0].is24h();return t.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):t.intervals.forEach(c=>{const d=c.getStartTime("en-US",e),f=c.getEndTime("en-US",e);n.push(`${d} - ${f}`)}),n}function Uv(t,e,n){const r=[];for(let c=1;c<=7;c++){const d=Dt.fromObject({weekday:c}),f=$d(d);r.push({startDay:f,endDay:f,dayName:n&&Fi(f)in n?n[Fi(f)]||"":Fi(f),intervals:t.filter(p=>p.start.weekday===c),isToday:e.weekday===c})}return r}const zv=t=>{const[e,n]=rt.useState(!1);rt.useEffect(()=>{n(!0)},[]);const r=new n_(t.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),c=Dt.now(),d=r.getIntervalsForNDays(7,c);let f=Uv(d,c,t.dayOfWeekNames);function p(T){return T?{today:$d(c),monday:Xt.Monday,tuesday:Xt.Tuesday,wednesday:Xt.Wednesday,thursday:Xt.Thursday,friday:Xt.Friday,saturday:Xt.Saturday,sunday:Xt.Sunday}[T]:Xt.Sunday}let C=[Xt.Sunday,Xt.Monday,Xt.Tuesday,Xt.Wednesday,Xt.Thursday,Xt.Friday,Xt.Saturday];const x=C.indexOf(p(t.startOfWeek));return C=Av(C,7-x),f.sort((T,O)=>C.indexOf(T.startDay)-C.indexOf(O.startDay)),t.collapseDays&&(f=Wv(f,t.dayOfWeekNames)),at.jsx(at.Fragment,{children:e&&at.jsx("div",{className:Qs("HoursTable",t.className),children:f.map(T=>{const M=(t.intervalStringsBuilderFn||Kv)(T,t.timeOptions);return at.jsxs("div",{className:Qs("HoursTable-row",{"is-today":T.isToday}),children:[at.jsx("span",{className:"HoursTable-day",children:T.dayName}),at.jsx("span",{className:"HoursTable-intervals",children:M.map((A,v)=>at.jsx("span",{className:"HoursTable-interval",children:A},v))})]},T.dayName)})})})},od=Math.log2(1.6745627884839434),Gv=4,Yv=19,sd="js-baidu-neg-lng-fix";let r_;const Vv=new Promise(t=>r_=t),jv="https://api.map.baidu.com/geoconv/v1/";let Vl=[];const qv="gcj02ToBD09Callback_b872c21c";let Zv=0,ep;async function i_(t){return await new Promise((e,n)=>{Vl.push({coordinates:t,resolve:e,reject:n}),Vl.length===1&&(ep=setTimeout(r,100)),Vl.length>40&&(clearTimeout(ep),r());function r(){const c=Vl;Vl=[];const d=[].concat(...c.map(C=>C.coordinates)),f=qv+"_"+Zv++,p=document.createElement("script");window[f]=C=>{if(C.status){const O=new Error(`Unable to convert coordinates to BD-09: Received status code ${C.status}${C.message?": "+C.message:""}`);c.forEach(M=>M.reject(O))}const x=C.result.map(O=>new rn(O.y,O.x));let T=0;c.forEach(O=>{O.resolve(x.slice(T,T+=O.coordinates.length))}),delete window[f],p.parentNode.removeChild(p)},Vv.then(C=>{const x={ak:C,callback:f,coords:d.map(T=>`${T.longitude},${T.latitude}`).join(";"),from:3,to:5};p.src=jv+"?"+Object.entries(x).map(([T,O])=>T+"="+O).join("&"),document.head.appendChild(p)})}})}class Jv extends il{constructor(e){super(e);const n=!!(window.MSInputMethodContext&&document.documentMode);this._wrapper=e.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:e.controlEnabled,maxZoom:n?14:18,...e.providerOptions}),e.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper.dataset.baiduZoom=this.map.getZoom(),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new rn(this.map.getCenter())}getZoom(){return this.map.getZoom()-od}setCenter(e,n){this._centerReady=i_([e]).then(([r])=>{const c=new BMap.Point(r.longitude,r.latitude);this.map.panTo(c,{noAnimation:!n})})}setZoom(e,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(e+od)},{enableAnimation:n})})}}class Xv extends gc{constructor(e){super(e),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;const n=this;class r extends BMap.Marker{initialize(f){return n._wrapper=super.initialize(f),n._wrapper&&(n._wrapper.style.zIndex=n._zIndex,n._originalWrapperClass=n._wrapper.getAttribute("class"),n._wrapper.setAttribute("class",n._getClass()),n._wrapper.appendChild(n._element),n.addListeners()),n._wrapper}draw(){if(n._wrapper){const f=n._wrapper.style.zIndex;super.draw(),n._wrapper.style.height="",n._wrapper.style.width="",n._wrapper.style.pointerEvents="none",n._wrapper.style.zIndex=f}else super.draw()}}this.pin=new r(new BMap.Point(0,0));const c=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(c),this.pin.setShadow(c)}addListeners(){super.addListeners(),this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(e){this._coordinateReady=i_([e]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](sd)})}setMap(e,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),e&&e.getProviderMap().map.addOverlay(this.pin)})}setProperties(e){super.setProperties(e),this._wrapperClass=e.getClass(),this._element=e.getElement()||this._pinEl,this._zIndex=e.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?sd:""} ${this._wrapperClass}`}}const Qv="https://api.map.baidu.com/getscript";function eS(t,e,n,{params:r={},version:c="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const d=n,f={ak:d,v:c,...r};r_(d);const p=document.createElement("script");p.src=Qv+"?"+Object.entries(f).map(([T,O])=>T+"="+O).join("&"),p.onload=()=>t(),document.head.appendChild(p);let C="";for(let T=Gv;T<=Yv;T++){const O=2**(T-od+7);C+=`[data-baidu-zoom="${T}"] .${sd}{transform:translateX(-${O}px);}`}const x=document.createElement("style");x.appendChild(document.createTextNode(C)),document.head.appendChild(x)}const tS=new hs().withLoadFunction(eS).withMapClass(Jv).withPinClass(Xv).withProviderName("Baidu").build();let o_;function nS(){class t extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),this._container=document.createElement("div"),this._map=null,this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(n){this._pins.add(n),n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper),this._map&&this.updatePinPosition(n)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(n){this._pins.delete(n),this._container.removeChild(n._wrapper)}updatePinPosition(n){if(!this._map)return;const r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px"}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n))}}o_=t}class rS extends il{constructor(e){super(e),this.wrapper=e.wrapper,this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!e.controlEnabled,disableZooming:!e.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...e.providerOptions}),this.pinOverlay=new o_(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler())}getCenter(){return new rn(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,n){const r=new Microsoft.Maps.Location(e.latitude,e.longitude);this.map.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(e,n){this.map.setView({zoom:Math.floor(e)}),this.pinOverlay.updatePinPositions()}}class iS extends gc{static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(e){super(e),this._map=null,this._location=new Microsoft.Maps.Location(0,0)}setCoordinate(e){this._location=new Microsoft.Maps.Location(e.latitude,e.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(e,n){n&&n.getProviderMap().pinOverlay.removePin(this),e&&e.getProviderMap().pinOverlay.addPin(this),this._map=e}}const tp="BingMapsCallback_593d7d33",oS="https://www.bing.com/api/maps/mapcontrol";function sS(t,e,n,{params:r={}}={}){window[tp]=()=>{nS(),t()};const c={callback:tp,key:n,...r};fp(oS+"?"+Object.entries(c).map(([d,f])=>d+"="+f).join("&"))}const lS=new hs().withLoadFunction(sS).withMapClass(rS).withPinClass(iS).withProviderName("Bing").build();class aS extends il{constructor(e){if(super(e),this.map=new mapboxgl.Map({container:e.wrapper,interactive:e.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...e.providerOptions}),e.controlEnabled){const n=new mapboxgl.NavigationControl({showCompass:!1});this.map.addControl(n)}this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new rn(this.map.getCenter())}getZoom(){return this.map.getZoom()+1}setCenter(e,n){const r=new mapboxgl.LngLat(e.longitude,e.latitude);this.map[n?"panTo":"setCenter"](r)}setZoom(e,n){this.map[n?"zoomTo":"setZoom"](e-1)}setZoomCenter(e,n,r){const c=new mapboxgl.LngLat(n.longitude,n.latitude);this.map[r?"easeTo":"jumpTo"]({center:c,zoom:e-1})}}class cS extends gc{constructor(e){super(e),this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper})}setCoordinate(e){this.pin.setLngLat(new mapboxgl.LngLat(e.longitude,e.latitude))}setMap(e,n){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}}function uS(t,e,n,{version:r="v1.13.0"}={}){const c=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,d=document.createElement("link");d.rel="stylesheet",d.href=c+".css";const f=document.createElement("script");f.src=c+".js",f.onload=()=>{mapboxgl.accessToken=n,t()},document.head.appendChild(d),document.head.appendChild(f)}const dS=new hs().withLoadFunction(uS).withMapClass(aS).withPinClass(cS).withProviderName("Mapbox").build();let s_=class extends il{constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map.zoomControl.setPosition("topright"),this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new rn(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,n){const r=new L.latLng(e.latitude,e.longitude);this.map.panTo(r,{animate:n})}setZoom(e,n){this.map.setZoom(e,{animate:n})}setZoomCenter(e,n,r){const c=new L.latLng(n.latitude,n.longitude);this.map.setView(c,e,{animate:r})}_initMap(e){this.map=new L.map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});const n=e.providerOptions,r=n.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",c=n.tileLayerOptions||{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};c.accessToken=this.constructor.apiKey,L.tileLayer(r,c).addTo(this.map)}},fS=class extends dd{constructor(e){super(e),this.pin=new L.marker,this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(e){const n=new L.latLng(e.latitude,e.longitude);this.pin.setLatLng(n)}setMap(e,n){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}setProperties(e){const n=e.getWidth(),r=e.getHeight(),c=e.getAnchorX(),d=e.getAnchorY();this.pin.setIcon(new L.icon({iconUrl:this._icons[e.getIcon()],iconSize:[n,r],iconAnchor:[c*n,d*r],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}};function hS(t,e,n,{version:r="1.7.1"}={}){const c=`https://unpkg.com/leaflet@${r}/dist/leaflet`;s_.apiKey=n;const d=document.createElement("link");d.rel="stylesheet",d.href=c+".css";const f=document.createElement("script");f.src=c+".js",f.onload=()=>t(),document.head.appendChild(d),document.head.appendChild(f)}const Fd=new hs().withLoadFunction(hS).withMapClass(s_).withPinClass(fS).withProviderName("Leaflet").build(),gS=Fd.getMapClass(),pS=Fd.getPinClass();class mS extends gS{_initMap(e){this.map=L.mapquest.map(e.wrapper,{boxZoom:e.controlEnabled,center:new L.latLng(0,0),doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions})}}class _S extends pS{}function yS(t,e,n,{version:r="v1.3.2"}={}){const c=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,d=document.createElement("link");d.rel="stylesheet",d.href=c+".css";const f=document.createElement("script");f.src=c+".js",f.onload=()=>{L.mapquest.key=n,t()},document.head.appendChild(d),document.head.appendChild(f)}const CS=new hs().withLoadFunction(yS).withMapClass(mS).withPinClass(_S).withProviderName("MapQuest").build();exports.Address=X_;exports.Analytics=lp;exports.AnalyticsContext=cd;exports.AnalyticsProvider=Ry;exports.AnalyticsScopeProvider=Sy;exports.BaiduMaps=tS;exports.BingMaps=lS;exports.Clusterer=sC;exports.Day=Xt;exports.GoogleMaps=fd;exports.HoursStatus=Hv;exports.HoursTable=zv;exports.Image=Py;exports.ImageLayoutOption=Ro;exports.LeafletMaps=Fd;exports.LegacyRichText=AT;exports.LexicalRichText=UN;exports.Link=dp;exports.LinkTypes=zy;exports.ListingPublisherOption=np;exports.LocationMap=_p;exports.Map=gd;exports.MapProviderOption=Uu;exports.MapQuestMaps=CS;exports.MapboxMaps=dS;exports.Marker=mc;exports.asciiAlpha=eE;exports.asciiAlphanumeric=Xu;exports.asciiAtext=tE;exports.asciiControl=nE;exports.asciiDigit=rE;exports.asciiHexDigit=iE;exports.asciiPunctuation=oE;exports.c=Qs;exports.classifyCharacter=Ql;exports.combineExtensions=Kp;exports.createState=NT;exports.getDefaultExportFromCjs=hc;exports.getDirections=V_;exports.getRuntime=Mo;exports.jsxRuntimeExports=at;exports.markdownLineEnding=sE;exports.markdownLineEndingOrSpace=qp;exports.markdownSpace=lE;exports.normalizeUri=sl;exports.push=qs;exports.resolveAll=Zp;exports.splice=_c;exports.useAnalytics=rl;exports.useClusterContext=oC;exports.useIdentify=Dy;exports.useMapContext=rC;exports.usePageView=Oy;exports.useScope=ud;exports.useTrack=wy;exports.visit=Dd;