sykpcomposer 0.0.47 → 0.0.49
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.
- package/dist/index.es.js +699 -702
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(Ir,
|
|
1
|
+
(function(Ir,Be){typeof exports=="object"&&typeof module<"u"?Be(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Be):(Ir=typeof globalThis<"u"?globalThis:Ir||self,Be(Ir.ViteButton={},Ir.React,Ir.ReactDOM))})(this,function(Ir,Be,so){"use strict";var b2=Object.defineProperty;var v2=(Ir,Be,so)=>Be in Ir?b2(Ir,Be,{enumerable:!0,configurable:!0,writable:!0,value:so}):Ir[Be]=so;var _c=(Ir,Be,so)=>(v2(Ir,typeof Be!="symbol"?Be+"":Be,so),so);function oh(y){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(y){for(const g in y)if(g!=="default"){const t=Object.getOwnPropertyDescriptor(y,g);Object.defineProperty(d,g,t.get?t:{enumerable:!0,get:()=>y[g]})}}return d.default=y,Object.freeze(d)}const Yn=oh(Be),Tb=oh(so);var gd={exports:{}},Ga={};/*
|
|
2
2
|
object-assign
|
|
3
3
|
(c) Sindre Sorhus
|
|
4
4
|
@license MIT
|
|
5
|
-
*/var md,
|
|
5
|
+
*/var md,ih;function ah(){if(ih)return md;ih=1;var y=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;function t(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function f(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var n={},e=0;e<10;e++)n["_"+String.fromCharCode(e)]=e;var s=Object.getOwnPropertyNames(n).map(function(l){return n[l]});if(s.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(l){i[l]=l}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return md=f()?Object.assign:function(r,n){for(var e,s=t(r),i,l=1;l<arguments.length;l++){e=Object(arguments[l]);for(var o in e)d.call(e,o)&&(s[o]=e[o]);if(y){i=y(e);for(var a=0;a<i.length;a++)g.call(e,i[a])&&(s[i[a]]=e[i[a]])}}return s},md}/** @license React v17.0.2
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var
|
|
12
|
+
*/var sh;function jb(){if(sh)return Ga;sh=1,ah();var y=Be,d=60103;if(Ga.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var g=Symbol.for;d=g("react.element"),Ga.Fragment=g("react.fragment")}var t=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f=Object.prototype.hasOwnProperty,r={key:!0,ref:!0,__self:!0,__source:!0};function n(e,s,i){var l,o={},a=null,c=null;i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),s.ref!==void 0&&(c=s.ref);for(l in s)f.call(s,l)&&!r.hasOwnProperty(l)&&(o[l]=s[l]);if(e&&e.defaultProps)for(l in s=e.defaultProps,s)o[l]===void 0&&(o[l]=s[l]);return{$$typeof:d,type:e,key:a,ref:c,props:o,_owner:t.current}}return Ga.jsx=n,Ga.jsxs=n,Ga}var yd={};/** @license React v17.0.2
|
|
13
13
|
* react-jsx-runtime.development.js
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var
|
|
19
|
+
*/var lh;function Ab(){return lh||(lh=1,function(y){process.env.NODE_ENV!=="production"&&function(){var d=Be,g=ah(),t=60103,f=60106;y.Fragment=60107;var r=60108,n=60114,e=60109,s=60110,i=60112,l=60113,o=60120,a=60115,c=60116,u=60121,h=60122,p=60117,m=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var _=Symbol.for;t=_("react.element"),f=_("react.portal"),y.Fragment=_("react.fragment"),r=_("react.strict_mode"),n=_("react.profiler"),e=_("react.provider"),s=_("react.context"),i=_("react.forward_ref"),l=_("react.suspense"),o=_("react.suspense_list"),a=_("react.memo"),c=_("react.lazy"),u=_("react.block"),h=_("react.server.block"),p=_("react.fundamental"),_("react.scope"),_("react.opaque.id"),m=_("react.debug_trace_mode"),_("react.offscreen"),b=_("react.legacy_hidden")}var v=typeof Symbol=="function"&&Symbol.iterator,w="@@iterator";function x(Tt){if(Tt===null||typeof Tt!="object")return null;var ae=v&&Tt[v]||Tt[w];return typeof ae=="function"?ae:null}var S=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(Tt){{for(var ae=arguments.length,de=new Array(ae>1?ae-1:0),we=1;we<ae;we++)de[we-1]=arguments[we];k("error",Tt,de)}}function k(Tt,ae,de){{var we=S.ReactDebugCurrentFrame,Oe=we.getStackAddendum();Oe!==""&&(ae+="%s",de=de.concat([Oe]));var Rt=de.map(function(Ut){return""+Ut});Rt.unshift("Warning: "+ae),Function.prototype.apply.call(console[Tt],console,Rt)}}var D=!1;function N(Tt){return!!(typeof Tt=="string"||typeof Tt=="function"||Tt===y.Fragment||Tt===n||Tt===m||Tt===r||Tt===l||Tt===o||Tt===b||D||typeof Tt=="object"&&Tt!==null&&(Tt.$$typeof===c||Tt.$$typeof===a||Tt.$$typeof===e||Tt.$$typeof===s||Tt.$$typeof===i||Tt.$$typeof===p||Tt.$$typeof===u||Tt[0]===h))}function O(Tt,ae,de){var we=ae.displayName||ae.name||"";return Tt.displayName||(we!==""?de+"("+we+")":de)}function R(Tt){return Tt.displayName||"Context"}function A(Tt){if(Tt==null)return null;if(typeof Tt.tag=="number"&&E("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof Tt=="function")return Tt.displayName||Tt.name||null;if(typeof Tt=="string")return Tt;switch(Tt){case y.Fragment:return"Fragment";case f:return"Portal";case n:return"Profiler";case r:return"StrictMode";case l:return"Suspense";case o:return"SuspenseList"}if(typeof Tt=="object")switch(Tt.$$typeof){case s:var ae=Tt;return R(ae)+".Consumer";case e:var de=Tt;return R(de._context)+".Provider";case i:return O(Tt,Tt.render,"ForwardRef");case a:return A(Tt.type);case u:return A(Tt._render);case c:{var we=Tt,Oe=we._payload,Rt=we._init;try{return A(Rt(Oe))}catch{return null}}}return null}var z=0,H,$,M,J,K,P,U;function V(){}V.__reactDisabledLog=!0;function G(){{if(z===0){H=console.log,$=console.info,M=console.warn,J=console.error,K=console.group,P=console.groupCollapsed,U=console.groupEnd;var Tt={configurable:!0,enumerable:!0,value:V,writable:!0};Object.defineProperties(console,{info:Tt,log:Tt,warn:Tt,error:Tt,group:Tt,groupCollapsed:Tt,groupEnd:Tt})}z++}}function F(){{if(z--,z===0){var Tt={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},Tt,{value:H}),info:g({},Tt,{value:$}),warn:g({},Tt,{value:M}),error:g({},Tt,{value:J}),group:g({},Tt,{value:K}),groupCollapsed:g({},Tt,{value:P}),groupEnd:g({},Tt,{value:U})})}z<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=S.ReactCurrentDispatcher,T;function I(Tt,ae,de){{if(T===void 0)try{throw Error()}catch(Oe){var we=Oe.stack.trim().match(/\n( *(at )?)/);T=we&&we[1]||""}return`
|
|
20
20
|
`+T+Tt}}var L=!1,B;{var Y=typeof WeakMap=="function"?WeakMap:Map;B=new Y}function Z(Tt,ae){if(!Tt||L)return"";{var de=B.get(Tt);if(de!==void 0)return de}var we;L=!0;var Oe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Rt;Rt=q.current,q.current=null,G();try{if(ae){var Ut=function(){throw Error()};if(Object.defineProperty(Ut.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ut,[])}catch(Te){we=Te}Reflect.construct(Tt,[],Ut)}else{try{Ut.call()}catch(Te){we=Te}Tt.call(Ut.prototype)}}else{try{throw Error()}catch(Te){we=Te}Tt()}}catch(Te){if(Te&&we&&typeof Te.stack=="string"){for(var se=Te.stack.split(`
|
|
21
21
|
`),bt=we.stack.split(`
|
|
22
22
|
`),ft=se.length-1,xt=bt.length-1;ft>=1&&xt>=0&&se[ft]!==bt[xt];)xt--;for(;ft>=1&&xt>=0;ft--,xt--)if(se[ft]!==bt[xt]){if(ft!==1||xt!==1)do if(ft--,xt--,xt<0||se[ft]!==bt[xt]){var Bt=`
|
|
@@ -26,20 +26,20 @@ Check the render method of \``+Tt+"`."}return""}}function Qt(Tt){{if(Tt!==void 0
|
|
|
26
26
|
|
|
27
27
|
Check your code at `+ae+":"+de+"."}return""}}var ve={};function kt(Tt){{var ae=Xt();if(!ae){var de=typeof Tt=="string"?Tt:Tt.displayName||Tt.name;de&&(ae=`
|
|
28
28
|
|
|
29
|
-
Check the top-level render call using <`+de+">.")}return ae}}function ee(Tt,ae){{if(!Tt._store||Tt._store.validated||Tt.key!=null)return;Tt._store.validated=!0;var de=kt(ae);if(ve[de])return;ve[de]=!0;var we="";Tt&&Tt._owner&&Tt._owner!==Nt.current&&(we=" It was passed a child from "+A(Tt._owner.type)+"."),dt(Tt),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',de,we),dt(null)}}function pe(Tt,ae){{if(typeof Tt!="object")return;if(Array.isArray(Tt))for(var de=0;de<Tt.length;de++){var we=Tt[de];Jt(we)&&ee(we,ae)}else if(Jt(Tt))Tt._store&&(Tt._store.validated=!0);else if(Tt){var Oe=x(Tt);if(typeof Oe=="function"&&Oe!==Tt.entries)for(var Rt=Oe.call(Tt),Ut;!(Ut=Rt.next()).done;)Jt(Ut.value)&&ee(Ut.value,ae)}}}function Le(Tt){{var ae=Tt.type;if(ae==null||typeof ae=="string")return;var de;if(typeof ae=="function")de=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===i||ae.$$typeof===a))de=ae.propTypes;else return;if(de){var we=A(ae);ct(de,Tt.props,"prop",we,Tt)}else if(ae.PropTypes!==void 0&&!Ft){Ft=!0;var Oe=A(ae);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function
|
|
29
|
+
Check the top-level render call using <`+de+">.")}return ae}}function ee(Tt,ae){{if(!Tt._store||Tt._store.validated||Tt.key!=null)return;Tt._store.validated=!0;var de=kt(ae);if(ve[de])return;ve[de]=!0;var we="";Tt&&Tt._owner&&Tt._owner!==Nt.current&&(we=" It was passed a child from "+A(Tt._owner.type)+"."),dt(Tt),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',de,we),dt(null)}}function pe(Tt,ae){{if(typeof Tt!="object")return;if(Array.isArray(Tt))for(var de=0;de<Tt.length;de++){var we=Tt[de];Jt(we)&&ee(we,ae)}else if(Jt(Tt))Tt._store&&(Tt._store.validated=!0);else if(Tt){var Oe=x(Tt);if(typeof Oe=="function"&&Oe!==Tt.entries)for(var Rt=Oe.call(Tt),Ut;!(Ut=Rt.next()).done;)Jt(Ut.value)&&ee(Ut.value,ae)}}}function Le(Tt){{var ae=Tt.type;if(ae==null||typeof ae=="string")return;var de;if(typeof ae=="function")de=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===i||ae.$$typeof===a))de=ae.propTypes;else return;if(de){var we=A(ae);ct(de,Tt.props,"prop",we,Tt)}else if(ae.PropTypes!==void 0&&!Ft){Ft=!0;var Oe=A(ae);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Fe(Tt){{for(var ae=Object.keys(Tt.props),de=0;de<ae.length;de++){var we=ae[de];if(we!=="children"&&we!=="key"){dt(Tt),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",we),dt(null);break}}Tt.ref!==null&&(dt(Tt),E("Invalid attribute `ref` supplied to `React.Fragment`."),dt(null))}}function qe(Tt,ae,de,we,Oe,Rt){{var Ut=N(Tt);if(!Ut){var se="";(Tt===void 0||typeof Tt=="object"&&Tt!==null&&Object.keys(Tt).length===0)&&(se+=" 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 bt=Qt(Oe);bt?se+=bt:se+=Xt();var ft;Tt===null?ft="null":Array.isArray(Tt)?ft="array":Tt!==void 0&&Tt.$$typeof===t?(ft="<"+(A(Tt.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):ft=typeof Tt,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ft,se)}var xt=Ct(Tt,ae,de,Oe,Rt);if(xt==null)return xt;if(Ut){var Bt=ae.children;if(Bt!==void 0)if(we)if(Array.isArray(Bt)){for(var ce=0;ce<Bt.length;ce++)pe(Bt[ce],Tt);Object.freeze&&Object.freeze(Bt)}else E("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 pe(Bt,Tt)}return Tt===y.Fragment?Fe(xt):Le(xt),xt}}function ze(Tt,ae,de){return qe(Tt,ae,de,!0)}function Ie(Tt,ae,de){return qe(Tt,ae,de,!1)}var He=Ie,hn=ze;y.jsx=He,y.jsxs=hn}()}(yd)),yd}process.env.NODE_ENV==="production"?gd.exports=jb():gd.exports=Ab();var Se=gd.exports;function bd(y){return{}}const qo={},ch={},uh={},lo={},vi={},Ya={},_i={},ll={},xc={},sa={},xi={},Cr={},cl={},ul={},Nb={},wc={},Pb={},Sc={},Ib={},vd={},_d={},dl={},Rb={},fl={},Cc={},pl={},dh={},Mb={},Db={},fh={},xd={},Za={},wd={},ph={},Lb={},hl={},gl={},Ec={},Sd={},Bb={},Qa={},Xa={},hh={},Fb={},zb={},co=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Ub=co&&"documentMode"in document?document.documentMode:null,uo=co&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),wi=co&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),kc=!(!co||!("InputEvent"in window)||Ub)&&"getTargetRanges"in new window.InputEvent("input"),Cd=co&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Oc=co&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,$b=co&&/Android/.test(navigator.userAgent),gh=co&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Hb=co&&$b&&gh,Ed=co&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!gh,ml=1,Si=3,la=0,mh=1,ts=2,qb=0,Jb=1,Wb=2,Tc=4,jc=8,kd=128,Vb=112|(3|Tc|jc)|kd,Od=1,Td=2,jd=3,Ad=4,Nd=5,Pd=6,Ac=Cd||Oc||Ed?" ":"",Jo=`
|
|
30
30
|
|
|
31
|
-
`,Kb=wi?" ":Ac,bh="֑-߿יִ-﷽ﹰ-ﻼ",vh="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Gb=new RegExp("^[^"+vh+"]*["+bh+"]"),Yb=new RegExp("^[^"+bh+"]*["+vh+"]"),Wo={bold:1,code:16,highlight:kd,italic:2,strikethrough:Tc,subscript:32,superscript:64,underline:jc},Zb={directionless:1,unmergeable:2},_h={center:Td,end:Pd,justify:Ad,left:Od,right:jd,start:Nd},Qb={[Td]:"center",[Pd]:"end",[Ad]:"justify",[Od]:"left",[jd]:"right",[Nd]:"start"},Xb={normal:0,segmented:2,token:1},tv={[qb]:"normal",[Wb]:"segmented",[Jb]:"token"};function ev(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Je=ev(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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 Nc(...y){const d=[];for(const g of y)if(g&&typeof g=="string")for(const[t]of g.matchAll(/\S+/g))d.push(t);return d}const nv=100;let Id=!1,Rd=0;function rv(y){Rd=y.timeStamp}function Md(y,d,g){return d.__lexicalLineBreak===y||y[`__lexicalKey_${g._key}`]!==void 0}function ov(y,d,g){const t=So(g._window);let f=null,r=null;t!==null&&t.anchorNode===y&&(f=t.anchorOffset,r=t.focusOffset);const n=y.nodeValue;n!==null&&Ud(d,n,f,r,!1)}function iv(y,d,g){if(_e(y)){const t=y.anchor.getNode();if(t.is(g)&&y.format!==t.getFormat())return!1}return d.nodeType===Si&&g.isAttached()}function xh(y,d,g){Id=!0;const t=performance.now()-Rd>nv;try{Ur(y,()=>{const f=je()||function(a){return a.getEditorState().read(()=>{const c=je();return c!==null?c.clone():null})}(y),r=new Map,n=y.getRootElement(),e=y._editorState,s=y._blockCursorElement;let i=!1,l="";for(let a=0;a<d.length;a++){const c=d[a],u=c.type,h=c.target;let p=yr(h,e);if(!(p===null&&h!==n||On(p))){if(u==="characterData")t&&Pe(p)&&iv(f,h,p)&&ov(h,p,y);else if(u==="childList"){i=!0;const m=c.addedNodes;for(let v=0;v<m.length;v++){const w=m[v],x=Ah(w),S=w.parentNode;if(S!=null&&w!==s&&x===null&&(w.nodeName!=="BR"||!Md(w,S,y))){if(wi){const E=w.innerText||w.nodeValue;E&&(l+=E)}S.removeChild(w)}}const b=c.removedNodes,_=b.length;if(_>0){let v=0;for(let w=0;w<_;w++){const x=b[w];(x.nodeName==="BR"&&Md(x,h,y)||s===x)&&(h.appendChild(x),v++)}_!==v&&(h===n&&(p=Ih(e)),r.set(h,p))}}}}if(r.size>0)for(const[a,c]of r)if(he(c)){const u=c.getChildrenKeys();let h=a.firstChild;for(let p=0;p<u.length;p++){const m=u[p],b=y.getElementByKey(m);b!==null&&(h==null?(a.appendChild(b),h=b):h!==b&&a.replaceChild(b,h),h=h.nextSibling)}}else Pe(c)&&c.markDirty();const o=g.takeRecords();if(o.length>0){for(let a=0;a<o.length;a++){const c=o[a],u=c.addedNodes,h=c.target;for(let p=0;p<u.length;p++){const m=u[p],b=m.parentNode;b==null||m.nodeName!=="BR"||Md(m,h,y)||b.removeChild(m)}}g.takeRecords()}f!==null&&(i&&(f.dirty=!0,or(f)),wi&&Jh(y)&&f.insertRawText(l))})}finally{Id=!1}}function wh(y){const d=y._observer;d!==null&&xh(y,d.takeRecords(),d)}function Sh(y){(function(d){Rd===0&&Lc(d).addEventListener("textInput",rv,!0)})(y),y._observer=new MutationObserver((d,g)=>{xh(y,d,g)})}function Ch(y,d){const g=y.__mode,t=y.__format,f=y.__style,r=d.__mode,n=d.__format,e=d.__style;return!(g!==null&&g!==r||t!==null&&t!==n||f!==null&&f!==e)}function Eh(y,d){const g=y.mergeWithSibling(d),t=qn()._normalizedNodes;return t.add(y.__key),t.add(d.__key),g}function kh(y){let d,g,t=y;if(t.__text!==""||!t.isSimpleText()||t.isUnmergeable()){for(;(d=t.getPreviousSibling())!==null&&Pe(d)&&d.isSimpleText()&&!d.isUnmergeable();){if(d.__text!==""){if(Ch(d,t)){t=Eh(d,t);break}break}d.remove()}for(;(g=t.getNextSibling())!==null&&Pe(g)&&g.isSimpleText()&&!g.isUnmergeable();){if(g.__text!==""){if(Ch(t,g)){t=Eh(t,g);break}break}g.remove()}}else t.remove()}function Dd(y){return Oh(y.anchor),Oh(y.focus),y}function Oh(y){for(;y.type==="element";){const d=y.getNode(),g=y.offset;let t,f;if(g===d.getChildrenSize()?(t=d.getChildAtIndex(g-1),f=!0):(t=d.getChildAtIndex(g),f=!1),Pe(t)){y.set(t.__key,f?t.getTextContentSize():0,"text");break}if(!he(t))break;y.set(t.__key,f?t.getChildrenSize():0,"element")}}let av=1;const sv=typeof queueMicrotask=="function"?queueMicrotask:y=>{Promise.resolve().then(y)};function Ld(y){const d=document.activeElement;if(d===null)return!1;const g=d.nodeName;return On(yr(y))&&(g==="INPUT"||g==="TEXTAREA"||d.contentEditable==="true"&&d.__lexicalEditor==null)}function yl(y,d,g){const t=y.getRootElement();try{return t!==null&&t.contains(d)&&t.contains(g)&&d!==null&&!Ld(d)&&Th(d)===y}catch{return!1}}function Th(y){let d=y;for(;d!=null;){const g=d.__lexicalEditor;if(g!=null)return g;d=Dc(d)}return null}function es(y){return y.isToken()||y.isSegmented()}function lv(y){return y.nodeType===Si}function Pc(y){let d=y;for(;d!=null;){if(lv(d))return d;d=d.firstChild}return null}function Bd(y,d,g){const t=Wo[d];if(g!==null&&(y&t)==(g&t))return y;let f=y^t;return d==="subscript"?f&=~Wo.superscript:d==="superscript"&&(f&=~Wo.subscript),f}function jh(y,d){if(d!=null)return void(y.__key=d);Or(),Tg();const g=qn(),t=Co(),f=""+av++;t._nodeMap.set(f,y),he(y)?g._dirtyElements.set(f,!0):g._dirtyLeaves.add(f),g._cloneNotNeeded.add(f),g._dirtyType=yh,y.__key=f}function ca(y){const d=y.getParent();if(d!==null){const g=y.getWritable(),t=d.getWritable(),f=y.getPreviousSibling(),r=y.getNextSibling();if(f===null)if(r!==null){const n=r.getWritable();t.__first=r.__key,n.__prev=null}else t.__first=null;else{const n=f.getWritable();if(r!==null){const e=r.getWritable();e.__prev=n.__key,n.__next=e.__key}else n.__next=null;g.__prev=null}if(r===null)if(f!==null){const n=f.getWritable();t.__last=f.__key,n.__next=null}else t.__last=null;else{const n=r.getWritable();if(f!==null){const e=f.getWritable();e.__next=n.__key,n.__prev=e.__key}else n.__prev=null;g.__next=null}t.__size--,g.__parent=null}}function Ic(y){Tg();const d=y.getLatest(),g=d.__parent,t=Co(),f=qn(),r=t._nodeMap,n=f._dirtyElements;g!==null&&function(s,i,l){let o=s;for(;o!==null;){if(l.has(o))return;const a=i.get(o);if(a===void 0)break;l.set(o,!1),o=a.__parent}}(g,r,n);const e=d.__key;f._dirtyType=yh,he(y)?n.set(e,!0):f._dirtyLeaves.add(e)}function fr(y){Or();const d=qn(),g=d._compositionKey;if(y!==g){if(d._compositionKey=y,g!==null){const t=Hn(g);t!==null&&t.getWritable()}if(y!==null){const t=Hn(y);t!==null&&t.getWritable()}}}function Ci(){return ls()?null:qn()._compositionKey}function Hn(y,d){const g=(d||Co())._nodeMap.get(y);return g===void 0?null:g}function Ah(y,d){const g=y[`__lexicalKey_${qn()._key}`];return g!==void 0?Hn(g,d):null}function yr(y,d){let g=y;for(;g!=null;){const t=Ah(g,d);if(t!==null)return t;g=Dc(g)}return null}function Nh(y){const d=y._decorators,g=Object.assign({},d);return y._pendingDecorators=g,g}function Ph(y){return y.read(()=>Dn().getTextContent())}function Dn(){return Ih(Co())}function Ih(y){return y._nodeMap.get("root")}function or(y){Or();const d=Co();y!==null&&(y.dirty=!0,y.setCachedNodes(null)),d._selection=y}function ns(y){const d=qn(),g=function(t,f){let r=t;for(;r!=null;){const n=r[`__lexicalKey_${f._key}`];if(n!==void 0)return n;r=Dc(r)}return null}(y,d);return g===null?y===d.getRootElement()?Hn("root"):null:Hn(g)}function Rh(y,d){return d?y.getTextContentSize():0}function Mh(y){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(y)}function Fd(y){const d=[];let g=y;for(;g!==null;)d.push(g),g=g._parentEditor;return d}function Dh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Lh(y){return y.nodeType===Si?y.nodeValue:null}function zd(y,d,g){const t=So(d._window);if(t===null)return;const f=t.anchorNode;let{anchorOffset:r,focusOffset:n}=t;if(f!==null){let e=Lh(f);const s=yr(f);if(e!==null&&Pe(s)){if(e===Ac&&g){const i=g.length;e=g,r=i,n=i}e!==null&&Ud(s,e,r,n,y)}}}function Ud(y,d,g,t,f){let r=y;if(r.isAttached()&&(f||!r.isDirty())){const n=r.isComposing();let e=d;(n||f)&&d[d.length-1]===Ac&&(e=d.slice(0,-1));const s=r.getTextContent();if(f||e!==s){if(e===""){if(fr(null),Cd||Oc||Ed)r.remove();else{const h=qn();setTimeout(()=>{h.update(()=>{r.isAttached()&&r.remove()})},20)}return}const i=r.getParent(),l=pa(),o=r.getTextContentSize(),a=Ci(),c=r.getKey();if(r.isToken()||a!==null&&c===a&&!n||_e(l)&&(i!==null&&!i.canInsertTextBefore()&&l.anchor.offset===0||l.anchor.key===y.__key&&l.anchor.offset===0&&!r.canInsertTextBefore()&&!n||l.focus.key===y.__key&&l.focus.offset===o&&!r.canInsertTextAfter()&&!n))return void r.markDirty();const u=je();if(!_e(u)||g===null||t===null)return void r.setTextContent(e);if(u.setTextNodeRange(r,g,r,t),r.isSegmented()){const h=Zn(r.getTextContent());r.replace(h),r=h}r.setTextContent(e)}}}function cv(y,d){if(d.isSegmented())return!0;if(!y.isCollapsed())return!1;const g=y.anchor.offset,t=d.getParentOrThrow(),f=d.isToken();return g===0?!d.canInsertTextBefore()||!t.canInsertTextBefore()&&!d.isComposing()||f||function(r){const n=r.getPreviousSibling();return(Pe(n)||he(n)&&n.isInline())&&!n.canInsertTextAfter()}(d):g===d.getTextContentSize()&&(!d.canInsertTextAfter()||!t.canInsertTextAfter()&&!d.isComposing()||f)}function Bh(y){return y==="ArrowLeft"}function Fh(y){return y==="ArrowRight"}function bl(y,d){return uo?y:d}function zh(y){return y==="Enter"}function vl(y){return y==="Backspace"}function _l(y){return y==="Delete"}function Uh(y,d,g){return y.toLowerCase()==="a"&&bl(d,g)}function $h(){const y=Dn();or(Dd(y.select(0,y.getChildrenSize())))}function xl(y,d){y.__lexicalClassNameCache===void 0&&(y.__lexicalClassNameCache={});const g=y.__lexicalClassNameCache,t=g[d];if(t!==void 0)return t;const f=y[d];if(typeof f=="string"){const r=Nc(f);return g[d]=r,r}return f}function $d(y,d,g,t,f){if(g.size===0)return;const r=t.__type,n=t.__key,e=d.get(r);e===void 0&&Je(33,r);const s=e.klass;let i=y.get(s);i===void 0&&(i=new Map,y.set(s,i));const l=i.get(n),o=l==="destroyed"&&f==="created";(l===void 0||o)&&i.set(n,o?"updated":f)}function Hh(y){const d=Co(),g=d._readOnly,t=y.getType(),f=d._nodeMap,r=[];for(const[,n]of f)n instanceof y&&n.__type===t&&(g||n.isAttached())&&r.push(n);return r}function qh(y,d,g){const t=y.getParent();let f=g,r=y;return t!==null&&(d&&g===0?(f=r.getIndexWithinParent(),r=t):d||g!==r.getChildrenSize()||(f=r.getIndexWithinParent()+1,r=t)),r.getChildAtIndex(d?f-1:f)}function wl(y,d){const g=y.offset;if(y.type==="element")return qh(y.getNode(),d,g);{const t=y.getNode();if(d&&g===0||!d&&g===t.getTextContentSize()){const f=d?t.getPreviousSibling():t.getNextSibling();return f===null?qh(t.getParentOrThrow(),d,t.getIndexWithinParent()+(d?0:1)):f}}return null}function Jh(y){const d=Lc(y).event,g=d&&d.inputType;return g==="insertFromPaste"||g==="insertFromPasteAsQuotation"}function Ke(y,d,g){return Pg(y,d,g)}function Rc(y){return!br(y)&&!y.isLastChild()&&!y.isInline()}function Mc(y,d){const g=y._keyToDOMMap.get(d);return g===void 0&&Je(75,d),g}function Dc(y){const d=y.assignedSlot||y.parentElement;return d!==null&&d.nodeType===11?d.host:d}function uv(y){Or(),qn()._updateTags.add(y)}function Hd(y,d){let g=y.getParent();for(;g!==null;){if(g.is(d))return!0;g=g.getParent()}return!1}function Lc(y){const d=y._window;return d===null&&Je(78),d}function dv(y){let d=y.getParentOrThrow();for(;d!==null;){if(wo(d))return d;d=d.getParentOrThrow()}return d}function wo(y){return br(y)||he(y)&&y.isShadowRoot()}function fv(y){const d=y.constructor.clone(y);return jh(d,null),d}function Vo(y){const d=qn(),g=y.constructor.getType(),t=d._nodes.get(g);t===void 0&&Je(97);const f=t.replace;if(f!==null){const r=f(y);return r instanceof y.constructor||Je(98),r}return y}function qd(y,d){!br(y.getParent())||he(d)||On(d)||Je(99)}function Jd(y){return(On(y)||he(y)&&!y.canBeEmpty())&&!y.isInline()}function Wd(y,d,g){g.style.removeProperty("caret-color"),d._blockCursorElement=null;const t=y.parentElement;t!==null&&t.removeChild(y)}function pv(y,d,g){let t=y._blockCursorElement;if(_e(g)&&g.isCollapsed()&&g.anchor.type==="element"&&d.contains(document.activeElement)){const f=g.anchor,r=f.getNode(),n=f.offset;let e=!1,s=null;if(n===r.getChildrenSize())Jd(r.getChildAtIndex(n-1))&&(e=!0);else{const i=r.getChildAtIndex(n);if(Jd(i)){const l=i.getPreviousSibling();(l===null||Jd(l))&&(e=!0,s=y.getElementByKey(i.__key))}}if(e){const i=y.getElementByKey(r.__key);return t===null&&(y._blockCursorElement=t=function(l){const o=l.theme,a=document.createElement("div");a.contentEditable="false",a.setAttribute("data-lexical-cursor","true");let c=o.blockCursor;if(c!==void 0){if(typeof c=="string"){const u=Nc(c);c=o.blockCursor=u}c!==void 0&&a.classList.add(...c)}return a}(y._config)),d.style.caretColor="transparent",void(s===null?i.appendChild(t):i.insertBefore(t,s))}}t!==null&&Wd(t,y,d)}function So(y){return co?(y||window).getSelection():null}function hv(y,d){let g=y.getChildAtIndex(d);g==null&&(g=y),wo(y)&&Je(102);const t=n=>{const e=n.getParentOrThrow(),s=wo(e),i=n!==g||s?fv(n):n;if(s)return he(n)&&he(i)||Je(133),n.insertAfter(i),[n,i,i];{const[l,o,a]=t(e),c=n.getNextSiblings();return a.append(i,...c),[l,o,i]}},[f,r]=t(g);return[f,r]}function gv(y){return Sl(y)&&y.tagName==="A"}function Sl(y){return y.nodeType===1}function mv(y){const d=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return y.nodeName.match(d)!==null}function yv(y){const d=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return y.nodeName.match(d)!==null}function rs(y){if(br(y)||On(y)&&!y.isInline())return!0;if(!he(y)||wo(y))return!1;const d=y.getFirstChild(),g=d===null||fa(d)||Pe(d)||d.isInline();return!y.isInline()&&y.canBeEmpty()!==!1&&g}function Vd(y,d){let g=y;for(;g!==null&&g.getParent()!==null&&!d(g);)g=g.getParentOrThrow();return d(g)?g:null}function Wh(y,d,g,t,f,r){let n=y.getFirstChild();for(;n!==null;){const e=n.__key;n.__parent===d&&(he(n)&&Wh(n,e,g,t,f,r),g.has(e)||r.delete(e),f.push(e)),n=n.getNextSibling()}}let Ei,Er,Cl,Bc,Kd,Gd,ua,fo,Yd,El,ir="",kr="",po=null,Ko="",Vh=!1,Fc=!1,zc=null;function Uc(y,d){const g=ua.get(y);if(d!==null){const t=tf(y);t.parentNode===d&&d.removeChild(t)}if(fo.has(y)||Er._keyToDOMMap.delete(y),he(g)){const t=Hc(g,ua);Zd(t,0,t.length-1,null)}g!==void 0&&$d(El,Cl,Bc,g,"destroyed")}function Zd(y,d,g,t){let f=d;for(;f<=g;++f){const r=y[f];r!==void 0&&Uc(r,t)}}function da(y,d){y.setProperty("text-align",d)}const bv="40px";function Kh(y,d){const g=Ei.theme.indent;if(typeof g=="string"){const f=y.classList.contains(g);d>0&&!f?y.classList.add(g):d<1&&f&&y.classList.remove(g)}const t=getComputedStyle(y).getPropertyValue("--lexical-indent-base-value")||bv;y.style.setProperty("padding-inline-start",d===0?"":`calc(${d} * ${t})`)}function Gh(y,d){const g=y.style;d===0?da(g,""):d===Od?da(g,"left"):d===Td?da(g,"center"):d===jd?da(g,"right"):d===Ad?da(g,"justify"):d===Nd?da(g,"start"):d===Pd&&da(g,"end")}function $c(y,d,g){const t=fo.get(y);t===void 0&&Je(60);const f=t.createDOM(Ei,Er);if(function(r,n,e){const s=e._keyToDOMMap;n["__lexicalKey_"+e._key]=r,s.set(r,n)}(y,f,Er),Pe(t)?f.setAttribute("data-lexical-text","true"):On(t)&&f.setAttribute("data-lexical-decorator","true"),he(t)){const r=t.__indent,n=t.__size;if(r!==0&&Kh(f,r),n!==0){const s=n-1;(function(i,l,o,a){const c=kr;kr="",Qd(i,o,0,l,a,null),Qh(o,a),kr=c})(Hc(t,fo),s,t,f)}const e=t.__format;e!==0&&Gh(f,e),t.isInline()||Zh(null,t,f),Rc(t)&&(ir+=Jo,Ko+=Jo)}else{const r=t.getTextContent();if(On(t)){const n=t.decorate(Er,Ei);n!==null&&Xh(y,n),f.contentEditable="false"}else Pe(t)&&(t.isDirectionless()||(kr+=r));ir+=r,Ko+=r}if(d!==null)if(g!=null)d.insertBefore(f,g);else{const r=d.__lexicalLineBreak;r!=null?d.insertBefore(f,r):d.appendChild(f)}return $d(El,Cl,Bc,t,"created"),f}function Qd(y,d,g,t,f,r){const n=ir;ir="";let e=g;for(;e<=t;++e){$c(y[e],f,r);const s=fo.get(y[e]);s!==null&&po===null&&Pe(s)&&(po=s.getFormat())}Rc(d)&&(ir+=Jo),f.__lexicalTextContent=ir,ir=n+ir}function Yh(y,d){const g=d.get(y);return fa(g)||On(g)&&g.isInline()}function Zh(y,d,g){const t=y!==null&&(y.__size===0||Yh(y.__last,ua)),f=d.__size===0||Yh(d.__last,fo);if(t){if(!f){const r=g.__lexicalLineBreak;r!=null&&g.removeChild(r),g.__lexicalLineBreak=null}}else if(f){const r=document.createElement("br");g.__lexicalLineBreak=r,g.appendChild(r)}}function Qh(y,d){const g=d.__lexicalDirTextContent,t=d.__lexicalDir;if(g!==kr||t!==zc){const r=kr==="",n=r?zc:(f=kr,Gb.test(f)?"rtl":Yb.test(f)?"ltr":null);if(n!==t){const e=d.classList,s=Ei.theme;let i=t!==null?s[t]:void 0,l=n!==null?s[n]:void 0;if(i!==void 0){if(typeof i=="string"){const o=Nc(i);i=s[t]=o}e.remove(...i)}if(n===null||r&&n==="ltr")d.removeAttribute("dir");else{if(l!==void 0){if(typeof l=="string"){const o=Nc(l);l=s[n]=o}l!==void 0&&e.add(...l)}d.dir=n}Fc||(y.getWritable().__dir=n)}zc=n,d.__lexicalDirTextContent=kr,d.__lexicalDir=n}var f}function vv(y,d,g){const t=kr;var f;kr="",po=null,function(r,n,e){const s=ir,i=r.__size,l=n.__size;if(ir="",i===1&&l===1){const o=r.__first,a=n.__first;if(o===a)kl(o,e);else{const u=tf(o),h=$c(a,null,null);e.replaceChild(h,u),Uc(o,null)}const c=fo.get(a);po===null&&Pe(c)&&(po=c.getFormat())}else{const o=Hc(r,ua),a=Hc(n,fo);if(i===0)l!==0&&Qd(a,n,0,l-1,e,null);else if(l===0){if(i!==0){const c=e.__lexicalLineBreak==null;Zd(o,0,i-1,c?null:e),c&&(e.textContent="")}}else(function(c,u,h,p,m,b){const _=p-1,v=m-1;let w,x,S=(D=b,D.firstChild),E=0,k=0;for(var D;E<=_&&k<=v;){const R=u[E],A=h[k];if(R===A)S=Xd(kl(A,b)),E++,k++;else{w===void 0&&(w=new Set(u)),x===void 0&&(x=new Set(h));const H=x.has(R),$=w.has(A);if(H)if($){const M=Mc(Er,A);M===S?S=Xd(kl(A,b)):(S!=null?b.insertBefore(M,S):b.appendChild(M),kl(A,b)),E++,k++}else $c(A,b,S),k++;else S=Xd(tf(R)),Uc(R,b),E++}const z=fo.get(A);z!==null&&po===null&&Pe(z)&&(po=z.getFormat())}const N=E>_,O=k>v;if(N&&!O){const R=h[v+1];Qd(h,c,k,v,b,R===void 0?null:Er.getElementByKey(R))}else O&&!N&&Zd(u,E,_,b)})(n,o,a,i,l,e)}Rc(n)&&(ir+=Jo),e.__lexicalTextContent=ir,ir=s+ir}(y,d,g),Qh(d,g),ma(f=d)&&po!=null&&po!==f.__textFormat&&!Fc&&f.setTextFormat(po),kr=t,po=null}function Hc(y,d){const g=[];let t=y.__first;for(;t!==null;){const f=d.get(t);f===void 0&&Je(101),g.push(t),t=f.__next}return g}function kl(y,d){const g=ua.get(y);let t=fo.get(y);g!==void 0&&t!==void 0||Je(61);const f=Vh||Gd.has(y)||Kd.has(y),r=Mc(Er,y);if(g===t&&!f){if(he(g)){const n=r.__lexicalTextContent;n!==void 0&&(ir+=n,Ko+=n);const e=r.__lexicalDirTextContent;e!==void 0&&(kr+=e)}else{const n=g.getTextContent();Pe(g)&&!g.isDirectionless()&&(kr+=n),Ko+=n,ir+=n}return r}if(g!==t&&f&&$d(El,Cl,Bc,t,"updated"),t.updateDOM(g,r,Ei)){const n=$c(y,null,null);return d===null&&Je(62),d.replaceChild(n,r),Uc(y,null),n}if(he(g)&&he(t)){const n=t.__indent;n!==g.__indent&&Kh(r,n);const e=t.__format;e!==g.__format&&Gh(r,e),f&&(vv(g,t,r),br(t)||t.isInline()||Zh(g,t,r)),Rc(t)&&(ir+=Jo,Ko+=Jo)}else{const n=t.getTextContent();if(On(t)){const e=t.decorate(Er,Ei);e!==null&&Xh(y,e)}else Pe(t)&&!t.isDirectionless()&&(kr+=n);ir+=n,Ko+=n}if(!Fc&&br(t)&&t.__cachedText!==Ko){const n=t.getWritable();n.__cachedText=Ko,t=n}return r}function Xh(y,d){let g=Er._pendingDecorators;const t=Er._decorators;if(g===null){if(t[y]===d)return;g=Nh(Er)}g[y]=d}function Xd(y){let d=y.nextSibling;return d!==null&&d===Er._blockCursorElement&&(d=d.nextSibling),d}function _v(y,d,g,t,f,r){ir="",Ko="",kr="",Vh=t===ts,zc=null,Er=g,Ei=g._config,Cl=g._nodes,Bc=Er._listeners.mutation,Kd=f,Gd=r,ua=y._nodeMap,fo=d._nodeMap,Fc=d._readOnly,Yd=new Map(g._keyToDOMMap);const n=new Map;return El=n,kl("root",null),Er=void 0,Cl=void 0,Kd=void 0,Gd=void 0,ua=void 0,fo=void 0,Ei=void 0,Yd=void 0,El=void 0,n}function tf(y){const d=Yd.get(y);return d===void 0&&Je(75,y),d}const Go=Object.freeze({}),ef=30,nf=[["keydown",function(y,d){if(Ol=y.timeStamp,tg=y.key,d.isComposing())return;const{key:g,shiftKey:t,ctrlKey:f,metaKey:r,altKey:n}=y;Ke(d,Nb,y)||g!=null&&(function(e,s,i,l){return Fh(e)&&!s&&!l&&!i}(g,f,n,r)?Ke(d,wc,y):function(e,s,i,l,o){return Fh(e)&&!l&&!i&&(s||o)}(g,f,t,n,r)?Ke(d,Pb,y):function(e,s,i,l){return Bh(e)&&!s&&!l&&!i}(g,f,n,r)?Ke(d,Sc,y):function(e,s,i,l,o){return Bh(e)&&!l&&!i&&(s||o)}(g,f,t,n,r)?Ke(d,Ib,y):function(e,s,i){return function(l){return l==="ArrowUp"}(e)&&!s&&!i}(g,f,r)?Ke(d,vd,y):function(e,s,i){return function(l){return l==="ArrowDown"}(e)&&!s&&!i}(g,f,r)?Ke(d,_d,y):function(e,s){return zh(e)&&s}(g,t)?(Tl=!0,Ke(d,dl,y)):function(e){return e===" "}(g)?Ke(d,Rb,y):function(e,s){return uo&&s&&e.toLowerCase()==="o"}(g,f)?(y.preventDefault(),Tl=!0,Ke(d,vi,!0)):function(e,s){return zh(e)&&!s}(g,t)?(Tl=!1,Ke(d,dl,y)):function(e,s,i,l){return uo?!s&&!i&&(vl(e)||e.toLowerCase()==="h"&&l):!(l||s||i)&&vl(e)}(g,n,r,f)?vl(g)?Ke(d,fl,y):(y.preventDefault(),Ke(d,lo,!0)):function(e){return e==="Escape"}(g)?Ke(d,Cc,y):function(e,s,i,l,o){return uo?!(i||l||o)&&(_l(e)||e.toLowerCase()==="d"&&s):!(s||l||o)&&_l(e)}(g,f,t,n,r)?_l(g)?Ke(d,pl,y):(y.preventDefault(),Ke(d,lo,!1)):function(e,s,i){return vl(e)&&(uo?s:i)}(g,n,f)?(y.preventDefault(),Ke(d,sa,!0)):function(e,s,i){return _l(e)&&(uo?s:i)}(g,n,f)?(y.preventDefault(),Ke(d,sa,!1)):function(e,s){return uo&&s&&vl(e)}(g,r)?(y.preventDefault(),Ke(d,xi,!0)):function(e,s){return uo&&s&&_l(e)}(g,r)?(y.preventDefault(),Ke(d,xi,!1)):function(e,s,i,l){return e.toLowerCase()==="b"&&!s&&bl(i,l)}(g,n,r,f)?(y.preventDefault(),Ke(d,Cr,"bold")):function(e,s,i,l){return e.toLowerCase()==="u"&&!s&&bl(i,l)}(g,n,r,f)?(y.preventDefault(),Ke(d,Cr,"underline")):function(e,s,i,l){return e.toLowerCase()==="i"&&!s&&bl(i,l)}(g,n,r,f)?(y.preventDefault(),Ke(d,Cr,"italic")):function(e,s,i,l){return e==="Tab"&&!s&&!i&&!l}(g,n,f,r)?Ke(d,fh,y):function(e,s,i,l){return e.toLowerCase()==="z"&&!s&&bl(i,l)}(g,t,r,f)?(y.preventDefault(),Ke(d,cl,void 0)):function(e,s,i,l){return uo?e.toLowerCase()==="z"&&i&&s:e.toLowerCase()==="y"&&l||e.toLowerCase()==="z"&&l&&s}(g,t,r,f)?(y.preventDefault(),Ke(d,ul,void 0)):Yr(d._editorState._selection)?function(e,s,i,l){return!s&&e.toLowerCase()==="c"&&(uo?i:l)}(g,t,r,f)?(y.preventDefault(),Ke(d,hl,y)):function(e,s,i,l){return!s&&e.toLowerCase()==="x"&&(uo?i:l)}(g,t,r,f)?(y.preventDefault(),Ke(d,gl,y)):Uh(g,r,f)&&(y.preventDefault(),Ke(d,Ec,y)):!wi&&Uh(g,r,f)&&(y.preventDefault(),Ke(d,Ec,y)),function(e,s,i,l){return e||s||i||l}(f,t,n,r)&&Ke(d,zb,y))}],["pointerdown",function(y,d){const g=y.target,t=y.pointerType;g instanceof Node&&t!=="touch"&&Ur(d,()=>{On(yr(g))||(of=!0)})}],["compositionstart",function(y,d){Ur(d,()=>{const g=je();if(_e(g)&&!d.isComposing()){const t=g.anchor,f=g.anchor.getNode();fr(t.key),(y.timeStamp<Ol+ef||t.type==="element"||!g.isCollapsed()||f.getFormat()!==g.format||Pe(f)&&f.getStyle()!==g.style)&&Ke(d,_i,Kb)}})}],["compositionend",function(y,d){wi?jl=!0:Ur(d,()=>{af(d,y.data)})}],["input",function(y,d){y.stopPropagation(),Ur(d,()=>{const g=je(),t=y.data,f=ag(y);if(t!=null&&_e(g)&&rg(g,f,t,y.timeStamp,!1)){jl&&(af(d,t),jl=!1);const r=g.anchor.getNode(),n=So(d._window);if(n===null)return;const e=g.isBackward(),s=e?g.anchor.offset:g.focus.offset,i=e?g.focus.offset:g.anchor.offset;kc&&!g.isCollapsed()&&Pe(r)&&n.anchorNode!==null&&r.getTextContent().slice(0,s)+t+r.getTextContent().slice(s+i)===Lh(n.anchorNode)||Ke(d,_i,t);const l=t.length;wi&&l>1&&y.inputType==="insertCompositionText"&&!d.isComposing()&&(g.anchor.offset-=l),Cd||Oc||Ed||!d.isComposing()||(Ol=0,fr(null))}else zd(!1,d,t!==null?t:void 0),jl&&(af(d,t||void 0),jl=!1);Or(),wh(qn())}),os=null}],["click",function(y,d){Ur(d,()=>{const g=je(),t=So(d._window),f=pa();if(t){if(_e(g)){const r=g.anchor,n=r.getNode();r.type==="element"&&r.offset===0&&g.isCollapsed()&&!br(n)&&Dn().getChildrenSize()===1&&n.getTopLevelElementOrThrow().isEmpty()&&f!==null&&g.is(f)?(t.removeAllRanges(),g.dirty=!0):y.detail===3&&!g.isCollapsed()&&n!==g.focus.getNode()&&(he(n)?n.select(0):n.getParentOrThrow().select(0))}else if(y.pointerType==="touch"){const r=t.anchorNode;if(r!==null){const n=r.nodeType;(n===ml||n===Si)&&or(Kc(f,t,d,y))}}}Ke(d,dh,y)})}],["cut",Go],["copy",Go],["dragstart",Go],["dragover",Go],["dragend",Go],["paste",Go],["focus",Go],["blur",Go],["drop",Go]];kc&&nf.push(["beforeinput",(y,d)=>function(g,t){const f=g.inputType,r=ag(g);f==="deleteCompositionText"||wi&&Jh(t)||f!=="insertCompositionText"&&Ur(t,()=>{const n=je();if(f==="deleteContentBackward"){if(n===null){const c=pa();if(!_e(c))return;or(c.clone())}if(_e(n)){const c=n.anchor.key===n.focus.key;if(e=g.timeStamp,tg==="MediaLast"&&e<Ol+ef&&t.isComposing()&&c){if(fr(null),Ol=0,setTimeout(()=>{Ur(t,()=>{fr(null)})},ef),_e(n)){const u=n.anchor.getNode();u.markDirty(),n.format=u.getFormat(),Pe(u)||Je(142),n.style=u.getStyle()}}else{fr(null),g.preventDefault();const u=n.anchor.getNode().getTextContent(),h=n.anchor.offset===0&&n.focus.offset===u.length;Hb&&c&&!h||Ke(t,lo,!0)}return}}var e;if(!_e(n))return;const s=g.data;os!==null&&zd(!1,t,os),n.dirty&&os===null||!n.isCollapsed()||br(n.anchor.getNode())||r===null||n.applyDOMRange(r),os=null;const i=n.anchor,l=n.focus,o=i.getNode(),a=l.getNode();if(f!=="insertText"&&f!=="insertTranspose")switch(g.preventDefault(),f){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Ke(t,_i,g);break;case"insertFromComposition":fr(null),Ke(t,_i,g);break;case"insertLineBreak":fr(null),Ke(t,vi,!1);break;case"insertParagraph":fr(null),Tl&&!Oc?(Tl=!1,Ke(t,vi,!1)):Ke(t,Ya,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Ke(t,ll,g);break;case"deleteByComposition":(function(c,u){return c!==u||he(c)||he(u)||!c.isToken()||!u.isToken()})(o,a)&&Ke(t,xc,g);break;case"deleteByDrag":case"deleteByCut":Ke(t,xc,g);break;case"deleteContent":Ke(t,lo,!1);break;case"deleteWordBackward":Ke(t,sa,!0);break;case"deleteWordForward":Ke(t,sa,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Ke(t,xi,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Ke(t,xi,!1);break;case"formatStrikeThrough":Ke(t,Cr,"strikethrough");break;case"formatBold":Ke(t,Cr,"bold");break;case"formatItalic":Ke(t,Cr,"italic");break;case"formatUnderline":Ke(t,Cr,"underline");break;case"historyUndo":Ke(t,cl,void 0);break;case"historyRedo":Ke(t,ul,void 0)}else{if(s===`
|
|
32
|
-
`)g.preventDefault(),Ke(t,vi,!1);else if(s===Jo)g.preventDefault(),Ke(t,Ya,void 0);else if(s==null&&g.dataTransfer){const c=g.dataTransfer.getData("text/plain");g.preventDefault(),n.insertRawText(c)}else s!=null&&
|
|
33
|
-
`){const t=je();if(_e(t)){const f=t.focus;return t.anchor.set(f.key,f.offset,f.type),void Ke(y,dl,null)}}}zd(!0,y,d)}function
|
|
34
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:d=>function(g){const t=g.parentElement;if(t!==null){const f=t.firstChild;if(f===g||f.nextSibling===g&&
|
|
31
|
+
`,Kb=wi?" ":Ac,yh="֑-߿יִ-﷽ﹰ-ﻼ",bh="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Gb=new RegExp("^[^"+bh+"]*["+yh+"]"),Yb=new RegExp("^[^"+yh+"]*["+bh+"]"),Wo={bold:1,code:16,highlight:kd,italic:2,strikethrough:Tc,subscript:32,superscript:64,underline:jc},Zb={directionless:1,unmergeable:2},vh={center:Td,end:Pd,justify:Ad,left:Od,right:jd,start:Nd},Qb={[Td]:"center",[Pd]:"end",[Ad]:"justify",[Od]:"left",[jd]:"right",[Nd]:"start"},Xb={normal:0,segmented:2,token:1},tv={[qb]:"normal",[Wb]:"segmented",[Jb]:"token"};function ev(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Je=ev(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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 Nc(...y){const d=[];for(const g of y)if(g&&typeof g=="string")for(const[t]of g.matchAll(/\S+/g))d.push(t);return d}const nv=100;let Id=!1,Rd=0;function rv(y){Rd=y.timeStamp}function Md(y,d,g){return d.__lexicalLineBreak===y||y[`__lexicalKey_${g._key}`]!==void 0}function ov(y,d,g){const t=So(g._window);let f=null,r=null;t!==null&&t.anchorNode===y&&(f=t.anchorOffset,r=t.focusOffset);const n=y.nodeValue;n!==null&&Ud(d,n,f,r,!1)}function iv(y,d,g){if(_e(y)){const t=y.anchor.getNode();if(t.is(g)&&y.format!==t.getFormat())return!1}return d.nodeType===Si&&g.isAttached()}function _h(y,d,g){Id=!0;const t=performance.now()-Rd>nv;try{Ur(y,()=>{const f=je()||function(a){return a.getEditorState().read(()=>{const c=je();return c!==null?c.clone():null})}(y),r=new Map,n=y.getRootElement(),e=y._editorState,s=y._blockCursorElement;let i=!1,l="";for(let a=0;a<d.length;a++){const c=d[a],u=c.type,h=c.target;let p=yr(h,e);if(!(p===null&&h!==n||On(p))){if(u==="characterData")t&&Pe(p)&&iv(f,h,p)&&ov(h,p,y);else if(u==="childList"){i=!0;const m=c.addedNodes;for(let v=0;v<m.length;v++){const w=m[v],x=jh(w),S=w.parentNode;if(S!=null&&w!==s&&x===null&&(w.nodeName!=="BR"||!Md(w,S,y))){if(wi){const E=w.innerText||w.nodeValue;E&&(l+=E)}S.removeChild(w)}}const b=c.removedNodes,_=b.length;if(_>0){let v=0;for(let w=0;w<_;w++){const x=b[w];(x.nodeName==="BR"&&Md(x,h,y)||s===x)&&(h.appendChild(x),v++)}_!==v&&(h===n&&(p=Ph(e)),r.set(h,p))}}}}if(r.size>0)for(const[a,c]of r)if(he(c)){const u=c.getChildrenKeys();let h=a.firstChild;for(let p=0;p<u.length;p++){const m=u[p],b=y.getElementByKey(m);b!==null&&(h==null?(a.appendChild(b),h=b):h!==b&&a.replaceChild(b,h),h=h.nextSibling)}}else Pe(c)&&c.markDirty();const o=g.takeRecords();if(o.length>0){for(let a=0;a<o.length;a++){const c=o[a],u=c.addedNodes,h=c.target;for(let p=0;p<u.length;p++){const m=u[p],b=m.parentNode;b==null||m.nodeName!=="BR"||Md(m,h,y)||b.removeChild(m)}}g.takeRecords()}f!==null&&(i&&(f.dirty=!0,or(f)),wi&&qh(y)&&f.insertRawText(l))})}finally{Id=!1}}function xh(y){const d=y._observer;d!==null&&_h(y,d.takeRecords(),d)}function wh(y){(function(d){Rd===0&&Lc(d).addEventListener("textInput",rv,!0)})(y),y._observer=new MutationObserver((d,g)=>{_h(y,d,g)})}function Sh(y,d){const g=y.__mode,t=y.__format,f=y.__style,r=d.__mode,n=d.__format,e=d.__style;return!(g!==null&&g!==r||t!==null&&t!==n||f!==null&&f!==e)}function Ch(y,d){const g=y.mergeWithSibling(d),t=qn()._normalizedNodes;return t.add(y.__key),t.add(d.__key),g}function Eh(y){let d,g,t=y;if(t.__text!==""||!t.isSimpleText()||t.isUnmergeable()){for(;(d=t.getPreviousSibling())!==null&&Pe(d)&&d.isSimpleText()&&!d.isUnmergeable();){if(d.__text!==""){if(Sh(d,t)){t=Ch(d,t);break}break}d.remove()}for(;(g=t.getNextSibling())!==null&&Pe(g)&&g.isSimpleText()&&!g.isUnmergeable();){if(g.__text!==""){if(Sh(t,g)){t=Ch(t,g);break}break}g.remove()}}else t.remove()}function Dd(y){return kh(y.anchor),kh(y.focus),y}function kh(y){for(;y.type==="element";){const d=y.getNode(),g=y.offset;let t,f;if(g===d.getChildrenSize()?(t=d.getChildAtIndex(g-1),f=!0):(t=d.getChildAtIndex(g),f=!1),Pe(t)){y.set(t.__key,f?t.getTextContentSize():0,"text");break}if(!he(t))break;y.set(t.__key,f?t.getChildrenSize():0,"element")}}let av=1;const sv=typeof queueMicrotask=="function"?queueMicrotask:y=>{Promise.resolve().then(y)};function Ld(y){const d=document.activeElement;if(d===null)return!1;const g=d.nodeName;return On(yr(y))&&(g==="INPUT"||g==="TEXTAREA"||d.contentEditable==="true"&&d.__lexicalEditor==null)}function yl(y,d,g){const t=y.getRootElement();try{return t!==null&&t.contains(d)&&t.contains(g)&&d!==null&&!Ld(d)&&Oh(d)===y}catch{return!1}}function Oh(y){let d=y;for(;d!=null;){const g=d.__lexicalEditor;if(g!=null)return g;d=Dc(d)}return null}function es(y){return y.isToken()||y.isSegmented()}function lv(y){return y.nodeType===Si}function Pc(y){let d=y;for(;d!=null;){if(lv(d))return d;d=d.firstChild}return null}function Bd(y,d,g){const t=Wo[d];if(g!==null&&(y&t)==(g&t))return y;let f=y^t;return d==="subscript"?f&=~Wo.superscript:d==="superscript"&&(f&=~Wo.subscript),f}function Th(y,d){if(d!=null)return void(y.__key=d);Or(),Og();const g=qn(),t=Co(),f=""+av++;t._nodeMap.set(f,y),he(y)?g._dirtyElements.set(f,!0):g._dirtyLeaves.add(f),g._cloneNotNeeded.add(f),g._dirtyType=mh,y.__key=f}function ca(y){const d=y.getParent();if(d!==null){const g=y.getWritable(),t=d.getWritable(),f=y.getPreviousSibling(),r=y.getNextSibling();if(f===null)if(r!==null){const n=r.getWritable();t.__first=r.__key,n.__prev=null}else t.__first=null;else{const n=f.getWritable();if(r!==null){const e=r.getWritable();e.__prev=n.__key,n.__next=e.__key}else n.__next=null;g.__prev=null}if(r===null)if(f!==null){const n=f.getWritable();t.__last=f.__key,n.__next=null}else t.__last=null;else{const n=r.getWritable();if(f!==null){const e=f.getWritable();e.__next=n.__key,n.__prev=e.__key}else n.__prev=null;g.__next=null}t.__size--,g.__parent=null}}function Ic(y){Og();const d=y.getLatest(),g=d.__parent,t=Co(),f=qn(),r=t._nodeMap,n=f._dirtyElements;g!==null&&function(s,i,l){let o=s;for(;o!==null;){if(l.has(o))return;const a=i.get(o);if(a===void 0)break;l.set(o,!1),o=a.__parent}}(g,r,n);const e=d.__key;f._dirtyType=mh,he(y)?n.set(e,!0):f._dirtyLeaves.add(e)}function fr(y){Or();const d=qn(),g=d._compositionKey;if(y!==g){if(d._compositionKey=y,g!==null){const t=Hn(g);t!==null&&t.getWritable()}if(y!==null){const t=Hn(y);t!==null&&t.getWritable()}}}function Ci(){return ls()?null:qn()._compositionKey}function Hn(y,d){const g=(d||Co())._nodeMap.get(y);return g===void 0?null:g}function jh(y,d){const g=y[`__lexicalKey_${qn()._key}`];return g!==void 0?Hn(g,d):null}function yr(y,d){let g=y;for(;g!=null;){const t=jh(g,d);if(t!==null)return t;g=Dc(g)}return null}function Ah(y){const d=y._decorators,g=Object.assign({},d);return y._pendingDecorators=g,g}function Nh(y){return y.read(()=>Dn().getTextContent())}function Dn(){return Ph(Co())}function Ph(y){return y._nodeMap.get("root")}function or(y){Or();const d=Co();y!==null&&(y.dirty=!0,y.setCachedNodes(null)),d._selection=y}function ns(y){const d=qn(),g=function(t,f){let r=t;for(;r!=null;){const n=r[`__lexicalKey_${f._key}`];if(n!==void 0)return n;r=Dc(r)}return null}(y,d);return g===null?y===d.getRootElement()?Hn("root"):null:Hn(g)}function Ih(y,d){return d?y.getTextContentSize():0}function Rh(y){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(y)}function Fd(y){const d=[];let g=y;for(;g!==null;)d.push(g),g=g._parentEditor;return d}function Mh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Dh(y){return y.nodeType===Si?y.nodeValue:null}function zd(y,d,g){const t=So(d._window);if(t===null)return;const f=t.anchorNode;let{anchorOffset:r,focusOffset:n}=t;if(f!==null){let e=Dh(f);const s=yr(f);if(e!==null&&Pe(s)){if(e===Ac&&g){const i=g.length;e=g,r=i,n=i}e!==null&&Ud(s,e,r,n,y)}}}function Ud(y,d,g,t,f){let r=y;if(r.isAttached()&&(f||!r.isDirty())){const n=r.isComposing();let e=d;(n||f)&&d[d.length-1]===Ac&&(e=d.slice(0,-1));const s=r.getTextContent();if(f||e!==s){if(e===""){if(fr(null),Cd||Oc||Ed)r.remove();else{const h=qn();setTimeout(()=>{h.update(()=>{r.isAttached()&&r.remove()})},20)}return}const i=r.getParent(),l=pa(),o=r.getTextContentSize(),a=Ci(),c=r.getKey();if(r.isToken()||a!==null&&c===a&&!n||_e(l)&&(i!==null&&!i.canInsertTextBefore()&&l.anchor.offset===0||l.anchor.key===y.__key&&l.anchor.offset===0&&!r.canInsertTextBefore()&&!n||l.focus.key===y.__key&&l.focus.offset===o&&!r.canInsertTextAfter()&&!n))return void r.markDirty();const u=je();if(!_e(u)||g===null||t===null)return void r.setTextContent(e);if(u.setTextNodeRange(r,g,r,t),r.isSegmented()){const h=Zn(r.getTextContent());r.replace(h),r=h}r.setTextContent(e)}}}function cv(y,d){if(d.isSegmented())return!0;if(!y.isCollapsed())return!1;const g=y.anchor.offset,t=d.getParentOrThrow(),f=d.isToken();return g===0?!d.canInsertTextBefore()||!t.canInsertTextBefore()&&!d.isComposing()||f||function(r){const n=r.getPreviousSibling();return(Pe(n)||he(n)&&n.isInline())&&!n.canInsertTextAfter()}(d):g===d.getTextContentSize()&&(!d.canInsertTextAfter()||!t.canInsertTextAfter()&&!d.isComposing()||f)}function Lh(y){return y==="ArrowLeft"}function Bh(y){return y==="ArrowRight"}function bl(y,d){return uo?y:d}function Fh(y){return y==="Enter"}function vl(y){return y==="Backspace"}function _l(y){return y==="Delete"}function zh(y,d,g){return y.toLowerCase()==="a"&&bl(d,g)}function Uh(){const y=Dn();or(Dd(y.select(0,y.getChildrenSize())))}function xl(y,d){y.__lexicalClassNameCache===void 0&&(y.__lexicalClassNameCache={});const g=y.__lexicalClassNameCache,t=g[d];if(t!==void 0)return t;const f=y[d];if(typeof f=="string"){const r=Nc(f);return g[d]=r,r}return f}function $d(y,d,g,t,f){if(g.size===0)return;const r=t.__type,n=t.__key,e=d.get(r);e===void 0&&Je(33,r);const s=e.klass;let i=y.get(s);i===void 0&&(i=new Map,y.set(s,i));const l=i.get(n),o=l==="destroyed"&&f==="created";(l===void 0||o)&&i.set(n,o?"updated":f)}function $h(y){const d=Co(),g=d._readOnly,t=y.getType(),f=d._nodeMap,r=[];for(const[,n]of f)n instanceof y&&n.__type===t&&(g||n.isAttached())&&r.push(n);return r}function Hh(y,d,g){const t=y.getParent();let f=g,r=y;return t!==null&&(d&&g===0?(f=r.getIndexWithinParent(),r=t):d||g!==r.getChildrenSize()||(f=r.getIndexWithinParent()+1,r=t)),r.getChildAtIndex(d?f-1:f)}function wl(y,d){const g=y.offset;if(y.type==="element")return Hh(y.getNode(),d,g);{const t=y.getNode();if(d&&g===0||!d&&g===t.getTextContentSize()){const f=d?t.getPreviousSibling():t.getNextSibling();return f===null?Hh(t.getParentOrThrow(),d,t.getIndexWithinParent()+(d?0:1)):f}}return null}function qh(y){const d=Lc(y).event,g=d&&d.inputType;return g==="insertFromPaste"||g==="insertFromPasteAsQuotation"}function Ke(y,d,g){return Ng(y,d,g)}function Rc(y){return!br(y)&&!y.isLastChild()&&!y.isInline()}function Mc(y,d){const g=y._keyToDOMMap.get(d);return g===void 0&&Je(75,d),g}function Dc(y){const d=y.assignedSlot||y.parentElement;return d!==null&&d.nodeType===11?d.host:d}function uv(y){Or(),qn()._updateTags.add(y)}function Hd(y,d){let g=y.getParent();for(;g!==null;){if(g.is(d))return!0;g=g.getParent()}return!1}function Lc(y){const d=y._window;return d===null&&Je(78),d}function dv(y){let d=y.getParentOrThrow();for(;d!==null;){if(wo(d))return d;d=d.getParentOrThrow()}return d}function wo(y){return br(y)||he(y)&&y.isShadowRoot()}function fv(y){const d=y.constructor.clone(y);return Th(d,null),d}function Vo(y){const d=qn(),g=y.constructor.getType(),t=d._nodes.get(g);t===void 0&&Je(97);const f=t.replace;if(f!==null){const r=f(y);return r instanceof y.constructor||Je(98),r}return y}function qd(y,d){!br(y.getParent())||he(d)||On(d)||Je(99)}function Jd(y){return(On(y)||he(y)&&!y.canBeEmpty())&&!y.isInline()}function Wd(y,d,g){g.style.removeProperty("caret-color"),d._blockCursorElement=null;const t=y.parentElement;t!==null&&t.removeChild(y)}function pv(y,d,g){let t=y._blockCursorElement;if(_e(g)&&g.isCollapsed()&&g.anchor.type==="element"&&d.contains(document.activeElement)){const f=g.anchor,r=f.getNode(),n=f.offset;let e=!1,s=null;if(n===r.getChildrenSize())Jd(r.getChildAtIndex(n-1))&&(e=!0);else{const i=r.getChildAtIndex(n);if(Jd(i)){const l=i.getPreviousSibling();(l===null||Jd(l))&&(e=!0,s=y.getElementByKey(i.__key))}}if(e){const i=y.getElementByKey(r.__key);return t===null&&(y._blockCursorElement=t=function(l){const o=l.theme,a=document.createElement("div");a.contentEditable="false",a.setAttribute("data-lexical-cursor","true");let c=o.blockCursor;if(c!==void 0){if(typeof c=="string"){const u=Nc(c);c=o.blockCursor=u}c!==void 0&&a.classList.add(...c)}return a}(y._config)),d.style.caretColor="transparent",void(s===null?i.appendChild(t):i.insertBefore(t,s))}}t!==null&&Wd(t,y,d)}function So(y){return co?(y||window).getSelection():null}function hv(y,d){let g=y.getChildAtIndex(d);g==null&&(g=y),wo(y)&&Je(102);const t=n=>{const e=n.getParentOrThrow(),s=wo(e),i=n!==g||s?fv(n):n;if(s)return he(n)&&he(i)||Je(133),n.insertAfter(i),[n,i,i];{const[l,o,a]=t(e),c=n.getNextSiblings();return a.append(i,...c),[l,o,i]}},[f,r]=t(g);return[f,r]}function gv(y){return Sl(y)&&y.tagName==="A"}function Sl(y){return y.nodeType===1}function mv(y){const d=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return y.nodeName.match(d)!==null}function yv(y){const d=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return y.nodeName.match(d)!==null}function rs(y){if(br(y)||On(y)&&!y.isInline())return!0;if(!he(y)||wo(y))return!1;const d=y.getFirstChild(),g=d===null||fa(d)||Pe(d)||d.isInline();return!y.isInline()&&y.canBeEmpty()!==!1&&g}function Vd(y,d){let g=y;for(;g!==null&&g.getParent()!==null&&!d(g);)g=g.getParentOrThrow();return d(g)?g:null}function Jh(y,d,g,t,f,r){let n=y.getFirstChild();for(;n!==null;){const e=n.__key;n.__parent===d&&(he(n)&&Jh(n,e,g,t,f,r),g.has(e)||r.delete(e),f.push(e)),n=n.getNextSibling()}}let Ei,Er,Cl,Bc,Kd,Gd,ua,fo,Yd,El,ir="",kr="",po=null,Ko="",Wh=!1,Fc=!1,zc=null;function Uc(y,d){const g=ua.get(y);if(d!==null){const t=tf(y);t.parentNode===d&&d.removeChild(t)}if(fo.has(y)||Er._keyToDOMMap.delete(y),he(g)){const t=Hc(g,ua);Zd(t,0,t.length-1,null)}g!==void 0&&$d(El,Cl,Bc,g,"destroyed")}function Zd(y,d,g,t){let f=d;for(;f<=g;++f){const r=y[f];r!==void 0&&Uc(r,t)}}function da(y,d){y.setProperty("text-align",d)}const bv="40px";function Vh(y,d){const g=Ei.theme.indent;if(typeof g=="string"){const f=y.classList.contains(g);d>0&&!f?y.classList.add(g):d<1&&f&&y.classList.remove(g)}const t=getComputedStyle(y).getPropertyValue("--lexical-indent-base-value")||bv;y.style.setProperty("padding-inline-start",d===0?"":`calc(${d} * ${t})`)}function Kh(y,d){const g=y.style;d===0?da(g,""):d===Od?da(g,"left"):d===Td?da(g,"center"):d===jd?da(g,"right"):d===Ad?da(g,"justify"):d===Nd?da(g,"start"):d===Pd&&da(g,"end")}function $c(y,d,g){const t=fo.get(y);t===void 0&&Je(60);const f=t.createDOM(Ei,Er);if(function(r,n,e){const s=e._keyToDOMMap;n["__lexicalKey_"+e._key]=r,s.set(r,n)}(y,f,Er),Pe(t)?f.setAttribute("data-lexical-text","true"):On(t)&&f.setAttribute("data-lexical-decorator","true"),he(t)){const r=t.__indent,n=t.__size;if(r!==0&&Vh(f,r),n!==0){const s=n-1;(function(i,l,o,a){const c=kr;kr="",Qd(i,o,0,l,a,null),Zh(o,a),kr=c})(Hc(t,fo),s,t,f)}const e=t.__format;e!==0&&Kh(f,e),t.isInline()||Yh(null,t,f),Rc(t)&&(ir+=Jo,Ko+=Jo)}else{const r=t.getTextContent();if(On(t)){const n=t.decorate(Er,Ei);n!==null&&Qh(y,n),f.contentEditable="false"}else Pe(t)&&(t.isDirectionless()||(kr+=r));ir+=r,Ko+=r}if(d!==null)if(g!=null)d.insertBefore(f,g);else{const r=d.__lexicalLineBreak;r!=null?d.insertBefore(f,r):d.appendChild(f)}return $d(El,Cl,Bc,t,"created"),f}function Qd(y,d,g,t,f,r){const n=ir;ir="";let e=g;for(;e<=t;++e){$c(y[e],f,r);const s=fo.get(y[e]);s!==null&&po===null&&Pe(s)&&(po=s.getFormat())}Rc(d)&&(ir+=Jo),f.__lexicalTextContent=ir,ir=n+ir}function Gh(y,d){const g=d.get(y);return fa(g)||On(g)&&g.isInline()}function Yh(y,d,g){const t=y!==null&&(y.__size===0||Gh(y.__last,ua)),f=d.__size===0||Gh(d.__last,fo);if(t){if(!f){const r=g.__lexicalLineBreak;r!=null&&g.removeChild(r),g.__lexicalLineBreak=null}}else if(f){const r=document.createElement("br");g.__lexicalLineBreak=r,g.appendChild(r)}}function Zh(y,d){const g=d.__lexicalDirTextContent,t=d.__lexicalDir;if(g!==kr||t!==zc){const r=kr==="",n=r?zc:(f=kr,Gb.test(f)?"rtl":Yb.test(f)?"ltr":null);if(n!==t){const e=d.classList,s=Ei.theme;let i=t!==null?s[t]:void 0,l=n!==null?s[n]:void 0;if(i!==void 0){if(typeof i=="string"){const o=Nc(i);i=s[t]=o}e.remove(...i)}if(n===null||r&&n==="ltr")d.removeAttribute("dir");else{if(l!==void 0){if(typeof l=="string"){const o=Nc(l);l=s[n]=o}l!==void 0&&e.add(...l)}d.dir=n}Fc||(y.getWritable().__dir=n)}zc=n,d.__lexicalDirTextContent=kr,d.__lexicalDir=n}var f}function vv(y,d,g){const t=kr;var f;kr="",po=null,function(r,n,e){const s=ir,i=r.__size,l=n.__size;if(ir="",i===1&&l===1){const o=r.__first,a=n.__first;if(o===a)kl(o,e);else{const u=tf(o),h=$c(a,null,null);e.replaceChild(h,u),Uc(o,null)}const c=fo.get(a);po===null&&Pe(c)&&(po=c.getFormat())}else{const o=Hc(r,ua),a=Hc(n,fo);if(i===0)l!==0&&Qd(a,n,0,l-1,e,null);else if(l===0){if(i!==0){const c=e.__lexicalLineBreak==null;Zd(o,0,i-1,c?null:e),c&&(e.textContent="")}}else(function(c,u,h,p,m,b){const _=p-1,v=m-1;let w,x,S=(D=b,D.firstChild),E=0,k=0;for(var D;E<=_&&k<=v;){const R=u[E],A=h[k];if(R===A)S=Xd(kl(A,b)),E++,k++;else{w===void 0&&(w=new Set(u)),x===void 0&&(x=new Set(h));const H=x.has(R),$=w.has(A);if(H)if($){const M=Mc(Er,A);M===S?S=Xd(kl(A,b)):(S!=null?b.insertBefore(M,S):b.appendChild(M),kl(A,b)),E++,k++}else $c(A,b,S),k++;else S=Xd(tf(R)),Uc(R,b),E++}const z=fo.get(A);z!==null&&po===null&&Pe(z)&&(po=z.getFormat())}const N=E>_,O=k>v;if(N&&!O){const R=h[v+1];Qd(h,c,k,v,b,R===void 0?null:Er.getElementByKey(R))}else O&&!N&&Zd(u,E,_,b)})(n,o,a,i,l,e)}Rc(n)&&(ir+=Jo),e.__lexicalTextContent=ir,ir=s+ir}(y,d,g),Zh(d,g),ma(f=d)&&po!=null&&po!==f.__textFormat&&!Fc&&f.setTextFormat(po),kr=t,po=null}function Hc(y,d){const g=[];let t=y.__first;for(;t!==null;){const f=d.get(t);f===void 0&&Je(101),g.push(t),t=f.__next}return g}function kl(y,d){const g=ua.get(y);let t=fo.get(y);g!==void 0&&t!==void 0||Je(61);const f=Wh||Gd.has(y)||Kd.has(y),r=Mc(Er,y);if(g===t&&!f){if(he(g)){const n=r.__lexicalTextContent;n!==void 0&&(ir+=n,Ko+=n);const e=r.__lexicalDirTextContent;e!==void 0&&(kr+=e)}else{const n=g.getTextContent();Pe(g)&&!g.isDirectionless()&&(kr+=n),Ko+=n,ir+=n}return r}if(g!==t&&f&&$d(El,Cl,Bc,t,"updated"),t.updateDOM(g,r,Ei)){const n=$c(y,null,null);return d===null&&Je(62),d.replaceChild(n,r),Uc(y,null),n}if(he(g)&&he(t)){const n=t.__indent;n!==g.__indent&&Vh(r,n);const e=t.__format;e!==g.__format&&Kh(r,e),f&&(vv(g,t,r),br(t)||t.isInline()||Yh(g,t,r)),Rc(t)&&(ir+=Jo,Ko+=Jo)}else{const n=t.getTextContent();if(On(t)){const e=t.decorate(Er,Ei);e!==null&&Qh(y,e)}else Pe(t)&&!t.isDirectionless()&&(kr+=n);ir+=n,Ko+=n}if(!Fc&&br(t)&&t.__cachedText!==Ko){const n=t.getWritable();n.__cachedText=Ko,t=n}return r}function Qh(y,d){let g=Er._pendingDecorators;const t=Er._decorators;if(g===null){if(t[y]===d)return;g=Ah(Er)}g[y]=d}function Xd(y){let d=y.nextSibling;return d!==null&&d===Er._blockCursorElement&&(d=d.nextSibling),d}function _v(y,d,g,t,f,r){ir="",Ko="",kr="",Wh=t===ts,zc=null,Er=g,Ei=g._config,Cl=g._nodes,Bc=Er._listeners.mutation,Kd=f,Gd=r,ua=y._nodeMap,fo=d._nodeMap,Fc=d._readOnly,Yd=new Map(g._keyToDOMMap);const n=new Map;return El=n,kl("root",null),Er=void 0,Cl=void 0,Kd=void 0,Gd=void 0,ua=void 0,fo=void 0,Ei=void 0,Yd=void 0,El=void 0,n}function tf(y){const d=Yd.get(y);return d===void 0&&Je(75,y),d}const Go=Object.freeze({}),ef=30,nf=[["keydown",function(y,d){if(Ol=y.timeStamp,Xh=y.key,d.isComposing())return;const{key:g,shiftKey:t,ctrlKey:f,metaKey:r,altKey:n}=y;Ke(d,Nb,y)||g!=null&&(function(e,s,i,l){return Bh(e)&&!s&&!l&&!i}(g,f,n,r)?Ke(d,wc,y):function(e,s,i,l,o){return Bh(e)&&!l&&!i&&(s||o)}(g,f,t,n,r)?Ke(d,Pb,y):function(e,s,i,l){return Lh(e)&&!s&&!l&&!i}(g,f,n,r)?Ke(d,Sc,y):function(e,s,i,l,o){return Lh(e)&&!l&&!i&&(s||o)}(g,f,t,n,r)?Ke(d,Ib,y):function(e,s,i){return function(l){return l==="ArrowUp"}(e)&&!s&&!i}(g,f,r)?Ke(d,vd,y):function(e,s,i){return function(l){return l==="ArrowDown"}(e)&&!s&&!i}(g,f,r)?Ke(d,_d,y):function(e,s){return Fh(e)&&s}(g,t)?(Tl=!0,Ke(d,dl,y)):function(e){return e===" "}(g)?Ke(d,Rb,y):function(e,s){return uo&&s&&e.toLowerCase()==="o"}(g,f)?(y.preventDefault(),Tl=!0,Ke(d,vi,!0)):function(e,s){return Fh(e)&&!s}(g,t)?(Tl=!1,Ke(d,dl,y)):function(e,s,i,l){return uo?!s&&!i&&(vl(e)||e.toLowerCase()==="h"&&l):!(l||s||i)&&vl(e)}(g,n,r,f)?vl(g)?Ke(d,fl,y):(y.preventDefault(),Ke(d,lo,!0)):function(e){return e==="Escape"}(g)?Ke(d,Cc,y):function(e,s,i,l,o){return uo?!(i||l||o)&&(_l(e)||e.toLowerCase()==="d"&&s):!(s||l||o)&&_l(e)}(g,f,t,n,r)?_l(g)?Ke(d,pl,y):(y.preventDefault(),Ke(d,lo,!1)):function(e,s,i){return vl(e)&&(uo?s:i)}(g,n,f)?(y.preventDefault(),Ke(d,sa,!0)):function(e,s,i){return _l(e)&&(uo?s:i)}(g,n,f)?(y.preventDefault(),Ke(d,sa,!1)):function(e,s){return uo&&s&&vl(e)}(g,r)?(y.preventDefault(),Ke(d,xi,!0)):function(e,s){return uo&&s&&_l(e)}(g,r)?(y.preventDefault(),Ke(d,xi,!1)):function(e,s,i,l){return e.toLowerCase()==="b"&&!s&&bl(i,l)}(g,n,r,f)?(y.preventDefault(),Ke(d,Cr,"bold")):function(e,s,i,l){return e.toLowerCase()==="u"&&!s&&bl(i,l)}(g,n,r,f)?(y.preventDefault(),Ke(d,Cr,"underline")):function(e,s,i,l){return e.toLowerCase()==="i"&&!s&&bl(i,l)}(g,n,r,f)?(y.preventDefault(),Ke(d,Cr,"italic")):function(e,s,i,l){return e==="Tab"&&!s&&!i&&!l}(g,n,f,r)?Ke(d,dh,y):function(e,s,i,l){return e.toLowerCase()==="z"&&!s&&bl(i,l)}(g,t,r,f)?(y.preventDefault(),Ke(d,cl,void 0)):function(e,s,i,l){return uo?e.toLowerCase()==="z"&&i&&s:e.toLowerCase()==="y"&&l||e.toLowerCase()==="z"&&l&&s}(g,t,r,f)?(y.preventDefault(),Ke(d,ul,void 0)):Yr(d._editorState._selection)?function(e,s,i,l){return!s&&e.toLowerCase()==="c"&&(uo?i:l)}(g,t,r,f)?(y.preventDefault(),Ke(d,hl,y)):function(e,s,i,l){return!s&&e.toLowerCase()==="x"&&(uo?i:l)}(g,t,r,f)?(y.preventDefault(),Ke(d,gl,y)):zh(g,r,f)&&(y.preventDefault(),Ke(d,Ec,y)):!wi&&zh(g,r,f)&&(y.preventDefault(),Ke(d,Ec,y)),function(e,s,i,l){return e||s||i||l}(f,t,n,r)&&Ke(d,zb,y))}],["pointerdown",function(y,d){const g=y.target,t=y.pointerType;g instanceof Node&&t!=="touch"&&Ur(d,()=>{On(yr(g))||(of=!0)})}],["compositionstart",function(y,d){Ur(d,()=>{const g=je();if(_e(g)&&!d.isComposing()){const t=g.anchor,f=g.anchor.getNode();fr(t.key),(y.timeStamp<Ol+ef||t.type==="element"||!g.isCollapsed()||f.getFormat()!==g.format||Pe(f)&&f.getStyle()!==g.style)&&Ke(d,_i,Kb)}})}],["compositionend",function(y,d){wi?jl=!0:Ur(d,()=>{af(d,y.data)})}],["input",function(y,d){y.stopPropagation(),Ur(d,()=>{const g=je(),t=y.data,f=ig(y);if(t!=null&&_e(g)&&ng(g,f,t,y.timeStamp,!1)){jl&&(af(d,t),jl=!1);const r=g.anchor.getNode(),n=So(d._window);if(n===null)return;const e=g.isBackward(),s=e?g.anchor.offset:g.focus.offset,i=e?g.focus.offset:g.anchor.offset;kc&&!g.isCollapsed()&&Pe(r)&&n.anchorNode!==null&&r.getTextContent().slice(0,s)+t+r.getTextContent().slice(s+i)===Dh(n.anchorNode)||Ke(d,_i,t);const l=t.length;wi&&l>1&&y.inputType==="insertCompositionText"&&!d.isComposing()&&(g.anchor.offset-=l),Cd||Oc||Ed||!d.isComposing()||(Ol=0,fr(null))}else zd(!1,d,t!==null?t:void 0),jl&&(af(d,t||void 0),jl=!1);Or(),xh(qn())}),os=null}],["click",function(y,d){Ur(d,()=>{const g=je(),t=So(d._window),f=pa();if(t){if(_e(g)){const r=g.anchor,n=r.getNode();r.type==="element"&&r.offset===0&&g.isCollapsed()&&!br(n)&&Dn().getChildrenSize()===1&&n.getTopLevelElementOrThrow().isEmpty()&&f!==null&&g.is(f)?(t.removeAllRanges(),g.dirty=!0):y.detail===3&&!g.isCollapsed()&&n!==g.focus.getNode()&&(he(n)?n.select(0):n.getParentOrThrow().select(0))}else if(y.pointerType==="touch"){const r=t.anchorNode;if(r!==null){const n=r.nodeType;(n===ml||n===Si)&&or(Kc(f,t,d,y))}}}Ke(d,uh,y)})}],["cut",Go],["copy",Go],["dragstart",Go],["dragover",Go],["dragend",Go],["paste",Go],["focus",Go],["blur",Go],["drop",Go]];kc&&nf.push(["beforeinput",(y,d)=>function(g,t){const f=g.inputType,r=ig(g);f==="deleteCompositionText"||wi&&qh(t)||f!=="insertCompositionText"&&Ur(t,()=>{const n=je();if(f==="deleteContentBackward"){if(n===null){const c=pa();if(!_e(c))return;or(c.clone())}if(_e(n)){const c=n.anchor.key===n.focus.key;if(e=g.timeStamp,Xh==="MediaLast"&&e<Ol+ef&&t.isComposing()&&c){if(fr(null),Ol=0,setTimeout(()=>{Ur(t,()=>{fr(null)})},ef),_e(n)){const u=n.anchor.getNode();u.markDirty(),n.format=u.getFormat(),Pe(u)||Je(142),n.style=u.getStyle()}}else{fr(null),g.preventDefault();const u=n.anchor.getNode().getTextContent(),h=n.anchor.offset===0&&n.focus.offset===u.length;Hb&&c&&!h||Ke(t,lo,!0)}return}}var e;if(!_e(n))return;const s=g.data;os!==null&&zd(!1,t,os),n.dirty&&os===null||!n.isCollapsed()||br(n.anchor.getNode())||r===null||n.applyDOMRange(r),os=null;const i=n.anchor,l=n.focus,o=i.getNode(),a=l.getNode();if(f!=="insertText"&&f!=="insertTranspose")switch(g.preventDefault(),f){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Ke(t,_i,g);break;case"insertFromComposition":fr(null),Ke(t,_i,g);break;case"insertLineBreak":fr(null),Ke(t,vi,!1);break;case"insertParagraph":fr(null),Tl&&!Oc?(Tl=!1,Ke(t,vi,!1)):Ke(t,Ya,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Ke(t,ll,g);break;case"deleteByComposition":(function(c,u){return c!==u||he(c)||he(u)||!c.isToken()||!u.isToken()})(o,a)&&Ke(t,xc,g);break;case"deleteByDrag":case"deleteByCut":Ke(t,xc,g);break;case"deleteContent":Ke(t,lo,!1);break;case"deleteWordBackward":Ke(t,sa,!0);break;case"deleteWordForward":Ke(t,sa,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Ke(t,xi,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Ke(t,xi,!1);break;case"formatStrikeThrough":Ke(t,Cr,"strikethrough");break;case"formatBold":Ke(t,Cr,"bold");break;case"formatItalic":Ke(t,Cr,"italic");break;case"formatUnderline":Ke(t,Cr,"underline");break;case"historyUndo":Ke(t,cl,void 0);break;case"historyRedo":Ke(t,ul,void 0)}else{if(s===`
|
|
32
|
+
`)g.preventDefault(),Ke(t,vi,!1);else if(s===Jo)g.preventDefault(),Ke(t,Ya,void 0);else if(s==null&&g.dataTransfer){const c=g.dataTransfer.getData("text/plain");g.preventDefault(),n.insertRawText(c)}else s!=null&&ng(n,r,s,g.timeStamp,!0)?(g.preventDefault(),Ke(t,_i,s)):os=s;tg=g.timeStamp}})}(y,d)]);let Ol=0,Xh=null,tg=0,os=null;const qc=new WeakMap;let rf=!1,of=!1,Tl=!1,jl=!1,eg=[0,"",0,"root",0];function ng(y,d,g,t,f){const r=y.anchor,n=y.focus,e=r.getNode(),s=qn(),i=So(s._window),l=i!==null?i.anchorNode:null,o=r.key,a=s.getElementByKey(o),c=g.length;return o!==n.key||!Pe(e)||(!f&&(!kc||tg<t+50)||e.isDirty()&&c<2||Rh(g))&&r.offset!==n.offset&&!e.isComposing()||es(e)||e.isDirty()&&c>1||(f||!kc)&&a!==null&&!e.isComposing()&&l!==Pc(a)||i!==null&&d!==null&&(!d.collapsed||d.startContainer!==i.anchorNode||d.startOffset!==i.anchorOffset)||e.getFormat()!==y.format||e.getStyle()!==y.style||cv(y,e)}function rg(y,d){return y!==null&&y.nodeValue!==null&&y.nodeType===Si&&d!==0&&d!==y.nodeValue.length}function og(y,d,g){const{anchorNode:t,anchorOffset:f,focusNode:r,focusOffset:n}=y;rf&&(rf=!1,rg(t,f)&&rg(r,n))||Ur(d,()=>{if(!g)return void or(null);if(!yl(d,t,r))return;const e=je();if(_e(e)){const s=e.anchor,i=s.getNode();if(e.isCollapsed()){y.type==="Range"&&y.anchorNode===y.focusNode&&(e.dirty=!0);const l=Lc(d).event,o=l?l.timeStamp:performance.now(),[a,c,u,h,p]=eg,m=Dn(),b=d.isComposing()===!1&&m.getTextContent()==="";if(o<p+200&&s.offset===u&&s.key===h)e.format=a,e.style=c;else if(s.type==="text")Pe(i)||Je(141),e.format=i.getFormat(),e.style=i.getStyle();else if(s.type==="element"&&!b){const _=s.getNode();_ instanceof ga&&_.getChildrenSize()===0?e.format=_.getTextFormat():e.format=0,e.style=""}}else{const l=s.key,o=e.focus.key,a=e.getNodes(),c=a.length,u=e.isBackward(),h=u?n:f,p=u?f:n,m=u?o:l,b=u?l:o;let _=Vb,v=!1;for(let w=0;w<c;w++){const x=a[w],S=x.getTextContentSize();if(Pe(x)&&S!==0&&!(w===0&&x.__key===m&&h===S||w===c-1&&x.__key===b&&p===0)&&(v=!0,_&=x.getFormat(),_===0))break}e.format=v?_:0}}Ke(d,qo,void 0)})}function ig(y){if(!y.getTargetRanges)return null;const d=y.getTargetRanges();return d.length===0?null:d[0]}function af(y,d){const g=y._compositionKey;if(fr(null),g!==null&&d!=null){if(d===""){const t=Hn(g),f=Pc(y.getElementByKey(g));return void(f!==null&&f.nodeValue!==null&&Pe(t)&&Ud(t,f.nodeValue,null,null,!0))}if(d[d.length-1]===`
|
|
33
|
+
`){const t=je();if(_e(t)){const f=t.focus;return t.anchor.set(f.key,f.offset,f.type),void Ke(y,dl,null)}}}zd(!0,y,d)}function ag(y){let d=y.__lexicalEventHandles;return d===void 0&&(d=[],y.__lexicalEventHandles=d),d}const is=new Map;function sg(y){const d=y.target,g=So(d==null?null:d.nodeType===9?d.defaultView:d.ownerDocument.defaultView);if(g===null)return;const t=Oh(g.anchorNode);if(t===null)return;of&&(of=!1,Ur(t,()=>{const i=pa(),l=g.anchorNode;if(l===null)return;const o=l.nodeType;o!==ml&&o!==Si||or(Kc(i,g,t,y))}));const f=Fd(t),r=f[f.length-1],n=r._key,e=is.get(n),s=e||r;s!==t&&og(g,s,!1),og(g,t,!0),t!==r?is.set(n,t):e&&is.delete(n)}function lg(y){y._lexicalHandled=!0}function cg(y){return y._lexicalHandled===!0}function xv(y){const d=y.ownerDocument,g=qc.get(d);g===void 0&&Je(162);const t=g-1;t>=0||Je(164),qc.set(d,t),t===0&&d.removeEventListener("selectionchange",sg);const f=y.__lexicalEditor;f!=null&&(function(n){if(n._parentEditor!==null){const e=Fd(n),s=e[e.length-1]._key;is.get(s)===n&&is.delete(s)}else is.delete(n._key)}(f),y.__lexicalEditor=null);const r=ag(y);for(let n=0;n<r.length;n++)r[n]();y.__lexicalEventHandles=[]}function sf(y,d,g){Or();const t=y.__key,f=y.getParent();if(f===null)return;const r=function(e){const s=je();if(!_e(s)||!he(e))return s;const{anchor:i,focus:l}=s,o=i.getNode(),a=l.getNode();return Hd(o,e)&&i.set(e.__key,0,"element"),Hd(a,e)&&l.set(e.__key,0,"element"),s}(y);let n=!1;if(_e(r)&&d){const e=r.anchor,s=r.focus;e.key===t&&(Yc(e,y,f,y.getPreviousSibling(),y.getNextSibling()),n=!0),s.key===t&&(Yc(s,y,f,y.getPreviousSibling(),y.getNextSibling()),n=!0)}else Yr(r)&&d&&y.isSelected()&&y.selectPrevious();if(_e(r)&&d&&!n){const e=y.getIndexWithinParent();ca(y),Gc(r,f,e,-1)}else ca(y);g||wo(f)||f.canBeEmpty()||!f.isEmpty()||sf(f,d),d&&br(f)&&f.isEmpty()&&f.selectEnd()}class Jc{static getType(){Je(64,this.name)}static clone(d){Je(65,this.name)}constructor(d){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Th(this,d)}getType(){return this.__type}isInline(){Je(137,this.constructor.name)}isAttached(){let d=this.__key;for(;d!==null;){if(d==="root")return!0;const g=Hn(d);if(g===null)break;d=g.__parent}return!1}isSelected(d){const g=d||je();if(g==null)return!1;const t=g.getNodes().some(f=>f.__key===this.__key);return(Pe(this)||!_e(g)||g.anchor.type!=="element"||g.focus.type!=="element"||g.anchor.key!==g.focus.key||g.anchor.offset!==g.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){const d=this.getParent();if(d===null)return-1;let g=d.getFirstChild(),t=0;for(;g!==null;){if(this.is(g))return t;t++,g=g.getNextSibling()}return-1}getParent(){const d=this.getLatest().__parent;return d===null?null:Hn(d)}getParentOrThrow(){const d=this.getParent();return d===null&&Je(66,this.__key),d}getTopLevelElement(){let d=this;for(;d!==null;){const g=d.getParent();if(wo(g))return he(d)||Je(138),d;d=g}return null}getTopLevelElementOrThrow(){const d=this.getTopLevelElement();return d===null&&Je(67,this.__key),d}getParents(){const d=[];let g=this.getParent();for(;g!==null;)d.push(g),g=g.getParent();return d}getParentKeys(){const d=[];let g=this.getParent();for(;g!==null;)d.push(g.__key),g=g.getParent();return d}getPreviousSibling(){const d=this.getLatest().__prev;return d===null?null:Hn(d)}getPreviousSiblings(){const d=[],g=this.getParent();if(g===null)return d;let t=g.getFirstChild();for(;t!==null&&!t.is(this);)d.push(t),t=t.getNextSibling();return d}getNextSibling(){const d=this.getLatest().__next;return d===null?null:Hn(d)}getNextSiblings(){const d=[];let g=this.getNextSibling();for(;g!==null;)d.push(g),g=g.getNextSibling();return d}getCommonAncestor(d){const g=this.getParents(),t=d.getParents();he(this)&&g.unshift(this),he(d)&&t.unshift(d);const f=g.length,r=t.length;if(f===0||r===0||g[f-1]!==t[r-1])return null;const n=new Set(t);for(let e=0;e<f;e++){const s=g[e];if(n.has(s))return s}return null}is(d){return d!=null&&this.__key===d.__key}isBefore(d){if(this===d)return!1;if(d.isParentOf(this))return!0;if(this.isParentOf(d))return!1;const g=this.getCommonAncestor(d);let t=0,f=0,r=this;for(;;){const n=r.getParentOrThrow();if(n===g){t=r.getIndexWithinParent();break}r=n}for(r=d;;){const n=r.getParentOrThrow();if(n===g){f=r.getIndexWithinParent();break}r=n}return t<f}isParentOf(d){const g=this.__key;if(g===d.__key)return!1;let t=d;for(;t!==null;){if(t.__key===g)return!0;t=t.getParent()}return!1}getNodesBetween(d){const g=this.isBefore(d),t=[],f=new Set;let r=this;for(;r!==null;){const n=r.__key;if(f.has(n)||(f.add(n),t.push(r)),r===d)break;const e=he(r)?g?r.getFirstChild():r.getLastChild():null;if(e!==null){r=e;continue}const s=g?r.getNextSibling():r.getPreviousSibling();if(s!==null){r=s;continue}const i=r.getParentOrThrow();if(f.has(i.__key)||t.push(i),i===d)break;let l=null,o=i;do{if(o===null&&Je(68),l=g?o.getNextSibling():o.getPreviousSibling(),o=o.getParent(),o===null)break;l!==null||f.has(o.__key)||t.push(o)}while(l===null);r=l}return g||t.reverse(),t}isDirty(){const d=qn()._dirtyLeaves;return d!==null&&d.has(this.__key)}getLatest(){const d=Hn(this.__key);return d===null&&Je(113),d}getWritable(){Or();const d=Co(),g=qn(),t=d._nodeMap,f=this.__key,r=this.getLatest(),n=r.__parent,e=g._cloneNotNeeded,s=je();if(s!==null&&s.setCachedNodes(null),e.has(f))return Ic(r),r;const i=r.constructor.clone(r);return i.__parent=n,i.__next=r.__next,i.__prev=r.__prev,he(r)&&he(i)?(ma(r)&&ma(i)&&(i.__textFormat=r.__textFormat),i.__first=r.__first,i.__last=r.__last,i.__size=r.__size,i.__indent=r.__indent,i.__format=r.__format,i.__dir=r.__dir):Pe(r)&&Pe(i)&&(i.__format=r.__format,i.__style=r.__style,i.__mode=r.__mode,i.__detail=r.__detail),e.add(f),i.__key=f,Ic(i),t.set(f,i),i}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(d,g){Je(70)}updateDOM(d,g,t){Je(71)}exportDOM(d){return{element:this.createDOM(d._config,d)}}exportJSON(){Je(72)}static importJSON(d){Je(18,this.name)}static transform(){return null}remove(d){sf(this,!0,d)}replace(d,g){Or();let t=je();t!==null&&(t=t.clone()),qd(this,d);const f=this.getLatest(),r=this.__key,n=d.__key,e=d.getWritable(),s=this.getParentOrThrow().getWritable(),i=s.__size;ca(e);const l=f.getPreviousSibling(),o=f.getNextSibling(),a=f.__prev,c=f.__next,u=f.__parent;if(sf(f,!1,!0),l===null?s.__first=n:l.getWritable().__next=n,e.__prev=a,o===null?s.__last=n:o.getWritable().__prev=n,e.__next=c,e.__parent=u,s.__size=i,g&&(he(this)&&he(e)||Je(139),this.getChildren().forEach(h=>{e.append(h)})),_e(t)){or(t);const h=t.anchor,p=t.focus;h.key===r&&mg(h,e),p.key===r&&mg(p,e)}return Ci()===r&&fr(n),e}insertAfter(d,g=!0){Or(),qd(this,d);const t=this.getWritable(),f=d.getWritable(),r=f.getParent(),n=je();let e=!1,s=!1;if(r!==null){const c=d.getIndexWithinParent();if(ca(f),_e(n)){const u=r.__key,h=n.anchor,p=n.focus;e=h.type==="element"&&h.key===u&&h.offset===c+1,s=p.type==="element"&&p.key===u&&p.offset===c+1}}const i=this.getNextSibling(),l=this.getParentOrThrow().getWritable(),o=f.__key,a=t.__next;if(i===null?l.__last=o:i.getWritable().__prev=o,l.__size++,t.__next=o,f.__next=a,f.__prev=t.__key,f.__parent=t.__parent,g&&_e(n)){const c=this.getIndexWithinParent();Gc(n,l,c+1);const u=l.__key;e&&n.anchor.set(u,c+2,"element"),s&&n.focus.set(u,c+2,"element")}return d}insertBefore(d,g=!0){Or(),qd(this,d);const t=this.getWritable(),f=d.getWritable(),r=f.__key;ca(f);const n=this.getPreviousSibling(),e=this.getParentOrThrow().getWritable(),s=t.__prev,i=this.getIndexWithinParent();n===null?e.__first=r:n.getWritable().__next=r,e.__size++,t.__prev=r,f.__prev=s,f.__next=t.__key,f.__parent=t.__parent;const l=je();return g&&_e(l)&&Gc(l,this.getParentOrThrow(),i),d}isParentRequired(){return!1}createParentElementNode(){return Qn()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(d,g){Or();const t=this.getPreviousSibling(),f=this.getParentOrThrow();if(t===null)return f.select(0,0);if(he(t))return t.select();if(!Pe(t)){const r=t.getIndexWithinParent()+1;return f.select(r,r)}return t.select(d,g)}selectNext(d,g){Or();const t=this.getNextSibling(),f=this.getParentOrThrow();if(t===null)return f.select();if(he(t))return t.select(0,0);if(!Pe(t)){const r=t.getIndexWithinParent();return f.select(r,r)}return t.select(d,g)}markDirty(){this.getWritable()}}class as extends Jc{static getType(){return"linebreak"}static clone(d){return new as(d.__key)}constructor(d){super(d)}getTextContent(){return`
|
|
34
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:d=>function(g){const t=g.parentElement;if(t!==null){const f=t.firstChild;if(f===g||f.nextSibling===g&&ug(f)){const r=t.lastChild;if(r===g||r.previousSibling===g&&ug(r))return!0}}return!1}(d)?null:{conversion:wv,priority:0}}}static importJSON(d){return ss()}exportJSON(){return{type:"linebreak",version:1}}}function wv(y){return{node:ss()}}function ss(){return Vo(new as)}function fa(y){return y instanceof as}function ug(y){return y.nodeType===Si&&/^( |\t|\r?\n)+$/.test(y.textContent||"")}function lf(y,d){return 16&d?"code":d&kd?"mark":32&d?"sub":64&d?"sup":null}function cf(y,d){return 1&d?"strong":2&d?"em":"span"}function dg(y,d,g,t,f){const r=t.classList;let n=xl(f,"base");n!==void 0&&r.add(...n),n=xl(f,"underlineStrikethrough");let e=!1;const s=d&jc&&d&Tc;n!==void 0&&(g&jc&&g&Tc?(e=!0,s||r.add(...n)):s&&r.remove(...n));for(const i in Wo){const l=Wo[i];if(n=xl(f,i),n!==void 0)if(g&l){if(e&&(i==="underline"||i==="strikethrough")){d&l&&r.remove(...n);continue}d&l&&(!s||i!=="underline")&&i!=="strikethrough"||r.add(...n)}else d&l&&r.remove(...n)}}function fg(y,d,g){const t=d.firstChild,f=g.isComposing(),r=y+(f?Ac:"");if(t==null)d.textContent=r;else{const n=t.nodeValue;if(n!==r)if(f||wi){const[e,s,i]=function(l,o){const a=l.length,c=o.length;let u=0,h=0;for(;u<a&&u<c&&l[u]===o[u];)u++;for(;h+u<a&&h+u<c&&l[a-h-1]===o[c-h-1];)h++;return[u,a-u-h,o.slice(u,c-h)]}(n,r);s!==0&&t.deleteData(e,s),t.insertData(e,i)}else t.nodeValue=r}}function pg(y,d,g,t,f,r){fg(f,y,d);const n=r.theme.text;n!==void 0&&dg(0,0,t,y,n)}function Wc(y,d){const g=document.createElement(d);return g.appendChild(y),g}class ki extends Jc{static getType(){return"text"}static clone(d){return new ki(d.__text,d.__key)}constructor(d,g){super(g),this.__text=d,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const d=this.getLatest();return tv[d.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Ci()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(d){const g=Wo[d];return!!(this.getFormat()&g)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(d,g){return Bd(this.getLatest().__format,d,g)}canHaveFormat(){return!0}createDOM(d,g){const t=this.__format,f=lf(0,t),r=cf(0,t),n=f===null?r:f,e=document.createElement(n);let s=e;this.hasFormat("code")&&e.setAttribute("spellcheck","false"),f!==null&&(s=document.createElement(r),e.appendChild(s)),pg(s,this,0,t,this.__text,d);const i=this.__style;return i!==""&&(e.style.cssText=i),e}updateDOM(d,g,t){const f=this.__text,r=d.__format,n=this.__format,e=lf(0,r),s=lf(0,n),i=cf(0,r),l=cf(0,n);if((e===null?i:e)!==(s===null?l:s))return!0;if(e===s&&i!==l){const h=g.firstChild;h==null&&Je(48);const p=document.createElement(l);return pg(p,this,0,n,f,t),g.replaceChild(p,h),!1}let o=g;s!==null&&e!==null&&(o=g.firstChild,o==null&&Je(49)),fg(f,o,this);const a=t.theme.text;a!==void 0&&r!==n&&dg(0,r,n,o,a);const c=d.__style,u=this.__style;return c!==u&&(g.style.cssText=u),!1}static importDOM(){return{"#text":()=>({conversion:kv,priority:0}),b:()=>({conversion:Cv,priority:0}),code:()=>({conversion:Oi,priority:0}),em:()=>({conversion:Oi,priority:0}),i:()=>({conversion:Oi,priority:0}),s:()=>({conversion:Oi,priority:0}),span:()=>({conversion:Sv,priority:0}),strong:()=>({conversion:Oi,priority:0}),sub:()=>({conversion:Oi,priority:0}),sup:()=>({conversion:Oi,priority:0}),u:()=>({conversion:Oi,priority:0})}}static importJSON(d){const g=Zn(d.text);return g.setFormat(d.format),g.setDetail(d.detail),g.setMode(d.mode),g.setStyle(d.style),g}exportDOM(d){let{element:g}=super.exportDOM(d);return g!==null&&Sl(g)||Je(132),g.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(g=Wc(g,"b")),this.hasFormat("italic")&&(g=Wc(g,"i")),this.hasFormat("strikethrough")&&(g=Wc(g,"s")),this.hasFormat("underline")&&(g=Wc(g,"u")),{element:g}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(d,g){}setFormat(d){const g=this.getWritable();return g.__format=typeof d=="string"?Wo[d]:d,g}setDetail(d){const g=this.getWritable();return g.__detail=typeof d=="string"?Zb[d]:d,g}setStyle(d){const g=this.getWritable();return g.__style=d,g}toggleFormat(d){const g=Bd(this.getFormat(),d,null);return this.setFormat(g)}toggleDirectionless(){const d=this.getWritable();return d.__detail^=1,d}toggleUnmergeable(){const d=this.getWritable();return d.__detail^=2,d}setMode(d){const g=Xb[d];if(this.__mode===g)return this;const t=this.getWritable();return t.__mode=g,t}setTextContent(d){if(this.__text===d)return this;const g=this.getWritable();return g.__text=d,g}select(d,g){Or();let t=d,f=g;const r=je(),n=this.getTextContent(),e=this.__key;if(typeof n=="string"){const s=n.length;t===void 0&&(t=s),f===void 0&&(f=s)}else t=0,f=0;if(!_e(r))return Sg(e,t,e,f,"text","text");{const s=Ci();s!==r.anchor.key&&s!==r.focus.key||fr(e),r.setTextNodeRange(this,t,this,f)}return r}selectStart(){return this.select(0,0)}selectEnd(){const d=this.getTextContentSize();return this.select(d,d)}spliceText(d,g,t,f){const r=this.getWritable(),n=r.__text,e=t.length;let s=d;s<0&&(s=e+s,s<0&&(s=0));const i=je();if(f&&_e(i)){const o=d+e;i.setTextNodeRange(r,o,r,o)}const l=n.slice(0,s)+t+n.slice(s+g);return r.__text=l,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...d){Or();const g=this.getLatest(),t=g.getTextContent(),f=g.__key,r=Ci(),n=new Set(d),e=[],s=t.length;let i="";for(let S=0;S<s;S++)i!==""&&n.has(S)&&(e.push(i),i=""),i+=t[S];i!==""&&e.push(i);const l=e.length;if(l===0)return[];if(e[0]===t)return[g];const o=e[0],a=g.getParentOrThrow();let c;const u=g.getFormat(),h=g.getStyle(),p=g.__detail;let m=!1;g.isSegmented()?(c=Zn(o),c.__format=u,c.__style=h,c.__detail=p,m=!0):(c=g.getWritable(),c.__text=o);const b=je(),_=[c];let v=o.length;for(let S=1;S<l;S++){const E=e[S],k=E.length,D=Zn(E).getWritable();D.__format=u,D.__style=h,D.__detail=p;const N=D.__key,O=v+k;if(_e(b)){const R=b.anchor,A=b.focus;R.key===f&&R.type==="text"&&R.offset>v&&R.offset<=O&&(R.key=N,R.offset-=v,b.dirty=!0),A.key===f&&A.type==="text"&&A.offset>v&&A.offset<=O&&(A.key=N,A.offset-=v,b.dirty=!0)}r===f&&fr(N),v=O,_.push(D)}(function(S){const E=S.getPreviousSibling(),k=S.getNextSibling();E!==null&&Ic(E),k!==null&&Ic(k)})(this);const w=a.getWritable(),x=this.getIndexWithinParent();return m?(w.splice(x,0,_),this.remove()):w.splice(x,1,_),_e(b)&&Gc(b,a,x,l-1),_}mergeWithSibling(d){const g=d===this.getPreviousSibling();g||d===this.getNextSibling()||Je(50);const t=this.__key,f=d.__key,r=this.__text,n=r.length;Ci()===f&&fr(t);const e=je();if(_e(e)){const o=e.anchor,a=e.focus;o!==null&&o.key===f&&(Eg(o,g,t,d,n),e.dirty=!0),a!==null&&a.key===f&&(Eg(a,g,t,d,n),e.dirty=!0)}const s=d.__text,i=g?s+r:r+s;this.setTextContent(i);const l=this.getWritable();return d.remove(),l}isTextEntity(){return!1}}function Sv(y){return{forChild:uf(y.style),node:null}}function Cv(y){const d=y,g=d.style.fontWeight==="normal";return{forChild:uf(d.style,g?void 0:"bold"),node:null}}const hg=new WeakMap;function Ev(y){return y.nodeName==="PRE"||y.nodeType===ml&&y.style!==void 0&&y.style.whiteSpace!==void 0&&y.style.whiteSpace.startsWith("pre")}function kv(y){const d=y;y.parentElement===null&&Je(129);let g=d.textContent||"";if(function(t){let f,r=t.parentNode;const n=[t];for(;r!==null&&(f=hg.get(r))===void 0&&!Ev(r);)n.push(r),r=r.parentNode;const e=f===void 0?r:f;for(let s=0;s<n.length;s++)hg.set(n[s],e);return e}(d)!==null){const t=g.split(/(\r?\n|\t)/),f=[],r=t.length;for(let n=0;n<r;n++){const e=t[n];e===`
|
|
35
35
|
`||e===`\r
|
|
36
|
-
`?f.push(ss()):e===" "?f.push(Nl()):e!==""&&f.push(Zn(e))}return{node:f}}if(g=g.replace(/\r/g,"").replace(/[ \t\n]+/g," "),g==="")return{node:null};if(g[0]===" "){let t=d,f=!0;for(;t!==null&&(t=
|
|
37
|
-
`),l=!a.isEmpty();else if(l=!1,Pe(a)){let c=a.getTextContent();a===g?a===t?f.type==="element"&&r.type==="element"&&r.offset!==f.offset||(c=e<s?c.slice(e,s):c.slice(s,e)):c=n?c.slice(e):c.slice(s):a===t&&(c=n?c.slice(0,s):c.slice(0,e)),i+=c}else!On(a)&&!fa(a)||a===t&&this.isCollapsed()||(i+=a.getTextContent())}return i}applyDOMRange(d){const g=qn(),t=g.getEditorState()._selection,f=
|
|
36
|
+
`?f.push(ss()):e===" "?f.push(Nl()):e!==""&&f.push(Zn(e))}return{node:f}}if(g=g.replace(/\r/g,"").replace(/[ \t\n]+/g," "),g==="")return{node:null};if(g[0]===" "){let t=d,f=!0;for(;t!==null&&(t=gg(t,!1))!==null;){const r=t.textContent||"";if(r.length>0){/[ \t\n]$/.test(r)&&(g=g.slice(1)),f=!1;break}}f&&(g=g.slice(1))}if(g[g.length-1]===" "){let t=d,f=!0;for(;t!==null&&(t=gg(t,!0))!==null;)if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(g=g.slice(0,g.length-1))}return g===""?{node:null}:{node:Zn(g)}}function gg(y,d){let g=y;for(;;){let t;for(;(t=d?g.nextSibling:g.previousSibling)===null;){const r=g.parentElement;if(r===null)return null;g=r}if(g=t,g.nodeType===ml){const r=g.style.display;if(r===""&&!mv(g)||r!==""&&!r.startsWith("inline"))return null}let f=g;for(;(f=d?g.firstChild:g.lastChild)!==null;)g=f;if(g.nodeType===Si)return g;if(g.nodeName==="BR")return null}}const Ov={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Oi(y){const d=Ov[y.nodeName.toLowerCase()];return d===void 0?{node:null}:{forChild:uf(y.style,d),node:null}}function Zn(y=""){return Vo(new ki(y))}function Pe(y){return y instanceof ki}function uf(y,d){const g=y.fontWeight,t=y.textDecoration.split(" "),f=g==="700"||g==="bold",r=t.includes("line-through"),n=y.fontStyle==="italic",e=t.includes("underline"),s=y.verticalAlign;return i=>(Pe(i)&&(f&&!i.hasFormat("bold")&&i.toggleFormat("bold"),r&&!i.hasFormat("strikethrough")&&i.toggleFormat("strikethrough"),n&&!i.hasFormat("italic")&&i.toggleFormat("italic"),e&&!i.hasFormat("underline")&&i.toggleFormat("underline"),s!=="sub"||i.hasFormat("subscript")||i.toggleFormat("subscript"),s!=="super"||i.hasFormat("superscript")||i.toggleFormat("superscript"),d&&!i.hasFormat(d)&&i.toggleFormat(d)),i)}class Al extends ki{static getType(){return"tab"}static clone(d){const g=new Al(d.__key);return g.__text=d.__text,g.__format=d.__format,g.__style=d.__style,g}constructor(d){super(" ",d),this.__detail=2}static importDOM(){return null}static importJSON(d){const g=Nl();return g.setFormat(d.format),g.setStyle(d.style),g}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(d){Je(126)}setDetail(d){Je(127)}setMode(d){Je(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Nl(){return Vo(new Al)}function Tv(y){return y instanceof Al}class jv{constructor(d,g,t){this._selection=null,this.key=d,this.offset=g,this.type=t}is(d){return this.key===d.key&&this.offset===d.offset&&this.type===d.type}isBefore(d){let g=this.getNode(),t=d.getNode();const f=this.offset,r=d.offset;if(he(g)){const n=g.getDescendantByIndex(f);g=n??g}if(he(t)){const n=t.getDescendantByIndex(r);t=n??t}return g===t?f<r:g.isBefore(t)}getNode(){const d=Hn(this.key);return d===null&&Je(20),d}set(d,g,t){const f=this._selection,r=this.key;this.key=d,this.offset=g,this.type=t,ls()||(Ci()===r&&fr(d),f!==null&&(f.setCachedNodes(null),f.dirty=!0))}}function Gr(y,d,g){return new jv(y,d,g)}function df(y,d){let g=d.__key,t=y.offset,f="element";if(Pe(d)){f="text";const r=d.getTextContentSize();t>r&&(t=r)}else if(!he(d)){const r=d.getNextSibling();if(Pe(r))g=r.__key,t=0,f="text";else{const n=d.getParent();n&&(g=n.__key,t=d.getIndexWithinParent()+1)}}y.set(g,t,f)}function mg(y,d){if(he(d)){const g=d.getLastDescendant();he(g)||Pe(g)?df(y,g):df(y,d)}else df(y,d)}function Ti(y,d,g,t){y.key=d,y.offset=g,y.type=t}class Vc{constructor(d){this._cachedNodes=null,this._nodes=d,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(d){this._cachedNodes=d}is(d){if(!Yr(d))return!1;const g=this._nodes,t=d._nodes;return g.size===t.size&&Array.from(g).every(f=>t.has(f))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(d){this.dirty=!0,this._nodes.add(d),this._cachedNodes=null}delete(d){this.dirty=!0,this._nodes.delete(d),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(d){return this._nodes.has(d)}clone(){return new Vc(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(d){}insertText(){}insertNodes(d){const g=this.getNodes(),t=g.length,f=g[t-1];let r;if(Pe(f))r=f.select();else{const n=f.getIndexWithinParent()+1;r=f.getParentOrThrow().select(n,n)}r.insertNodes(d);for(let n=0;n<t;n++)g[n].remove()}getNodes(){const d=this._cachedNodes;if(d!==null)return d;const g=this._nodes,t=[];for(const f of g){const r=Hn(f);r!==null&&t.push(r)}return ls()||(this._cachedNodes=t),t}getTextContent(){const d=this.getNodes();let g="";for(let t=0;t<d.length;t++)g+=d[t].getTextContent();return g}}function _e(y){return y instanceof ji}class ji{constructor(d,g,t,f){this.anchor=d,this.focus=g,d._selection=this,g._selection=this,this._cachedNodes=null,this.format=t,this.style=f,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(d){this._cachedNodes=d}is(d){return!!_e(d)&&this.anchor.is(d.anchor)&&this.focus.is(d.focus)&&this.format===d.format&&this.style===d.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const d=this._cachedNodes;if(d!==null)return d;const g=this.anchor,t=this.focus,f=g.isBefore(t),r=f?g:t,n=f?t:g;let e=r.getNode(),s=n.getNode();const i=r.offset,l=n.offset;if(he(e)){const a=e.getDescendantByIndex(i);e=a??e}if(he(s)){let a=s.getDescendantByIndex(l);a!==null&&a!==e&&s.getChildAtIndex(l)===a&&(a=a.getPreviousSibling()),s=a??s}let o;return o=e.is(s)?he(e)&&e.getChildrenSize()>0?[]:[e]:e.getNodesBetween(s),ls()||(this._cachedNodes=o),o}setTextNodeRange(d,g,t,f){Ti(this.anchor,d.__key,g,"text"),Ti(this.focus,t.__key,f,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const d=this.getNodes();if(d.length===0)return"";const g=d[0],t=d[d.length-1],f=this.anchor,r=this.focus,n=f.isBefore(r),[e,s]=ff(this);let i="",l=!0;for(let o=0;o<d.length;o++){const a=d[o];if(he(a)&&!a.isInline())l||(i+=`
|
|
37
|
+
`),l=!a.isEmpty();else if(l=!1,Pe(a)){let c=a.getTextContent();a===g?a===t?f.type==="element"&&r.type==="element"&&r.offset!==f.offset||(c=e<s?c.slice(e,s):c.slice(s,e)):c=n?c.slice(e):c.slice(s):a===t&&(c=n?c.slice(0,s):c.slice(0,e)),i+=c}else!On(a)&&!fa(a)||a===t&&this.isCollapsed()||(i+=a.getTextContent())}return i}applyDOMRange(d){const g=qn(),t=g.getEditorState()._selection,f=wg(d.startContainer,d.startOffset,d.endContainer,d.endOffset,g,t);if(f===null)return;const[r,n]=f;Ti(this.anchor,r.key,r.offset,r.type),Ti(this.focus,n.key,n.offset,n.type),this._cachedNodes=null}clone(){const d=this.anchor,g=this.focus;return new ji(Gr(d.key,d.offset,d.type),Gr(g.key,g.offset,g.type),this.format,this.style)}toggleFormat(d){this.format=Bd(this.format,d,null),this.dirty=!0}setStyle(d){this.style=d,this.dirty=!0}hasFormat(d){const g=Wo[d];return!!(this.format&g)}insertRawText(d){const g=d.split(/(\r?\n|\t)/),t=[],f=g.length;for(let r=0;r<f;r++){const n=g[r];n===`
|
|
38
38
|
`||n===`\r
|
|
39
|
-
`?t.push(ss()):n===" "?t.push(Nl()):t.push(Zn(n))}this.insertNodes(t)}insertText(d){const g=this.anchor,t=this.focus,f=this.format,r=this.style;let n=g,e=t;!this.isCollapsed()&&t.isBefore(g)&&(n=t,e=g),n.type==="element"&&function(p,m,b,_){const v=p.getNode(),w=v.getChildAtIndex(p.offset),x=Zn(),S=br(v)?Qn().append(x):x;x.setFormat(b),x.setStyle(_),w===null?v.append(S):w.insertBefore(S),p.is(m)&&m.set(x.__key,0,"text"),p.set(x.__key,0,"text")}(n,e,f,r);const s=n.offset;let i=e.offset;const l=this.getNodes(),o=l.length;let a=l[0];Pe(a)||Je(26);const c=a.getTextContent().length,u=a.getParentOrThrow();let h=l[o-1];if(o===1&&e.type==="element"&&(i=c,e.set(n.key,i,"text")),this.isCollapsed()&&s===c&&(a.isSegmented()||a.isToken()||!a.canInsertTextAfter()||!u.canInsertTextAfter()&&a.getNextSibling()===null)){let p=a.getNextSibling();if(Pe(p)&&p.canInsertTextBefore()&&!es(p)||(p=Zn(),p.setFormat(f),p.setStyle(r),u.canInsertTextAfter()?a.insertAfter(p):u.insertAfter(p)),p.select(0,0),a=p,d!=="")return void this.insertText(d)}else if(this.isCollapsed()&&s===0&&(a.isSegmented()||a.isToken()||!a.canInsertTextBefore()||!u.canInsertTextBefore()&&a.getPreviousSibling()===null)){let p=a.getPreviousSibling();if(Pe(p)&&!es(p)||(p=Zn(),p.setFormat(f),u.canInsertTextBefore()?a.insertBefore(p):u.insertBefore(p)),p.select(),a=p,d!=="")return void this.insertText(d)}else if(a.isSegmented()&&s!==c){const p=Zn(a.getTextContent());p.setFormat(f),a.replace(p),a=p}else if(!this.isCollapsed()&&d!==""){const p=h.getParent();if(!u.canInsertTextBefore()||!u.canInsertTextAfter()||he(p)&&(!p.canInsertTextBefore()||!p.canInsertTextAfter()))return this.insertText(""),wg(this.anchor,this.focus,null),void this.insertText(d)}if(o===1){if(a.isToken()){const _=Zn(d);return _.select(),void a.replace(_)}const p=a.getFormat(),m=a.getStyle();if(s!==i||p===f&&m===r){if(Tv(a)){const _=Zn(d);return _.setFormat(f),_.setStyle(r),_.select(),void a.replace(_)}}else{if(a.getTextContent()!==""){const _=Zn(d);if(_.setFormat(f),_.setStyle(r),_.select(),s===0)a.insertBefore(_,!1);else{const[v]=a.splitText(s);v.insertAfter(_,!1)}return void(_.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=d.length))}a.setFormat(f),a.setStyle(r)}const b=i-s;a=a.spliceText(s,b,d,!0),a.getTextContent()===""?a.remove():this.anchor.type==="text"&&(a.isComposing()?this.anchor.offset-=d.length:(this.format=p,this.style=m))}else{const p=new Set([...a.getParentKeys(),...h.getParentKeys()]),m=he(a)?a:a.getParentOrThrow();let b=he(h)?h:h.getParentOrThrow(),_=h;if(!m.is(b)&&b.isInline())do _=b,b=b.getParentOrThrow();while(b.isInline());if(e.type==="text"&&(i!==0||h.getTextContent()==="")||e.type==="element"&&h.getIndexWithinParent()<i)if(Pe(h)&&!h.isToken()&&i!==h.getTextContentSize()){if(h.isSegmented()){const E=Zn(h.getTextContent());h.replace(E),h=E}br(e.getNode())||e.type!=="text"||(h=h.spliceText(0,i,"")),p.add(h.__key)}else{const E=h.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?h.remove():E.remove()}else p.add(h.__key);const v=b.getChildren(),w=new Set(l),x=m.is(b),S=m.isInline()&&a.getNextSibling()===null?m:a;for(let E=v.length-1;E>=0;E--){const k=v[E];if(k.is(a)||he(k)&&k.isParentOf(a))break;k.isAttached()&&(!w.has(k)||k.is(_)?x||S.insertAfter(k,!1):k.remove())}if(!x){let E=b,k=null;for(;E!==null;){const D=E.getChildren(),N=D.length;(N===0||D[N-1].is(k))&&(p.delete(E.__key),k=E),E=E.getParent()}}if(a.isToken())if(s===c)a.select();else{const E=Zn(d);E.select(),a.replace(E)}else a=a.spliceText(s,c-s,d,!0),a.getTextContent()===""?a.remove():a.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=d.length);for(let E=1;E<o;E++){const k=l[E],D=k.__key;p.has(D)||k.remove()}}}removeText(){this.insertText("")}formatText(d){if(this.isCollapsed())return this.toggleFormat(d),void fr(null);const g=this.getNodes(),t=[];for(const b of g)Pe(b)&&t.push(b);const f=t.length;if(f===0)return this.toggleFormat(d),void fr(null);const r=this.anchor,n=this.focus,e=this.isBackward(),s=e?n:r,i=e?r:n;let l=0,o=t[0],a=s.type==="element"?0:s.offset;if(s.type==="text"&&a===o.getTextContentSize()&&(l=1,o=t[1],a=0),o==null)return;const c=o.getFormatFlags(d,null),u=f-1;let h=t[u];const p=i.type==="text"?i.offset:h.getTextContentSize();if(o.is(h)){if(a===p)return;if(es(o)||a===0&&p===o.getTextContentSize())o.setFormat(c);else{const b=o.splitText(a,p),_=a===0?b[0]:b[1];_.setFormat(c),s.type==="text"&&s.set(_.__key,0,"text"),i.type==="text"&&i.set(_.__key,p-a,"text")}return void(this.format=c)}a===0||es(o)||([,o]=o.splitText(a),a=0),o.setFormat(c);const m=h.getFormatFlags(d,c);p>0&&(p===h.getTextContentSize()||es(h)||([h]=h.splitText(p)),h.setFormat(m));for(let b=l+1;b<u;b++){const _=t[b],v=_.getFormatFlags(d,m);_.setFormat(v)}s.type==="text"&&s.set(o.__key,a,"text"),i.type==="text"&&i.set(h.__key,p,"text"),this.format=c|m}insertNodes(d){if(d.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const u=je();return _e(u)||Je(134),u.insertNodes(d)}const g=Vd((this.isBackward()?this.focus:this.anchor).getNode(),rs),t=d[d.length-1];if("__language"in g&&he(g)){if("__language"in d[0])this.insertText(d[0].getTextContent());else{const u=mf(this);g.splice(u,0,d),t.selectEnd()}return}if(!d.some(u=>(he(u)||On(u))&&!u.isInline())){he(g)||Je(135);const u=mf(this);return g.splice(u,0,d),void t.selectEnd()}const f=function(u){const h=Qn();let p=null;for(let m=0;m<u.length;m++){const b=u[m],_=fa(b);if(_||On(b)&&b.isInline()||he(b)&&b.isInline()||Pe(b)||b.isParentRequired()){if(p===null&&(p=b.createParentElementNode(),h.append(p),_))continue;p!==null&&p.append(b)}else h.append(b),p=null}return h}(d),r=f.getLastDescendant(),n=f.getChildren(),e=u=>"__value"in u&&"__checked"in u,s=!he(g)||!g.isEmpty()?this.insertParagraph():null,i=n[n.length-1];let l=n[0];var o;he(o=l)&&rs(o)&&!o.isEmpty()&&he(g)&&(!g.isEmpty()||e(g))&&(he(g)||Je(135),g.append(...l.getChildren()),l=n[1]),l&&function(u,h,p){const m=h.getParentOrThrow().getLastChild();let b=h;const _=[h];for(;b!==m;)b.getNextSibling()||Je(140),b=b.getNextSibling(),_.push(b);let v=u;for(const w of _)v=v.insertAfter(w)}(g,l);const a=Vd(r,rs);s&&he(a)&&(e(s)||rs(i))&&(a.append(...s.getChildren()),s.remove()),he(g)&&g.isEmpty()&&g.remove(),r.selectEnd();const c=he(g)?g.getLastChild():null;fa(c)&&a!==g&&c.remove()}insertParagraph(){if(this.anchor.key==="root"){const n=Qn();return Dn().splice(this.anchor.offset,0,[n]),n.select(),n}const d=mf(this),g=Vd(this.anchor.getNode(),rs);he(g)||Je(136);const t=g.getChildAtIndex(d),f=t?[t,...t.getNextSiblings()]:[],r=g.insertNewAfter(this,!1);return r?(r.append(...f),r.selectStart(),r):null}insertLineBreak(d){const g=ss();if(this.insertNodes([g]),d){const t=g.getParentOrThrow(),f=g.getIndexWithinParent();t.select(f,f)}}extract(){const d=this.getNodes(),g=d.length,t=g-1,f=this.anchor,r=this.focus;let n=d[0],e=d[t];const[s,i]=ff(this);if(g===0)return[];if(g===1){if(Pe(n)&&!this.isCollapsed()){const o=s>i?i:s,a=s>i?s:i,c=n.splitText(o,a),u=o===0?c[0]:c[1];return u!=null?[u]:[]}return[n]}const l=f.isBefore(r);if(Pe(n)){const o=l?s:i;o===n.getTextContentSize()?d.shift():o!==0&&([,n]=n.splitText(o),d[0]=n)}if(Pe(e)){const o=e.getTextContent().length,a=l?i:s;a===0?d.pop():a!==o&&([e]=e.splitText(a),d[t]=e)}return d}modify(d,g,t){const f=this.focus,r=this.anchor,n=d==="move",e=wl(f,g);if(On(e)&&!e.isIsolated()){if(n&&e.isKeyboardSelectable()){const c=gf();return c.add(e.__key),void or(c)}const a=g?e.getPreviousSibling():e.getNextSibling();if(Pe(a)){const c=a.__key,u=g?a.getTextContent().length:0;return f.set(c,u,"text"),void(n&&r.set(c,u,"text"))}{const c=e.getParentOrThrow();let u,h;return he(a)?(h=a.__key,u=g?a.getChildrenSize():0):(u=e.getIndexWithinParent(),h=c.__key,g||u++),f.set(h,u,"element"),void(n&&r.set(h,u,"element"))}}const s=qn(),i=So(s._window);if(!i)return;const l=s._blockCursorElement,o=s._rootElement;if(o===null||l===null||!he(e)||e.isInline()||e.canBeEmpty()||Wd(l,s,o),function(a,c,u,h){a.modify(c,u,h)}(i,d,g?"backward":"forward",t),i.rangeCount>0){const a=i.getRangeAt(0),c=this.anchor.getNode(),u=br(c)?c:dv(c);if(this.applyDOMRange(a),this.dirty=!0,!n){const h=this.getNodes(),p=[];let m=!1;for(let b=0;b<h.length;b++){const _=h[b];Hd(_,u)?p.push(_):m=!0}if(m&&p.length>0)if(g){const b=p[0];he(b)?b.selectStart():b.getParentOrThrow().selectStart()}else{const b=p[p.length-1];he(b)?b.selectEnd():b.getParentOrThrow().selectEnd()}i.anchorNode===a.startContainer&&i.anchorOffset===a.startOffset||function(b){const _=b.focus,v=b.anchor,w=v.key,x=v.offset,S=v.type;Ti(v,_.key,_.offset,_.type),Ti(_,w,x,S),b._cachedNodes=null}(this)}}}forwardDeletion(d,g,t){if(!t&&(d.type==="element"&&he(g)&&d.offset===g.getChildrenSize()||d.type==="text"&&d.offset===g.getTextContentSize())){const f=g.getParent(),r=g.getNextSibling()||(f===null?null:f.getNextSibling());if(he(r)&&r.isShadowRoot())return!0}return!1}deleteCharacter(d){const g=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let f=t.getNode();if(this.forwardDeletion(t,f,d))return;const r=this.focus,n=wl(r,d);if(On(n)&&!n.isIsolated()){if(n.isKeyboardSelectable()&&he(f)&&f.getChildrenSize()===0){f.remove();const e=gf();e.add(n.__key),or(e)}else n.remove(),qn().dispatchCommand(qo,void 0);return}if(!d&&he(n)&&he(f)&&f.isEmpty())return f.remove(),void n.selectStart();if(this.modify("extend",d,"character"),this.isCollapsed()){if(d&&t.offset===0&&(t.type==="element"?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const e=r.type==="text"?r.getNode():null;if(f=t.type==="text"?t.getNode():null,e!==null&&e.isSegmented()){const s=r.offset,i=e.getTextContentSize();if(e.is(f)||d&&s!==i||!d&&s!==0)return void vg(e,d,s)}else if(f!==null&&f.isSegmented()){const s=t.offset,i=f.getTextContentSize();if(f.is(e)||d&&s!==0||!d&&s!==i)return void vg(f,d,s)}(function(s,i){const l=s.anchor,o=s.focus,a=l.getNode(),c=o.getNode();if(a===c&&l.type==="text"&&o.type==="text"){const u=l.offset,h=o.offset,p=u<h,m=p?u:h,b=p?h:u,_=b-1;m!==_&&(Mh(a.getTextContent().slice(m,b))||(i?o.offset=_:l.offset=_))}})(this,d)}}if(this.removeText(),d&&!g&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const t=this.anchor.getNode();t.isEmpty()&&br(t.getParent())&&t.getIndexWithinParent()===0&&t.collapseAtStart(this)}}deleteLine(d){if(this.isCollapsed()){const g=this.anchor.type==="element";if(g&&this.insertText(" "),this.modify("extend",d,"lineboundary"),(d?this.focus:this.anchor).offset===0&&this.modify("extend",d,"character"),g){const t=d?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(d){if(this.isCollapsed()){const g=this.anchor,t=g.getNode();if(this.forwardDeletion(g,t,d))return;this.modify("extend",d,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Yr(y){return y instanceof Vc}function bg(y){const d=y.offset;if(y.type==="text")return d;const g=y.getNode();return d===g.getChildrenSize()?g.getTextContent().length:0}function ff(y){const d=y.getStartEndPoints();if(d===null)return[0,0];const[g,t]=d;return g.type==="element"&&t.type==="element"&&g.key===t.key&&g.offset===t.offset?[0,0]:[bg(g),bg(t)]}function vg(y,d,g){const t=y,f=t.getTextContent().split(/(?=\s)/g),r=f.length;let n=0,e=0;for(let i=0;i<r;i++){const l=i===r-1;if(e=n,n+=f[i].length,d&&n===g||n>g||l){f.splice(i,1),l&&(e=void 0);break}}const s=f.join("").trim();s===""?t.remove():(t.setTextContent(s),t.select(e,e))}function _g(y,d,g,t){let f,r=d;if(y.nodeType===ml){let n=!1;const e=y.childNodes,s=e.length,i=t._blockCursorElement;r===s&&(n=!0,r=s-1);let l=e[r],o=!1;if(l===i)l=e[r+1],o=!0;else if(i!==null){const a=i.parentNode;y===a&&d>Array.prototype.indexOf.call(a.children,i)&&r--}if(f=ns(l),Pe(f))r=Rh(f,n);else{let a=ns(y);if(a===null)return null;if(he(a)){r=Math.min(a.getChildrenSize(),r);let c=a.getChildAtIndex(r);if(he(c)&&function(u,h,p){const m=u.getParent();return p===null||m===null||!m.canBeEmpty()||m!==p.getNode()}(c,0,g)){const u=n?c.getLastDescendant():c.getFirstDescendant();u===null?a=c:(c=u,a=he(c)?c:c.getParentOrThrow()),r=0}Pe(c)?(f=c,a=null,r=Rh(c,n)):c!==a&&n&&!o&&r++}else{const c=a.getIndexWithinParent();r=d===0&&On(a)&&ns(y)===a?c:c+1,a=a.getParentOrThrow()}if(he(a))return Gr(a.__key,r,"element")}}else f=ns(y);return Pe(f)?Gr(f.__key,r,"text"):null}function xg(y,d,g){const t=y.offset,f=y.getNode();if(t===0){const r=f.getPreviousSibling(),n=f.getParent();if(d){if((g||!d)&&r===null&&he(n)&&n.isInline()){const e=n.getPreviousSibling();Pe(e)&&(y.key=e.__key,y.offset=e.getTextContent().length)}}else he(r)&&!g&&r.isInline()?(y.key=r.__key,y.offset=r.getChildrenSize(),y.type="element"):Pe(r)&&(y.key=r.__key,y.offset=r.getTextContent().length)}else if(t===f.getTextContent().length){const r=f.getNextSibling(),n=f.getParent();if(d&&he(r)&&r.isInline())y.key=r.__key,y.offset=0,y.type="element";else if((g||d)&&r===null&&he(n)&&n.isInline()&&!n.canInsertTextAfter()){const e=n.getNextSibling();Pe(e)&&(y.key=e.__key,y.offset=0)}}}function wg(y,d,g){if(y.type==="text"&&d.type==="text"){const t=y.isBefore(d),f=y.is(d);xg(y,t,f),xg(d,!t,f),f&&(d.key=y.key,d.offset=y.offset,d.type=y.type);const r=qn();if(r.isComposing()&&r._compositionKey!==y.key&&_e(g)){const n=g.anchor,e=g.focus;Ti(y,n.key,n.offset,n.type),Ti(d,e.key,e.offset,e.type)}}}function Sg(y,d,g,t,f,r){if(y===null||g===null||!yl(f,y,g))return null;const n=_g(y,d,_e(r)?r.anchor:null,f);if(n===null)return null;const e=_g(g,t,_e(r)?r.focus:null,f);if(e===null)return null;if(n.type==="element"&&e.type==="element"){const s=ns(y),i=ns(g);if(On(s)&&On(i))return null}return wg(n,e,r),[n,e]}function pf(y){return he(y)&&!y.isInline()}function Cg(y,d,g,t,f,r){const n=Co(),e=new ji(Gr(y,d,f),Gr(g,t,r),0,"");return e.dirty=!0,n._selection=e,e}function hf(){const y=Gr("root",0,"element"),d=Gr("root",0,"element");return new ji(y,d,0,"")}function gf(){return new Vc(new Set)}function Av(y,d){return Kc(null,y,d,null)}function Kc(y,d,g,t){const f=g._window;if(f===null)return null;const r=t||f.event,n=r?r.type:void 0,e=n==="selectionchange",s=!Id&&(e||n==="beforeinput"||n==="compositionstart"||n==="compositionend"||n==="click"&&r&&r.detail===3||n==="drop"||n===void 0);let i,l,o,a;if(_e(y)&&!s)return y.clone();if(d===null)return null;if(i=d.anchorNode,l=d.focusNode,o=d.anchorOffset,a=d.focusOffset,e&&_e(y)&&!yl(g,i,l))return y.clone();const c=Sg(i,o,l,a,g,y);if(c===null)return null;const[u,h]=c;return new ji(u,h,_e(y)?y.format:0,_e(y)?y.style:"")}function je(){return Co()._selection}function pa(){return qn()._editorState._selection}function Gc(y,d,g,t=1){const f=y.anchor,r=y.focus,n=f.getNode(),e=r.getNode();if(!d.is(n)&&!d.is(e))return;const s=d.__key;if(y.isCollapsed()){const i=f.offset;if(g<=i&&t>0||g<i&&t<0){const l=Math.max(0,i+t);f.set(s,l,"element"),r.set(s,l,"element"),Eg(y)}}else{const i=y.isBackward(),l=i?r:f,o=l.getNode(),a=i?f:r,c=a.getNode();if(d.is(o)){const u=l.offset;(g<=u&&t>0||g<u&&t<0)&&l.set(s,Math.max(0,u+t),"element")}if(d.is(c)){const u=a.offset;(g<=u&&t>0||g<u&&t<0)&&a.set(s,Math.max(0,u+t),"element")}}Eg(y)}function Eg(y){const d=y.anchor,g=d.offset,t=y.focus,f=t.offset,r=d.getNode(),n=t.getNode();if(y.isCollapsed()){if(!he(r))return;const e=r.getChildrenSize(),s=g>=e,i=s?r.getChildAtIndex(e-1):r.getChildAtIndex(g);if(Pe(i)){let l=0;s&&(l=i.getTextContentSize()),d.set(i.__key,l,"text"),t.set(i.__key,l,"text")}}else{if(he(r)){const e=r.getChildrenSize(),s=g>=e,i=s?r.getChildAtIndex(e-1):r.getChildAtIndex(g);if(Pe(i)){let l=0;s&&(l=i.getTextContentSize()),d.set(i.__key,l,"text")}}if(he(n)){const e=n.getChildrenSize(),s=f>=e,i=s?n.getChildAtIndex(e-1):n.getChildAtIndex(f);if(Pe(i)){let l=0;s&&(l=i.getTextContentSize()),t.set(i.__key,l,"text")}}}}function Yc(y,d,g,t,f){let r=null,n=0,e=null;t!==null?(r=t.__key,Pe(t)?(n=t.getTextContentSize(),e="text"):he(t)&&(n=t.getChildrenSize(),e="element")):f!==null&&(r=f.__key,Pe(f)?e="text":he(f)&&(e="element")),r!==null&&e!==null?y.set(r,n,e):(n=d.getIndexWithinParent(),n===-1&&(n=g.getChildrenSize()),y.set(g.__key,n,"element"))}function kg(y,d,g,t,f){y.type==="text"?(y.key=g,d||(y.offset+=f)):y.offset>t.getIndexWithinParent()&&(y.offset-=1)}function Nv(y,d,g,t,f,r,n){const e=t.anchorNode,s=t.focusNode,i=t.anchorOffset,l=t.focusOffset,o=document.activeElement;if(f.has("collaboration")&&o!==r||o!==null&&Ld(o))return;if(!_e(d))return void(y!==null&&yl(g,e,s)&&t.removeAllRanges());const a=d.anchor,c=d.focus,u=a.key,h=c.key,p=Mc(g,u),m=Mc(g,h),b=a.offset,_=c.offset,v=d.format,w=d.style,x=d.isCollapsed();let S=p,E=m,k=!1;if(a.type==="text"){S=Pc(p);const z=a.getNode();k=z.getFormat()!==v||z.getStyle()!==w}else _e(y)&&y.anchor.type==="text"&&(k=!0);var D,N,O,R,A;if(c.type==="text"&&(E=Pc(m)),S!==null&&E!==null&&(x&&(y===null||k||_e(y)&&(y.format!==v||y.style!==w))&&(D=v,N=w,O=b,R=u,A=performance.now(),ng=[D,N,O,R,A]),i!==b||l!==_||e!==S||s!==E||t.type==="Range"&&x||(o!==null&&r.contains(o)||r.focus({preventScroll:!0}),a.type==="element"))){try{t.setBaseAndExtent(S,b,E,_)}catch{}if(!f.has("skip-scroll-into-view")&&d.isCollapsed()&&r!==null&&r===document.activeElement){const z=d instanceof ji&&d.anchor.type==="element"?S.childNodes[b]||null:t.rangeCount>0?t.getRangeAt(0):null;if(z!==null){let H;if(z instanceof Text){const $=document.createRange();$.selectNode(z),H=$.getBoundingClientRect()}else H=z.getBoundingClientRect();(function($,M,J){const K=J.ownerDocument,P=K.defaultView;if(P===null)return;let{top:U,bottom:V}=M,G=0,F=0,q=J;for(;q!==null;){const T=q===K.body;if(T)G=0,F=Lc($).innerHeight;else{const L=q.getBoundingClientRect();G=L.top,F=L.bottom}let I=0;if(U<G?I=-(G-U):V>F&&(I=V-F),I!==0)if(T)P.scrollBy(0,I);else{const L=q.scrollTop;q.scrollTop+=I;const B=q.scrollTop-L;U-=B,V-=B}if(T)break;q=Dc(q)}})(g,H,r)}}rf=!0}}function Pv(y){let d=je()||pa();d===null&&(d=Dn().selectEnd()),d.insertNodes(y)}function mf(y){let d=y;y.isCollapsed()||d.removeText();const g=je();_e(g)&&(d=g),_e(d)||Je(161);const t=d.anchor;let f=t.getNode(),r=t.offset;for(;!rs(f);)[f,r]=Iv(f,r);return r}function Iv(y,d){const g=y.getParent();if(!g){const f=Qn();return Dn().append(f),f.select(),[Dn(),0]}if(Pe(y)){const f=y.splitText(d);if(f.length===0)return[g,y.getIndexWithinParent()];const r=d===0?0:1;return[g,f[0].getIndexWithinParent()+r]}if(!he(y)||d===0)return[g,y.getIndexWithinParent()];const t=y.getChildAtIndex(d);if(t){const f=new ji(Gr(y.__key,d,"element"),Gr(y.__key,d,"element"),0,""),r=y.insertNewAfter(f);r&&r.append(t,...t.getNextSiblings())}return[g,y.getIndexWithinParent()+1]}let lr=null,cr=null,Rr=!1,yf=!1,Zc=0;const Og={characterData:!0,childList:!0,subtree:!0};function ls(){return Rr||lr!==null&&lr._readOnly}function Or(){Rr&&Je(13)}function Tg(){Zc>99&&Je(14)}function Co(){return lr===null&&Je(15),lr}function qn(){return cr===null&&Je(16),cr}function Rv(){return cr}function jg(y,d,g){const t=d.__type,f=function(e,s){const i=e._nodes.get(s);return i===void 0&&Je(30,s),i}(y,t);let r=g.get(t);r===void 0&&(r=Array.from(f.transforms),g.set(t,r));const n=r.length;for(let e=0;e<n&&(r[e](d),d.isAttached());e++);}function Ag(y,d){return y!==void 0&&y.__key!==d&&y.isAttached()}function Mv(y){return bf(y,qn()._nodes)}function bf(y,d){const g=y.type,t=d.get(g);t===void 0&&Je(17,g);const f=t.klass;y.type!==f.getType()&&Je(18,f.name);const r=f.importJSON(y),n=y.children;if(he(r)&&Array.isArray(n))for(let e=0;e<n.length;e++){const s=bf(n[e],d);r.append(s)}return r}function Ng(y,d){const g=lr,t=Rr,f=cr;lr=y,Rr=!0,cr=null;try{return d()}finally{lr=g,Rr=t,cr=f}}function ha(y,d){const g=y._pendingEditorState,t=y._rootElement,f=y._headless||t===null;if(g===null)return;const r=y._editorState,n=r._selection,e=g._selection,s=y._dirtyType!==la,i=lr,l=Rr,o=cr,a=y._updating,c=y._observer;let u=null;if(y._pendingEditorState=null,y._editorState=g,!f&&s&&c!==null){cr=y,lr=g,Rr=!1,y._updating=!0;try{const x=y._dirtyType,S=y._dirtyElements,E=y._dirtyLeaves;c.disconnect(),u=_v(r,g,y,x,S,E)}catch(x){if(x instanceof Error&&y._onError(x),yf)throw x;return Bg(y,null,t,g),Sh(y),y._dirtyType=ts,yf=!0,ha(y,r),void(yf=!1)}finally{c.observe(t,Og),y._updating=a,lr=i,Rr=l,cr=o}}g._readOnly||(g._readOnly=!0);const h=y._dirtyLeaves,p=y._dirtyElements,m=y._normalizedNodes,b=y._updateTags,_=y._deferred;s&&(y._dirtyType=la,y._cloneNotNeeded.clear(),y._dirtyLeaves=new Set,y._dirtyElements=new Map,y._normalizedNodes=new Set,y._updateTags=new Set),function(x,S){const E=x._decorators;let k=x._pendingDecorators||E;const D=S._nodeMap;let N;for(N in k)D.has(N)||(k===E&&(k=Nh(x)),delete k[N])}(y,g);const v=f?null:So(y._window);if(y._editable&&v!==null&&(s||e===null||e.dirty)){cr=y,lr=g;try{if(c!==null&&c.disconnect(),s||e===null||e.dirty){const x=y._blockCursorElement;x!==null&&Wd(x,y,t),Nv(n,e,y,v,b,t)}pv(y,t,e),c!==null&&c.observe(t,Og)}finally{cr=o,lr=i}}u!==null&&function(x,S,E,k,D){const N=Array.from(x._listeners.mutation),O=N.length;for(let R=0;R<O;R++){const[A,z]=N[R],H=S.get(z);H!==void 0&&A(H,{dirtyLeaves:k,prevEditorState:D,updateTags:E})}}(y,u,b,h,r),_e(e)||e===null||n!==null&&n.is(e)||y.dispatchCommand(qo,void 0);const w=y._pendingDecorators;w!==null&&(y._decorators=w,y._pendingDecorators=null,Pl("decorator",y,!0,w)),function(x,S,E){const k=Ph(S),D=Ph(E);k!==D&&Pl("textcontent",x,!0,D)}(y,d||r,g),Pl("update",y,!0,{dirtyElements:p,dirtyLeaves:h,editorState:g,normalizedNodes:m,prevEditorState:d||r,tags:b}),function(x,S){if(x._deferred=[],S.length!==0){const E=x._updating;x._updating=!0;try{for(let k=0;k<S.length;k++)S[k]()}finally{x._updating=E}}}(y,_),function(x){const S=x._updates;if(S.length!==0){const E=S.shift();if(E){const[k,D]=E;Rg(x,k,D)}}}(y)}function Pl(y,d,g,...t){const f=d._updating;d._updating=g;try{const r=Array.from(d._listeners[y]);for(let n=0;n<r.length;n++)r[n].apply(null,t)}finally{d._updating=f}}function Pg(y,d,g){if(y._updating===!1||cr!==y){let f=!1;return y.update(()=>{f=Pg(y,d,g)}),f}const t=Fd(y);for(let f=4;f>=0;f--)for(let r=0;r<t.length;r++){const n=t[r]._commands.get(d);if(n!==void 0){const e=n[f];if(e!==void 0){const s=Array.from(e),i=s.length;for(let l=0;l<i;l++)if(s[l](g,y)===!0)return!0}}}return!1}function Ig(y,d){const g=y._updates;let t=d||!1;for(;g.length!==0;){const f=g.shift();if(f){const[r,n]=f;let e,s;n!==void 0&&(e=n.onUpdate,s=n.tag,n.skipTransforms&&(t=!0),e&&y._deferred.push(e),s&&y._updateTags.add(s)),r()}}return t}function Rg(y,d,g){const t=y._updateTags;let f,r,n=!1,e=!1;g!==void 0&&(f=g.onUpdate,r=g.tag,r!=null&&t.add(r),n=g.skipTransforms||!1,e=g.discrete||!1),f&&y._deferred.push(f);const s=y._editorState;let i=y._pendingEditorState,l=!1;(i===null||i._readOnly)&&(i=y._pendingEditorState=new Qc(new Map((i||s)._nodeMap)),l=!0),i._flushSync=e;const o=lr,a=Rr,c=cr,u=y._updating;lr=i,Rr=!1,y._updating=!0,cr=y;try{l&&(y._headless?s._selection!==null&&(i._selection=s._selection.clone()):i._selection=function(b){const _=b.getEditorState()._selection,v=So(b._window);return _e(_)||_==null?Kc(_,v,b,null):_.clone()}(y));const p=y._compositionKey;d(),n=Ig(y,n),function(b,_){const v=_.getEditorState()._selection,w=b._selection;if(_e(w)){const x=w.anchor,S=w.focus;let E;if(x.type==="text"&&(E=x.getNode(),E.selectionTransform(v,w)),S.type==="text"){const k=S.getNode();E!==k&&k.selectionTransform(v,w)}}}(i,y),y._dirtyType!==la&&(n?function(b,_){const v=_._dirtyLeaves,w=b._nodeMap;for(const x of v){const S=w.get(x);Pe(S)&&S.isAttached()&&S.isSimpleText()&&!S.isUnmergeable()&&kh(S)}}(i,y):function(b,_){const v=_._dirtyLeaves,w=_._dirtyElements,x=b._nodeMap,S=Ci(),E=new Map;let k=v,D=k.size,N=w,O=N.size;for(;D>0||O>0;){if(D>0){_._dirtyLeaves=new Set;for(const R of k){const A=x.get(R);Pe(A)&&A.isAttached()&&A.isSimpleText()&&!A.isUnmergeable()&&kh(A),A!==void 0&&Ag(A,S)&&jg(_,A,E),v.add(R)}if(k=_._dirtyLeaves,D=k.size,D>0){Zc++;continue}}_._dirtyLeaves=new Set,_._dirtyElements=new Map;for(const R of N){const A=R[0],z=R[1];if(A!=="root"&&!z)continue;const H=x.get(A);H!==void 0&&Ag(H,S)&&jg(_,H,E),w.set(A,z)}k=_._dirtyLeaves,D=k.size,N=_._dirtyElements,O=N.size,Zc++}_._dirtyLeaves=v,_._dirtyElements=w}(i,y),Ig(y),function(b,_,v,w){const x=b._nodeMap,S=_._nodeMap,E=[];for(const[k]of w){const D=S.get(k);D!==void 0&&(D.isAttached()||(he(D)&&Wh(D,k,x,S,E,w),x.has(k)||w.delete(k),E.push(k)))}for(const k of E)S.delete(k);for(const k of v){const D=S.get(k);D===void 0||D.isAttached()||(x.has(k)||v.delete(k),S.delete(k))}}(s,i,y._dirtyLeaves,y._dirtyElements)),p!==y._compositionKey&&(i._flushSync=!0);const m=i._selection;if(_e(m)){const b=i._nodeMap,_=m.anchor.key,v=m.focus.key;b.get(_)!==void 0&&b.get(v)!==void 0||Je(19)}else Yr(m)&&m._nodes.size===0&&(i._selection=null)}catch(p){return p instanceof Error&&y._onError(p),y._pendingEditorState=s,y._dirtyType=ts,y._cloneNotNeeded.clear(),y._dirtyLeaves=new Set,y._dirtyElements.clear(),void ha(y)}finally{lr=o,Rr=a,cr=c,y._updating=u,Zc=0}y._dirtyType!==la||function(p,m){const b=m.getEditorState()._selection,_=p._selection;if(_!==null){if(_.dirty||!_.is(b))return!0}else if(b!==null)return!0;return!1}(i,y)?i._flushSync?(i._flushSync=!1,ha(y)):l&&sv(()=>{ha(y)}):(i._flushSync=!1,l&&(t.clear(),y._deferred=[],y._pendingEditorState=null))}function Ur(y,d,g){y._updating?y._updates.push([d,g]):Rg(y,d,g)}class Eo extends Jc{constructor(d){super(d),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 d=this.getFormat();return Qb[d]||""}getIndent(){return this.getLatest().__indent}getChildren(){const d=[];let g=this.getFirstChild();for(;g!==null;)d.push(g),g=g.getNextSibling();return d}getChildrenKeys(){const d=[];let g=this.getFirstChild();for(;g!==null;)d.push(g.__key),g=g.getNextSibling();return d}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const d=qn()._dirtyElements;return d!==null&&d.has(this.__key)}isLastChild(){const d=this.getLatest(),g=this.getParentOrThrow().getLastChild();return g!==null&&g.is(d)}getAllTextNodes(){const d=[];let g=this.getFirstChild();for(;g!==null;){if(Pe(g)&&d.push(g),he(g)){const t=g.getAllTextNodes();d.push(...t)}g=g.getNextSibling()}return d}getFirstDescendant(){let d=this.getFirstChild();for(;he(d);){const g=d.getFirstChild();if(g===null)break;d=g}return d}getLastDescendant(){let d=this.getLastChild();for(;he(d);){const g=d.getLastChild();if(g===null)break;d=g}return d}getDescendantByIndex(d){const g=this.getChildren(),t=g.length;if(d>=t){const r=g[t-1];return he(r)&&r.getLastDescendant()||r||null}const f=g[d];return he(f)&&f.getFirstDescendant()||f||null}getFirstChild(){const d=this.getLatest().__first;return d===null?null:Hn(d)}getFirstChildOrThrow(){const d=this.getFirstChild();return d===null&&Je(45,this.__key),d}getLastChild(){const d=this.getLatest().__last;return d===null?null:Hn(d)}getLastChildOrThrow(){const d=this.getLastChild();return d===null&&Je(96,this.__key),d}getChildAtIndex(d){const g=this.getChildrenSize();let t,f;if(d<g/2){for(t=this.getFirstChild(),f=0;t!==null&&f<=d;){if(f===d)return t;t=t.getNextSibling(),f++}return null}for(t=this.getLastChild(),f=g-1;t!==null&&f>=d;){if(f===d)return t;t=t.getPreviousSibling(),f--}return null}getTextContent(){let d="";const g=this.getChildren(),t=g.length;for(let f=0;f<t;f++){const r=g[f];d+=r.getTextContent(),he(r)&&f!==t-1&&!r.isInline()&&(d+=Jo)}return d}getTextContentSize(){let d=0;const g=this.getChildren(),t=g.length;for(let f=0;f<t;f++){const r=g[f];d+=r.getTextContentSize(),he(r)&&f!==t-1&&!r.isInline()&&(d+=Jo.length)}return d}getDirection(){return this.getLatest().__dir}hasFormat(d){if(d!==""){const g=_h[d];return!!(this.getFormat()&g)}return!1}select(d,g){Or();const t=je();let f=d,r=g;const n=this.getChildrenSize();if(!this.canBeEmpty()){if(d===0&&g===0){const s=this.getFirstChild();if(Pe(s)||he(s))return s.select(0,0)}else if(!(d!==void 0&&d!==n||g!==void 0&&g!==n)){const s=this.getLastChild();if(Pe(s)||he(s))return s.select()}}f===void 0&&(f=n),r===void 0&&(r=n);const e=this.__key;return _e(t)?(t.anchor.set(e,f,"element"),t.focus.set(e,r,"element"),t.dirty=!0,t):Cg(e,f,e,r,"element","element")}selectStart(){const d=this.getFirstDescendant();return d?d.selectStart():this.select()}selectEnd(){const d=this.getLastDescendant();return d?d.selectEnd():this.select()}clear(){const d=this.getWritable();return this.getChildren().forEach(g=>g.remove()),d}append(...d){return this.splice(this.getChildrenSize(),0,d)}setDirection(d){const g=this.getWritable();return g.__dir=d,g}setFormat(d){return this.getWritable().__format=d!==""?_h[d]:0,this}setIndent(d){return this.getWritable().__indent=d,this}splice(d,g,t){const f=t.length,r=this.getChildrenSize(),n=this.getWritable(),e=n.__key,s=[],i=[],l=this.getChildAtIndex(d+g);let o=null,a=r-g+f;if(d!==0)if(d===r)o=this.getLastChild();else{const u=this.getChildAtIndex(d);u!==null&&(o=u.getPreviousSibling())}if(g>0){let u=o===null?this.getFirstChild():o.getNextSibling();for(let h=0;h<g;h++){u===null&&Je(100);const p=u.getNextSibling(),m=u.__key;ca(u.getWritable()),i.push(m),u=p}}let c=o;for(let u=0;u<f;u++){const h=t[u];c!==null&&h.is(c)&&(o=c=c.getPreviousSibling());const p=h.getWritable();p.__parent===e&&a--,ca(p);const m=h.__key;if(c===null)n.__first=m,p.__prev=null;else{const b=c.getWritable();b.__next=m,p.__prev=b.__key}h.__key===e&&Je(76),p.__parent=e,s.push(m),c=h}if(d+g===r)c!==null&&(c.getWritable().__next=null,n.__last=c.__key);else if(l!==null){const u=l.getWritable();if(c!==null){const h=c.getWritable();u.__prev=c.__key,h.__next=l.__key}else u.__prev=null}if(n.__size=a,i.length){const u=je();if(_e(u)){const h=new Set(i),p=new Set(s),{anchor:m,focus:b}=u;Mg(m,h,p)&&Yc(m,m.getNode(),this,o,l),Mg(b,h,p)&&Yc(b,b.getNode(),this,o,l),a!==0||this.canBeEmpty()||wo(this)||this.remove()}}return n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(d,g){return null}canIndent(){return!0}collapseAtStart(d){return!1}excludeFromCopy(d){return!1}canReplaceWith(d){return!0}canInsertAfter(d){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(d){return!1}extractWithChild(d,g,t){return!1}}function he(y){return y instanceof Eo}function Mg(y,d,g){let t=y.getNode();for(;t;){const f=t.__key;if(d.has(f)&&!g.has(f))return!0;t=t.getParent()}return!1}class Dg extends Jc{constructor(d){super(d)}decorate(d,g){Je(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function On(y){return y instanceof Dg}class cs extends Eo{static getType(){return"root"}static clone(){return new cs}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Je(51)}getTextContent(){const d=this.__cachedText;return!ls()&&qn()._dirtyType!==la||d===null?super.getTextContent():d}remove(){Je(52)}replace(d){Je(53)}insertBefore(d){Je(54)}insertAfter(d){Je(55)}updateDOM(d,g){return!1}append(...d){for(let g=0;g<d.length;g++){const t=d[g];he(t)||On(t)||Je(56)}return super.append(...d)}static importJSON(d){const g=Dn();return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function br(y){return y instanceof cs}function vf(){return new Qc(new Map([["root",new cs]]))}function Lg(y){const d=y.exportJSON(),g=y.constructor;if(d.type!==g.getType()&&Je(130,g.name),he(y)){const t=d.children;Array.isArray(t)||Je(59,g.name);const f=y.getChildren();for(let r=0;r<f.length;r++){const n=Lg(f[r]);t.push(n)}}return d}class Qc{constructor(d,g){this._nodeMap=d,this._selection=g||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(d){return Ng(this,d)}clone(d){const g=new Qc(this._nodeMap,d===void 0?this._selection:d);return g._readOnly=!0,g}toJSON(){return Ng(this,()=>({root:Lg(Dn())}))}}class _f extends Eo{static getType(){return"artificial"}createDOM(d){return document.createElement("div")}}class ga extends Eo{constructor(d){super(d),this.__textFormat=0}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(d){const g=this.getWritable();return g.__textFormat=d,g}hasTextFormat(d){const g=Wo[d];return!!(this.getTextFormat()&g)}static clone(d){return new ga(d.__key)}createDOM(d){const g=document.createElement("p"),t=xl(d.theme,"paragraph");return t!==void 0&&g.classList.add(...t),g}updateDOM(d,g,t){return!1}static importDOM(){return{p:d=>({conversion:Dv,priority:0})}}exportDOM(d){const{element:g}=super.exportDOM(d);if(g&&Sl(g)){this.isEmpty()&&g.append(document.createElement("br"));const t=this.getFormatType();g.style.textAlign=t;const f=this.getDirection();f&&(g.dir=f);const r=this.getIndent();r>0&&(g.style.textIndent=20*r+"px")}return{element:g}}static importJSON(d){const g=Qn();return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g.setTextFormat(d.textFormat),g}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),type:"paragraph",version:1}}insertNewAfter(d,g){const t=Qn();t.setTextFormat(d.format);const f=this.getDirection();return t.setDirection(f),t.setFormat(this.getFormatType()),this.insertAfter(t,g),t}collapseAtStart(){const d=this.getChildren();if(d.length===0||Pe(d[0])&&d[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 Dv(y){const d=Qn();if(y.style){d.setFormat(y.style.textAlign);const g=parseInt(y.style.textIndent,10)/20;g>0&&d.setIndent(g)}return{node:d}}function Qn(){return Vo(new ga)}function ma(y){return y instanceof ga}const an=0,us=3,Zr=4;function Bg(y,d,g,t){const f=y._keyToDOMMap;f.clear(),y._editorState=vf(),y._pendingEditorState=t,y._compositionKey=null,y._dirtyType=la,y._cloneNotNeeded.clear(),y._dirtyLeaves=new Set,y._dirtyElements.clear(),y._normalizedNodes=new Set,y._updateTags=new Set,y._updates=[],y._blockCursorElement=null;const r=y._observer;r!==null&&(r.disconnect(),y._observer=null),d!==null&&(d.textContent=""),g!==null&&(g.textContent="",f.set("root",g))}function Fg(y){const d=y||{},g=Rv(),t=d.theme||{},f=y===void 0?g:d.parentEditor||null,r=d.disableEvents||!1,n=vf(),e=d.namespace||(f!==null?f._config.namespace:Dh()),s=d.editorState,i=[cs,ki,as,Al,ga,_f,...d.nodes||[]],{onError:l,html:o}=d,a=d.editable===void 0||d.editable;let c;if(y===void 0&&g!==null)c=g._nodes;else{c=new Map;for(let h=0;h<i.length;h++){let p=i[h],m=null,b=null;if(typeof p!="function"){const x=p;p=x.replace,m=x.with,b=x.withKlass||null}const _=p.getType(),v=p.transform(),w=new Set;v!==null&&w.add(v),c.set(_,{exportDOM:o&&o.export?o.export.get(p):void 0,klass:p,replace:m,replaceWithKlass:b,transforms:w})}}const u=new Lv(n,f,c,{disableEvents:r,namespace:e,theme:t},l||console.error,function(h,p){const m=new Map,b=new Set,_=v=>{Object.keys(v).forEach(w=>{let x=m.get(w);x===void 0&&(x=[],m.set(w,x)),x.push(v[w])})};return h.forEach(v=>{const w=v.klass.importDOM;if(w==null||b.has(w))return;b.add(w);const x=w.call(v.klass);x!==null&&_(x)}),p&&_(p),m}(c,o?o.import:void 0),a);return s!==void 0&&(u._pendingEditorState=s,u._dirtyType=ts),u}class Lv{constructor(d,g,t,f,r,n,e){this._parentEditor=g,this._rootElement=null,this._editorState=d,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=f,this._nodes=t,this._decorators={},this._pendingDecorators=null,this._dirtyType=la,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=Dh(),this._onError=r,this._htmlConversions=n,this._editable=e,this._headless=g!==null&&g._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(d){const g=this._listeners.update;return g.add(d),()=>{g.delete(d)}}registerEditableListener(d){const g=this._listeners.editable;return g.add(d),()=>{g.delete(d)}}registerDecoratorListener(d){const g=this._listeners.decorator;return g.add(d),()=>{g.delete(d)}}registerTextContentListener(d){const g=this._listeners.textcontent;return g.add(d),()=>{g.delete(d)}}registerRootListener(d){const g=this._listeners.root;return d(this._rootElement,null),g.add(d),()=>{d(null,this._rootElement),g.delete(d)}}registerCommand(d,g,t){t===void 0&&Je(35);const f=this._commands;f.has(d)||f.set(d,[new Set,new Set,new Set,new Set,new Set]);const r=f.get(d);r===void 0&&Je(36,String(d));const n=r[t];return n.add(g),()=>{n.delete(g),r.every(e=>e.size===0)&&f.delete(d)}}registerMutationListener(d,g){let t=this._nodes.get(d.getType());t===void 0&&Je(37,d.name);let f=d,r=null;for(;r=t.replaceWithKlass;)f=r,t=this._nodes.get(r.getType()),t===void 0&&Je(37,r.name);const n=this._listeners.mutation;return n.set(g,f),()=>{n.delete(g)}}registerNodeTransformToKlass(d,g){const t=d.getType(),f=this._nodes.get(t);return f===void 0&&Je(37,d.name),f.transforms.add(g),f}registerNodeTransform(d,g){const t=this.registerNodeTransformToKlass(d,g),f=[t],r=t.replaceWithKlass;if(r!=null){const s=this.registerNodeTransformToKlass(r,g);f.push(s)}var n,e;return n=this,e=d.getType(),Ur(n,()=>{const s=Co();if(s.isEmpty())return;if(e==="root")return void Dn().markDirty();const i=s._nodeMap;for(const[,l]of i)l.markDirty()},n._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{f.forEach(s=>s.transforms.delete(g))}}hasNode(d){return this._nodes.has(d.getType())}hasNodes(d){return d.every(this.hasNode.bind(this))}dispatchCommand(d,g){return Ke(this,d,g)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(d){const g=this._rootElement;if(d!==g){const t=xl(this._config.theme,"root"),f=this._pendingEditorState||this._editorState;if(this._rootElement=d,Bg(this,g,d,f),g!==null&&(this._config.disableEvents||xv(g),t!=null&&g.classList.remove(...t)),d!==null){const r=function(e){const s=e.ownerDocument;return s&&s.defaultView||null}(d),n=d.style;n.userSelect="text",n.whiteSpace="pre-wrap",n.wordBreak="break-word",d.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=ts,Sh(this),this._updateTags.add("history-merge"),ha(this),this._config.disableEvents||function(e,s){const i=e.ownerDocument,l=qc.get(i);(l===void 0||l<1)&&i.addEventListener("selectionchange",lg),qc.set(i,(l||0)+1),e.__lexicalEditor=s;const o=sg(e);for(let a=0;a<nf.length;a++){const[c,u]=nf[a],h=typeof u=="function"?p=>{ug(p)||(cg(p),(s.isEditable()||c==="click")&&u(p,s))}:p=>{if(ug(p))return;cg(p);const m=s.isEditable();switch(c){case"cut":return m&&Ke(s,gl,p);case"copy":return Ke(s,hl,p);case"paste":return m&&Ke(s,ll,p);case"dragstart":return m&&Ke(s,wd,p);case"dragover":return m&&Ke(s,hh,p);case"dragend":return m&&Ke(s,Lb,p);case"focus":return m&&Ke(s,gh,p);case"blur":return m&&Ke(s,Fb,p);case"drop":return m&&Ke(s,xd,p)}};e.addEventListener(c,h),o.push(()=>{e.removeEventListener(c,h)})}}(d,this),t!=null&&d.classList.add(...t)}else this._editorState=f,this._pendingEditorState=null,this._window=null;Pl("root",this,!1,d,g)}}getElementByKey(d){return this._keyToDOMMap.get(d)||null}getEditorState(){return this._editorState}setEditorState(d,g){d.isEmpty()&&Je(38),wh(this);const t=this._pendingEditorState,f=this._updateTags,r=g!==void 0?g.tag:null;t===null||t.isEmpty()||(r!=null&&f.add(r),ha(this)),this._pendingEditorState=d,this._dirtyType=ts,this._dirtyElements.set("root",!1),this._compositionKey=null,r!=null&&f.add(r),ha(this)}parseEditorState(d,g){return function(t,f,r){const n=vf(),e=lr,s=Rr,i=cr,l=f._dirtyElements,o=f._dirtyLeaves,a=f._cloneNotNeeded,c=f._dirtyType;f._dirtyElements=new Map,f._dirtyLeaves=new Set,f._cloneNotNeeded=new Set,f._dirtyType=0,lr=n,Rr=!1,cr=f;try{const u=f._nodes;bf(t.root,u),r&&r(),n._readOnly=!0}catch(u){u instanceof Error&&f._onError(u)}finally{f._dirtyElements=l,f._dirtyLeaves=o,f._cloneNotNeeded=a,f._dirtyType=c,lr=e,Rr=s,cr=i}return n}(typeof d=="string"?JSON.parse(d):d,this,g)}update(d,g){Ur(this,d,g)}focus(d,g={}){const t=this._rootElement;t!==null&&(t.setAttribute("autocapitalize","off"),Ur(this,()=>{const f=je(),r=Dn();f!==null?f.dirty=!0:r.getChildrenSize()!==0&&(g.defaultSelection==="rootStart"?r.selectStart():r.selectEnd())},{onUpdate:()=>{t.removeAttribute("autocapitalize"),d&&d()},tag:"focus"}),this._pendingEditorState===null&&t.removeAttribute("autocapitalize"))}blur(){const d=this._rootElement;d!==null&&d.blur();const g=So(this._window);g!==null&&g.removeAllRanges()}isEditable(){return this._editable}setEditable(d){this._editable!==d&&(this._editable=d,Pl("editable",this,!0,d))}toJSON(){return{editorState:this._editorState.toJSON()}}}const x2="";function Bv(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Fv=Bv(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const xf=Fe.createContext(null);function zv(y,d){let g=null;return y!=null&&(g=y[1]),{getTheme:function(){return d??(g!=null?g.getTheme():null)}}}function Tr(){const y=Fe.useContext(xf);return y==null&&Fv(8),y}const zg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Uv=zg?Fe.useLayoutEffect:Fe.useEffect,Xc={tag:"history-merge"};function Ug({initialConfig:y,children:d}){const g=Fe.useMemo(()=>{const{theme:t,namespace:f,editor__DEPRECATED:r,nodes:n,onError:e,editorState:s,html:i}=y,l=zv(null,t);let o=r||null;if(o===null){const a=Fg({editable:y.editable,html:i,namespace:f,nodes:n,onError:c=>e(c,a),theme:t});(function(c,u){if(u!==null){if(u===void 0)c.update(()=>{const h=Dn();if(h.isEmpty()){const p=Qn();h.append(p);const m=zg?document.activeElement:null;(je()!==null||m!==null&&m===c.getRootElement())&&p.select()}},Xc);else if(u!==null)switch(typeof u){case"string":{const h=c.parseEditorState(u);c.setEditorState(h,Xc);break}case"object":c.setEditorState(u,Xc);break;case"function":c.update(()=>{Dn().isEmpty()&&u(c)},Xc)}}})(a,s),o=a}return[o,l]},[]);return Uv(()=>{const t=y.editable,[f]=g;f.setEditable(t===void 0||t)},[]),Se.jsx(xf.Provider,{value:g,children:d})}function $g({defaultSelection:y}){const[d]=Tr();return Fe.useEffect(()=>{d.focus(()=>{const g=document.activeElement,t=d.getRootElement();t===null||g!==null&&t.contains(g)||t.focus({preventScroll:!0})},{defaultSelection:y})},[y,d]),null}const $v=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Fe.useLayoutEffect:Fe.useEffect;function Hg({ariaActiveDescendant:y,ariaAutoComplete:d,ariaControls:g,ariaDescribedBy:t,ariaExpanded:f,ariaLabel:r,ariaLabelledBy:n,ariaMultiline:e,ariaOwns:s,ariaRequired:i,autoCapitalize:l,className:o,id:a,role:c="textbox",spellCheck:u=!0,style:h,tabIndex:p,"data-testid":m,...b}){const[_]=Tr(),[v,w]=Fe.useState(!1),x=Fe.useCallback(S=>{S&&S.ownerDocument&&S.ownerDocument.defaultView&&_.setRootElement(S)},[_]);return $v(()=>(w(_.isEditable()),_.registerEditableListener(S=>{w(S)})),[_]),Se.jsx("div",{...b,"aria-activedescendant":v?y:void 0,"aria-autocomplete":v?d:"none","aria-controls":v?g:void 0,"aria-describedby":t,"aria-expanded":v&&c==="combobox"?!!f:void 0,"aria-label":r,"aria-labelledby":n,"aria-multiline":e,"aria-owns":v?s:void 0,"aria-readonly":!v||void 0,"aria-required":i,autoCapitalize:l,className:o,contentEditable:v,"data-testid":m,id:a,ref:x,role:c,spellCheck:u,style:h,tabIndex:p})}function Hv(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}Hv(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const tu=new Map;function qg(y){let d=y;for(;d!=null;){if(d.nodeType===Node.TEXT_NODE)return d;d=d.firstChild}return null}function Jg(y){const d=y.parentNode;if(d==null)throw new Error("Should never happen");return[d,Array.from(d.childNodes).indexOf(y)]}function qv(y,d,g,t,f){const r=d.getKey(),n=t.getKey(),e=document.createRange();let s=y.getElementByKey(r),i=y.getElementByKey(n),l=g,o=f;if(Pe(d)&&(s=qg(s)),Pe(t)&&(i=qg(i)),d===void 0||t===void 0||s===null||i===null)return null;s.nodeName==="BR"&&([s,l]=Jg(s)),i.nodeName==="BR"&&([i,o]=Jg(i));const a=s.firstChild;s===i&&a!=null&&a.nodeName==="BR"&&l===0&&o===0&&(o=1);try{e.setStart(s,l),e.setEnd(i,o)}catch{return null}return!e.collapsed||l===o&&r===n||(e.setStart(i,o),e.setEnd(s,l)),e}function Jv(y,d){const g=y.getRootElement();if(g===null)return[];const t=g.getBoundingClientRect(),f=getComputedStyle(g),r=parseFloat(f.paddingLeft)+parseFloat(f.paddingRight),n=Array.from(d.getClientRects());let e,s=n.length;n.sort((i,l)=>{const o=i.top-l.top;return Math.abs(o)<=3?i.left-l.left:o});for(let i=0;i<s;i++){const l=n[i],o=e&&e.top<=l.top&&e.top+e.height>l.top&&e.left+e.width>l.left,a=l.width+r===t.width;o||a?(n.splice(i--,1),s--):e=l}return n}function Wg(y){const d={},g=y.split(";");for(const t of g)if(t!==""){const[f,r]=t.split(/:([^]+)/);f&&r&&(d[f.trim()]=r.trim())}return d}function wf(y){let d=tu.get(y);return d===void 0&&(d=Wg(y),tu.set(y,d)),d}function Vg(y){const d=y.constructor.clone(y);return d.__parent=y.__parent,d.__next=y.__next,d.__prev=y.__prev,he(y)&&he(d)?(t=y,(g=d).__first=t.__first,g.__last=t.__last,g.__size=t.__size,g.__format=t.__format,g.__indent=t.__indent,g.__dir=t.__dir,g):Pe(y)&&Pe(d)?function(f,r){return f.__format=r.__format,f.__style=r.__style,f.__mode=r.__mode,f.__detail=r.__detail,f}(d,y):ma(y)&&ma(d)?function(f,r){return f.__textFormat=r.__textFormat,f}(d,y):d;var g,t}function Kg(y,d){const g=y.getStartEndPoints();if(d.isSelected(y)&&!d.isSegmented()&&!d.isToken()&&g!==null){const[t,f]=g,r=y.isBackward(),n=t.getNode(),e=f.getNode(),s=d.is(n),i=d.is(e);if(s||i){const[l,o]=ff(y),a=n.is(e),c=d.is(r?e:n),u=d.is(r?n:e);let h,p=0;return a?(p=l>o?o:l,h=l>o?l:o):c?(p=r?o:l,h=void 0):u&&(p=0,h=r?l:o),d.__text=d.__text.slice(p,h),d}}return d}function Wv(y){const d=y.getStyle(),g=Wg(d);tu.set(d,g)}function ds(y,d){const g=wf("getStyle"in y?y.getStyle():y.style),t=Object.entries(d).reduce((r,[n,e])=>(e instanceof Function?r[n]=e(g[n]):e===null?delete r[n]:r[n]=e,r),{...g}),f=function(r){let n="";for(const e in r)e&&(n+=`${e}: ${r[e]};`);return n}(t);y.setStyle(f),tu.set(f,t)}function Gg(y,d){const g=y.getNodes(),t=g.length,f=y.getStartEndPoints();if(f===null)return;const[r,n]=f,e=t-1;let s=g[0],i=g[e];if(y.isCollapsed()&&_e(y))return void ds(y,d);const l=s.getTextContent().length,o=n.offset;let a=r.offset;const c=r.isBefore(n);let u=c?a:o,h=c?o:a;const p=c?r.type:n.type,m=c?n.type:r.type,b=c?n.key:r.key;if(Pe(s)&&u===l){const _=s.getNextSibling();Pe(_)&&(a=0,u=0,s=_)}if(g.length===1){if(Pe(s)&&s.canHaveFormat()){if(u=p==="element"?0:a>o?o:a,h=m==="element"?l:a>o?a:o,u===h)return;if(u===0&&h===l)ds(s,d),s.select(u,h);else{const _=s.splitText(u,h),v=u===0?_[0]:_[1];ds(v,d),v.select(0,h-u)}}}else{if(Pe(s)&&u<s.getTextContentSize()&&s.canHaveFormat()&&(u!==0&&(s=s.splitText(u)[1],u=0,c?r.set(s.getKey(),u,"text"):n.set(s.getKey(),u,"text")),ds(s,d)),Pe(i)&&i.canHaveFormat()){const _=i.getTextContent().length;i.__key!==b&&h!==0&&(h=_),h!==_&&([i]=i.splitText(h)),h===0&&m!=="element"||ds(i,d)}for(let _=1;_<e;_++){const v=g[_],w=v.getKey();Pe(v)&&v.canHaveFormat()&&w!==s.getKey()&&w!==i.getKey()&&!v.isToken()&&ds(v,d)}}}function eu(y,d){const g=wl(y.focus,d);return On(g)&&!g.isIsolated()||he(g)&&!g.isInline()&&!g.canBeEmpty()}function Vv(y,d,g,t){y.modify(d?"extend":"move",g,t)}function Kv(y){const d=y.anchor.getNode();return(br(d)?d:d.getParentOrThrow()).getDirection()==="rtl"}function nu(y,d,g){const t=Kv(y);Vv(y,d,g?!t:t,"character")}function Gv(y,d,g){const t=wf(y.getStyle());return t!==null&&t[d]||g}function Yg(y,d,g=""){let t=null;const f=y.getNodes(),r=y.anchor,n=y.focus,e=y.isBackward(),s=e?n.offset:r.offset,i=e?n.getNode():r.getNode();if(_e(y)&&y.isCollapsed()&&y.style!==""){const l=wf(y.style);if(l!==null&&d in l)return l[d]}for(let l=0;l<f.length;l++){const o=f[l];if((l===0||s!==0||!o.is(i))&&Pe(o)){const a=Gv(o,d,g);if(t===null)t=a;else if(t!==a){t="";break}}}return t===null?g:t}function Yv(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Zv=Yv(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const Zg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Qv=Zg&&"documentMode"in document?document.documentMode:null;!(!Zg||!("InputEvent"in window)||Qv)&&"getTargetRanges"in new window.InputEvent("input");function Qg(...y){const d=[];for(const g of y)if(g&&typeof g=="string")for(const[t]of g.matchAll(/\S+/g))d.push(t);return d}function ko(...y){return()=>{for(let d=y.length-1;d>=0;d--)y[d]();y.length=0}}function Ai(y,...d){const g=Qg(...d);g.length>0&&y.classList.add(...g)}function Xg(y,...d){const g=Qg(...d);g.length>0&&y.classList.remove(...g)}function Xv(y){const d=_n(y,g=>he(g)&&!g.isInline());return he(d)||Zv(4,y.__key),d}const _n=(y,d)=>{let g=y;for(;g!==Dn()&&g!=null;){if(d(g))return g;g=g.getParent()}return null};function t1(y,d,g,t){const f=r=>r instanceof d;return y.registerNodeTransform(d,r=>{const n=(e=>{const s=e.getChildren();for(let o=0;o<s.length;o++){const a=s[o];if(f(a))return null}let i=e,l=e;for(;i!==null;)if(l=i,i=i.getParent(),f(i))return{child:l,parent:i};return null})(r);if(n!==null){const{child:e,parent:s}=n;if(e.is(r)){t(s,r);const i=e.getNextSiblings(),l=i.length;if(s.insertAfter(e),l!==0){const o=g(s);e.insertAfter(o);for(let a=0;a<l;a++)o.append(i[a])}s.canBeEmpty()||s.getChildrenSize()!==0||s.remove()}}})}function tm(y){const d=je()||pa();if(_e(d)){const{focus:g}=d,t=g.getNode(),f=g.offset;if(wo(t)){const r=t.getChildAtIndex(f);r==null?t.append(y):r.insertBefore(y),y.selectNext()}else{let r,n;Pe(t)?(r=t.getParentOrThrow(),n=t.getIndexWithinParent(),f>0&&(n+=1,t.splitText(f))):(r=t,n=f);const[,e]=hv(r,n);e.insertBefore(y),e.selectStart()}}else{if(d!=null){const t=d.getNodes();t[t.length-1].getTopLevelElementOrThrow().insertAfter(y)}else Dn().append(y);const g=Qn();y.insertAfter(g),g.select()}return y.getLatest()}function Ni(y,d){return y!==null&&Object.getPrototypeOf(y).constructor.name===d.name}function em(y,d){const g=y.getFirstChild();g!==null?g.insertBefore(d):y.append(d)}const ru=0,Sf=1,Cf=2,ho=0,e1=1,nm=2,n1=3,r1=4;function o1(y,d,g,t,f){if(y===null||g.size===0&&t.size===0&&!f)return ho;const r=d._selection,n=y._selection;if(f)return e1;if(!(_e(r)&&_e(n)&&n.isCollapsed()&&r.isCollapsed()))return ho;const e=function(m,b,_){const v=m._nodeMap,w=[];for(const x of b){const S=v.get(x);S!==void 0&&w.push(S)}for(const[x,S]of _){if(!S)continue;const E=v.get(x);E===void 0||br(E)||w.push(E)}return w}(d,g,t);if(e.length===0)return ho;if(e.length>1){const m=d._nodeMap,b=m.get(r.anchor.key),_=m.get(n.anchor.key);return b&&_&&!y._nodeMap.has(b.__key)&&Pe(b)&&b.__text.length===1&&r.anchor.offset===1?nm:ho}const s=e[0],i=y._nodeMap.get(s.__key);if(!Pe(i)||!Pe(s)||i.__mode!==s.__mode)return ho;const l=i.__text,o=s.__text;if(l===o)return ho;const a=r.anchor,c=n.anchor;if(a.key!==c.key||a.type!=="text")return ho;const u=a.offset,h=c.offset,p=o.length-l.length;return p===1&&h===u-1?nm:p===-1&&h===u+1?n1:p===-1&&h===u?r1:ho}function i1(y,d){let g=Date.now(),t=ho;return(f,r,n,e,s,i)=>{const l=Date.now();if(i.has("historic"))return t=ho,g=l,Cf;const o=o1(f,r,e,s,y.isComposing()),a=(()=>{const c=n===null||n.editor===y,u=i.has("history-push");if(!u&&c&&i.has("history-merge"))return ru;if(f===null)return Sf;const h=r._selection;return e.size>0||s.size>0?u===!1&&o!==ho&&o===t&&l<g+d&&c||e.size===1&&function(p,m,b){const _=m._nodeMap.get(p),v=b._nodeMap.get(p),w=m._selection,x=b._selection;let S=!1;return _e(w)&&_e(x)&&(S=w.anchor.type==="element"&&w.focus.type==="element"&&x.anchor.type==="text"&&x.focus.type==="text"),!(S||!Pe(_)||!Pe(v))&&_.__type===v.__type&&_.__text===v.__text&&_.__mode===v.__mode&&_.__detail===v.__detail&&_.__style===v.__style&&_.__format===v.__format&&_.__parent===v.__parent}(Array.from(e)[0],f,r)?ru:Sf:h!==null?ru:Cf})();return g=l,t=o,a}}function rm(y){y.undoStack=[],y.redoStack=[],y.current=null}function a1(y,d,g){const t=i1(y,g);return ko(y.registerCommand(cl,()=>(function(r,n){const e=n.redoStack,s=n.undoStack;if(s.length!==0){const i=n.current,l=s.pop();i!==null&&(e.push(i),r.dispatchCommand(Qa,!0)),s.length===0&&r.dispatchCommand(Xa,!1),n.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}}(y,d),!0),an),y.registerCommand(ul,()=>(function(r,n){const e=n.redoStack,s=n.undoStack;if(e.length!==0){const i=n.current;i!==null&&(s.push(i),r.dispatchCommand(Xa,!0));const l=e.pop();e.length===0&&r.dispatchCommand(Qa,!1),n.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}}(y,d),!0),an),y.registerCommand(Sd,()=>(rm(d),!1),an),y.registerCommand(Bb,()=>(rm(d),y.dispatchCommand(Qa,!1),y.dispatchCommand(Xa,!1),!0),an),y.registerUpdateListener(({editorState:r,prevEditorState:n,dirtyLeaves:e,dirtyElements:s,tags:i})=>{const l=d.current,o=d.redoStack,a=d.undoStack,c=l===null?null:l.editorState;if(l!==null&&r===c)return;const u=t(n,r,l,e,s,i);if(u===Sf)o.length!==0&&(d.redoStack=[],y.dispatchCommand(Qa,!1)),l!==null&&(a.push({...l}),y.dispatchCommand(Xa,!0));else if(u===Cf)return;d.current={editor:y,editorState:r}}))}function s1(){return{current:null,redoStack:[],undoStack:[]}}function om({externalHistoryState:y}){const[d]=Tr();return function(g,t,f=1e3){const r=Fe.useMemo(()=>t||s1(),[t]);Fe.useEffect(()=>a1(g,r,f),[f,g,r])}(d,y),null}const l1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Fe.useLayoutEffect:Fe.useEffect;function c1(y){return{initialValueFn:()=>y.isEditable(),subscribe:d=>y.registerEditableListener(d)}}function im(){return function(y){const[d]=Tr(),g=Fe.useMemo(()=>y(d),[d,y]),t=Fe.useRef(g.initialValueFn()),[f,r]=Fe.useState(t.current);return l1(()=>{const{initialValueFn:n,subscribe:e}=g,s=n();return t.current!==s&&(t.current=s,r(s)),e(i=>{t.current=i,r(i)})},[g,y]),f}(c1)}function am(){return Dn().getTextContent()}function sm(y,d=!0){if(y)return!1;let g=am();return d&&(g=g.trim()),g===""}function u1(y){if(!sm(y,!1))return!1;const d=Dn().getChildren(),g=d.length;if(g>1)return!1;for(let t=0;t<g;t++){const f=d[t];if(On(f))return!1;if(he(f)){if(!ma(f)||f.__indent!==0)return!1;const r=f.getChildren(),n=r.length;for(let e=0;e<n;e++){const s=r[t];if(!Pe(s))return!1}}}return!0}function lm(y){return()=>u1(y)}function d1(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}d1(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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 cm(y){const d=window.location.origin,g=t=>{if(t.origin!==d)return;const f=y.getRootElement();if(document.activeElement!==f)return;const r=t.data;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{return}if(n&&n.protocol==="nuanria_messaging"&&n.type==="request"){const e=n.payload;if(e&&e.functionId==="makeChanges"){const s=e.args;if(s){const[i,l,o,a,c,u]=s;y.update(()=>{const h=je();if(_e(h)){const p=h.anchor;let m=p.getNode(),b=0,_=0;if(Pe(m)&&i>=0&&l>=0&&(b=i,_=i+l,h.setTextNodeRange(m,b,m,_)),b===_&&o===""||(h.insertRawText(o),m=p.getNode()),Pe(m)){b=a,_=a+c;const v=m.getTextContentSize();b=b>v?v:b,_=_>v?v:_,h.setTextNodeRange(m,b,m,_)}t.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",g,!0),()=>{window.removeEventListener("message",g,!0)}}function f1(y,d){const g=d.body?d.body.childNodes:[];let t=[];const f=[];for(let r=0;r<g.length;r++){const n=g[r];if(!dm.has(n.nodeName)){const e=fm(n,y,f,!1);e!==null&&(t=t.concat(e))}}return function(r){for(const n of r)n.getNextSibling()instanceof _f&&n.insertAfter(ss());for(const n of r){const e=n.getChildren();for(const s of e)n.insertBefore(s);n.remove()}}(f),t}function p1(y,d){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const g=document.createElement("div"),t=Dn().getChildren();for(let f=0;f<t.length;f++)um(y,t[f],g,d);return g.innerHTML}function um(y,d,g,t=null){let f=t===null||d.isSelected(t);const r=he(d)&&d.excludeFromCopy("html");let n=d;if(t!==null){let c=Vg(d);c=Pe(c)&&t!==null?Kg(t,c):c,n=c}const e=he(n)?n.getChildren():[],s=y._nodes.get(n.getType());let i;i=s&&s.exportDOM!==void 0?s.exportDOM(y,n):n.exportDOM(y);const{element:l,after:o}=i;if(!l)return!1;const a=document.createDocumentFragment();for(let c=0;c<e.length;c++){const u=e[c],h=um(y,u,a,t);!f&&he(d)&&h&&d.extractWithChild(u,t,"html")&&(f=!0)}if(f&&!r){if(Sl(l)&&l.append(a),g.append(l),o){const c=o.call(n,l);c&&l.replaceWith(c)}}else g.append(a);return f}const dm=new Set(["STYLE","SCRIPT"]);function fm(y,d,g,t,f=new Map,r){let n=[];if(dm.has(y.nodeName))return n;let e=null;const s=function(u,h){const{nodeName:p}=u,m=h._htmlConversions.get(p.toLowerCase());let b=null;if(m!==void 0)for(const _ of m){const v=_(u);v!==null&&(b===null||(b.priority||0)<(v.priority||0))&&(b=v)}return b!==null?b.conversion:null}(y,d),i=s?s(y):null;let l=null;if(i!==null){l=i.after;const u=i.node;if(e=Array.isArray(u)?u[u.length-1]:u,e!==null){for(const[,h]of f)if(e=h(e,r),!e)break;e&&n.push(...Array.isArray(u)?u:[e])}i.forChild!=null&&f.set(y.nodeName,i.forChild)}const o=y.childNodes;let a=[];const c=(e==null||!wo(e))&&(e!=null&&pf(e)||t);for(let u=0;u<o.length;u++)a.push(...fm(o[u],d,g,c,new Map(f),e));return l!=null&&(a=l(a)),yv(y)&&(a=h1(y,a,c?()=>{const u=new _f;return g.push(u),u}:Qn)),e==null?n=n.concat(a):he(e)&&e.append(...a),n}function h1(y,d,g){const t=y.style.textAlign,f=[];let r=[];for(let n=0;n<d.length;n++){const e=d[n];if(pf(e))t&&!e.getFormat()&&e.setFormat(t),f.push(e);else if(r.push(e),n===d.length-1||n<d.length-1&&pf(d[n+1])){const s=g();s.setFormat(t),s.append(...r),f.push(s),r=[]}}return f}function g1(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var ou=g1(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const m1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,pm=y=>m1?(y||window).getSelection():null;function hm(y){const d=je();return d==null&&ou(166),_e(d)&&d.isCollapsed()||d.getNodes().length===0?"":p1(y,d)}function y1(y){const d=je();return d==null&&ou(166),_e(d)&&d.isCollapsed()||d.getNodes().length===0?null:JSON.stringify(b1(y,d))}function gm(y,d){const g=y.getData("text/plain")||y.getData("text/uri-list");g!=null&&d.insertRawText(g)}function mm(y,d,g){const t=y.getData("application/x-lexical-editor");if(t)try{const n=JSON.parse(t);if(n.namespace===g._config.namespace&&Array.isArray(n.nodes))return ym(g,v1(n.nodes),d)}catch{}const f=y.getData("text/html");if(f)try{const n=new DOMParser().parseFromString(f,"text/html");return ym(g,f1(g,n),d)}catch{}const r=y.getData("text/plain")||y.getData("text/uri-list");if(r!=null)if(_e(d)){const n=r.split(/(\r?\n|\t)/);n[n.length-1]===""&&n.pop();for(let e=0;e<n.length;e++){const s=je();if(_e(s)){const i=n[e];i===`
|
|
39
|
+
`?t.push(ss()):n===" "?t.push(Nl()):t.push(Zn(n))}this.insertNodes(t)}insertText(d){const g=this.anchor,t=this.focus,f=this.format,r=this.style;let n=g,e=t;!this.isCollapsed()&&t.isBefore(g)&&(n=t,e=g),n.type==="element"&&function(p,m,b,_){const v=p.getNode(),w=v.getChildAtIndex(p.offset),x=Zn(),S=br(v)?Qn().append(x):x;x.setFormat(b),x.setStyle(_),w===null?v.append(S):w.insertBefore(S),p.is(m)&&m.set(x.__key,0,"text"),p.set(x.__key,0,"text")}(n,e,f,r);const s=n.offset;let i=e.offset;const l=this.getNodes(),o=l.length;let a=l[0];Pe(a)||Je(26);const c=a.getTextContent().length,u=a.getParentOrThrow();let h=l[o-1];if(o===1&&e.type==="element"&&(i=c,e.set(n.key,i,"text")),this.isCollapsed()&&s===c&&(a.isSegmented()||a.isToken()||!a.canInsertTextAfter()||!u.canInsertTextAfter()&&a.getNextSibling()===null)){let p=a.getNextSibling();if(Pe(p)&&p.canInsertTextBefore()&&!es(p)||(p=Zn(),p.setFormat(f),p.setStyle(r),u.canInsertTextAfter()?a.insertAfter(p):u.insertAfter(p)),p.select(0,0),a=p,d!=="")return void this.insertText(d)}else if(this.isCollapsed()&&s===0&&(a.isSegmented()||a.isToken()||!a.canInsertTextBefore()||!u.canInsertTextBefore()&&a.getPreviousSibling()===null)){let p=a.getPreviousSibling();if(Pe(p)&&!es(p)||(p=Zn(),p.setFormat(f),u.canInsertTextBefore()?a.insertBefore(p):u.insertBefore(p)),p.select(),a=p,d!=="")return void this.insertText(d)}else if(a.isSegmented()&&s!==c){const p=Zn(a.getTextContent());p.setFormat(f),a.replace(p),a=p}else if(!this.isCollapsed()&&d!==""){const p=h.getParent();if(!u.canInsertTextBefore()||!u.canInsertTextAfter()||he(p)&&(!p.canInsertTextBefore()||!p.canInsertTextAfter()))return this.insertText(""),xg(this.anchor,this.focus,null),void this.insertText(d)}if(o===1){if(a.isToken()){const _=Zn(d);return _.select(),void a.replace(_)}const p=a.getFormat(),m=a.getStyle();if(s!==i||p===f&&m===r){if(Tv(a)){const _=Zn(d);return _.setFormat(f),_.setStyle(r),_.select(),void a.replace(_)}}else{if(a.getTextContent()!==""){const _=Zn(d);if(_.setFormat(f),_.setStyle(r),_.select(),s===0)a.insertBefore(_,!1);else{const[v]=a.splitText(s);v.insertAfter(_,!1)}return void(_.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=d.length))}a.setFormat(f),a.setStyle(r)}const b=i-s;a=a.spliceText(s,b,d,!0),a.getTextContent()===""?a.remove():this.anchor.type==="text"&&(a.isComposing()?this.anchor.offset-=d.length:(this.format=p,this.style=m))}else{const p=new Set([...a.getParentKeys(),...h.getParentKeys()]),m=he(a)?a:a.getParentOrThrow();let b=he(h)?h:h.getParentOrThrow(),_=h;if(!m.is(b)&&b.isInline())do _=b,b=b.getParentOrThrow();while(b.isInline());if(e.type==="text"&&(i!==0||h.getTextContent()==="")||e.type==="element"&&h.getIndexWithinParent()<i)if(Pe(h)&&!h.isToken()&&i!==h.getTextContentSize()){if(h.isSegmented()){const E=Zn(h.getTextContent());h.replace(E),h=E}br(e.getNode())||e.type!=="text"||(h=h.spliceText(0,i,"")),p.add(h.__key)}else{const E=h.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?h.remove():E.remove()}else p.add(h.__key);const v=b.getChildren(),w=new Set(l),x=m.is(b),S=m.isInline()&&a.getNextSibling()===null?m:a;for(let E=v.length-1;E>=0;E--){const k=v[E];if(k.is(a)||he(k)&&k.isParentOf(a))break;k.isAttached()&&(!w.has(k)||k.is(_)?x||S.insertAfter(k,!1):k.remove())}if(!x){let E=b,k=null;for(;E!==null;){const D=E.getChildren(),N=D.length;(N===0||D[N-1].is(k))&&(p.delete(E.__key),k=E),E=E.getParent()}}if(a.isToken())if(s===c)a.select();else{const E=Zn(d);E.select(),a.replace(E)}else a=a.spliceText(s,c-s,d,!0),a.getTextContent()===""?a.remove():a.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=d.length);for(let E=1;E<o;E++){const k=l[E],D=k.__key;p.has(D)||k.remove()}}}removeText(){this.insertText("")}formatText(d){if(this.isCollapsed())return this.toggleFormat(d),void fr(null);const g=this.getNodes(),t=[];for(const b of g)Pe(b)&&t.push(b);const f=t.length;if(f===0)return this.toggleFormat(d),void fr(null);const r=this.anchor,n=this.focus,e=this.isBackward(),s=e?n:r,i=e?r:n;let l=0,o=t[0],a=s.type==="element"?0:s.offset;if(s.type==="text"&&a===o.getTextContentSize()&&(l=1,o=t[1],a=0),o==null)return;const c=o.getFormatFlags(d,null),u=f-1;let h=t[u];const p=i.type==="text"?i.offset:h.getTextContentSize();if(o.is(h)){if(a===p)return;if(es(o)||a===0&&p===o.getTextContentSize())o.setFormat(c);else{const b=o.splitText(a,p),_=a===0?b[0]:b[1];_.setFormat(c),s.type==="text"&&s.set(_.__key,0,"text"),i.type==="text"&&i.set(_.__key,p-a,"text")}return void(this.format=c)}a===0||es(o)||([,o]=o.splitText(a),a=0),o.setFormat(c);const m=h.getFormatFlags(d,c);p>0&&(p===h.getTextContentSize()||es(h)||([h]=h.splitText(p)),h.setFormat(m));for(let b=l+1;b<u;b++){const _=t[b],v=_.getFormatFlags(d,m);_.setFormat(v)}s.type==="text"&&s.set(o.__key,a,"text"),i.type==="text"&&i.set(h.__key,p,"text"),this.format=c|m}insertNodes(d){if(d.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const u=je();return _e(u)||Je(134),u.insertNodes(d)}const g=Vd((this.isBackward()?this.focus:this.anchor).getNode(),rs),t=d[d.length-1];if("__language"in g&&he(g)){if("__language"in d[0])this.insertText(d[0].getTextContent());else{const u=mf(this);g.splice(u,0,d),t.selectEnd()}return}if(!d.some(u=>(he(u)||On(u))&&!u.isInline())){he(g)||Je(135);const u=mf(this);return g.splice(u,0,d),void t.selectEnd()}const f=function(u){const h=Qn();let p=null;for(let m=0;m<u.length;m++){const b=u[m],_=fa(b);if(_||On(b)&&b.isInline()||he(b)&&b.isInline()||Pe(b)||b.isParentRequired()){if(p===null&&(p=b.createParentElementNode(),h.append(p),_))continue;p!==null&&p.append(b)}else h.append(b),p=null}return h}(d),r=f.getLastDescendant(),n=f.getChildren(),e=u=>"__value"in u&&"__checked"in u,s=!he(g)||!g.isEmpty()?this.insertParagraph():null,i=n[n.length-1];let l=n[0];var o;he(o=l)&&rs(o)&&!o.isEmpty()&&he(g)&&(!g.isEmpty()||e(g))&&(he(g)||Je(135),g.append(...l.getChildren()),l=n[1]),l&&function(u,h,p){const m=h.getParentOrThrow().getLastChild();let b=h;const _=[h];for(;b!==m;)b.getNextSibling()||Je(140),b=b.getNextSibling(),_.push(b);let v=u;for(const w of _)v=v.insertAfter(w)}(g,l);const a=Vd(r,rs);s&&he(a)&&(e(s)||rs(i))&&(a.append(...s.getChildren()),s.remove()),he(g)&&g.isEmpty()&&g.remove(),r.selectEnd();const c=he(g)?g.getLastChild():null;fa(c)&&a!==g&&c.remove()}insertParagraph(){if(this.anchor.key==="root"){const n=Qn();return Dn().splice(this.anchor.offset,0,[n]),n.select(),n}const d=mf(this),g=Vd(this.anchor.getNode(),rs);he(g)||Je(136);const t=g.getChildAtIndex(d),f=t?[t,...t.getNextSiblings()]:[],r=g.insertNewAfter(this,!1);return r?(r.append(...f),r.selectStart(),r):null}insertLineBreak(d){const g=ss();if(this.insertNodes([g]),d){const t=g.getParentOrThrow(),f=g.getIndexWithinParent();t.select(f,f)}}extract(){const d=this.getNodes(),g=d.length,t=g-1,f=this.anchor,r=this.focus;let n=d[0],e=d[t];const[s,i]=ff(this);if(g===0)return[];if(g===1){if(Pe(n)&&!this.isCollapsed()){const o=s>i?i:s,a=s>i?s:i,c=n.splitText(o,a),u=o===0?c[0]:c[1];return u!=null?[u]:[]}return[n]}const l=f.isBefore(r);if(Pe(n)){const o=l?s:i;o===n.getTextContentSize()?d.shift():o!==0&&([,n]=n.splitText(o),d[0]=n)}if(Pe(e)){const o=e.getTextContent().length,a=l?i:s;a===0?d.pop():a!==o&&([e]=e.splitText(a),d[t]=e)}return d}modify(d,g,t){const f=this.focus,r=this.anchor,n=d==="move",e=wl(f,g);if(On(e)&&!e.isIsolated()){if(n&&e.isKeyboardSelectable()){const c=gf();return c.add(e.__key),void or(c)}const a=g?e.getPreviousSibling():e.getNextSibling();if(Pe(a)){const c=a.__key,u=g?a.getTextContent().length:0;return f.set(c,u,"text"),void(n&&r.set(c,u,"text"))}{const c=e.getParentOrThrow();let u,h;return he(a)?(h=a.__key,u=g?a.getChildrenSize():0):(u=e.getIndexWithinParent(),h=c.__key,g||u++),f.set(h,u,"element"),void(n&&r.set(h,u,"element"))}}const s=qn(),i=So(s._window);if(!i)return;const l=s._blockCursorElement,o=s._rootElement;if(o===null||l===null||!he(e)||e.isInline()||e.canBeEmpty()||Wd(l,s,o),function(a,c,u,h){a.modify(c,u,h)}(i,d,g?"backward":"forward",t),i.rangeCount>0){const a=i.getRangeAt(0),c=this.anchor.getNode(),u=br(c)?c:dv(c);if(this.applyDOMRange(a),this.dirty=!0,!n){const h=this.getNodes(),p=[];let m=!1;for(let b=0;b<h.length;b++){const _=h[b];Hd(_,u)?p.push(_):m=!0}if(m&&p.length>0)if(g){const b=p[0];he(b)?b.selectStart():b.getParentOrThrow().selectStart()}else{const b=p[p.length-1];he(b)?b.selectEnd():b.getParentOrThrow().selectEnd()}i.anchorNode===a.startContainer&&i.anchorOffset===a.startOffset||function(b){const _=b.focus,v=b.anchor,w=v.key,x=v.offset,S=v.type;Ti(v,_.key,_.offset,_.type),Ti(_,w,x,S),b._cachedNodes=null}(this)}}}forwardDeletion(d,g,t){if(!t&&(d.type==="element"&&he(g)&&d.offset===g.getChildrenSize()||d.type==="text"&&d.offset===g.getTextContentSize())){const f=g.getParent(),r=g.getNextSibling()||(f===null?null:f.getNextSibling());if(he(r)&&r.isShadowRoot())return!0}return!1}deleteCharacter(d){const g=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let f=t.getNode();if(this.forwardDeletion(t,f,d))return;const r=this.focus,n=wl(r,d);if(On(n)&&!n.isIsolated()){if(n.isKeyboardSelectable()&&he(f)&&f.getChildrenSize()===0){f.remove();const e=gf();e.add(n.__key),or(e)}else n.remove(),qn().dispatchCommand(qo,void 0);return}if(!d&&he(n)&&he(f)&&f.isEmpty())return f.remove(),void n.selectStart();if(this.modify("extend",d,"character"),this.isCollapsed()){if(d&&t.offset===0&&(t.type==="element"?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const e=r.type==="text"?r.getNode():null;if(f=t.type==="text"?t.getNode():null,e!==null&&e.isSegmented()){const s=r.offset,i=e.getTextContentSize();if(e.is(f)||d&&s!==i||!d&&s!==0)return void bg(e,d,s)}else if(f!==null&&f.isSegmented()){const s=t.offset,i=f.getTextContentSize();if(f.is(e)||d&&s!==0||!d&&s!==i)return void bg(f,d,s)}(function(s,i){const l=s.anchor,o=s.focus,a=l.getNode(),c=o.getNode();if(a===c&&l.type==="text"&&o.type==="text"){const u=l.offset,h=o.offset,p=u<h,m=p?u:h,b=p?h:u,_=b-1;m!==_&&(Rh(a.getTextContent().slice(m,b))||(i?o.offset=_:l.offset=_))}})(this,d)}}if(this.removeText(),d&&!g&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const t=this.anchor.getNode();t.isEmpty()&&br(t.getParent())&&t.getIndexWithinParent()===0&&t.collapseAtStart(this)}}deleteLine(d){if(this.isCollapsed()){const g=this.anchor.type==="element";if(g&&this.insertText(" "),this.modify("extend",d,"lineboundary"),(d?this.focus:this.anchor).offset===0&&this.modify("extend",d,"character"),g){const t=d?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(d){if(this.isCollapsed()){const g=this.anchor,t=g.getNode();if(this.forwardDeletion(g,t,d))return;this.modify("extend",d,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Yr(y){return y instanceof Vc}function yg(y){const d=y.offset;if(y.type==="text")return d;const g=y.getNode();return d===g.getChildrenSize()?g.getTextContent().length:0}function ff(y){const d=y.getStartEndPoints();if(d===null)return[0,0];const[g,t]=d;return g.type==="element"&&t.type==="element"&&g.key===t.key&&g.offset===t.offset?[0,0]:[yg(g),yg(t)]}function bg(y,d,g){const t=y,f=t.getTextContent().split(/(?=\s)/g),r=f.length;let n=0,e=0;for(let i=0;i<r;i++){const l=i===r-1;if(e=n,n+=f[i].length,d&&n===g||n>g||l){f.splice(i,1),l&&(e=void 0);break}}const s=f.join("").trim();s===""?t.remove():(t.setTextContent(s),t.select(e,e))}function vg(y,d,g,t){let f,r=d;if(y.nodeType===ml){let n=!1;const e=y.childNodes,s=e.length,i=t._blockCursorElement;r===s&&(n=!0,r=s-1);let l=e[r],o=!1;if(l===i)l=e[r+1],o=!0;else if(i!==null){const a=i.parentNode;y===a&&d>Array.prototype.indexOf.call(a.children,i)&&r--}if(f=ns(l),Pe(f))r=Ih(f,n);else{let a=ns(y);if(a===null)return null;if(he(a)){r=Math.min(a.getChildrenSize(),r);let c=a.getChildAtIndex(r);if(he(c)&&function(u,h,p){const m=u.getParent();return p===null||m===null||!m.canBeEmpty()||m!==p.getNode()}(c,0,g)){const u=n?c.getLastDescendant():c.getFirstDescendant();u===null?a=c:(c=u,a=he(c)?c:c.getParentOrThrow()),r=0}Pe(c)?(f=c,a=null,r=Ih(c,n)):c!==a&&n&&!o&&r++}else{const c=a.getIndexWithinParent();r=d===0&&On(a)&&ns(y)===a?c:c+1,a=a.getParentOrThrow()}if(he(a))return Gr(a.__key,r,"element")}}else f=ns(y);return Pe(f)?Gr(f.__key,r,"text"):null}function _g(y,d,g){const t=y.offset,f=y.getNode();if(t===0){const r=f.getPreviousSibling(),n=f.getParent();if(d){if((g||!d)&&r===null&&he(n)&&n.isInline()){const e=n.getPreviousSibling();Pe(e)&&(y.key=e.__key,y.offset=e.getTextContent().length)}}else he(r)&&!g&&r.isInline()?(y.key=r.__key,y.offset=r.getChildrenSize(),y.type="element"):Pe(r)&&(y.key=r.__key,y.offset=r.getTextContent().length)}else if(t===f.getTextContent().length){const r=f.getNextSibling(),n=f.getParent();if(d&&he(r)&&r.isInline())y.key=r.__key,y.offset=0,y.type="element";else if((g||d)&&r===null&&he(n)&&n.isInline()&&!n.canInsertTextAfter()){const e=n.getNextSibling();Pe(e)&&(y.key=e.__key,y.offset=0)}}}function xg(y,d,g){if(y.type==="text"&&d.type==="text"){const t=y.isBefore(d),f=y.is(d);_g(y,t,f),_g(d,!t,f),f&&(d.key=y.key,d.offset=y.offset,d.type=y.type);const r=qn();if(r.isComposing()&&r._compositionKey!==y.key&&_e(g)){const n=g.anchor,e=g.focus;Ti(y,n.key,n.offset,n.type),Ti(d,e.key,e.offset,e.type)}}}function wg(y,d,g,t,f,r){if(y===null||g===null||!yl(f,y,g))return null;const n=vg(y,d,_e(r)?r.anchor:null,f);if(n===null)return null;const e=vg(g,t,_e(r)?r.focus:null,f);if(e===null)return null;if(n.type==="element"&&e.type==="element"){const s=ns(y),i=ns(g);if(On(s)&&On(i))return null}return xg(n,e,r),[n,e]}function pf(y){return he(y)&&!y.isInline()}function Sg(y,d,g,t,f,r){const n=Co(),e=new ji(Gr(y,d,f),Gr(g,t,r),0,"");return e.dirty=!0,n._selection=e,e}function hf(){const y=Gr("root",0,"element"),d=Gr("root",0,"element");return new ji(y,d,0,"")}function gf(){return new Vc(new Set)}function Av(y,d){return Kc(null,y,d,null)}function Kc(y,d,g,t){const f=g._window;if(f===null)return null;const r=t||f.event,n=r?r.type:void 0,e=n==="selectionchange",s=!Id&&(e||n==="beforeinput"||n==="compositionstart"||n==="compositionend"||n==="click"&&r&&r.detail===3||n==="drop"||n===void 0);let i,l,o,a;if(_e(y)&&!s)return y.clone();if(d===null)return null;if(i=d.anchorNode,l=d.focusNode,o=d.anchorOffset,a=d.focusOffset,e&&_e(y)&&!yl(g,i,l))return y.clone();const c=wg(i,o,l,a,g,y);if(c===null)return null;const[u,h]=c;return new ji(u,h,_e(y)?y.format:0,_e(y)?y.style:"")}function je(){return Co()._selection}function pa(){return qn()._editorState._selection}function Gc(y,d,g,t=1){const f=y.anchor,r=y.focus,n=f.getNode(),e=r.getNode();if(!d.is(n)&&!d.is(e))return;const s=d.__key;if(y.isCollapsed()){const i=f.offset;if(g<=i&&t>0||g<i&&t<0){const l=Math.max(0,i+t);f.set(s,l,"element"),r.set(s,l,"element"),Cg(y)}}else{const i=y.isBackward(),l=i?r:f,o=l.getNode(),a=i?f:r,c=a.getNode();if(d.is(o)){const u=l.offset;(g<=u&&t>0||g<u&&t<0)&&l.set(s,Math.max(0,u+t),"element")}if(d.is(c)){const u=a.offset;(g<=u&&t>0||g<u&&t<0)&&a.set(s,Math.max(0,u+t),"element")}}Cg(y)}function Cg(y){const d=y.anchor,g=d.offset,t=y.focus,f=t.offset,r=d.getNode(),n=t.getNode();if(y.isCollapsed()){if(!he(r))return;const e=r.getChildrenSize(),s=g>=e,i=s?r.getChildAtIndex(e-1):r.getChildAtIndex(g);if(Pe(i)){let l=0;s&&(l=i.getTextContentSize()),d.set(i.__key,l,"text"),t.set(i.__key,l,"text")}}else{if(he(r)){const e=r.getChildrenSize(),s=g>=e,i=s?r.getChildAtIndex(e-1):r.getChildAtIndex(g);if(Pe(i)){let l=0;s&&(l=i.getTextContentSize()),d.set(i.__key,l,"text")}}if(he(n)){const e=n.getChildrenSize(),s=f>=e,i=s?n.getChildAtIndex(e-1):n.getChildAtIndex(f);if(Pe(i)){let l=0;s&&(l=i.getTextContentSize()),t.set(i.__key,l,"text")}}}}function Yc(y,d,g,t,f){let r=null,n=0,e=null;t!==null?(r=t.__key,Pe(t)?(n=t.getTextContentSize(),e="text"):he(t)&&(n=t.getChildrenSize(),e="element")):f!==null&&(r=f.__key,Pe(f)?e="text":he(f)&&(e="element")),r!==null&&e!==null?y.set(r,n,e):(n=d.getIndexWithinParent(),n===-1&&(n=g.getChildrenSize()),y.set(g.__key,n,"element"))}function Eg(y,d,g,t,f){y.type==="text"?(y.key=g,d||(y.offset+=f)):y.offset>t.getIndexWithinParent()&&(y.offset-=1)}function Nv(y,d,g,t,f,r,n){const e=t.anchorNode,s=t.focusNode,i=t.anchorOffset,l=t.focusOffset,o=document.activeElement;if(f.has("collaboration")&&o!==r||o!==null&&Ld(o))return;if(!_e(d))return void(y!==null&&yl(g,e,s)&&t.removeAllRanges());const a=d.anchor,c=d.focus,u=a.key,h=c.key,p=Mc(g,u),m=Mc(g,h),b=a.offset,_=c.offset,v=d.format,w=d.style,x=d.isCollapsed();let S=p,E=m,k=!1;if(a.type==="text"){S=Pc(p);const z=a.getNode();k=z.getFormat()!==v||z.getStyle()!==w}else _e(y)&&y.anchor.type==="text"&&(k=!0);var D,N,O,R,A;if(c.type==="text"&&(E=Pc(m)),S!==null&&E!==null&&(x&&(y===null||k||_e(y)&&(y.format!==v||y.style!==w))&&(D=v,N=w,O=b,R=u,A=performance.now(),eg=[D,N,O,R,A]),i!==b||l!==_||e!==S||s!==E||t.type==="Range"&&x||(o!==null&&r.contains(o)||r.focus({preventScroll:!0}),a.type==="element"))){try{t.setBaseAndExtent(S,b,E,_)}catch{}if(!f.has("skip-scroll-into-view")&&d.isCollapsed()&&r!==null&&r===document.activeElement){const z=d instanceof ji&&d.anchor.type==="element"?S.childNodes[b]||null:t.rangeCount>0?t.getRangeAt(0):null;if(z!==null){let H;if(z instanceof Text){const $=document.createRange();$.selectNode(z),H=$.getBoundingClientRect()}else H=z.getBoundingClientRect();(function($,M,J){const K=J.ownerDocument,P=K.defaultView;if(P===null)return;let{top:U,bottom:V}=M,G=0,F=0,q=J;for(;q!==null;){const T=q===K.body;if(T)G=0,F=Lc($).innerHeight;else{const L=q.getBoundingClientRect();G=L.top,F=L.bottom}let I=0;if(U<G?I=-(G-U):V>F&&(I=V-F),I!==0)if(T)P.scrollBy(0,I);else{const L=q.scrollTop;q.scrollTop+=I;const B=q.scrollTop-L;U-=B,V-=B}if(T)break;q=Dc(q)}})(g,H,r)}}rf=!0}}function Pv(y){let d=je()||pa();d===null&&(d=Dn().selectEnd()),d.insertNodes(y)}function mf(y){let d=y;y.isCollapsed()||d.removeText();const g=je();_e(g)&&(d=g),_e(d)||Je(161);const t=d.anchor;let f=t.getNode(),r=t.offset;for(;!rs(f);)[f,r]=Iv(f,r);return r}function Iv(y,d){const g=y.getParent();if(!g){const f=Qn();return Dn().append(f),f.select(),[Dn(),0]}if(Pe(y)){const f=y.splitText(d);if(f.length===0)return[g,y.getIndexWithinParent()];const r=d===0?0:1;return[g,f[0].getIndexWithinParent()+r]}if(!he(y)||d===0)return[g,y.getIndexWithinParent()];const t=y.getChildAtIndex(d);if(t){const f=new ji(Gr(y.__key,d,"element"),Gr(y.__key,d,"element"),0,""),r=y.insertNewAfter(f);r&&r.append(t,...t.getNextSiblings())}return[g,y.getIndexWithinParent()+1]}let lr=null,cr=null,Rr=!1,yf=!1,Zc=0;const kg={characterData:!0,childList:!0,subtree:!0};function ls(){return Rr||lr!==null&&lr._readOnly}function Or(){Rr&&Je(13)}function Og(){Zc>99&&Je(14)}function Co(){return lr===null&&Je(15),lr}function qn(){return cr===null&&Je(16),cr}function Rv(){return cr}function Tg(y,d,g){const t=d.__type,f=function(e,s){const i=e._nodes.get(s);return i===void 0&&Je(30,s),i}(y,t);let r=g.get(t);r===void 0&&(r=Array.from(f.transforms),g.set(t,r));const n=r.length;for(let e=0;e<n&&(r[e](d),d.isAttached());e++);}function jg(y,d){return y!==void 0&&y.__key!==d&&y.isAttached()}function Mv(y){return bf(y,qn()._nodes)}function bf(y,d){const g=y.type,t=d.get(g);t===void 0&&Je(17,g);const f=t.klass;y.type!==f.getType()&&Je(18,f.name);const r=f.importJSON(y),n=y.children;if(he(r)&&Array.isArray(n))for(let e=0;e<n.length;e++){const s=bf(n[e],d);r.append(s)}return r}function Ag(y,d){const g=lr,t=Rr,f=cr;lr=y,Rr=!0,cr=null;try{return d()}finally{lr=g,Rr=t,cr=f}}function ha(y,d){const g=y._pendingEditorState,t=y._rootElement,f=y._headless||t===null;if(g===null)return;const r=y._editorState,n=r._selection,e=g._selection,s=y._dirtyType!==la,i=lr,l=Rr,o=cr,a=y._updating,c=y._observer;let u=null;if(y._pendingEditorState=null,y._editorState=g,!f&&s&&c!==null){cr=y,lr=g,Rr=!1,y._updating=!0;try{const x=y._dirtyType,S=y._dirtyElements,E=y._dirtyLeaves;c.disconnect(),u=_v(r,g,y,x,S,E)}catch(x){if(x instanceof Error&&y._onError(x),yf)throw x;return Lg(y,null,t,g),wh(y),y._dirtyType=ts,yf=!0,ha(y,r),void(yf=!1)}finally{c.observe(t,kg),y._updating=a,lr=i,Rr=l,cr=o}}g._readOnly||(g._readOnly=!0);const h=y._dirtyLeaves,p=y._dirtyElements,m=y._normalizedNodes,b=y._updateTags,_=y._deferred;s&&(y._dirtyType=la,y._cloneNotNeeded.clear(),y._dirtyLeaves=new Set,y._dirtyElements=new Map,y._normalizedNodes=new Set,y._updateTags=new Set),function(x,S){const E=x._decorators;let k=x._pendingDecorators||E;const D=S._nodeMap;let N;for(N in k)D.has(N)||(k===E&&(k=Ah(x)),delete k[N])}(y,g);const v=f?null:So(y._window);if(y._editable&&v!==null&&(s||e===null||e.dirty)){cr=y,lr=g;try{if(c!==null&&c.disconnect(),s||e===null||e.dirty){const x=y._blockCursorElement;x!==null&&Wd(x,y,t),Nv(n,e,y,v,b,t)}pv(y,t,e),c!==null&&c.observe(t,kg)}finally{cr=o,lr=i}}u!==null&&function(x,S,E,k,D){const N=Array.from(x._listeners.mutation),O=N.length;for(let R=0;R<O;R++){const[A,z]=N[R],H=S.get(z);H!==void 0&&A(H,{dirtyLeaves:k,prevEditorState:D,updateTags:E})}}(y,u,b,h,r),_e(e)||e===null||n!==null&&n.is(e)||y.dispatchCommand(qo,void 0);const w=y._pendingDecorators;w!==null&&(y._decorators=w,y._pendingDecorators=null,Pl("decorator",y,!0,w)),function(x,S,E){const k=Nh(S),D=Nh(E);k!==D&&Pl("textcontent",x,!0,D)}(y,d||r,g),Pl("update",y,!0,{dirtyElements:p,dirtyLeaves:h,editorState:g,normalizedNodes:m,prevEditorState:d||r,tags:b}),function(x,S){if(x._deferred=[],S.length!==0){const E=x._updating;x._updating=!0;try{for(let k=0;k<S.length;k++)S[k]()}finally{x._updating=E}}}(y,_),function(x){const S=x._updates;if(S.length!==0){const E=S.shift();if(E){const[k,D]=E;Ig(x,k,D)}}}(y)}function Pl(y,d,g,...t){const f=d._updating;d._updating=g;try{const r=Array.from(d._listeners[y]);for(let n=0;n<r.length;n++)r[n].apply(null,t)}finally{d._updating=f}}function Ng(y,d,g){if(y._updating===!1||cr!==y){let f=!1;return y.update(()=>{f=Ng(y,d,g)}),f}const t=Fd(y);for(let f=4;f>=0;f--)for(let r=0;r<t.length;r++){const n=t[r]._commands.get(d);if(n!==void 0){const e=n[f];if(e!==void 0){const s=Array.from(e),i=s.length;for(let l=0;l<i;l++)if(s[l](g,y)===!0)return!0}}}return!1}function Pg(y,d){const g=y._updates;let t=d||!1;for(;g.length!==0;){const f=g.shift();if(f){const[r,n]=f;let e,s;n!==void 0&&(e=n.onUpdate,s=n.tag,n.skipTransforms&&(t=!0),e&&y._deferred.push(e),s&&y._updateTags.add(s)),r()}}return t}function Ig(y,d,g){const t=y._updateTags;let f,r,n=!1,e=!1;g!==void 0&&(f=g.onUpdate,r=g.tag,r!=null&&t.add(r),n=g.skipTransforms||!1,e=g.discrete||!1),f&&y._deferred.push(f);const s=y._editorState;let i=y._pendingEditorState,l=!1;(i===null||i._readOnly)&&(i=y._pendingEditorState=new Qc(new Map((i||s)._nodeMap)),l=!0),i._flushSync=e;const o=lr,a=Rr,c=cr,u=y._updating;lr=i,Rr=!1,y._updating=!0,cr=y;try{l&&(y._headless?s._selection!==null&&(i._selection=s._selection.clone()):i._selection=function(b){const _=b.getEditorState()._selection,v=So(b._window);return _e(_)||_==null?Kc(_,v,b,null):_.clone()}(y));const p=y._compositionKey;d(),n=Pg(y,n),function(b,_){const v=_.getEditorState()._selection,w=b._selection;if(_e(w)){const x=w.anchor,S=w.focus;let E;if(x.type==="text"&&(E=x.getNode(),E.selectionTransform(v,w)),S.type==="text"){const k=S.getNode();E!==k&&k.selectionTransform(v,w)}}}(i,y),y._dirtyType!==la&&(n?function(b,_){const v=_._dirtyLeaves,w=b._nodeMap;for(const x of v){const S=w.get(x);Pe(S)&&S.isAttached()&&S.isSimpleText()&&!S.isUnmergeable()&&Eh(S)}}(i,y):function(b,_){const v=_._dirtyLeaves,w=_._dirtyElements,x=b._nodeMap,S=Ci(),E=new Map;let k=v,D=k.size,N=w,O=N.size;for(;D>0||O>0;){if(D>0){_._dirtyLeaves=new Set;for(const R of k){const A=x.get(R);Pe(A)&&A.isAttached()&&A.isSimpleText()&&!A.isUnmergeable()&&Eh(A),A!==void 0&&jg(A,S)&&Tg(_,A,E),v.add(R)}if(k=_._dirtyLeaves,D=k.size,D>0){Zc++;continue}}_._dirtyLeaves=new Set,_._dirtyElements=new Map;for(const R of N){const A=R[0],z=R[1];if(A!=="root"&&!z)continue;const H=x.get(A);H!==void 0&&jg(H,S)&&Tg(_,H,E),w.set(A,z)}k=_._dirtyLeaves,D=k.size,N=_._dirtyElements,O=N.size,Zc++}_._dirtyLeaves=v,_._dirtyElements=w}(i,y),Pg(y),function(b,_,v,w){const x=b._nodeMap,S=_._nodeMap,E=[];for(const[k]of w){const D=S.get(k);D!==void 0&&(D.isAttached()||(he(D)&&Jh(D,k,x,S,E,w),x.has(k)||w.delete(k),E.push(k)))}for(const k of E)S.delete(k);for(const k of v){const D=S.get(k);D===void 0||D.isAttached()||(x.has(k)||v.delete(k),S.delete(k))}}(s,i,y._dirtyLeaves,y._dirtyElements)),p!==y._compositionKey&&(i._flushSync=!0);const m=i._selection;if(_e(m)){const b=i._nodeMap,_=m.anchor.key,v=m.focus.key;b.get(_)!==void 0&&b.get(v)!==void 0||Je(19)}else Yr(m)&&m._nodes.size===0&&(i._selection=null)}catch(p){return p instanceof Error&&y._onError(p),y._pendingEditorState=s,y._dirtyType=ts,y._cloneNotNeeded.clear(),y._dirtyLeaves=new Set,y._dirtyElements.clear(),void ha(y)}finally{lr=o,Rr=a,cr=c,y._updating=u,Zc=0}y._dirtyType!==la||function(p,m){const b=m.getEditorState()._selection,_=p._selection;if(_!==null){if(_.dirty||!_.is(b))return!0}else if(b!==null)return!0;return!1}(i,y)?i._flushSync?(i._flushSync=!1,ha(y)):l&&sv(()=>{ha(y)}):(i._flushSync=!1,l&&(t.clear(),y._deferred=[],y._pendingEditorState=null))}function Ur(y,d,g){y._updating?y._updates.push([d,g]):Ig(y,d,g)}class Eo extends Jc{constructor(d){super(d),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 d=this.getFormat();return Qb[d]||""}getIndent(){return this.getLatest().__indent}getChildren(){const d=[];let g=this.getFirstChild();for(;g!==null;)d.push(g),g=g.getNextSibling();return d}getChildrenKeys(){const d=[];let g=this.getFirstChild();for(;g!==null;)d.push(g.__key),g=g.getNextSibling();return d}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const d=qn()._dirtyElements;return d!==null&&d.has(this.__key)}isLastChild(){const d=this.getLatest(),g=this.getParentOrThrow().getLastChild();return g!==null&&g.is(d)}getAllTextNodes(){const d=[];let g=this.getFirstChild();for(;g!==null;){if(Pe(g)&&d.push(g),he(g)){const t=g.getAllTextNodes();d.push(...t)}g=g.getNextSibling()}return d}getFirstDescendant(){let d=this.getFirstChild();for(;he(d);){const g=d.getFirstChild();if(g===null)break;d=g}return d}getLastDescendant(){let d=this.getLastChild();for(;he(d);){const g=d.getLastChild();if(g===null)break;d=g}return d}getDescendantByIndex(d){const g=this.getChildren(),t=g.length;if(d>=t){const r=g[t-1];return he(r)&&r.getLastDescendant()||r||null}const f=g[d];return he(f)&&f.getFirstDescendant()||f||null}getFirstChild(){const d=this.getLatest().__first;return d===null?null:Hn(d)}getFirstChildOrThrow(){const d=this.getFirstChild();return d===null&&Je(45,this.__key),d}getLastChild(){const d=this.getLatest().__last;return d===null?null:Hn(d)}getLastChildOrThrow(){const d=this.getLastChild();return d===null&&Je(96,this.__key),d}getChildAtIndex(d){const g=this.getChildrenSize();let t,f;if(d<g/2){for(t=this.getFirstChild(),f=0;t!==null&&f<=d;){if(f===d)return t;t=t.getNextSibling(),f++}return null}for(t=this.getLastChild(),f=g-1;t!==null&&f>=d;){if(f===d)return t;t=t.getPreviousSibling(),f--}return null}getTextContent(){let d="";const g=this.getChildren(),t=g.length;for(let f=0;f<t;f++){const r=g[f];d+=r.getTextContent(),he(r)&&f!==t-1&&!r.isInline()&&(d+=Jo)}return d}getTextContentSize(){let d=0;const g=this.getChildren(),t=g.length;for(let f=0;f<t;f++){const r=g[f];d+=r.getTextContentSize(),he(r)&&f!==t-1&&!r.isInline()&&(d+=Jo.length)}return d}getDirection(){return this.getLatest().__dir}hasFormat(d){if(d!==""){const g=vh[d];return!!(this.getFormat()&g)}return!1}select(d,g){Or();const t=je();let f=d,r=g;const n=this.getChildrenSize();if(!this.canBeEmpty()){if(d===0&&g===0){const s=this.getFirstChild();if(Pe(s)||he(s))return s.select(0,0)}else if(!(d!==void 0&&d!==n||g!==void 0&&g!==n)){const s=this.getLastChild();if(Pe(s)||he(s))return s.select()}}f===void 0&&(f=n),r===void 0&&(r=n);const e=this.__key;return _e(t)?(t.anchor.set(e,f,"element"),t.focus.set(e,r,"element"),t.dirty=!0,t):Sg(e,f,e,r,"element","element")}selectStart(){const d=this.getFirstDescendant();return d?d.selectStart():this.select()}selectEnd(){const d=this.getLastDescendant();return d?d.selectEnd():this.select()}clear(){const d=this.getWritable();return this.getChildren().forEach(g=>g.remove()),d}append(...d){return this.splice(this.getChildrenSize(),0,d)}setDirection(d){const g=this.getWritable();return g.__dir=d,g}setFormat(d){return this.getWritable().__format=d!==""?vh[d]:0,this}setIndent(d){return this.getWritable().__indent=d,this}splice(d,g,t){const f=t.length,r=this.getChildrenSize(),n=this.getWritable(),e=n.__key,s=[],i=[],l=this.getChildAtIndex(d+g);let o=null,a=r-g+f;if(d!==0)if(d===r)o=this.getLastChild();else{const u=this.getChildAtIndex(d);u!==null&&(o=u.getPreviousSibling())}if(g>0){let u=o===null?this.getFirstChild():o.getNextSibling();for(let h=0;h<g;h++){u===null&&Je(100);const p=u.getNextSibling(),m=u.__key;ca(u.getWritable()),i.push(m),u=p}}let c=o;for(let u=0;u<f;u++){const h=t[u];c!==null&&h.is(c)&&(o=c=c.getPreviousSibling());const p=h.getWritable();p.__parent===e&&a--,ca(p);const m=h.__key;if(c===null)n.__first=m,p.__prev=null;else{const b=c.getWritable();b.__next=m,p.__prev=b.__key}h.__key===e&&Je(76),p.__parent=e,s.push(m),c=h}if(d+g===r)c!==null&&(c.getWritable().__next=null,n.__last=c.__key);else if(l!==null){const u=l.getWritable();if(c!==null){const h=c.getWritable();u.__prev=c.__key,h.__next=l.__key}else u.__prev=null}if(n.__size=a,i.length){const u=je();if(_e(u)){const h=new Set(i),p=new Set(s),{anchor:m,focus:b}=u;Rg(m,h,p)&&Yc(m,m.getNode(),this,o,l),Rg(b,h,p)&&Yc(b,b.getNode(),this,o,l),a!==0||this.canBeEmpty()||wo(this)||this.remove()}}return n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(d,g){return null}canIndent(){return!0}collapseAtStart(d){return!1}excludeFromCopy(d){return!1}canReplaceWith(d){return!0}canInsertAfter(d){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(d){return!1}extractWithChild(d,g,t){return!1}}function he(y){return y instanceof Eo}function Rg(y,d,g){let t=y.getNode();for(;t;){const f=t.__key;if(d.has(f)&&!g.has(f))return!0;t=t.getParent()}return!1}class Mg extends Jc{constructor(d){super(d)}decorate(d,g){Je(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function On(y){return y instanceof Mg}class cs extends Eo{static getType(){return"root"}static clone(){return new cs}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Je(51)}getTextContent(){const d=this.__cachedText;return!ls()&&qn()._dirtyType!==la||d===null?super.getTextContent():d}remove(){Je(52)}replace(d){Je(53)}insertBefore(d){Je(54)}insertAfter(d){Je(55)}updateDOM(d,g){return!1}append(...d){for(let g=0;g<d.length;g++){const t=d[g];he(t)||On(t)||Je(56)}return super.append(...d)}static importJSON(d){const g=Dn();return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function br(y){return y instanceof cs}function vf(){return new Qc(new Map([["root",new cs]]))}function Dg(y){const d=y.exportJSON(),g=y.constructor;if(d.type!==g.getType()&&Je(130,g.name),he(y)){const t=d.children;Array.isArray(t)||Je(59,g.name);const f=y.getChildren();for(let r=0;r<f.length;r++){const n=Dg(f[r]);t.push(n)}}return d}class Qc{constructor(d,g){this._nodeMap=d,this._selection=g||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(d){return Ag(this,d)}clone(d){const g=new Qc(this._nodeMap,d===void 0?this._selection:d);return g._readOnly=!0,g}toJSON(){return Ag(this,()=>({root:Dg(Dn())}))}}class _f extends Eo{static getType(){return"artificial"}createDOM(d){return document.createElement("div")}}class ga extends Eo{constructor(d){super(d),this.__textFormat=0}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(d){const g=this.getWritable();return g.__textFormat=d,g}hasTextFormat(d){const g=Wo[d];return!!(this.getTextFormat()&g)}static clone(d){return new ga(d.__key)}createDOM(d){const g=document.createElement("p"),t=xl(d.theme,"paragraph");return t!==void 0&&g.classList.add(...t),g}updateDOM(d,g,t){return!1}static importDOM(){return{p:d=>({conversion:Dv,priority:0})}}exportDOM(d){const{element:g}=super.exportDOM(d);if(g&&Sl(g)){this.isEmpty()&&g.append(document.createElement("br"));const t=this.getFormatType();g.style.textAlign=t;const f=this.getDirection();f&&(g.dir=f);const r=this.getIndent();r>0&&(g.style.textIndent=20*r+"px")}return{element:g}}static importJSON(d){const g=Qn();return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g.setTextFormat(d.textFormat),g}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),type:"paragraph",version:1}}insertNewAfter(d,g){const t=Qn();t.setTextFormat(d.format);const f=this.getDirection();return t.setDirection(f),t.setFormat(this.getFormatType()),this.insertAfter(t,g),t}collapseAtStart(){const d=this.getChildren();if(d.length===0||Pe(d[0])&&d[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 Dv(y){const d=Qn();if(y.style){d.setFormat(y.style.textAlign);const g=parseInt(y.style.textIndent,10)/20;g>0&&d.setIndent(g)}return{node:d}}function Qn(){return Vo(new ga)}function ma(y){return y instanceof ga}const an=0,us=3,Zr=4;function Lg(y,d,g,t){const f=y._keyToDOMMap;f.clear(),y._editorState=vf(),y._pendingEditorState=t,y._compositionKey=null,y._dirtyType=la,y._cloneNotNeeded.clear(),y._dirtyLeaves=new Set,y._dirtyElements.clear(),y._normalizedNodes=new Set,y._updateTags=new Set,y._updates=[],y._blockCursorElement=null;const r=y._observer;r!==null&&(r.disconnect(),y._observer=null),d!==null&&(d.textContent=""),g!==null&&(g.textContent="",f.set("root",g))}function Bg(y){const d=y||{},g=Rv(),t=d.theme||{},f=y===void 0?g:d.parentEditor||null,r=d.disableEvents||!1,n=vf(),e=d.namespace||(f!==null?f._config.namespace:Mh()),s=d.editorState,i=[cs,ki,as,Al,ga,_f,...d.nodes||[]],{onError:l,html:o}=d,a=d.editable===void 0||d.editable;let c;if(y===void 0&&g!==null)c=g._nodes;else{c=new Map;for(let h=0;h<i.length;h++){let p=i[h],m=null,b=null;if(typeof p!="function"){const x=p;p=x.replace,m=x.with,b=x.withKlass||null}const _=p.getType(),v=p.transform(),w=new Set;v!==null&&w.add(v),c.set(_,{exportDOM:o&&o.export?o.export.get(p):void 0,klass:p,replace:m,replaceWithKlass:b,transforms:w})}}const u=new Lv(n,f,c,{disableEvents:r,namespace:e,theme:t},l||console.error,function(h,p){const m=new Map,b=new Set,_=v=>{Object.keys(v).forEach(w=>{let x=m.get(w);x===void 0&&(x=[],m.set(w,x)),x.push(v[w])})};return h.forEach(v=>{const w=v.klass.importDOM;if(w==null||b.has(w))return;b.add(w);const x=w.call(v.klass);x!==null&&_(x)}),p&&_(p),m}(c,o?o.import:void 0),a);return s!==void 0&&(u._pendingEditorState=s,u._dirtyType=ts),u}class Lv{constructor(d,g,t,f,r,n,e){this._parentEditor=g,this._rootElement=null,this._editorState=d,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=f,this._nodes=t,this._decorators={},this._pendingDecorators=null,this._dirtyType=la,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=Mh(),this._onError=r,this._htmlConversions=n,this._editable=e,this._headless=g!==null&&g._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(d){const g=this._listeners.update;return g.add(d),()=>{g.delete(d)}}registerEditableListener(d){const g=this._listeners.editable;return g.add(d),()=>{g.delete(d)}}registerDecoratorListener(d){const g=this._listeners.decorator;return g.add(d),()=>{g.delete(d)}}registerTextContentListener(d){const g=this._listeners.textcontent;return g.add(d),()=>{g.delete(d)}}registerRootListener(d){const g=this._listeners.root;return d(this._rootElement,null),g.add(d),()=>{d(null,this._rootElement),g.delete(d)}}registerCommand(d,g,t){t===void 0&&Je(35);const f=this._commands;f.has(d)||f.set(d,[new Set,new Set,new Set,new Set,new Set]);const r=f.get(d);r===void 0&&Je(36,String(d));const n=r[t];return n.add(g),()=>{n.delete(g),r.every(e=>e.size===0)&&f.delete(d)}}registerMutationListener(d,g){let t=this._nodes.get(d.getType());t===void 0&&Je(37,d.name);let f=d,r=null;for(;r=t.replaceWithKlass;)f=r,t=this._nodes.get(r.getType()),t===void 0&&Je(37,r.name);const n=this._listeners.mutation;return n.set(g,f),()=>{n.delete(g)}}registerNodeTransformToKlass(d,g){const t=d.getType(),f=this._nodes.get(t);return f===void 0&&Je(37,d.name),f.transforms.add(g),f}registerNodeTransform(d,g){const t=this.registerNodeTransformToKlass(d,g),f=[t],r=t.replaceWithKlass;if(r!=null){const s=this.registerNodeTransformToKlass(r,g);f.push(s)}var n,e;return n=this,e=d.getType(),Ur(n,()=>{const s=Co();if(s.isEmpty())return;if(e==="root")return void Dn().markDirty();const i=s._nodeMap;for(const[,l]of i)l.markDirty()},n._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{f.forEach(s=>s.transforms.delete(g))}}hasNode(d){return this._nodes.has(d.getType())}hasNodes(d){return d.every(this.hasNode.bind(this))}dispatchCommand(d,g){return Ke(this,d,g)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(d){const g=this._rootElement;if(d!==g){const t=xl(this._config.theme,"root"),f=this._pendingEditorState||this._editorState;if(this._rootElement=d,Lg(this,g,d,f),g!==null&&(this._config.disableEvents||xv(g),t!=null&&g.classList.remove(...t)),d!==null){const r=function(e){const s=e.ownerDocument;return s&&s.defaultView||null}(d),n=d.style;n.userSelect="text",n.whiteSpace="pre-wrap",n.wordBreak="break-word",d.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=ts,wh(this),this._updateTags.add("history-merge"),ha(this),this._config.disableEvents||function(e,s){const i=e.ownerDocument,l=qc.get(i);(l===void 0||l<1)&&i.addEventListener("selectionchange",sg),qc.set(i,(l||0)+1),e.__lexicalEditor=s;const o=ag(e);for(let a=0;a<nf.length;a++){const[c,u]=nf[a],h=typeof u=="function"?p=>{cg(p)||(lg(p),(s.isEditable()||c==="click")&&u(p,s))}:p=>{if(cg(p))return;lg(p);const m=s.isEditable();switch(c){case"cut":return m&&Ke(s,gl,p);case"copy":return Ke(s,hl,p);case"paste":return m&&Ke(s,ll,p);case"dragstart":return m&&Ke(s,wd,p);case"dragover":return m&&Ke(s,ph,p);case"dragend":return m&&Ke(s,Lb,p);case"focus":return m&&Ke(s,hh,p);case"blur":return m&&Ke(s,Fb,p);case"drop":return m&&Ke(s,xd,p)}};e.addEventListener(c,h),o.push(()=>{e.removeEventListener(c,h)})}}(d,this),t!=null&&d.classList.add(...t)}else this._editorState=f,this._pendingEditorState=null,this._window=null;Pl("root",this,!1,d,g)}}getElementByKey(d){return this._keyToDOMMap.get(d)||null}getEditorState(){return this._editorState}setEditorState(d,g){d.isEmpty()&&Je(38),xh(this);const t=this._pendingEditorState,f=this._updateTags,r=g!==void 0?g.tag:null;t===null||t.isEmpty()||(r!=null&&f.add(r),ha(this)),this._pendingEditorState=d,this._dirtyType=ts,this._dirtyElements.set("root",!1),this._compositionKey=null,r!=null&&f.add(r),ha(this)}parseEditorState(d,g){return function(t,f,r){const n=vf(),e=lr,s=Rr,i=cr,l=f._dirtyElements,o=f._dirtyLeaves,a=f._cloneNotNeeded,c=f._dirtyType;f._dirtyElements=new Map,f._dirtyLeaves=new Set,f._cloneNotNeeded=new Set,f._dirtyType=0,lr=n,Rr=!1,cr=f;try{const u=f._nodes;bf(t.root,u),r&&r(),n._readOnly=!0}catch(u){u instanceof Error&&f._onError(u)}finally{f._dirtyElements=l,f._dirtyLeaves=o,f._cloneNotNeeded=a,f._dirtyType=c,lr=e,Rr=s,cr=i}return n}(typeof d=="string"?JSON.parse(d):d,this,g)}update(d,g){Ur(this,d,g)}focus(d,g={}){const t=this._rootElement;t!==null&&(t.setAttribute("autocapitalize","off"),Ur(this,()=>{const f=je(),r=Dn();f!==null?f.dirty=!0:r.getChildrenSize()!==0&&(g.defaultSelection==="rootStart"?r.selectStart():r.selectEnd())},{onUpdate:()=>{t.removeAttribute("autocapitalize"),d&&d()},tag:"focus"}),this._pendingEditorState===null&&t.removeAttribute("autocapitalize"))}blur(){const d=this._rootElement;d!==null&&d.blur();const g=So(this._window);g!==null&&g.removeAllRanges()}isEditable(){return this._editable}setEditable(d){this._editable!==d&&(this._editable=d,Pl("editable",this,!0,d))}toJSON(){return{editorState:this._editorState.toJSON()}}}const _2="";function Bv(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Fv=Bv(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const xf=Be.createContext(null);function zv(y,d){let g=null;return y!=null&&(g=y[1]),{getTheme:function(){return d??(g!=null?g.getTheme():null)}}}function Tr(){const y=Be.useContext(xf);return y==null&&Fv(8),y}const Fg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Uv=Fg?Be.useLayoutEffect:Be.useEffect,Xc={tag:"history-merge"};function zg({initialConfig:y,children:d}){const g=Be.useMemo(()=>{const{theme:t,namespace:f,editor__DEPRECATED:r,nodes:n,onError:e,editorState:s,html:i}=y,l=zv(null,t);let o=r||null;if(o===null){const a=Bg({editable:y.editable,html:i,namespace:f,nodes:n,onError:c=>e(c,a),theme:t});(function(c,u){if(u!==null){if(u===void 0)c.update(()=>{const h=Dn();if(h.isEmpty()){const p=Qn();h.append(p);const m=Fg?document.activeElement:null;(je()!==null||m!==null&&m===c.getRootElement())&&p.select()}},Xc);else if(u!==null)switch(typeof u){case"string":{const h=c.parseEditorState(u);c.setEditorState(h,Xc);break}case"object":c.setEditorState(u,Xc);break;case"function":c.update(()=>{Dn().isEmpty()&&u(c)},Xc)}}})(a,s),o=a}return[o,l]},[]);return Uv(()=>{const t=y.editable,[f]=g;f.setEditable(t===void 0||t)},[]),Se.jsx(xf.Provider,{value:g,children:d})}function Ug({defaultSelection:y}){const[d]=Tr();return Be.useEffect(()=>{d.focus(()=>{const g=document.activeElement,t=d.getRootElement();t===null||g!==null&&t.contains(g)||t.focus({preventScroll:!0})},{defaultSelection:y})},[y,d]),null}const $v=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Be.useLayoutEffect:Be.useEffect;function $g({ariaActiveDescendant:y,ariaAutoComplete:d,ariaControls:g,ariaDescribedBy:t,ariaExpanded:f,ariaLabel:r,ariaLabelledBy:n,ariaMultiline:e,ariaOwns:s,ariaRequired:i,autoCapitalize:l,className:o,id:a,role:c="textbox",spellCheck:u=!0,style:h,tabIndex:p,"data-testid":m,...b}){const[_]=Tr(),[v,w]=Be.useState(!1),x=Be.useCallback(S=>{S&&S.ownerDocument&&S.ownerDocument.defaultView&&_.setRootElement(S)},[_]);return $v(()=>(w(_.isEditable()),_.registerEditableListener(S=>{w(S)})),[_]),Se.jsx("div",{...b,"aria-activedescendant":v?y:void 0,"aria-autocomplete":v?d:"none","aria-controls":v?g:void 0,"aria-describedby":t,"aria-expanded":v&&c==="combobox"?!!f:void 0,"aria-label":r,"aria-labelledby":n,"aria-multiline":e,"aria-owns":v?s:void 0,"aria-readonly":!v||void 0,"aria-required":i,autoCapitalize:l,className:o,contentEditable:v,"data-testid":m,id:a,ref:x,role:c,spellCheck:u,style:h,tabIndex:p})}function Hv(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}Hv(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const tu=new Map;function Hg(y){let d=y;for(;d!=null;){if(d.nodeType===Node.TEXT_NODE)return d;d=d.firstChild}return null}function qg(y){const d=y.parentNode;if(d==null)throw new Error("Should never happen");return[d,Array.from(d.childNodes).indexOf(y)]}function qv(y,d,g,t,f){const r=d.getKey(),n=t.getKey(),e=document.createRange();let s=y.getElementByKey(r),i=y.getElementByKey(n),l=g,o=f;if(Pe(d)&&(s=Hg(s)),Pe(t)&&(i=Hg(i)),d===void 0||t===void 0||s===null||i===null)return null;s.nodeName==="BR"&&([s,l]=qg(s)),i.nodeName==="BR"&&([i,o]=qg(i));const a=s.firstChild;s===i&&a!=null&&a.nodeName==="BR"&&l===0&&o===0&&(o=1);try{e.setStart(s,l),e.setEnd(i,o)}catch{return null}return!e.collapsed||l===o&&r===n||(e.setStart(i,o),e.setEnd(s,l)),e}function Jv(y,d){const g=y.getRootElement();if(g===null)return[];const t=g.getBoundingClientRect(),f=getComputedStyle(g),r=parseFloat(f.paddingLeft)+parseFloat(f.paddingRight),n=Array.from(d.getClientRects());let e,s=n.length;n.sort((i,l)=>{const o=i.top-l.top;return Math.abs(o)<=3?i.left-l.left:o});for(let i=0;i<s;i++){const l=n[i],o=e&&e.top<=l.top&&e.top+e.height>l.top&&e.left+e.width>l.left,a=l.width+r===t.width;o||a?(n.splice(i--,1),s--):e=l}return n}function Jg(y){const d={},g=y.split(";");for(const t of g)if(t!==""){const[f,r]=t.split(/:([^]+)/);f&&r&&(d[f.trim()]=r.trim())}return d}function wf(y){let d=tu.get(y);return d===void 0&&(d=Jg(y),tu.set(y,d)),d}function Wg(y){const d=y.constructor.clone(y);return d.__parent=y.__parent,d.__next=y.__next,d.__prev=y.__prev,he(y)&&he(d)?(t=y,(g=d).__first=t.__first,g.__last=t.__last,g.__size=t.__size,g.__format=t.__format,g.__indent=t.__indent,g.__dir=t.__dir,g):Pe(y)&&Pe(d)?function(f,r){return f.__format=r.__format,f.__style=r.__style,f.__mode=r.__mode,f.__detail=r.__detail,f}(d,y):ma(y)&&ma(d)?function(f,r){return f.__textFormat=r.__textFormat,f}(d,y):d;var g,t}function Vg(y,d){const g=y.getStartEndPoints();if(d.isSelected(y)&&!d.isSegmented()&&!d.isToken()&&g!==null){const[t,f]=g,r=y.isBackward(),n=t.getNode(),e=f.getNode(),s=d.is(n),i=d.is(e);if(s||i){const[l,o]=ff(y),a=n.is(e),c=d.is(r?e:n),u=d.is(r?n:e);let h,p=0;return a?(p=l>o?o:l,h=l>o?l:o):c?(p=r?o:l,h=void 0):u&&(p=0,h=r?l:o),d.__text=d.__text.slice(p,h),d}}return d}function Wv(y){const d=y.getStyle(),g=Jg(d);tu.set(d,g)}function ds(y,d){const g=wf("getStyle"in y?y.getStyle():y.style),t=Object.entries(d).reduce((r,[n,e])=>(e instanceof Function?r[n]=e(g[n]):e===null?delete r[n]:r[n]=e,r),{...g}),f=function(r){let n="";for(const e in r)e&&(n+=`${e}: ${r[e]};`);return n}(t);y.setStyle(f),tu.set(f,t)}function Kg(y,d){const g=y.getNodes(),t=g.length,f=y.getStartEndPoints();if(f===null)return;const[r,n]=f,e=t-1;let s=g[0],i=g[e];if(y.isCollapsed()&&_e(y))return void ds(y,d);const l=s.getTextContent().length,o=n.offset;let a=r.offset;const c=r.isBefore(n);let u=c?a:o,h=c?o:a;const p=c?r.type:n.type,m=c?n.type:r.type,b=c?n.key:r.key;if(Pe(s)&&u===l){const _=s.getNextSibling();Pe(_)&&(a=0,u=0,s=_)}if(g.length===1){if(Pe(s)&&s.canHaveFormat()){if(u=p==="element"?0:a>o?o:a,h=m==="element"?l:a>o?a:o,u===h)return;if(u===0&&h===l)ds(s,d),s.select(u,h);else{const _=s.splitText(u,h),v=u===0?_[0]:_[1];ds(v,d),v.select(0,h-u)}}}else{if(Pe(s)&&u<s.getTextContentSize()&&s.canHaveFormat()&&(u!==0&&(s=s.splitText(u)[1],u=0,c?r.set(s.getKey(),u,"text"):n.set(s.getKey(),u,"text")),ds(s,d)),Pe(i)&&i.canHaveFormat()){const _=i.getTextContent().length;i.__key!==b&&h!==0&&(h=_),h!==_&&([i]=i.splitText(h)),h===0&&m!=="element"||ds(i,d)}for(let _=1;_<e;_++){const v=g[_],w=v.getKey();Pe(v)&&v.canHaveFormat()&&w!==s.getKey()&&w!==i.getKey()&&!v.isToken()&&ds(v,d)}}}function eu(y,d){const g=wl(y.focus,d);return On(g)&&!g.isIsolated()||he(g)&&!g.isInline()&&!g.canBeEmpty()}function Vv(y,d,g,t){y.modify(d?"extend":"move",g,t)}function Kv(y){const d=y.anchor.getNode();return(br(d)?d:d.getParentOrThrow()).getDirection()==="rtl"}function nu(y,d,g){const t=Kv(y);Vv(y,d,g?!t:t,"character")}function Gv(y,d,g){const t=wf(y.getStyle());return t!==null&&t[d]||g}function Gg(y,d,g=""){let t=null;const f=y.getNodes(),r=y.anchor,n=y.focus,e=y.isBackward(),s=e?n.offset:r.offset,i=e?n.getNode():r.getNode();if(_e(y)&&y.isCollapsed()&&y.style!==""){const l=wf(y.style);if(l!==null&&d in l)return l[d]}for(let l=0;l<f.length;l++){const o=f[l];if((l===0||s!==0||!o.is(i))&&Pe(o)){const a=Gv(o,d,g);if(t===null)t=a;else if(t!==a){t="";break}}}return t===null?g:t}function Yv(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Zv=Yv(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const Yg=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Qv=Yg&&"documentMode"in document?document.documentMode:null;!(!Yg||!("InputEvent"in window)||Qv)&&"getTargetRanges"in new window.InputEvent("input");function Zg(...y){const d=[];for(const g of y)if(g&&typeof g=="string")for(const[t]of g.matchAll(/\S+/g))d.push(t);return d}function ko(...y){return()=>{for(let d=y.length-1;d>=0;d--)y[d]();y.length=0}}function Ai(y,...d){const g=Zg(...d);g.length>0&&y.classList.add(...g)}function Qg(y,...d){const g=Zg(...d);g.length>0&&y.classList.remove(...g)}function Xv(y){const d=_n(y,g=>he(g)&&!g.isInline());return he(d)||Zv(4,y.__key),d}const _n=(y,d)=>{let g=y;for(;g!==Dn()&&g!=null;){if(d(g))return g;g=g.getParent()}return null};function t1(y,d,g,t){const f=r=>r instanceof d;return y.registerNodeTransform(d,r=>{const n=(e=>{const s=e.getChildren();for(let o=0;o<s.length;o++){const a=s[o];if(f(a))return null}let i=e,l=e;for(;i!==null;)if(l=i,i=i.getParent(),f(i))return{child:l,parent:i};return null})(r);if(n!==null){const{child:e,parent:s}=n;if(e.is(r)){t(s,r);const i=e.getNextSiblings(),l=i.length;if(s.insertAfter(e),l!==0){const o=g(s);e.insertAfter(o);for(let a=0;a<l;a++)o.append(i[a])}s.canBeEmpty()||s.getChildrenSize()!==0||s.remove()}}})}function Xg(y){const d=je()||pa();if(_e(d)){const{focus:g}=d,t=g.getNode(),f=g.offset;if(wo(t)){const r=t.getChildAtIndex(f);r==null?t.append(y):r.insertBefore(y),y.selectNext()}else{let r,n;Pe(t)?(r=t.getParentOrThrow(),n=t.getIndexWithinParent(),f>0&&(n+=1,t.splitText(f))):(r=t,n=f);const[,e]=hv(r,n);e.insertBefore(y),e.selectStart()}}else{if(d!=null){const t=d.getNodes();t[t.length-1].getTopLevelElementOrThrow().insertAfter(y)}else Dn().append(y);const g=Qn();y.insertAfter(g),g.select()}return y.getLatest()}function Ni(y,d){return y!==null&&Object.getPrototypeOf(y).constructor.name===d.name}function tm(y,d){const g=y.getFirstChild();g!==null?g.insertBefore(d):y.append(d)}const ru=0,Sf=1,Cf=2,ho=0,e1=1,em=2,n1=3,r1=4;function o1(y,d,g,t,f){if(y===null||g.size===0&&t.size===0&&!f)return ho;const r=d._selection,n=y._selection;if(f)return e1;if(!(_e(r)&&_e(n)&&n.isCollapsed()&&r.isCollapsed()))return ho;const e=function(m,b,_){const v=m._nodeMap,w=[];for(const x of b){const S=v.get(x);S!==void 0&&w.push(S)}for(const[x,S]of _){if(!S)continue;const E=v.get(x);E===void 0||br(E)||w.push(E)}return w}(d,g,t);if(e.length===0)return ho;if(e.length>1){const m=d._nodeMap,b=m.get(r.anchor.key),_=m.get(n.anchor.key);return b&&_&&!y._nodeMap.has(b.__key)&&Pe(b)&&b.__text.length===1&&r.anchor.offset===1?em:ho}const s=e[0],i=y._nodeMap.get(s.__key);if(!Pe(i)||!Pe(s)||i.__mode!==s.__mode)return ho;const l=i.__text,o=s.__text;if(l===o)return ho;const a=r.anchor,c=n.anchor;if(a.key!==c.key||a.type!=="text")return ho;const u=a.offset,h=c.offset,p=o.length-l.length;return p===1&&h===u-1?em:p===-1&&h===u+1?n1:p===-1&&h===u?r1:ho}function i1(y,d){let g=Date.now(),t=ho;return(f,r,n,e,s,i)=>{const l=Date.now();if(i.has("historic"))return t=ho,g=l,Cf;const o=o1(f,r,e,s,y.isComposing()),a=(()=>{const c=n===null||n.editor===y,u=i.has("history-push");if(!u&&c&&i.has("history-merge"))return ru;if(f===null)return Sf;const h=r._selection;return e.size>0||s.size>0?u===!1&&o!==ho&&o===t&&l<g+d&&c||e.size===1&&function(p,m,b){const _=m._nodeMap.get(p),v=b._nodeMap.get(p),w=m._selection,x=b._selection;let S=!1;return _e(w)&&_e(x)&&(S=w.anchor.type==="element"&&w.focus.type==="element"&&x.anchor.type==="text"&&x.focus.type==="text"),!(S||!Pe(_)||!Pe(v))&&_.__type===v.__type&&_.__text===v.__text&&_.__mode===v.__mode&&_.__detail===v.__detail&&_.__style===v.__style&&_.__format===v.__format&&_.__parent===v.__parent}(Array.from(e)[0],f,r)?ru:Sf:h!==null?ru:Cf})();return g=l,t=o,a}}function nm(y){y.undoStack=[],y.redoStack=[],y.current=null}function a1(y,d,g){const t=i1(y,g);return ko(y.registerCommand(cl,()=>(function(r,n){const e=n.redoStack,s=n.undoStack;if(s.length!==0){const i=n.current,l=s.pop();i!==null&&(e.push(i),r.dispatchCommand(Qa,!0)),s.length===0&&r.dispatchCommand(Xa,!1),n.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}}(y,d),!0),an),y.registerCommand(ul,()=>(function(r,n){const e=n.redoStack,s=n.undoStack;if(e.length!==0){const i=n.current;i!==null&&(s.push(i),r.dispatchCommand(Xa,!0));const l=e.pop();e.length===0&&r.dispatchCommand(Qa,!1),n.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}}(y,d),!0),an),y.registerCommand(Sd,()=>(nm(d),!1),an),y.registerCommand(Bb,()=>(nm(d),y.dispatchCommand(Qa,!1),y.dispatchCommand(Xa,!1),!0),an),y.registerUpdateListener(({editorState:r,prevEditorState:n,dirtyLeaves:e,dirtyElements:s,tags:i})=>{const l=d.current,o=d.redoStack,a=d.undoStack,c=l===null?null:l.editorState;if(l!==null&&r===c)return;const u=t(n,r,l,e,s,i);if(u===Sf)o.length!==0&&(d.redoStack=[],y.dispatchCommand(Qa,!1)),l!==null&&(a.push({...l}),y.dispatchCommand(Xa,!0));else if(u===Cf)return;d.current={editor:y,editorState:r}}))}function s1(){return{current:null,redoStack:[],undoStack:[]}}function rm({externalHistoryState:y}){const[d]=Tr();return function(g,t,f=1e3){const r=Be.useMemo(()=>t||s1(),[t]);Be.useEffect(()=>a1(g,r,f),[f,g,r])}(d,y),null}const l1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Be.useLayoutEffect:Be.useEffect;function c1(y){return{initialValueFn:()=>y.isEditable(),subscribe:d=>y.registerEditableListener(d)}}function om(){return function(y){const[d]=Tr(),g=Be.useMemo(()=>y(d),[d,y]),t=Be.useRef(g.initialValueFn()),[f,r]=Be.useState(t.current);return l1(()=>{const{initialValueFn:n,subscribe:e}=g,s=n();return t.current!==s&&(t.current=s,r(s)),e(i=>{t.current=i,r(i)})},[g,y]),f}(c1)}function im(){return Dn().getTextContent()}function am(y,d=!0){if(y)return!1;let g=im();return d&&(g=g.trim()),g===""}function u1(y){if(!am(y,!1))return!1;const d=Dn().getChildren(),g=d.length;if(g>1)return!1;for(let t=0;t<g;t++){const f=d[t];if(On(f))return!1;if(he(f)){if(!ma(f)||f.__indent!==0)return!1;const r=f.getChildren(),n=r.length;for(let e=0;e<n;e++){const s=r[t];if(!Pe(s))return!1}}}return!0}function sm(y){return()=>u1(y)}function d1(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}d1(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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 lm(y){const d=window.location.origin,g=t=>{if(t.origin!==d)return;const f=y.getRootElement();if(document.activeElement!==f)return;const r=t.data;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{return}if(n&&n.protocol==="nuanria_messaging"&&n.type==="request"){const e=n.payload;if(e&&e.functionId==="makeChanges"){const s=e.args;if(s){const[i,l,o,a,c,u]=s;y.update(()=>{const h=je();if(_e(h)){const p=h.anchor;let m=p.getNode(),b=0,_=0;if(Pe(m)&&i>=0&&l>=0&&(b=i,_=i+l,h.setTextNodeRange(m,b,m,_)),b===_&&o===""||(h.insertRawText(o),m=p.getNode()),Pe(m)){b=a,_=a+c;const v=m.getTextContentSize();b=b>v?v:b,_=_>v?v:_,h.setTextNodeRange(m,b,m,_)}t.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",g,!0),()=>{window.removeEventListener("message",g,!0)}}function f1(y,d){const g=d.body?d.body.childNodes:[];let t=[];const f=[];for(let r=0;r<g.length;r++){const n=g[r];if(!um.has(n.nodeName)){const e=dm(n,y,f,!1);e!==null&&(t=t.concat(e))}}return function(r){for(const n of r)n.getNextSibling()instanceof _f&&n.insertAfter(ss());for(const n of r){const e=n.getChildren();for(const s of e)n.insertBefore(s);n.remove()}}(f),t}function p1(y,d){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const g=document.createElement("div"),t=Dn().getChildren();for(let f=0;f<t.length;f++)cm(y,t[f],g,d);return g.innerHTML}function cm(y,d,g,t=null){let f=t===null||d.isSelected(t);const r=he(d)&&d.excludeFromCopy("html");let n=d;if(t!==null){let c=Wg(d);c=Pe(c)&&t!==null?Vg(t,c):c,n=c}const e=he(n)?n.getChildren():[],s=y._nodes.get(n.getType());let i;i=s&&s.exportDOM!==void 0?s.exportDOM(y,n):n.exportDOM(y);const{element:l,after:o}=i;if(!l)return!1;const a=document.createDocumentFragment();for(let c=0;c<e.length;c++){const u=e[c],h=cm(y,u,a,t);!f&&he(d)&&h&&d.extractWithChild(u,t,"html")&&(f=!0)}if(f&&!r){if(Sl(l)&&l.append(a),g.append(l),o){const c=o.call(n,l);c&&l.replaceWith(c)}}else g.append(a);return f}const um=new Set(["STYLE","SCRIPT"]);function dm(y,d,g,t,f=new Map,r){let n=[];if(um.has(y.nodeName))return n;let e=null;const s=function(u,h){const{nodeName:p}=u,m=h._htmlConversions.get(p.toLowerCase());let b=null;if(m!==void 0)for(const _ of m){const v=_(u);v!==null&&(b===null||(b.priority||0)<(v.priority||0))&&(b=v)}return b!==null?b.conversion:null}(y,d),i=s?s(y):null;let l=null;if(i!==null){l=i.after;const u=i.node;if(e=Array.isArray(u)?u[u.length-1]:u,e!==null){for(const[,h]of f)if(e=h(e,r),!e)break;e&&n.push(...Array.isArray(u)?u:[e])}i.forChild!=null&&f.set(y.nodeName,i.forChild)}const o=y.childNodes;let a=[];const c=(e==null||!wo(e))&&(e!=null&&pf(e)||t);for(let u=0;u<o.length;u++)a.push(...dm(o[u],d,g,c,new Map(f),e));return l!=null&&(a=l(a)),yv(y)&&(a=h1(y,a,c?()=>{const u=new _f;return g.push(u),u}:Qn)),e==null?n=n.concat(a):he(e)&&e.append(...a),n}function h1(y,d,g){const t=y.style.textAlign,f=[];let r=[];for(let n=0;n<d.length;n++){const e=d[n];if(pf(e))t&&!e.getFormat()&&e.setFormat(t),f.push(e);else if(r.push(e),n===d.length-1||n<d.length-1&&pf(d[n+1])){const s=g();s.setFormat(t),s.append(...r),f.push(s),r=[]}}return f}function g1(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var ou=g1(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const m1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,fm=y=>m1?(y||window).getSelection():null;function pm(y){const d=je();return d==null&&ou(166),_e(d)&&d.isCollapsed()||d.getNodes().length===0?"":p1(y,d)}function y1(y){const d=je();return d==null&&ou(166),_e(d)&&d.isCollapsed()||d.getNodes().length===0?null:JSON.stringify(b1(y,d))}function hm(y,d){const g=y.getData("text/plain")||y.getData("text/uri-list");g!=null&&d.insertRawText(g)}function gm(y,d,g){const t=y.getData("application/x-lexical-editor");if(t)try{const n=JSON.parse(t);if(n.namespace===g._config.namespace&&Array.isArray(n.nodes))return mm(g,v1(n.nodes),d)}catch{}const f=y.getData("text/html");if(f)try{const n=new DOMParser().parseFromString(f,"text/html");return mm(g,f1(g,n),d)}catch{}const r=y.getData("text/plain")||y.getData("text/uri-list");if(r!=null)if(_e(d)){const n=r.split(/(\r?\n|\t)/);n[n.length-1]===""&&n.pop();for(let e=0;e<n.length;e++){const s=je();if(_e(s)){const i=n[e];i===`
|
|
40
40
|
`||i===`\r
|
|
41
|
-
`?s.insertParagraph():i===" "?s.insertNodes([Nl()]):s.insertText(i)}}}else d.insertRawText(r)}function ym(y,d,g){y.dispatchCommand(uh,{nodes:d,selection:g})||g.insertNodes(d)}function bm(y,d,g,t=[]){let f=d===null||g.isSelected(d);const r=he(g)&&g.excludeFromCopy("html");let n=g;if(d!==null){let i=Vg(g);i=Pe(i)&&d!==null?Kg(d,i):i,n=i}const e=he(n)?n.getChildren():[],s=function(i){const l=i.exportJSON(),o=i.constructor;if(l.type!==o.getType()&&ou(58,o.name),he(i)){const a=l.children;Array.isArray(a)||ou(59,o.name)}return l}(n);if(Pe(n)){const i=n.__text;i.length>0?s.text=i:f=!1}for(let i=0;i<e.length;i++){const l=e[i],o=bm(y,d,l,s.children);!f&&he(g)&&o&&g.extractWithChild(l,d,"clone")&&(f=!0)}if(f&&!r)t.push(s);else if(Array.isArray(s.children))for(let i=0;i<s.children.length;i++){const l=s.children[i];t.push(l)}return f}function b1(y,d){const g=[],t=Dn().getChildren();for(let f=0;f<t.length;f++)bm(y,d,t[f],g);return{namespace:y._config.namespace,nodes:g}}function v1(y){const d=[];for(let g=0;g<y.length;g++){const t=y[g],f=Mv(t);Pe(f)&&Wv(f),d.push(f)}return d}let fs=null;async function vm(y,d){if(fs!==null)return!1;if(d!==null)return new Promise((e,s)=>{y.update(()=>{e(_m(y,d))})});const g=y.getRootElement(),t=y._window==null?window.document:y._window.document,f=pm(y._window);if(g===null||f===null)return!1;const r=t.createElement("span");r.style.cssText="position: fixed; top: -1000px;",r.append(t.createTextNode("#")),g.append(r);const n=new Range;return n.setStart(r,0),n.setEnd(r,1),f.removeAllRanges(),f.addRange(n),new Promise((e,s)=>{const i=y.registerCommand(hl,l=>(Ni(l,ClipboardEvent)&&(i(),fs!==null&&(window.clearTimeout(fs),fs=null),e(_m(y,l))),!0),Zr);fs=window.setTimeout(()=>{i(),fs=null,e(!1)},50),t.execCommand("copy"),r.remove()})}function _m(y,d){const g=pm(y._window);if(!g)return!1;const t=g.anchorNode,f=g.focusNode;if(t!==null&&f!==null&&!yl(y,t,f))return!1;d.preventDefault();const r=d.clipboardData,n=je();if(r===null||n===null)return!1;const e=hm(y),s=y1(y);let i="";return n!==null&&(i=n.getTextContent()),e!==null&&r.setData("text/html",e),s!==null&&r.setData("application/x-lexical-editor",s),r.setData("text/plain",i),!0}function xm(y,d){if(document.caretRangeFromPoint!==void 0){const g=document.caretRangeFromPoint(y,d);return g===null?null:{node:g.startContainer,offset:g.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const g=document.caretPositionFromPoint(y,d);return g===null?null:{node:g.offsetNode,offset:g.offset}}return null}const ps=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,_1=ps&&"documentMode"in document?document.documentMode:null,x1=!(!ps||!("InputEvent"in window)||_1)&&"getTargetRanges"in new window.InputEvent("input"),w1=ps&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),S1=ps&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,C1=ps&&/^(?=.*Chrome).*/i.test(navigator.userAgent),E1=ps&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!C1,wm=bd();function iu(y){let d=null;if(Ni(y,DragEvent)?d=y.dataTransfer:Ni(y,ClipboardEvent)&&(d=y.clipboardData),d===null)return[!1,[],!1];const g=d.types,t=g.includes("Files"),f=g.includes("text/html")||g.includes("text/plain");return[t,Array.from(d.files),f]}function Sm(y){const d=je();if(!_e(d))return!1;const g=new Set,t=d.getNodes();for(let f=0;f<t.length;f++){const r=t[f],n=r.getKey();if(g.has(n))continue;const e=_n(r,i=>he(i)&&!i.isInline());if(e===null)continue;const s=e.getKey();e.canIndent()&&!g.has(s)&&(g.add(s),y(e))}return g.size>0}function au(y){const d=yr(y);return On(d)}function k1(y){return ko(y.registerCommand(dh,d=>{const g=je();return!!Yr(g)&&(g.clear(),!0)},0),y.registerCommand(lo,d=>{const g=je();return!!_e(g)&&(g.deleteCharacter(d),!0)},an),y.registerCommand(sa,d=>{const g=je();return!!_e(g)&&(g.deleteWord(d),!0)},an),y.registerCommand(xi,d=>{const g=je();return!!_e(g)&&(g.deleteLine(d),!0)},an),y.registerCommand(_i,d=>{const g=je();if(typeof d=="string")g!==null&&g.insertText(d);else{if(g===null)return!1;const t=d.dataTransfer;if(t!=null)mm(t,g,y);else if(_e(g)){const f=d.data;return f&&g.insertText(f),!0}}return!0},an),y.registerCommand(xc,()=>{const d=je();return!!_e(d)&&(d.removeText(),!0)},an),y.registerCommand(Cr,d=>{const g=je();return!!_e(g)&&(g.formatText(d),!0)},an),y.registerCommand(Za,d=>{const g=je();if(!_e(g)&&!Yr(g))return!1;const t=g.getNodes();for(const f of t){const r=_n(f,n=>he(n)&&!n.isInline());r!==null&&r.setFormat(d)}return!0},an),y.registerCommand(vi,d=>{const g=je();return!!_e(g)&&(g.insertLineBreak(d),!0)},an),y.registerCommand(Ya,()=>{const d=je();return!!_e(d)&&(d.insertParagraph(),!0)},an),y.registerCommand(Mb,()=>(Pv([Nl()]),!0),an),y.registerCommand(Db,()=>Sm(d=>{const g=d.getIndent();d.setIndent(g+1)}),an),y.registerCommand(ph,()=>Sm(d=>{const g=d.getIndent();g>0&&d.setIndent(g-1)}),an),y.registerCommand(vd,d=>{const g=je();if(Yr(g)&&!au(d.target)){const t=g.getNodes();if(t.length>0)return t[0].selectPrevious(),!0}else if(_e(g)){const t=wl(g.focus,!0);if(!d.shiftKey&&On(t)&&!t.isIsolated()&&!t.isInline())return t.selectPrevious(),d.preventDefault(),!0}return!1},an),y.registerCommand(_d,d=>{const g=je();if(Yr(g)){const t=g.getNodes();if(t.length>0)return t[0].selectNext(0,0),!0}else if(_e(g)){if(function(f){const r=f.focus;return r.key==="root"&&r.offset===Dn().getChildrenSize()}(g))return d.preventDefault(),!0;const t=wl(g.focus,!1);if(!d.shiftKey&&On(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),d.preventDefault(),!0}return!1},an),y.registerCommand(Sc,d=>{const g=je();if(Yr(g)){const t=g.getNodes();if(t.length>0)return d.preventDefault(),t[0].selectPrevious(),!0}if(!_e(g))return!1;if(eu(g,!0)){const t=d.shiftKey;return d.preventDefault(),nu(g,t,!0),!0}return!1},an),y.registerCommand(wc,d=>{const g=je();if(Yr(g)&&!au(d.target)){const f=g.getNodes();if(f.length>0)return d.preventDefault(),f[0].selectNext(0,0),!0}if(!_e(g))return!1;const t=d.shiftKey;return!!eu(g,!1)&&(d.preventDefault(),nu(g,t,!1),!0)},an),y.registerCommand(fl,d=>{if(au(d.target))return!1;const g=je();if(!_e(g))return!1;d.preventDefault();const{anchor:t}=g,f=t.getNode();return g.isCollapsed()&&t.offset===0&&!br(f)&&Xv(f).getIndent()>0?y.dispatchCommand(ph,void 0):y.dispatchCommand(lo,!0)},an),y.registerCommand(pl,d=>{if(au(d.target))return!1;const g=je();return!!_e(g)&&(d.preventDefault(),y.dispatchCommand(lo,!1))},an),y.registerCommand(dl,d=>{const g=je();if(!_e(g))return!1;if(d!==null){if((S1||w1||E1)&&x1)return!1;if(d.preventDefault(),d.shiftKey)return y.dispatchCommand(vi,!1)}return y.dispatchCommand(Ya,void 0)},an),y.registerCommand(Cc,()=>{const d=je();return!!_e(d)&&(y.blur(),!0)},an),y.registerCommand(xd,d=>{const[,g]=iu(d);if(g.length>0){const f=xm(d.clientX,d.clientY);if(f!==null){const{offset:r,node:n}=f,e=yr(n);if(e!==null){const s=hf();if(Pe(e))s.anchor.set(e.getKey(),r,"text"),s.focus.set(e.getKey(),r,"text");else{const l=e.getParentOrThrow().getKey(),o=e.getIndexWithinParent()+1;s.anchor.set(l,o,"element"),s.focus.set(l,o,"element")}const i=Dd(s);or(i)}y.dispatchCommand(wm,g)}return d.preventDefault(),!0}const t=je();return!!_e(t)},an),y.registerCommand(wd,d=>{const[g]=iu(d),t=je();return!(g&&!_e(t))},an),y.registerCommand(hh,d=>{const[g]=iu(d),t=je();if(g&&!_e(t))return!1;const f=xm(d.clientX,d.clientY);if(f!==null){const r=yr(f.node);On(r)&&d.preventDefault()}return!0},an),y.registerCommand(Ec,()=>($h(),!0),an),y.registerCommand(hl,d=>(vm(y,Ni(d,ClipboardEvent)?d:null),!0),an),y.registerCommand(gl,d=>(async function(g,t){await vm(t,Ni(g,ClipboardEvent)?g:null),t.update(()=>{const f=je();_e(f)?f.removeText():Yr(f)&&f.getNodes().forEach(r=>r.remove())})}(d,y),!0),an),y.registerCommand(ll,d=>{const[,g,t]=iu(d);return g.length>0&&!t?(y.dispatchCommand(wm,g),!0):Ld(d.target)?!1:je()!==null&&(function(f,r){f.preventDefault(),r.update(()=>{const n=je(),e=Ni(f,InputEvent)||Ni(f,KeyboardEvent)?null:f.clipboardData;e!=null&&n!==null&&mm(e,n,r)},{tag:"paste"})}(d,y),!0)},an))}const Ef=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Fe.useLayoutEffect:Fe.useEffect;function Cm(y){return y.getEditorState().read(lm(y.isComposing()))}function O1({contentEditable:y,placeholder:d,ErrorBoundary:g}){const[t]=Tr(),f=function(r,n){const[e,s]=Fe.useState(()=>r.getDecorators());return Ef(()=>r.registerDecoratorListener(i=>{so.flushSync(()=>{s(i)})}),[r]),Fe.useEffect(()=>{s(r.getDecorators())},[r]),Fe.useMemo(()=>{const i=[],l=Object.keys(e);for(let o=0;o<l.length;o++){const a=l[o],c=Se.jsx(n,{onError:h=>r._onError(h),children:Se.jsx(Fe.Suspense,{fallback:null,children:e[a]})}),u=r.getElementByKey(a);u!==null&&i.push(so.createPortal(c,u,a))}return i},[n,e,r])}(t,g);return function(r){Ef(()=>ko(k1(r),cm(r)),[r])}(t),Se.jsxs(Se.Fragment,{children:[y,Se.jsx(T1,{content:d}),f]})}function T1({content:y}){const[d]=Tr(),g=function(f){const[r,n]=Fe.useState(()=>Cm(f));return Ef(()=>{function e(){const s=Cm(f);n(s)}return e(),ko(f.registerUpdateListener(()=>{e()}),f.registerEditableListener(()=>{e()}))},[f]),r}(d),t=im();return g?typeof y=="function"?y(t):y:null}const j1=new Set(["http:","https:","mailto:","sms:","tel:"]);let Em=class kb extends Eo{static getType(){return"link"}static clone(d){return new kb(d.__url,{rel:d.__rel,target:d.__target,title:d.__title},d.__key)}constructor(d,g={},t){super(t);const{target:f=null,rel:r=null,title:n=null}=g;this.__url=d,this.__target=f,this.__rel=r,this.__title=n}createDOM(d){const g=document.createElement("a");return g.href=this.sanitizeUrl(this.__url),this.__target!==null&&(g.target=this.__target),this.__rel!==null&&(g.rel=this.__rel),this.__title!==null&&(g.title=this.__title),Ai(g,d.theme.link),g}updateDOM(d,g,t){if(g instanceof HTMLAnchorElement){const f=this.__url,r=this.__target,n=this.__rel,e=this.__title;f!==d.__url&&(g.href=f),r!==d.__target&&(r?g.target=r:g.removeAttribute("target")),n!==d.__rel&&(n?g.rel=n:g.removeAttribute("rel")),e!==d.__title&&(e?g.title=e:g.removeAttribute("title"))}return!1}static importDOM(){return{a:d=>({conversion:A1,priority:1})}}static importJSON(d){const g=kf(d.url,{rel:d.rel,target:d.target,title:d.title});return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g}sanitizeUrl(d){try{const g=new URL(d);if(!j1.has(g.protocol))return"about:blank"}catch{return d}return d}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(d){this.getWritable().__url=d}getTarget(){return this.getLatest().__target}setTarget(d){this.getWritable().__target=d}getRel(){return this.getLatest().__rel}setRel(d){this.getWritable().__rel=d}getTitle(){return this.getLatest().__title}setTitle(d){this.getWritable().__title=d}insertNewAfter(d,g=!0){const t=kf(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(t,g),t}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(d,g,t){if(!_e(g))return!1;const f=g.anchor.getNode(),r=g.focus.getNode();return this.isParentOf(f)&&this.isParentOf(r)&&g.getTextContent().length>0}};function A1(y){let d=null;if(gv(y)){const g=y.textContent;(g!==null&&g!==""||y.children.length>0)&&(d=kf(y.getAttribute("href")||"",{rel:y.getAttribute("rel"),target:y.getAttribute("target"),title:y.getAttribute("title")}))}return{node:d}}function kf(y,d){return Vo(new Em(y,d))}function N1(y){return y instanceof Em}let Of=class Ob extends Eo{static getType(){return"mark"}static clone(d){return new Ob(Array.from(d.__ids),d.__key)}static importDOM(){return null}static importJSON(d){const g=su(d.ids);return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g}exportJSON(){return{...super.exportJSON(),ids:this.getIDs(),type:"mark",version:1}}constructor(d,g){super(g),this.__ids=d||[]}createDOM(d){const g=document.createElement("mark");return Ai(g,d.theme.mark),this.__ids.length>1&&Ai(g,d.theme.markOverlap),g}updateDOM(d,g,t){const f=d.__ids,r=this.__ids,n=f.length,e=r.length,s=t.theme.markOverlap;return n!==e&&(n===1?e===2&&Ai(g,s):e===1&&Xg(g,s)),!1}hasID(d){const g=this.getIDs();for(let t=0;t<g.length;t++)if(d===g[t])return!0;return!1}getIDs(){const d=this.getLatest();return ya(d)?d.__ids:[]}addID(d){const g=this.getWritable();if(ya(g)){const t=g.__ids;g.__ids=t;for(let f=0;f<t.length;f++)if(d===t[f])return;t.push(d)}}deleteID(d){const g=this.getWritable();if(ya(g)){const t=g.__ids;g.__ids=t;for(let f=0;f<t.length;f++)if(d===t[f])return void t.splice(f,1)}}insertNewAfter(d,g=!0){const t=su(this.__ids);return this.insertAfter(t,g),t}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(d,g,t){if(!_e(g)||t==="html")return!1;const f=g.anchor,r=g.focus,n=f.getNode(),e=r.getNode(),s=g.isBackward()?f.offset-r.offset:r.offset-f.offset;return this.isParentOf(n)&&this.isParentOf(e)&&this.getTextContent().length===s}excludeFromCopy(d){return d!=="clone"}};function su(y){return Vo(new Of(y))}function ya(y){return y instanceof Of}function P1(y){const d=y.getChildren();let g=null;for(let t=0;t<d.length;t++){const f=d[t];g===null?y.insertBefore(f):g.insertAfter(f),g=f}y.remove()}function I1(y,d,g,t){const f=y.getNodes(),r=y.anchor.offset,n=y.focus.offset,e=f.length,s=d?n:r,i=d?r:n;let l,o;for(let a=0;a<e;a++){const c=f[a];if(he(o)&&o.isParentOf(c))continue;const u=a===0,h=a===e-1;let p=null;if(Pe(c)){const m=c.getTextContentSize(),b=u?s:0,_=h?i:m;if(b===0&&_===0)continue;const v=c.splitText(b,_);p=v.length>1&&(v.length===3||u&&!h||_===m)?v[1]:v[0]}else{if(ya(c))continue;he(c)&&c.isInline()&&(p=c)}if(p!==null){if(p&&p.is(l))continue;const m=p.getParent();m!=null&&m.is(l)||(o=void 0),l=m,o===void 0&&(o=(t||su)([g]),p.insertBefore(o)),o.append(p)}else l=void 0,o=void 0}he(o)&&(d?o.selectStart():o.selectEnd())}function R1(y,d){let g=y;for(;g!==null;){if(ya(g))return g.getIDs();if(Pe(g)&&d===g.getTextContentSize()){const t=g.getNextSibling();if(ya(t))return t.getIDs()}g=g.getParent()}return null}const km=/^(\d+(?:\.\d+)?)px$/,Yo={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class Oo extends Eo{static getType(){return"tablecell"}static clone(d){const g=new Oo(d.__headerState,d.__colSpan,d.__width,d.__key);return g.__rowSpan=d.__rowSpan,g.__backgroundColor=d.__backgroundColor,g}static importDOM(){return{td:d=>({conversion:Om,priority:0}),th:d=>({conversion:Om,priority:0})}}static importJSON(d){const g=d.colSpan||1,t=d.rowSpan||1,f=hs(d.headerState,g,d.width||void 0);return f.__rowSpan=t,f.__backgroundColor=d.backgroundColor||null,f}constructor(d=Yo.NO_STATUS,g=1,t,f){super(f),this.__colSpan=g,this.__rowSpan=1,this.__headerState=d,this.__width=t,this.__backgroundColor=null}createDOM(d){const g=document.createElement(this.getTag());return this.__width&&(g.style.width=`${this.__width}px`),this.__colSpan>1&&(g.colSpan=this.__colSpan),this.__rowSpan>1&&(g.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(g.style.backgroundColor=this.__backgroundColor),Ai(g,d.theme.tableCell,this.hasHeader()&&d.theme.tableCellHeader),g}exportDOM(d){const{element:g}=super.exportDOM(d);if(g){const t=g;t.style.border="1px solid black",this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),t.style.width=`${this.getWidth()||75}px`,t.style.verticalAlign="top",t.style.textAlign="start";const f=this.getBackgroundColor();f!==null?t.style.backgroundColor=f:this.hasHeader()&&(t.style.backgroundColor="#f2f3f5")}return{element:g}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,type:"tablecell",width:this.getWidth()}}getColSpan(){return this.__colSpan}setColSpan(d){return this.getWritable().__colSpan=d,this}getRowSpan(){return this.__rowSpan}setRowSpan(d){return this.getWritable().__rowSpan=d,this}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(d){return this.getWritable().__headerState=d,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(d){return this.getWritable().__width=d,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(d){this.getWritable().__backgroundColor=d}toggleHeaderStyle(d){const g=this.getWritable();return(g.__headerState&d)===d?g.__headerState-=d:g.__headerState+=d,g}hasHeaderState(d){return(this.getHeaderStyles()&d)===d}hasHeader(){return this.getLatest().__headerState!==Yo.NO_STATUS}updateDOM(d){return d.__headerState!==this.__headerState||d.__width!==this.__width||d.__colSpan!==this.__colSpan||d.__rowSpan!==this.__rowSpan||d.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function Om(y){const d=y,g=y.nodeName.toLowerCase();let t;km.test(d.style.width)&&(t=parseFloat(d.style.width));const f=hs(g==="th"?Yo.ROW:Yo.NO_STATUS,d.colSpan,t);f.__rowSpan=d.rowSpan;const r=d.style.backgroundColor;r!==""&&(f.__backgroundColor=r);const n=d.style,e=n.textDecoration.split(" "),s=n.fontWeight==="700"||n.fontWeight==="bold",i=e.includes("line-through"),l=n.fontStyle==="italic",o=e.includes("underline");return{after:a=>(a.length===0&&a.push(Qn()),a),forChild:(a,c)=>{if(on(c)&&!he(a)){const u=Qn();return fa(a)&&a.getTextContent()===`
|
|
42
|
-
`?null:(Pe(a)&&(s&&a.toggleFormat("bold"),i&&a.toggleFormat("strikethrough"),l&&a.toggleFormat("italic"),o&&a.toggleFormat("underline")),u.append(a),u)}return a},node:f}}function hs(y,d=1,g){return Vo(new Oo(y,d,g))}function on(y){return y instanceof Oo}const M1=bd();class ba extends Eo{static getType(){return"tablerow"}static clone(d){return new ba(d.__height,d.__key)}static importDOM(){return{tr:d=>({conversion:D1,priority:0})}}static importJSON(d){return lu(d.height)}constructor(d,g){super(g),this.__height=d}exportJSON(){return{...super.exportJSON(),...this.getHeight()&&{height:this.getHeight()},type:"tablerow",version:1}}createDOM(d){const g=document.createElement("tr");return this.__height&&(g.style.height=`${this.__height}px`),Ai(g,d.theme.tableRow),g}isShadowRoot(){return!0}setHeight(d){return this.getWritable().__height=d,this.__height}getHeight(){return this.getLatest().__height}updateDOM(d){return d.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function D1(y){const d=y;let g;return km.test(d.style.height)&&(g=parseFloat(d.style.height)),{node:lu(g)}}function lu(y){return Vo(new ba(y))}function Mr(y){return y instanceof ba}function L1(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Pn=L1(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const B1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Tm(y,d,g=!0){const t=Nf();for(let f=0;f<y;f++){const r=lu();for(let n=0;n<d;n++){let e=Yo.NO_STATUS;typeof g=="object"?(f===0&&g.rows&&(e|=Yo.ROW),n===0&&g.columns&&(e|=Yo.COLUMN)):g&&(f===0&&(e|=Yo.ROW),n===0&&(e|=Yo.COLUMN));const s=hs(e),i=Qn();i.append(Zn()),s.append(i),r.append(s)}t.append(r)}return t}function F1(y){const d=_n(y,g=>Mr(g));if(Mr(d))return d;throw new Error("Expected table cell to be inside of table row.")}function z1(y){return F1(y).getChildren().findIndex(d=>d.is(y))}function gs(y,d,g){const[t,f,r]=jm(y,d,g);return f===null&&Pn(110),r===null&&Pn(111),[t,f,r]}function jm(y,d,g){const t=[];let f=null,r=null;function n(i,l,o){const a={cell:o,startColumn:l,startRow:i},c=o.__rowSpan,u=o.__colSpan;for(let h=0;h<c;h++){t[i+h]===void 0&&(t[i+h]=[]);for(let p=0;p<u;p++)t[i+h][l+p]=a}d!==null&&d.is(o)&&(f=a),g!==null&&g.is(o)&&(r=a)}function e(i,l){return t[i]===void 0||t[i][l]===void 0}const s=y.getChildren();for(let i=0;i<s.length;i++){const l=s[i];Mr(l)||Pn(146);const o=l.getChildren();let a=0;for(const c of o){for(on(c)||Pn(147);!e(i,a);)a++;n(i,a,c),a+=c.__colSpan}}return[t,f,r]}function ms(y){let d;if(y instanceof Oo)d=y;else if("__type"in y){const f=_n(y,on);on(f)||Pn(148),d=f}else{const f=_n(y.getNode(),on);on(f)||Pn(148),d=f}const g=d.getParent();Mr(g)||Pn(149);const t=g.getParent();return Jn(t)||Pn(150),[d,g,t]}function Am(y){const[d,,g]=ms(y),t=g.getChildren(),f=t.length,r=t[0].getChildren().length,n=new Array(f);for(let e=0;e<f;e++)n[e]=new Array(r);for(let e=0;e<f;e++){const s=t[e].getChildren();let i=0;for(let l=0;l<s.length;l++){for(;n[e][i];)i++;const o=s[l],a=o.__rowSpan||1,c=o.__colSpan||1;for(let u=0;u<a;u++)for(let h=0;h<c;h++)n[e+u][i+h]=o;if(d===o)return{colSpan:c,columnIndex:i,rowIndex:e,rowSpan:a};i+=c}}return null}class cu{constructor(d,g,t){this.anchor=g,this.focus=t,g._selection=this,t._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=d}getStartEndPoints(){return[this.anchor,this.focus]}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(d){this._cachedNodes=d}is(d){return!!Xn(d)&&this.tableKey===d.tableKey&&this.anchor.is(d.anchor)&&this.focus.is(d.focus)}set(d,g,t){this.dirty=!0,this.tableKey=d,this.anchor.key=g,this.focus.key=t,this._cachedNodes=null}clone(){return new cu(this.tableKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(d){}insertText(){}insertNodes(d){const g=this.focus.getNode();he(g)||Pn(151),Dd(g.select(0,g.getChildrenSize())).insertNodes(d)}getShape(){const d=Hn(this.anchor.key);on(d)||Pn(152);const g=Am(d);g===null&&Pn(153);const t=Hn(this.focus.key);on(t)||Pn(154);const f=Am(t);f===null&&Pn(155);const r=Math.min(g.columnIndex,f.columnIndex),n=Math.max(g.columnIndex,f.columnIndex),e=Math.min(g.rowIndex,f.rowIndex),s=Math.max(g.rowIndex,f.rowIndex);return{fromX:Math.min(r,n),fromY:Math.min(e,s),toX:Math.max(r,n),toY:Math.max(e,s)}}getNodes(){const d=this._cachedNodes;if(d!==null)return d;const g=this.anchor.getNode(),t=this.focus.getNode(),f=_n(g,on),r=_n(t,on);on(f)||Pn(152),on(r)||Pn(154);const n=f.getParent();Mr(n)||Pn(156);const e=n.getParent();Jn(e)||Pn(157);const s=r.getParents()[1];if(s!==e){if(e.isParentOf(r)){const S=s.getParent();S==null&&Pn(159),this.set(this.tableKey,r.getKey(),S.getKey())}else{const S=e.getParent();S==null&&Pn(158),this.set(this.tableKey,S.getKey(),r.getKey())}return this.getNodes()}const[i,l,o]=gs(e,f,r);let a=Math.min(l.startColumn,o.startColumn),c=Math.min(l.startRow,o.startRow),u=Math.max(l.startColumn+l.cell.__colSpan-1,o.startColumn+o.cell.__colSpan-1),h=Math.max(l.startRow+l.cell.__rowSpan-1,o.startRow+o.cell.__rowSpan-1),p=a,m=c,b=a,_=c;function v(S){const{cell:E,startColumn:k,startRow:D}=S;a=Math.min(a,k),c=Math.min(c,D),u=Math.max(u,k+E.__colSpan-1),h=Math.max(h,D+E.__rowSpan-1)}for(;a<p||c<m||u>b||h>_;){if(a<p){const S=_-m,E=p-1;for(let k=0;k<=S;k++)v(i[m+k][E]);p=E}if(c<m){const S=b-p,E=m-1;for(let k=0;k<=S;k++)v(i[E][p+k]);m=E}if(u>b){const S=_-m,E=b+1;for(let k=0;k<=S;k++)v(i[m+k][E]);b=E}if(h>_){const S=b-p,E=_+1;for(let k=0;k<=S;k++)v(i[E][p+k]);_=E}}const w=[e];let x=null;for(let S=c;S<=h;S++)for(let E=a;E<=u;E++){const{cell:k}=i[S][E],D=k.getParent();Mr(D)||Pn(160),D!==x&&w.push(D),w.push(k,...U1(k)),x=D}return ls()||(this._cachedNodes=w),w}getTextContent(){const d=this.getNodes();let g="";for(let t=0;t<d.length;t++)g+=d[t].getTextContent();return g}}function Xn(y){return y instanceof cu}function uu(){const y=Gr("root",0,"element"),d=Gr("root",0,"element");return new cu("root",y,d)}function U1(y){const d=[],g=[y];for(;g.length>0;){const t=g.pop();t===void 0&&Pn(112),he(t)&&g.unshift(...t.getChildren()),t!==y&&d.push(t)}return d}class $1{constructor(d,g){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=g,this.editor=d,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTable(),this.isSelecting=!1}getTable(){return this.table}removeListeners(){Array.from(this.listenersToRemove).forEach(d=>d())}trackTable(){const d=new MutationObserver(g=>{this.editor.update(()=>{let t=!1;for(let r=0;r<g.length;r++){const n=g[r].target.nodeName;if(n==="TABLE"||n==="TBODY"||n==="THEAD"||n==="TR"){t=!0;break}}if(!t)return;const f=this.editor.getElementByKey(this.tableNodeKey);if(!f)throw new Error("Expected to find TableElement in DOM");this.table=Il(f)})});this.editor.update(()=>{const g=this.editor.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");this.table=Il(g),d.observe(g,{childList:!0,subtree:!0})})}clearHighlight(){const d=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),d.update(()=>{if(!Jn(Hn(this.tableNodeKey)))throw new Error("Expected TableNode.");const g=d.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");const t=Il(g);du(d,t,null),or(null),d.dispatchCommand(qo,void 0)})}enableHighlightStyle(){const d=this.editor;d.update(()=>{const g=d.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");Xg(g,d._config.theme.tableSelection),g.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const d=this.editor;d.update(()=>{const g=d.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");Ai(g,d._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableTableSelection(d){if(d!==null&&d.tableKey===this.tableNodeKey){const g=this.editor;this.tableSelection=d,this.isHighlightingCells=!0,this.disableHighlightStyle(),du(g,this.table,this.tableSelection)}else d==null?this.clearHighlight():(this.tableNodeKey=d.tableKey,this.updateTableTableSelection(d))}setFocusCellForSelection(d,g=!1){const t=this.editor;t.update(()=>{const f=Hn(this.tableNodeKey);if(!Jn(f))throw new Error("Expected TableNode.");if(!t.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const r=d.x,n=d.y;if(this.focusCell=d,this.anchorCell!==null){const e=Nm(t._window);e&&e.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===r&&this.anchorY===n&&!g){if(r===this.focusX&&n===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();if(this.focusX=r,this.focusY=n,this.isHighlightingCells){const e=yr(d.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null&&on(e)&&f.is(ys(e))){const s=e.getKey();this.tableSelection=this.tableSelection.clone()||uu(),this.focusCellNodeKey=s,this.tableSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),or(this.tableSelection),t.dispatchCommand(qo,void 0),du(t,this.table,this.tableSelection)}}})}setAnchorCellForSelection(d){this.isHighlightingCells=!1,this.anchorCell=d,this.anchorX=d.x,this.anchorY=d.y,this.editor.update(()=>{const g=yr(d.elem);if(on(g)){const t=g.getKey();this.tableSelection=this.tableSelection!=null?this.tableSelection.clone():uu(),this.anchorCellNodeKey=t}})}formatCells(d){this.editor.update(()=>{const g=je();Xn(g)||Pn(11);const t=hf(),f=t.anchor,r=t.focus;g.getNodes().forEach(n=>{on(n)&&n.getTextContentSize()!==0&&(f.set(n.getKey(),0,"element"),r.set(n.getKey(),n.getChildrenSize(),"element"),t.formatText(d))}),or(g),this.editor.dispatchCommand(qo,void 0)})}clearText(){const d=this.editor;d.update(()=>{const g=Hn(this.tableNodeKey);if(!Jn(g))throw new Error("Expected TableNode.");const t=je();Xn(t)||Pn(11);const f=t.getNodes().filter(on);f.length!==this.table.columns*this.table.rows?(f.forEach(r=>{if(he(r)){const n=Qn(),e=Zn();n.append(e),r.append(n),r.getChildren().forEach(s=>{s!==n&&s.remove()})}}),du(d,this.table,null),or(null),d.dispatchCommand(qo,void 0)):(g.selectPrevious(),g.remove(),Dn().selectStart())})}}const H1="__lexicalTableSelection",Nm=y=>B1?(y||window).getSelection():null;function q1(y,d,g,t){const f=g.getRootElement();if(f===null)throw new Error("No root element.");const r=new $1(g,y.getKey()),n=g._window||window;(function(o,a){o[H1]=a})(d,r);const e=()=>{const o=()=>{r.isSelecting=!1,n.removeEventListener("mouseup",o),n.removeEventListener("mousemove",a)},a=c=>{setTimeout(()=>{if(1&~c.buttons&&r.isSelecting)return r.isSelecting=!1,n.removeEventListener("mouseup",o),void n.removeEventListener("mousemove",a);const u=Pm(c.target);u===null||r.anchorX===u.x&&r.anchorY===u.y||(c.preventDefault(),r.setFocusCellForSelection(u))},0)};return{onMouseMove:a,onMouseUp:o}};d.addEventListener("mousedown",o=>{setTimeout(()=>{if(o.button!==0||!n)return;const a=Pm(o.target);a!==null&&(va(o),r.setAnchorCellForSelection(a));const{onMouseUp:c,onMouseMove:u}=e();r.isSelecting=!0,n.addEventListener("mouseup",c),n.addEventListener("mousemove",u)},0)});const s=o=>{o.button===0&&g.update(()=>{const a=je(),c=o.target;Xn(a)&&a.tableKey===r.tableNodeKey&&f.contains(c)&&r.clearHighlight()})};n.addEventListener("mousedown",s),r.listenersToRemove.add(()=>n.removeEventListener("mousedown",s)),r.listenersToRemove.add(g.registerCommand(_d,o=>Rl(g,o,"down",y,r),us)),r.listenersToRemove.add(g.registerCommand(vd,o=>Rl(g,o,"up",y,r),us)),r.listenersToRemove.add(g.registerCommand(Sc,o=>Rl(g,o,"backward",y,r),us)),r.listenersToRemove.add(g.registerCommand(wc,o=>Rl(g,o,"forward",y,r),us)),r.listenersToRemove.add(g.registerCommand(Cc,o=>{const a=je();if(Xn(a)){const c=_n(a.focus.getNode(),on);if(on(c))return va(o),c.selectEnd(),!0}return!1},us)),[sa,xi,lo].forEach(o=>{r.listenersToRemove.add(g.registerCommand(o,(a=>()=>{const c=je();if(!Pi(c,y))return!1;if(Xn(c))return r.clearText(),!0;if(_e(c)){const u=_n(c.anchor.getNode(),w=>on(w));if(!on(u))return!1;const h=c.anchor.getNode(),p=c.focus.getNode(),m=y.isParentOf(h),b=y.isParentOf(p);if(m&&!b||b&&!m)return r.clearText(),!0;const _=_n(c.anchor.getNode(),w=>he(w)),v=_&&_n(_,w=>he(w)&&on(w.getParent()));if(!he(v)||!he(_))return!1;if(a===xi&&v.getPreviousSibling()===null)return!0}return!1})(o),Zr))});const i=o=>{const a=je();if(!Pi(a,y)){const c=a?a.getNodes():null;if(c){const u=c.find(h=>Jn(h)&&h.getKey()===r.tableNodeKey);if(Jn(u)){const h=u.getParent();if(!h)return!1;const p=u.getNextSibling()||u.getPreviousSibling();u.remove(),p?p.selectStart():h.selectStart()}}return!0}if(Xn(a))return o.preventDefault(),o.stopPropagation(),r.clearText(),!0;if(_e(a)){const c=_n(a.anchor.getNode(),u=>on(u));if(!on(c))return!1}return!1};function l(o){const a=y.getCordsFromCellNode(o,r.table);return y.getDOMCellFromCordsOrThrow(a.x,a.y,r.table)}return r.listenersToRemove.add(g.registerCommand(fl,i,Zr)),r.listenersToRemove.add(g.registerCommand(pl,i,Zr)),r.listenersToRemove.add(g.registerCommand(Cr,o=>{const a=je();if(!Pi(a,y))return!1;if(Xn(a))return r.formatCells(o),!0;if(_e(a)){const c=_n(a.anchor.getNode(),u=>on(u));if(!on(c))return!1}return!1},Zr)),r.listenersToRemove.add(g.registerCommand(Za,o=>{const a=je();if(!Xn(a)||!Pi(a,y))return!1;const c=a.anchor.getNode(),u=a.focus.getNode();if(!on(c)||!on(u))return!1;const[h,p,m]=gs(y,c,u),b=Math.max(p.startRow,m.startRow),_=Math.max(p.startColumn,m.startColumn),v=Math.min(p.startRow,m.startRow),w=Math.min(p.startColumn,m.startColumn);for(let x=v;x<=b;x++)for(let S=w;S<=_;S++){const E=h[x][S].cell;E.setFormat(o);const k=E.getChildren();for(let D=0;D<k.length;D++){const N=k[D];he(N)&&!N.isInline()&&N.setFormat(o)}}return!0},Zr)),r.listenersToRemove.add(g.registerCommand(_i,o=>{const a=je();if(!Pi(a,y))return!1;if(Xn(a))return r.clearHighlight(),!1;if(_e(a)){const c=_n(a.anchor.getNode(),u=>on(u));if(!on(c))return!1;if(typeof o=="string"){const u=Bm(g,a,y);if(u)return Lm(u,y,[Zn(o)]),!0}}return!1},Zr)),t&&r.listenersToRemove.add(g.registerCommand(fh,o=>{const a=je();if(!_e(a)||!a.isCollapsed()||!Pi(a,y))return!1;const c=Af(a.anchor.getNode());if(c===null)return!1;va(o);const u=y.getCordsFromCellNode(c,r.table);return Rm(r,y,u.x,u.y,o.shiftKey?"backward":"forward"),!0},Zr)),r.listenersToRemove.add(g.registerCommand(gh,o=>y.isSelected(),us)),r.listenersToRemove.add(g.registerCommand(uh,o=>{const{nodes:a,selection:c}=o,u=c.getStartEndPoints(),h=Xn(c),p=_e(c)&&_n(c.anchor.getNode(),P=>on(P))!==null&&_n(c.focus.getNode(),P=>on(P))!==null||h;if(a.length!==1||!Jn(a[0])||!p||u===null)return!1;const[m]=u,b=a[0],_=b.getChildren(),v=b.getFirstChildOrThrow().getChildrenSize(),w=b.getChildrenSize(),x=_n(m.getNode(),P=>on(P)),S=x&&_n(x,P=>Mr(P)),E=S&&_n(S,P=>Jn(P));if(!on(x)||!Mr(S)||!Jn(E))return!1;const k=S.getIndexWithinParent(),D=Math.min(E.getChildrenSize()-1,k+w-1),N=x.getIndexWithinParent(),O=Math.min(S.getChildrenSize()-1,N+v-1),R=Math.min(N,O),A=Math.min(k,D),z=Math.max(N,O),H=Math.max(k,D),$=E.getChildren();let M,J,K=0;for(let P=A;P<=H;P++){const U=$[P];if(!Mr(U))return!1;const V=_[K];if(!Mr(V))return!1;const G=U.getChildren(),F=V.getChildren();let q=0;for(let T=R;T<=z;T++){const I=G[T];if(!on(I))return!1;const L=F[q];if(!on(L))return!1;P===A&&T===R?M=I.getKey():P===H&&T===z&&(J=I.getKey());const B=I.getChildren();L.getChildren().forEach(Y=>{Pe(Y)&&Qn().append(Y),I.append(Y)}),B.forEach(Y=>Y.remove()),q++}K++}if(M&&J){const P=uu();P.set(a[0].getKey(),M,J),or(P)}return!0},Zr)),r.listenersToRemove.add(g.registerCommand(qo,()=>{const o=je(),a=pa();if(_e(o)){const{anchor:c,focus:u}=o,h=c.getNode(),p=u.getNode(),m=Af(h),b=Af(p),_=!(!m||!y.is(ys(m))),v=!(!b||!y.is(ys(b))),w=_!==v,x=_&&v,S=o.isBackward();if(w){const E=o.clone();if(v){const[k]=gs(y,b,b),D=k[0][0].cell,N=k[k.length-1].at(-1).cell;E.focus.set(S?D.getKey():N.getKey(),S?D.getChildrenSize():N.getChildrenSize(),"element")}else E.anchor.set(y.getParentOrThrow().getKey(),S?y.getIndexWithinParent()+1:y.getIndexWithinParent(),"element");or(E),Im(g,r)}else x&&(m.is(b)||(r.setAnchorCellForSelection(l(m)),r.setFocusCellForSelection(l(b),!0),r.isSelecting||setTimeout(()=>{const{onMouseUp:E,onMouseMove:k}=e();r.isSelecting=!0,n.addEventListener("mouseup",E),n.addEventListener("mousemove",k)},0)))}else if(o&&Xn(o)&&o.is(a)&&o.tableKey===y.getKey()){const c=Nm(g._window);if(c&&c.anchorNode&&c.focusNode){const u=yr(c.focusNode),h=u&&!y.is(ys(u)),p=yr(c.anchorNode),m=p&&y.is(ys(p));if(h&&m&&c.rangeCount>0){const b=Av(c,g);b&&(b.anchor.set(y.getKey(),o.isBackward()?y.getChildrenSize():0,"element"),c.removeAllRanges(),or(b))}}}return o&&!o.is(a)&&(Xn(o)||Xn(a))&&r.tableSelection&&!r.tableSelection.is(a)?(Xn(o)&&o.tableKey===r.tableNodeKey?r.updateTableTableSelection(o):!Xn(o)&&Xn(a)&&a.tableKey===r.tableNodeKey&&r.updateTableTableSelection(null),!1):(r.hasHijackedSelectionStyles&&!y.isSelected()?function(c,u){u.enableHighlightStyle(),Tf(u.table,h=>{const p=h.elem;h.highlighted=!1,Dm(c,h),p.getAttribute("style")||p.removeAttribute("style")})}(g,r):!r.hasHijackedSelectionStyles&&y.isSelected()&&Im(g,r),!1)},Zr)),r.listenersToRemove.add(g.registerCommand(Ya,()=>{const o=je();if(!_e(o)||!o.isCollapsed()||!Pi(o,y))return!1;const a=Bm(g,o,y);return!!a&&(Lm(a,y),!0)},Zr)),r}function Pm(y){let d=y;for(;d!=null;){const g=d.nodeName;if(g==="TD"||g==="TH"){const t=d._cell;return t===void 0?null:t}d=d.parentNode}return null}function Il(y){const d=[],g={columns:0,domRows:d,rows:0};let t=y.firstChild,f=0,r=0;for(d.length=0;t!=null;){const n=t.nodeName;if(n==="TD"||n==="TH"){const i={elem:t,hasBackgroundColor:t.style.backgroundColor!=="",highlighted:!1,x:f,y:r};t._cell=i;let l=d[r];l===void 0&&(l=d[r]=[]),l[f]=i}else{const i=t.firstChild;if(i!=null){t=i;continue}}const e=t.nextSibling;if(e!=null){f++,t=e;continue}const s=t.parentNode;if(s!=null){const i=s.nextSibling;if(i==null)break;r++,f=0,t=i}}return g.columns=f+1,g.rows=r+1,g}function du(y,d,g){const t=new Set(g?g.getNodes():[]);Tf(d,(f,r)=>{const n=f.elem;t.has(r)?(f.highlighted=!0,Mm(y,f)):(f.highlighted=!1,Dm(y,f),n.getAttribute("style")||n.removeAttribute("style"))})}function Tf(y,d){const{domRows:g}=y;for(let t=0;t<g.length;t++){const f=g[t];if(f)for(let r=0;r<f.length;r++){const n=f[r];if(!n)continue;const e=yr(n.elem);e!==null&&d(n,e,{x:r,y:t})}}}function Im(y,d){d.disableHighlightStyle(),Tf(d.table,g=>{g.highlighted=!0,Mm(y,g)})}const Rm=(y,d,g,t,f)=>{const r=f==="forward";switch(f){case"backward":case"forward":return g!==(r?y.table.columns-1:0)?fu(d.getCellNodeFromCordsOrThrow(g+(r?1:-1),t,y.table),r):t!==(r?y.table.rows-1:0)?fu(d.getCellNodeFromCordsOrThrow(r?0:y.table.columns-1,t+(r?1:-1),y.table),r):r?d.selectNext():d.selectPrevious(),!0;case"up":return t!==0?fu(d.getCellNodeFromCordsOrThrow(g,t-1,y.table),!1):d.selectPrevious(),!0;case"down":return t!==y.table.rows-1?fu(d.getCellNodeFromCordsOrThrow(g,t+1,y.table),!0):d.selectNext(),!0;default:return!1}},J1=(y,d,g,t,f)=>{const r=f==="forward";switch(f){case"backward":case"forward":return g!==(r?y.table.columns-1:0)&&y.setFocusCellForSelection(d.getDOMCellFromCordsOrThrow(g+(r?1:-1),t,y.table)),!0;case"up":return t!==0&&(y.setFocusCellForSelection(d.getDOMCellFromCordsOrThrow(g,t-1,y.table)),!0);case"down":return t!==y.table.rows-1&&(y.setFocusCellForSelection(d.getDOMCellFromCordsOrThrow(g,t+1,y.table)),!0);default:return!1}};function Pi(y,d){if(_e(y)||Xn(y)){const g=d.isParentOf(y.anchor.getNode()),t=d.isParentOf(y.focus.getNode());return g&&t}return!1}function fu(y,d){d?y.selectStart():y.selectEnd()}const jf="172,206,247";function Mm(y,d){const g=d.elem,t=yr(g);on(t)||Pn(131),t.getBackgroundColor()===null?g.style.setProperty("background-color",`rgb(${jf})`):g.style.setProperty("background-image",`linear-gradient(to right, rgba(${jf},0.85), rgba(${jf},0.85))`),g.style.setProperty("caret-color","transparent")}function Dm(y,d){const g=d.elem,t=yr(g);on(t)||Pn(131),t.getBackgroundColor()===null&&g.style.removeProperty("background-color"),g.style.removeProperty("background-image"),g.style.removeProperty("caret-color")}function Af(y){const d=_n(y,on);return on(d)?d:null}function ys(y){const d=_n(y,Jn);return Jn(d)?d:null}function Rl(y,d,g,t,f){if((g==="up"||g==="down")&&function(n){const e=n.getRootElement();return e?e.hasAttribute("aria-controls")&&e.getAttribute("aria-controls")==="typeahead-menu":!1}(y))return!1;const r=je();if(!Pi(r,t)){if(_e(r)){if(r.isCollapsed()&&g==="backward"){const n=r.anchor.type,e=r.anchor.offset;if(n!=="element"&&(n!=="text"||e!==0))return!1;const s=r.anchor.getNode();if(!s)return!1;const i=_n(s,o=>he(o)&&!o.isInline());if(!i)return!1;const l=i.getPreviousSibling();return!(!l||!Jn(l))&&(va(d),l.selectEnd(),!0)}if(d.shiftKey&&(g==="up"||g==="down")){const n=r.anchor.getNode();if(wo(n)){const e=r.getNodes()[0];if(e){const s=_n(e,on);if(s&&t.isParentOf(s)){const i=t.getFirstDescendant(),l=t.getLastDescendant();if(!i||!l)return!1;const[o]=ms(i),[a]=ms(l),c=t.getCordsFromCellNode(o,f.table),u=t.getCordsFromCellNode(a,f.table),h=t.getDOMCellFromCordsOrThrow(c.x,c.y,f.table),p=t.getDOMCellFromCordsOrThrow(u.x,u.y,f.table);return f.setAnchorCellForSelection(h),f.setFocusCellForSelection(p,!0),!0}}return!1}{const e=_n(n,i=>he(i)&&!i.isInline());if(!e)return!1;const s=g==="down"?e.getNextSibling():e.getPreviousSibling();if(Jn(s)&&f.tableNodeKey===s.getKey()){const i=s.getFirstDescendant(),l=s.getLastDescendant();if(!i||!l)return!1;const[o]=ms(i),[a]=ms(l),c=r.clone();return c.focus.set((g==="up"?o:a).getKey(),g==="up"?0:a.getChildrenSize(),"element"),or(c),!0}}}}return!1}if(_e(r)&&r.isCollapsed()){const{anchor:n,focus:e}=r,s=_n(n.getNode(),on),i=_n(e.getNode(),on);if(!on(s)||!s.is(i))return!1;const l=ys(s);if(l!==t&&l!=null){const m=y.getElementByKey(l.getKey());if(m!=null)return f.table=Il(m),Rl(y,d,g,l,f)}if(g==="backward"||g==="forward"){const m=n.type,b=n.offset,_=n.getNode();if(!_)return!1;const v=r.getNodes();return(v.length!==1||!On(v[0]))&&!!function(w,x,S,E){return function(k,D,N){return k==="element"&&(N==="backward"?D.getPreviousSibling()===null:D.getNextSibling()===null)}(w,S,E)||function(k,D,N,O){const R=_n(N,z=>he(z)&&!z.isInline());if(!R)return!1;const A=O==="backward"?D===0:D===N.getTextContentSize();return k==="text"&&A&&(O==="backward"?R.getPreviousSibling()===null:R.getNextSibling()===null)}(w,x,S,E)}(m,b,_,g)&&function(w,x,S,E){const k=_n(x,on);if(!on(k))return!1;const[D,N]=gs(S,k,k);if(!function(R,A,z){const H=R[0][0],$=R[R.length-1][R[0].length-1],{startColumn:M,startRow:J}=A;return z==="backward"?M===H.startColumn&&J===H.startRow:M===$.startColumn&&J===$.startRow}(D,N,E))return!1;const O=function(R,A,z){const H=_n(R,M=>he(M)&&!M.isInline());if(!H)return;const $=A==="backward"?H.getPreviousSibling():H.getNextSibling();return $&&Jn($)?$:A==="backward"?z.getPreviousSibling():z.getNextSibling()}(x,E,S);return!O||Jn(O)?!1:(va(w),E==="backward"?O.selectEnd():O.selectStart(),!0)}(d,_,t,g)}const o=y.getElementByKey(s.__key),a=y.getElementByKey(n.key);if(a==null||o==null)return!1;let c;if(n.type==="element")c=a.getBoundingClientRect();else{const m=window.getSelection();if(m===null||m.rangeCount===0)return!1;c=m.getRangeAt(0).getBoundingClientRect()}const u=g==="up"?s.getFirstChild():s.getLastChild();if(u==null)return!1;const h=y.getElementByKey(u.__key);if(h==null)return!1;const p=h.getBoundingClientRect();if(g==="up"?p.top>c.top-c.height:c.bottom+c.height>p.bottom){va(d);const m=t.getCordsFromCellNode(s,f.table);if(!d.shiftKey)return Rm(f,t,m.x,m.y,g);{const b=t.getDOMCellFromCordsOrThrow(m.x,m.y,f.table);f.setAnchorCellForSelection(b),f.setFocusCellForSelection(b,!0)}return!0}}else if(Xn(r)){const{anchor:n,focus:e}=r,s=_n(n.getNode(),on),i=_n(e.getNode(),on),[l]=r.getNodes(),o=y.getElementByKey(l.getKey());if(!on(s)||!on(i)||!Jn(l)||o==null)return!1;f.updateTableTableSelection(r);const a=Il(o),c=t.getCordsFromCellNode(s,a),u=t.getDOMCellFromCordsOrThrow(c.x,c.y,a);if(f.setAnchorCellForSelection(u),va(d),d.shiftKey){const h=t.getCordsFromCellNode(i,a);return J1(f,l,h.x,h.y,g)}return i.selectEnd(),!0}return!1}function va(y){y.preventDefault(),y.stopImmediatePropagation(),y.stopPropagation()}function Lm(y,d,g){const t=Qn();y==="first"?d.insertBefore(t):d.insertAfter(t),t.append(...g||[]),t.selectEnd()}function Bm(y,d,g){const t=g.getParent();if(!t)return;const f=y.getElementByKey(t.getKey());if(!f)return;const r=window.getSelection();if(!r||r.anchorNode!==f)return;const n=_n(d.anchor.getNode(),p=>on(p));if(!n)return;const e=_n(n,p=>Jn(p));if(!Jn(e)||!e.is(g))return;const[s,i]=gs(g,n,n),l=s[0][0],o=s[s.length-1][s[0].length-1],{startRow:a,startColumn:c}=i,u=a===l.startRow&&c===l.startColumn,h=a===o.startRow&&c===o.startColumn;return u?"first":h?"last":void 0}class To extends Eo{static getType(){return"table"}static clone(d){return new To(d.__key)}static importDOM(){return{table:d=>({conversion:W1,priority:1})}}static importJSON(d){return Nf()}constructor(d){super(d)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(d,g){const t=document.createElement("table");return Ai(t,d.theme.table),t}updateDOM(){return!1}exportDOM(d){return{...super.exportDOM(d),after:g=>{if(g){const t=g.cloneNode(),f=document.createElement("colgroup"),r=document.createElement("tbody");Sl(g)&&r.append(...g.children);const n=this.getFirstChildOrThrow();if(!Mr(n))throw new Error("Expected to find row node.");const e=n.getChildrenSize();for(let s=0;s<e;s++){const i=document.createElement("col");f.append(i)}return t.replaceChildren(f,r),t}}}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(d,g){const{rows:t,domRows:f}=g;for(let r=0;r<t;r++){const n=f[r];if(n==null)continue;const e=n.findIndex(s=>{if(!s)return;const{elem:i}=s;return yr(i)===d});if(e!==-1)return{x:e,y:r}}throw new Error("Cell not found in table.")}getDOMCellFromCords(d,g,t){const{domRows:f}=t,r=f[g];if(r==null)return null;const n=r[d];return n??null}getDOMCellFromCordsOrThrow(d,g,t){const f=this.getDOMCellFromCords(d,g,t);if(!f)throw new Error("Cell not found at cords.");return f}getCellNodeFromCords(d,g,t){const f=this.getDOMCellFromCords(d,g,t);if(f==null)return null;const r=yr(f.elem);return on(r)?r:null}getCellNodeFromCordsOrThrow(d,g,t){const f=this.getCellNodeFromCords(d,g,t);if(!f)throw new Error("Node at cords not TableCellNode.");return f}canSelectBefore(){return!0}canIndent(){return!1}}function W1(y){return{node:Nf()}}function Nf(){return Vo(new To)}function Jn(y){return y instanceof To}const Fm=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],zm=Fm[Math.floor(Math.random()*Fm.length)],V1=Fe.createContext({clientID:0,color:zm[1],isCollabActive:!1,name:zm[0],yjsDocMap:new Map});function K1(y,d){const g=Fe.useContext(V1);return y!=null&&(g.name=y),d!=null&&(g.color=d),g}const G1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Fe.useLayoutEffect:Fe.useEffect;function Y1({onClear:y}){const[d]=Tr();return G1(()=>d.registerCommand(Sd,g=>(d.update(()=>{if(y==null){const t=Dn(),f=je(),r=Qn();t.clear(),t.append(r),f!==null&&r.select(),_e(f)&&(f.format=0)}else y()}),!0),an),[d,y]),null}function Pf(y,d){return Pf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,t){return g.__proto__=t,g},Pf(y,d)}var Um={error:null},Z1=function(y){var d,g;function t(){for(var r,n=arguments.length,e=new Array(n),s=0;s<n;s++)e[s]=arguments[s];return(r=y.call.apply(y,[this].concat(e))||this).state=Um,r.resetErrorBoundary=function(){for(var i,l=arguments.length,o=new Array(l),a=0;a<l;a++)o[a]=arguments[a];r.props.onReset==null||(i=r.props).onReset.apply(i,o),r.reset()},r}g=y,(d=t).prototype=Object.create(g.prototype),d.prototype.constructor=d,Pf(d,g),t.getDerivedStateFromError=function(r){return{error:r}};var f=t.prototype;return f.reset=function(){this.setState(Um)},f.componentDidCatch=function(r,n){var e,s;(e=(s=this.props).onError)==null||e.call(s,r,n)},f.componentDidUpdate=function(r,n){var e,s,i,l,o=this.state.error,a=this.props.resetKeys;o!==null&&n.error!==null&&((i=r.resetKeys)===void 0&&(i=[]),(l=a)===void 0&&(l=[]),i.length!==l.length||i.some(function(c,u){return!Object.is(c,l[u])}))&&((e=(s=this.props).onResetKeysChange)==null||e.call(s,r.resetKeys,a),this.reset())},f.render=function(){var r=this.state.error,n=this.props,e=n.fallbackRender,s=n.FallbackComponent,i=n.fallback;if(r!==null){var l={error:r,resetErrorBoundary:this.resetErrorBoundary};if(Yn.isValidElement(i))return i;if(typeof e=="function")return e(l);if(s)return Yn.createElement(s,l);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Yn.Component);function Q1({children:y,onError:d}){return Se.jsx(Z1,{fallback:Se.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:d,children:y})}const X1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Fe.useLayoutEffect:Fe.useEffect;function t_({ignoreHistoryMergeTagChange:y=!0,ignoreSelectionChange:d=!1,onChange:g}){const[t]=Tr();return X1(()=>{if(g)return t.registerUpdateListener(({editorState:f,dirtyElements:r,dirtyLeaves:n,prevEditorState:e,tags:s})=>{d&&r.size===0&&n.size===0||y&&s.has("history-merge")||e.isEmpty()||g(f,t,s)})},[t,y,d,g]),null}const bs=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,e_=bs&&"documentMode"in document?document.documentMode:null,n_=!(!bs||!("InputEvent"in window)||e_)&&"getTargetRanges"in new window.InputEvent("input"),r_=bs&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),o_=bs&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,i_=bs&&/^(?=.*Chrome).*/i.test(navigator.userAgent),a_=bs&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!i_;function $m(y,d){d.update(()=>{if(y!==null){const g=Ni(y,KeyboardEvent)?null:y.clipboardData,t=je();if(t!==null&&g!=null){y.preventDefault();const f=hm(d);f!==null&&g.setData("text/html",f),g.setData("text/plain",t.getTextContent())}}})}function s_(y){return ko(y.registerCommand(lo,d=>{const g=je();return!!_e(g)&&(g.deleteCharacter(d),!0)},an),y.registerCommand(sa,d=>{const g=je();return!!_e(g)&&(g.deleteWord(d),!0)},an),y.registerCommand(xi,d=>{const g=je();return!!_e(g)&&(g.deleteLine(d),!0)},an),y.registerCommand(_i,d=>{const g=je();if(!_e(g))return!1;if(typeof d=="string")g.insertText(d);else{const t=d.dataTransfer;if(t!=null)gm(t,g);else{const f=d.data;f&&g.insertText(f)}}return!0},an),y.registerCommand(xc,()=>{const d=je();return!!_e(d)&&(d.removeText(),!0)},an),y.registerCommand(vi,d=>{const g=je();return!!_e(g)&&(g.insertLineBreak(d),!0)},an),y.registerCommand(Ya,()=>{const d=je();return!!_e(d)&&(d.insertLineBreak(),!0)},an),y.registerCommand(Sc,d=>{const g=je();if(!_e(g))return!1;const t=d,f=t.shiftKey;return!!eu(g,!0)&&(t.preventDefault(),nu(g,f,!0),!0)},an),y.registerCommand(wc,d=>{const g=je();if(!_e(g))return!1;const t=d,f=t.shiftKey;return!!eu(g,!1)&&(t.preventDefault(),nu(g,f,!1),!0)},an),y.registerCommand(fl,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),y.dispatchCommand(lo,!0))},an),y.registerCommand(pl,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),y.dispatchCommand(lo,!1))},an),y.registerCommand(dl,d=>{const g=je();if(!_e(g))return!1;if(d!==null){if((o_||r_||a_)&&n_)return!1;d.preventDefault()}return y.dispatchCommand(vi,!1)},an),y.registerCommand(Ec,()=>($h(),!0),an),y.registerCommand(hl,d=>{const g=je();return!!_e(g)&&($m(d,y),!0)},an),y.registerCommand(gl,d=>{const g=je();return!!_e(g)&&(function(t,f){$m(t,f),f.update(()=>{const r=je();_e(r)&&r.removeText()})}(d,y),!0)},an),y.registerCommand(ll,d=>{const g=je();return!!_e(g)&&(function(t,f){t.preventDefault(),f.update(()=>{const r=je(),{clipboardData:n}=t;n!=null&&_e(r)&&gm(n,r)},{tag:"paste"})}(d,y),!0)},an),y.registerCommand(xd,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),!0)},an),y.registerCommand(wd,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),!0)},an))}const If=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Fe.useLayoutEffect:Fe.useEffect;function Hm(y){return y.getEditorState().read(lm(y.isComposing()))}function l_({contentEditable:y,placeholder:d,ErrorBoundary:g}){const[t]=Tr(),f=function(r,n){const[e,s]=Fe.useState(()=>r.getDecorators());return If(()=>r.registerDecoratorListener(i=>{so.flushSync(()=>{s(i)})}),[r]),Fe.useEffect(()=>{s(r.getDecorators())},[r]),Fe.useMemo(()=>{const i=[],l=Object.keys(e);for(let o=0;o<l.length;o++){const a=l[o],c=Se.jsx(n,{onError:h=>r._onError(h),children:Se.jsx(Fe.Suspense,{fallback:null,children:e[a]})}),u=r.getElementByKey(a);u!==null&&i.push(so.createPortal(c,u,a))}return i},[n,e,r])}(t,g);return function(r){If(()=>ko(s_(r),cm(r)),[r])}(t),Se.jsxs(Se.Fragment,{children:[y,Se.jsx(c_,{content:d}),f]})}function c_({content:y}){const[d]=Tr(),g=function(f){const[r,n]=Fe.useState(()=>Hm(f));return If(()=>{function e(){const s=Hm(f);n(s)}return e(),ko(f.registerUpdateListener(()=>{e()}),f.registerEditableListener(()=>{e()}))},[f]),r}(d),t=im();return g?typeof y=="function"?y(t):y:null}var u_={967:(y,d,g)=>{const t=["docId","username","apiKey","domain","hooks","editorInstanceHooks","appServer","demo"];function f(c,u){var h=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(c,m).enumerable})),h.push.apply(h,p)}return h}function r(c){for(var u=1;u<arguments.length;u++){var h=arguments[u]!=null?arguments[u]:{};u%2?f(Object(h),!0).forEach(function(p){n(c,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(h)):f(Object(h)).forEach(function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(h,p))})}return c}function n(c,u,h){return(u=function(p){var m=function(b,_){if(typeof b!="object"||!b)return b;var v=b[Symbol.toPrimitive];if(v!==void 0){var w=v.call(b,"string");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)}(p);return typeof m=="symbol"?m:m+""}(u))in c?Object.defineProperty(c,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):c[u]=h,c}let e;e=g(668);let s=null;d.conf=function(c){c.autoStart=!1,s&&s.init(c)};const i=async function(c){if(s)return s.start(c)};d.start=i;const l=function(c){s&&(s.stop(),s=null)};d.stop=l;const o=function(c,u){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(s)return s.diff({state1:c,state2:u,config:h})};d.diff=o;const a=function(){if(s)return s.sync(...arguments)};d.sync=a,d.initSync=function(c){return s?s.initSync(c):c},y.exports={start:i,sync:a,diff:o,stop:l,createConfig:c=>{let{docId:u,username:h,apiKey:p,domain:m,hooks:b,editorInstanceHooks:_,appServer:v={},demo:w=!1}=c;return r(r({},function(x,S){if(x==null)return{};var E,k,D=function(O,R){if(O==null)return{};var A={};for(var z in O)if({}.hasOwnProperty.call(O,z)){if(R.indexOf(z)>=0)continue;A[z]=O[z]}return A}(x,S);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(x);for(k=0;k<N.length;k++)E=N[k],S.indexOf(E)>=0||{}.propertyIsEnumerable.call(x,E)&&(D[E]=x[E])}return D}(c,t)),{},{docId:u,username:h,apiKey:p,autoStart:!0,demo:w,domain:m,hooks:b,editorInstance:r({type:"lexical"},_),app:"json",json:{keyNames:{default:"codoxId"},filters:{version:!0},appServer:v,semantics:{paths:{"state.root.children.children.text":"MERGE","state.root.children.children.children.text":"MERGE"},string:"MERGE"}}})},get instance(){return s},createNewInstance:()=>{s=new e}}},668:(y,d,g)=>{y.exports=function t(f,r,n){function e(l,o){if(!r[l]){if(!f[l]){var a=void 0;if(!o&&a)return require(l,!0);if(s)return s(l,!0);throw(o=new Error("Cannot find module '"+l+"'")).code="MODULE_NOT_FOUND",o}a=r[l]={exports:{}},f[l][0].call(a.exports,function(c){return e(f[l][1][c]||c)},a,a.exports,t,f,r,n)}return r[l].exports}for(var s=void 0,i=0;i<n.length;i++)e(n[i]);return e}({1:[function(t,f,r){f.exports=function(n,e){(e==null||e>n.length)&&(e=n.length);for(var s=0,i=new Array(e);s<e;s++)i[s]=n[s];return i},f.exports.__esModule=!0,f.exports.default=f.exports},{}],2:[function(t,f,r){f.exports=function(n){if(Array.isArray(n))return n},f.exports.__esModule=!0,f.exports.default=f.exports},{}],3:[function(t,f,r){var n=t("./arrayLikeToArray.js");f.exports=function(e){if(Array.isArray(e))return n(e)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./arrayLikeToArray.js":1}],4:[function(t,f,r){f.exports=function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n},f.exports.__esModule=!0,f.exports.default=f.exports},{}],5:[function(t,f,r){f.exports=function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")},f.exports.__esModule=!0,f.exports.default=f.exports},{}],6:[function(t,f,r){var n=t("./setPrototypeOf.js"),e=t("./isNativeReflectConstruct.js");function s(i,l,o){return e()?f.exports=s=Reflect.construct.bind():f.exports=s=function(a,c,u){var h=[null];return h.push.apply(h,c),c=new(Function.bind.apply(a,h)),u&&n(c,u.prototype),c},f.exports.__esModule=!0,f.exports.default=f.exports,s.apply(null,arguments)}f.exports=s,f.exports.__esModule=!0,f.exports.default=f.exports},{"./isNativeReflectConstruct.js":13,"./setPrototypeOf.js":19}],7:[function(t,f,r){function n(e,s){for(var i=0;i<s.length;i++){var l=s[i];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}f.exports=function(e,s,i){return s&&n(e.prototype,s),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},f.exports.__esModule=!0,f.exports.default=f.exports},{}],8:[function(t,f,r){f.exports=function(n,e,s){return e in n?Object.defineProperty(n,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[e]=s,n},f.exports.__esModule=!0,f.exports.default=f.exports},{}],9:[function(t,f,r){function n(e){return f.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},f.exports.__esModule=!0,f.exports.default=f.exports,n(e)}f.exports=n,f.exports.__esModule=!0,f.exports.default=f.exports},{}],10:[function(t,f,r){var n=t("./setPrototypeOf.js");f.exports=function(e,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(s&&s.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),s&&n(e,s)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./setPrototypeOf.js":19}],11:[function(t,f,r){f.exports=function(n){return n&&n.__esModule?n:{default:n}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],12:[function(t,f,r){f.exports=function(n){return Function.toString.call(n).indexOf("[native code]")!==-1},f.exports.__esModule=!0,f.exports.default=f.exports},{}],13:[function(t,f,r){f.exports=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],14:[function(t,f,r){f.exports=function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)},f.exports.__esModule=!0,f.exports.default=f.exports},{}],15:[function(t,f,r){f.exports=function(n,e){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var i,l,o=[],a=!0,c=!1;try{for(s=s.call(n);!(a=(i=s.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(u){c=!0,l=u}finally{try{a||s.return==null||s.return()}finally{if(c)throw l}}return o}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],16:[function(t,f,r){f.exports=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
41
|
+
`?s.insertParagraph():i===" "?s.insertNodes([Nl()]):s.insertText(i)}}}else d.insertRawText(r)}function mm(y,d,g){y.dispatchCommand(ch,{nodes:d,selection:g})||g.insertNodes(d)}function ym(y,d,g,t=[]){let f=d===null||g.isSelected(d);const r=he(g)&&g.excludeFromCopy("html");let n=g;if(d!==null){let i=Wg(g);i=Pe(i)&&d!==null?Vg(d,i):i,n=i}const e=he(n)?n.getChildren():[],s=function(i){const l=i.exportJSON(),o=i.constructor;if(l.type!==o.getType()&&ou(58,o.name),he(i)){const a=l.children;Array.isArray(a)||ou(59,o.name)}return l}(n);if(Pe(n)){const i=n.__text;i.length>0?s.text=i:f=!1}for(let i=0;i<e.length;i++){const l=e[i],o=ym(y,d,l,s.children);!f&&he(g)&&o&&g.extractWithChild(l,d,"clone")&&(f=!0)}if(f&&!r)t.push(s);else if(Array.isArray(s.children))for(let i=0;i<s.children.length;i++){const l=s.children[i];t.push(l)}return f}function b1(y,d){const g=[],t=Dn().getChildren();for(let f=0;f<t.length;f++)ym(y,d,t[f],g);return{namespace:y._config.namespace,nodes:g}}function v1(y){const d=[];for(let g=0;g<y.length;g++){const t=y[g],f=Mv(t);Pe(f)&&Wv(f),d.push(f)}return d}let fs=null;async function bm(y,d){if(fs!==null)return!1;if(d!==null)return new Promise((e,s)=>{y.update(()=>{e(vm(y,d))})});const g=y.getRootElement(),t=y._window==null?window.document:y._window.document,f=fm(y._window);if(g===null||f===null)return!1;const r=t.createElement("span");r.style.cssText="position: fixed; top: -1000px;",r.append(t.createTextNode("#")),g.append(r);const n=new Range;return n.setStart(r,0),n.setEnd(r,1),f.removeAllRanges(),f.addRange(n),new Promise((e,s)=>{const i=y.registerCommand(hl,l=>(Ni(l,ClipboardEvent)&&(i(),fs!==null&&(window.clearTimeout(fs),fs=null),e(vm(y,l))),!0),Zr);fs=window.setTimeout(()=>{i(),fs=null,e(!1)},50),t.execCommand("copy"),r.remove()})}function vm(y,d){const g=fm(y._window);if(!g)return!1;const t=g.anchorNode,f=g.focusNode;if(t!==null&&f!==null&&!yl(y,t,f))return!1;d.preventDefault();const r=d.clipboardData,n=je();if(r===null||n===null)return!1;const e=pm(y),s=y1(y);let i="";return n!==null&&(i=n.getTextContent()),e!==null&&r.setData("text/html",e),s!==null&&r.setData("application/x-lexical-editor",s),r.setData("text/plain",i),!0}function _m(y,d){if(document.caretRangeFromPoint!==void 0){const g=document.caretRangeFromPoint(y,d);return g===null?null:{node:g.startContainer,offset:g.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const g=document.caretPositionFromPoint(y,d);return g===null?null:{node:g.offsetNode,offset:g.offset}}return null}const ps=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,_1=ps&&"documentMode"in document?document.documentMode:null,x1=!(!ps||!("InputEvent"in window)||_1)&&"getTargetRanges"in new window.InputEvent("input"),w1=ps&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),S1=ps&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,C1=ps&&/^(?=.*Chrome).*/i.test(navigator.userAgent),E1=ps&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!C1,xm=bd();function iu(y){let d=null;if(Ni(y,DragEvent)?d=y.dataTransfer:Ni(y,ClipboardEvent)&&(d=y.clipboardData),d===null)return[!1,[],!1];const g=d.types,t=g.includes("Files"),f=g.includes("text/html")||g.includes("text/plain");return[t,Array.from(d.files),f]}function wm(y){const d=je();if(!_e(d))return!1;const g=new Set,t=d.getNodes();for(let f=0;f<t.length;f++){const r=t[f],n=r.getKey();if(g.has(n))continue;const e=_n(r,i=>he(i)&&!i.isInline());if(e===null)continue;const s=e.getKey();e.canIndent()&&!g.has(s)&&(g.add(s),y(e))}return g.size>0}function au(y){const d=yr(y);return On(d)}function k1(y){return ko(y.registerCommand(uh,d=>{const g=je();return!!Yr(g)&&(g.clear(),!0)},0),y.registerCommand(lo,d=>{const g=je();return!!_e(g)&&(g.deleteCharacter(d),!0)},an),y.registerCommand(sa,d=>{const g=je();return!!_e(g)&&(g.deleteWord(d),!0)},an),y.registerCommand(xi,d=>{const g=je();return!!_e(g)&&(g.deleteLine(d),!0)},an),y.registerCommand(_i,d=>{const g=je();if(typeof d=="string")g!==null&&g.insertText(d);else{if(g===null)return!1;const t=d.dataTransfer;if(t!=null)gm(t,g,y);else if(_e(g)){const f=d.data;return f&&g.insertText(f),!0}}return!0},an),y.registerCommand(xc,()=>{const d=je();return!!_e(d)&&(d.removeText(),!0)},an),y.registerCommand(Cr,d=>{const g=je();return!!_e(g)&&(g.formatText(d),!0)},an),y.registerCommand(Za,d=>{const g=je();if(!_e(g)&&!Yr(g))return!1;const t=g.getNodes();for(const f of t){const r=_n(f,n=>he(n)&&!n.isInline());r!==null&&r.setFormat(d)}return!0},an),y.registerCommand(vi,d=>{const g=je();return!!_e(g)&&(g.insertLineBreak(d),!0)},an),y.registerCommand(Ya,()=>{const d=je();return!!_e(d)&&(d.insertParagraph(),!0)},an),y.registerCommand(Mb,()=>(Pv([Nl()]),!0),an),y.registerCommand(Db,()=>wm(d=>{const g=d.getIndent();d.setIndent(g+1)}),an),y.registerCommand(fh,()=>wm(d=>{const g=d.getIndent();g>0&&d.setIndent(g-1)}),an),y.registerCommand(vd,d=>{const g=je();if(Yr(g)&&!au(d.target)){const t=g.getNodes();if(t.length>0)return t[0].selectPrevious(),!0}else if(_e(g)){const t=wl(g.focus,!0);if(!d.shiftKey&&On(t)&&!t.isIsolated()&&!t.isInline())return t.selectPrevious(),d.preventDefault(),!0}return!1},an),y.registerCommand(_d,d=>{const g=je();if(Yr(g)){const t=g.getNodes();if(t.length>0)return t[0].selectNext(0,0),!0}else if(_e(g)){if(function(f){const r=f.focus;return r.key==="root"&&r.offset===Dn().getChildrenSize()}(g))return d.preventDefault(),!0;const t=wl(g.focus,!1);if(!d.shiftKey&&On(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),d.preventDefault(),!0}return!1},an),y.registerCommand(Sc,d=>{const g=je();if(Yr(g)){const t=g.getNodes();if(t.length>0)return d.preventDefault(),t[0].selectPrevious(),!0}if(!_e(g))return!1;if(eu(g,!0)){const t=d.shiftKey;return d.preventDefault(),nu(g,t,!0),!0}return!1},an),y.registerCommand(wc,d=>{const g=je();if(Yr(g)&&!au(d.target)){const f=g.getNodes();if(f.length>0)return d.preventDefault(),f[0].selectNext(0,0),!0}if(!_e(g))return!1;const t=d.shiftKey;return!!eu(g,!1)&&(d.preventDefault(),nu(g,t,!1),!0)},an),y.registerCommand(fl,d=>{if(au(d.target))return!1;const g=je();if(!_e(g))return!1;d.preventDefault();const{anchor:t}=g,f=t.getNode();return g.isCollapsed()&&t.offset===0&&!br(f)&&Xv(f).getIndent()>0?y.dispatchCommand(fh,void 0):y.dispatchCommand(lo,!0)},an),y.registerCommand(pl,d=>{if(au(d.target))return!1;const g=je();return!!_e(g)&&(d.preventDefault(),y.dispatchCommand(lo,!1))},an),y.registerCommand(dl,d=>{const g=je();if(!_e(g))return!1;if(d!==null){if((S1||w1||E1)&&x1)return!1;if(d.preventDefault(),d.shiftKey)return y.dispatchCommand(vi,!1)}return y.dispatchCommand(Ya,void 0)},an),y.registerCommand(Cc,()=>{const d=je();return!!_e(d)&&(y.blur(),!0)},an),y.registerCommand(xd,d=>{const[,g]=iu(d);if(g.length>0){const f=_m(d.clientX,d.clientY);if(f!==null){const{offset:r,node:n}=f,e=yr(n);if(e!==null){const s=hf();if(Pe(e))s.anchor.set(e.getKey(),r,"text"),s.focus.set(e.getKey(),r,"text");else{const l=e.getParentOrThrow().getKey(),o=e.getIndexWithinParent()+1;s.anchor.set(l,o,"element"),s.focus.set(l,o,"element")}const i=Dd(s);or(i)}y.dispatchCommand(xm,g)}return d.preventDefault(),!0}const t=je();return!!_e(t)},an),y.registerCommand(wd,d=>{const[g]=iu(d),t=je();return!(g&&!_e(t))},an),y.registerCommand(ph,d=>{const[g]=iu(d),t=je();if(g&&!_e(t))return!1;const f=_m(d.clientX,d.clientY);if(f!==null){const r=yr(f.node);On(r)&&d.preventDefault()}return!0},an),y.registerCommand(Ec,()=>(Uh(),!0),an),y.registerCommand(hl,d=>(bm(y,Ni(d,ClipboardEvent)?d:null),!0),an),y.registerCommand(gl,d=>(async function(g,t){await bm(t,Ni(g,ClipboardEvent)?g:null),t.update(()=>{const f=je();_e(f)?f.removeText():Yr(f)&&f.getNodes().forEach(r=>r.remove())})}(d,y),!0),an),y.registerCommand(ll,d=>{const[,g,t]=iu(d);return g.length>0&&!t?(y.dispatchCommand(xm,g),!0):Ld(d.target)?!1:je()!==null&&(function(f,r){f.preventDefault(),r.update(()=>{const n=je(),e=Ni(f,InputEvent)||Ni(f,KeyboardEvent)?null:f.clipboardData;e!=null&&n!==null&&gm(e,n,r)},{tag:"paste"})}(d,y),!0)},an))}const Ef=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Be.useLayoutEffect:Be.useEffect;function Sm(y){return y.getEditorState().read(sm(y.isComposing()))}function O1({contentEditable:y,placeholder:d,ErrorBoundary:g}){const[t]=Tr(),f=function(r,n){const[e,s]=Be.useState(()=>r.getDecorators());return Ef(()=>r.registerDecoratorListener(i=>{so.flushSync(()=>{s(i)})}),[r]),Be.useEffect(()=>{s(r.getDecorators())},[r]),Be.useMemo(()=>{const i=[],l=Object.keys(e);for(let o=0;o<l.length;o++){const a=l[o],c=Se.jsx(n,{onError:h=>r._onError(h),children:Se.jsx(Be.Suspense,{fallback:null,children:e[a]})}),u=r.getElementByKey(a);u!==null&&i.push(so.createPortal(c,u,a))}return i},[n,e,r])}(t,g);return function(r){Ef(()=>ko(k1(r),lm(r)),[r])}(t),Se.jsxs(Se.Fragment,{children:[y,Se.jsx(T1,{content:d}),f]})}function T1({content:y}){const[d]=Tr(),g=function(f){const[r,n]=Be.useState(()=>Sm(f));return Ef(()=>{function e(){const s=Sm(f);n(s)}return e(),ko(f.registerUpdateListener(()=>{e()}),f.registerEditableListener(()=>{e()}))},[f]),r}(d),t=om();return g?typeof y=="function"?y(t):y:null}const j1=new Set(["http:","https:","mailto:","sms:","tel:"]);let Cm=class kb extends Eo{static getType(){return"link"}static clone(d){return new kb(d.__url,{rel:d.__rel,target:d.__target,title:d.__title},d.__key)}constructor(d,g={},t){super(t);const{target:f=null,rel:r=null,title:n=null}=g;this.__url=d,this.__target=f,this.__rel=r,this.__title=n}createDOM(d){const g=document.createElement("a");return g.href=this.sanitizeUrl(this.__url),this.__target!==null&&(g.target=this.__target),this.__rel!==null&&(g.rel=this.__rel),this.__title!==null&&(g.title=this.__title),Ai(g,d.theme.link),g}updateDOM(d,g,t){if(g instanceof HTMLAnchorElement){const f=this.__url,r=this.__target,n=this.__rel,e=this.__title;f!==d.__url&&(g.href=f),r!==d.__target&&(r?g.target=r:g.removeAttribute("target")),n!==d.__rel&&(n?g.rel=n:g.removeAttribute("rel")),e!==d.__title&&(e?g.title=e:g.removeAttribute("title"))}return!1}static importDOM(){return{a:d=>({conversion:A1,priority:1})}}static importJSON(d){const g=kf(d.url,{rel:d.rel,target:d.target,title:d.title});return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g}sanitizeUrl(d){try{const g=new URL(d);if(!j1.has(g.protocol))return"about:blank"}catch{return d}return d}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(d){this.getWritable().__url=d}getTarget(){return this.getLatest().__target}setTarget(d){this.getWritable().__target=d}getRel(){return this.getLatest().__rel}setRel(d){this.getWritable().__rel=d}getTitle(){return this.getLatest().__title}setTitle(d){this.getWritable().__title=d}insertNewAfter(d,g=!0){const t=kf(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(t,g),t}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(d,g,t){if(!_e(g))return!1;const f=g.anchor.getNode(),r=g.focus.getNode();return this.isParentOf(f)&&this.isParentOf(r)&&g.getTextContent().length>0}};function A1(y){let d=null;if(gv(y)){const g=y.textContent;(g!==null&&g!==""||y.children.length>0)&&(d=kf(y.getAttribute("href")||"",{rel:y.getAttribute("rel"),target:y.getAttribute("target"),title:y.getAttribute("title")}))}return{node:d}}function kf(y,d){return Vo(new Cm(y,d))}function N1(y){return y instanceof Cm}let Of=class Ob extends Eo{static getType(){return"mark"}static clone(d){return new Ob(Array.from(d.__ids),d.__key)}static importDOM(){return null}static importJSON(d){const g=su(d.ids);return g.setFormat(d.format),g.setIndent(d.indent),g.setDirection(d.direction),g}exportJSON(){return{...super.exportJSON(),ids:this.getIDs(),type:"mark",version:1}}constructor(d,g){super(g),this.__ids=d||[]}createDOM(d){const g=document.createElement("mark");return Ai(g,d.theme.mark),this.__ids.length>1&&Ai(g,d.theme.markOverlap),g}updateDOM(d,g,t){const f=d.__ids,r=this.__ids,n=f.length,e=r.length,s=t.theme.markOverlap;return n!==e&&(n===1?e===2&&Ai(g,s):e===1&&Qg(g,s)),!1}hasID(d){const g=this.getIDs();for(let t=0;t<g.length;t++)if(d===g[t])return!0;return!1}getIDs(){const d=this.getLatest();return ya(d)?d.__ids:[]}addID(d){const g=this.getWritable();if(ya(g)){const t=g.__ids;g.__ids=t;for(let f=0;f<t.length;f++)if(d===t[f])return;t.push(d)}}deleteID(d){const g=this.getWritable();if(ya(g)){const t=g.__ids;g.__ids=t;for(let f=0;f<t.length;f++)if(d===t[f])return void t.splice(f,1)}}insertNewAfter(d,g=!0){const t=su(this.__ids);return this.insertAfter(t,g),t}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(d,g,t){if(!_e(g)||t==="html")return!1;const f=g.anchor,r=g.focus,n=f.getNode(),e=r.getNode(),s=g.isBackward()?f.offset-r.offset:r.offset-f.offset;return this.isParentOf(n)&&this.isParentOf(e)&&this.getTextContent().length===s}excludeFromCopy(d){return d!=="clone"}};function su(y){return Vo(new Of(y))}function ya(y){return y instanceof Of}function P1(y){const d=y.getChildren();let g=null;for(let t=0;t<d.length;t++){const f=d[t];g===null?y.insertBefore(f):g.insertAfter(f),g=f}y.remove()}function I1(y,d,g,t){const f=y.getNodes(),r=y.anchor.offset,n=y.focus.offset,e=f.length,s=d?n:r,i=d?r:n;let l,o;for(let a=0;a<e;a++){const c=f[a];if(he(o)&&o.isParentOf(c))continue;const u=a===0,h=a===e-1;let p=null;if(Pe(c)){const m=c.getTextContentSize(),b=u?s:0,_=h?i:m;if(b===0&&_===0)continue;const v=c.splitText(b,_);p=v.length>1&&(v.length===3||u&&!h||_===m)?v[1]:v[0]}else{if(ya(c))continue;he(c)&&c.isInline()&&(p=c)}if(p!==null){if(p&&p.is(l))continue;const m=p.getParent();m!=null&&m.is(l)||(o=void 0),l=m,o===void 0&&(o=(t||su)([g]),p.insertBefore(o)),o.append(p)}else l=void 0,o=void 0}he(o)&&(d?o.selectStart():o.selectEnd())}function R1(y,d){let g=y;for(;g!==null;){if(ya(g))return g.getIDs();if(Pe(g)&&d===g.getTextContentSize()){const t=g.getNextSibling();if(ya(t))return t.getIDs()}g=g.getParent()}return null}const Em=/^(\d+(?:\.\d+)?)px$/,Yo={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class Oo extends Eo{static getType(){return"tablecell"}static clone(d){const g=new Oo(d.__headerState,d.__colSpan,d.__width,d.__key);return g.__rowSpan=d.__rowSpan,g.__backgroundColor=d.__backgroundColor,g}static importDOM(){return{td:d=>({conversion:km,priority:0}),th:d=>({conversion:km,priority:0})}}static importJSON(d){const g=d.colSpan||1,t=d.rowSpan||1,f=hs(d.headerState,g,d.width||void 0);return f.__rowSpan=t,f.__backgroundColor=d.backgroundColor||null,f}constructor(d=Yo.NO_STATUS,g=1,t,f){super(f),this.__colSpan=g,this.__rowSpan=1,this.__headerState=d,this.__width=t,this.__backgroundColor=null}createDOM(d){const g=document.createElement(this.getTag());return this.__width&&(g.style.width=`${this.__width}px`),this.__colSpan>1&&(g.colSpan=this.__colSpan),this.__rowSpan>1&&(g.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(g.style.backgroundColor=this.__backgroundColor),Ai(g,d.theme.tableCell,this.hasHeader()&&d.theme.tableCellHeader),g}exportDOM(d){const{element:g}=super.exportDOM(d);if(g){const t=g;t.style.border="1px solid black",this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),t.style.width=`${this.getWidth()||75}px`,t.style.verticalAlign="top",t.style.textAlign="start";const f=this.getBackgroundColor();f!==null?t.style.backgroundColor=f:this.hasHeader()&&(t.style.backgroundColor="#f2f3f5")}return{element:g}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,type:"tablecell",width:this.getWidth()}}getColSpan(){return this.__colSpan}setColSpan(d){return this.getWritable().__colSpan=d,this}getRowSpan(){return this.__rowSpan}setRowSpan(d){return this.getWritable().__rowSpan=d,this}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(d){return this.getWritable().__headerState=d,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(d){return this.getWritable().__width=d,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(d){this.getWritable().__backgroundColor=d}toggleHeaderStyle(d){const g=this.getWritable();return(g.__headerState&d)===d?g.__headerState-=d:g.__headerState+=d,g}hasHeaderState(d){return(this.getHeaderStyles()&d)===d}hasHeader(){return this.getLatest().__headerState!==Yo.NO_STATUS}updateDOM(d){return d.__headerState!==this.__headerState||d.__width!==this.__width||d.__colSpan!==this.__colSpan||d.__rowSpan!==this.__rowSpan||d.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function km(y){const d=y,g=y.nodeName.toLowerCase();let t;Em.test(d.style.width)&&(t=parseFloat(d.style.width));const f=hs(g==="th"?Yo.ROW:Yo.NO_STATUS,d.colSpan,t);f.__rowSpan=d.rowSpan;const r=d.style.backgroundColor;r!==""&&(f.__backgroundColor=r);const n=d.style,e=n.textDecoration.split(" "),s=n.fontWeight==="700"||n.fontWeight==="bold",i=e.includes("line-through"),l=n.fontStyle==="italic",o=e.includes("underline");return{after:a=>(a.length===0&&a.push(Qn()),a),forChild:(a,c)=>{if(on(c)&&!he(a)){const u=Qn();return fa(a)&&a.getTextContent()===`
|
|
42
|
+
`?null:(Pe(a)&&(s&&a.toggleFormat("bold"),i&&a.toggleFormat("strikethrough"),l&&a.toggleFormat("italic"),o&&a.toggleFormat("underline")),u.append(a),u)}return a},node:f}}function hs(y,d=1,g){return Vo(new Oo(y,d,g))}function on(y){return y instanceof Oo}const M1=bd();class ba extends Eo{static getType(){return"tablerow"}static clone(d){return new ba(d.__height,d.__key)}static importDOM(){return{tr:d=>({conversion:D1,priority:0})}}static importJSON(d){return lu(d.height)}constructor(d,g){super(g),this.__height=d}exportJSON(){return{...super.exportJSON(),...this.getHeight()&&{height:this.getHeight()},type:"tablerow",version:1}}createDOM(d){const g=document.createElement("tr");return this.__height&&(g.style.height=`${this.__height}px`),Ai(g,d.theme.tableRow),g}isShadowRoot(){return!0}setHeight(d){return this.getWritable().__height=d,this.__height}getHeight(){return this.getLatest().__height}updateDOM(d){return d.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function D1(y){const d=y;let g;return Em.test(d.style.height)&&(g=parseFloat(d.style.height)),{node:lu(g)}}function lu(y){return Vo(new ba(y))}function Mr(y){return y instanceof ba}function L1(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Pn=L1(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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.`)});const B1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Om(y,d,g=!0){const t=Nf();for(let f=0;f<y;f++){const r=lu();for(let n=0;n<d;n++){let e=Yo.NO_STATUS;typeof g=="object"?(f===0&&g.rows&&(e|=Yo.ROW),n===0&&g.columns&&(e|=Yo.COLUMN)):g&&(f===0&&(e|=Yo.ROW),n===0&&(e|=Yo.COLUMN));const s=hs(e),i=Qn();i.append(Zn()),s.append(i),r.append(s)}t.append(r)}return t}function F1(y){const d=_n(y,g=>Mr(g));if(Mr(d))return d;throw new Error("Expected table cell to be inside of table row.")}function z1(y){return F1(y).getChildren().findIndex(d=>d.is(y))}function gs(y,d,g){const[t,f,r]=Tm(y,d,g);return f===null&&Pn(110),r===null&&Pn(111),[t,f,r]}function Tm(y,d,g){const t=[];let f=null,r=null;function n(i,l,o){const a={cell:o,startColumn:l,startRow:i},c=o.__rowSpan,u=o.__colSpan;for(let h=0;h<c;h++){t[i+h]===void 0&&(t[i+h]=[]);for(let p=0;p<u;p++)t[i+h][l+p]=a}d!==null&&d.is(o)&&(f=a),g!==null&&g.is(o)&&(r=a)}function e(i,l){return t[i]===void 0||t[i][l]===void 0}const s=y.getChildren();for(let i=0;i<s.length;i++){const l=s[i];Mr(l)||Pn(146);const o=l.getChildren();let a=0;for(const c of o){for(on(c)||Pn(147);!e(i,a);)a++;n(i,a,c),a+=c.__colSpan}}return[t,f,r]}function ms(y){let d;if(y instanceof Oo)d=y;else if("__type"in y){const f=_n(y,on);on(f)||Pn(148),d=f}else{const f=_n(y.getNode(),on);on(f)||Pn(148),d=f}const g=d.getParent();Mr(g)||Pn(149);const t=g.getParent();return Jn(t)||Pn(150),[d,g,t]}function jm(y){const[d,,g]=ms(y),t=g.getChildren(),f=t.length,r=t[0].getChildren().length,n=new Array(f);for(let e=0;e<f;e++)n[e]=new Array(r);for(let e=0;e<f;e++){const s=t[e].getChildren();let i=0;for(let l=0;l<s.length;l++){for(;n[e][i];)i++;const o=s[l],a=o.__rowSpan||1,c=o.__colSpan||1;for(let u=0;u<a;u++)for(let h=0;h<c;h++)n[e+u][i+h]=o;if(d===o)return{colSpan:c,columnIndex:i,rowIndex:e,rowSpan:a};i+=c}}return null}class cu{constructor(d,g,t){this.anchor=g,this.focus=t,g._selection=this,t._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=d}getStartEndPoints(){return[this.anchor,this.focus]}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(d){this._cachedNodes=d}is(d){return!!Xn(d)&&this.tableKey===d.tableKey&&this.anchor.is(d.anchor)&&this.focus.is(d.focus)}set(d,g,t){this.dirty=!0,this.tableKey=d,this.anchor.key=g,this.focus.key=t,this._cachedNodes=null}clone(){return new cu(this.tableKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(d){}insertText(){}insertNodes(d){const g=this.focus.getNode();he(g)||Pn(151),Dd(g.select(0,g.getChildrenSize())).insertNodes(d)}getShape(){const d=Hn(this.anchor.key);on(d)||Pn(152);const g=jm(d);g===null&&Pn(153);const t=Hn(this.focus.key);on(t)||Pn(154);const f=jm(t);f===null&&Pn(155);const r=Math.min(g.columnIndex,f.columnIndex),n=Math.max(g.columnIndex,f.columnIndex),e=Math.min(g.rowIndex,f.rowIndex),s=Math.max(g.rowIndex,f.rowIndex);return{fromX:Math.min(r,n),fromY:Math.min(e,s),toX:Math.max(r,n),toY:Math.max(e,s)}}getNodes(){const d=this._cachedNodes;if(d!==null)return d;const g=this.anchor.getNode(),t=this.focus.getNode(),f=_n(g,on),r=_n(t,on);on(f)||Pn(152),on(r)||Pn(154);const n=f.getParent();Mr(n)||Pn(156);const e=n.getParent();Jn(e)||Pn(157);const s=r.getParents()[1];if(s!==e){if(e.isParentOf(r)){const S=s.getParent();S==null&&Pn(159),this.set(this.tableKey,r.getKey(),S.getKey())}else{const S=e.getParent();S==null&&Pn(158),this.set(this.tableKey,S.getKey(),r.getKey())}return this.getNodes()}const[i,l,o]=gs(e,f,r);let a=Math.min(l.startColumn,o.startColumn),c=Math.min(l.startRow,o.startRow),u=Math.max(l.startColumn+l.cell.__colSpan-1,o.startColumn+o.cell.__colSpan-1),h=Math.max(l.startRow+l.cell.__rowSpan-1,o.startRow+o.cell.__rowSpan-1),p=a,m=c,b=a,_=c;function v(S){const{cell:E,startColumn:k,startRow:D}=S;a=Math.min(a,k),c=Math.min(c,D),u=Math.max(u,k+E.__colSpan-1),h=Math.max(h,D+E.__rowSpan-1)}for(;a<p||c<m||u>b||h>_;){if(a<p){const S=_-m,E=p-1;for(let k=0;k<=S;k++)v(i[m+k][E]);p=E}if(c<m){const S=b-p,E=m-1;for(let k=0;k<=S;k++)v(i[E][p+k]);m=E}if(u>b){const S=_-m,E=b+1;for(let k=0;k<=S;k++)v(i[m+k][E]);b=E}if(h>_){const S=b-p,E=_+1;for(let k=0;k<=S;k++)v(i[E][p+k]);_=E}}const w=[e];let x=null;for(let S=c;S<=h;S++)for(let E=a;E<=u;E++){const{cell:k}=i[S][E],D=k.getParent();Mr(D)||Pn(160),D!==x&&w.push(D),w.push(k,...U1(k)),x=D}return ls()||(this._cachedNodes=w),w}getTextContent(){const d=this.getNodes();let g="";for(let t=0;t<d.length;t++)g+=d[t].getTextContent();return g}}function Xn(y){return y instanceof cu}function uu(){const y=Gr("root",0,"element"),d=Gr("root",0,"element");return new cu("root",y,d)}function U1(y){const d=[],g=[y];for(;g.length>0;){const t=g.pop();t===void 0&&Pn(112),he(t)&&g.unshift(...t.getChildren()),t!==y&&d.push(t)}return d}class $1{constructor(d,g){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=g,this.editor=d,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTable(),this.isSelecting=!1}getTable(){return this.table}removeListeners(){Array.from(this.listenersToRemove).forEach(d=>d())}trackTable(){const d=new MutationObserver(g=>{this.editor.update(()=>{let t=!1;for(let r=0;r<g.length;r++){const n=g[r].target.nodeName;if(n==="TABLE"||n==="TBODY"||n==="THEAD"||n==="TR"){t=!0;break}}if(!t)return;const f=this.editor.getElementByKey(this.tableNodeKey);if(!f)throw new Error("Expected to find TableElement in DOM");this.table=Il(f)})});this.editor.update(()=>{const g=this.editor.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");this.table=Il(g),d.observe(g,{childList:!0,subtree:!0})})}clearHighlight(){const d=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),d.update(()=>{if(!Jn(Hn(this.tableNodeKey)))throw new Error("Expected TableNode.");const g=d.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");const t=Il(g);du(d,t,null),or(null),d.dispatchCommand(qo,void 0)})}enableHighlightStyle(){const d=this.editor;d.update(()=>{const g=d.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");Qg(g,d._config.theme.tableSelection),g.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const d=this.editor;d.update(()=>{const g=d.getElementByKey(this.tableNodeKey);if(!g)throw new Error("Expected to find TableElement in DOM");Ai(g,d._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableTableSelection(d){if(d!==null&&d.tableKey===this.tableNodeKey){const g=this.editor;this.tableSelection=d,this.isHighlightingCells=!0,this.disableHighlightStyle(),du(g,this.table,this.tableSelection)}else d==null?this.clearHighlight():(this.tableNodeKey=d.tableKey,this.updateTableTableSelection(d))}setFocusCellForSelection(d,g=!1){const t=this.editor;t.update(()=>{const f=Hn(this.tableNodeKey);if(!Jn(f))throw new Error("Expected TableNode.");if(!t.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const r=d.x,n=d.y;if(this.focusCell=d,this.anchorCell!==null){const e=Am(t._window);e&&e.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===r&&this.anchorY===n&&!g){if(r===this.focusX&&n===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();if(this.focusX=r,this.focusY=n,this.isHighlightingCells){const e=yr(d.elem);if(this.tableSelection!=null&&this.anchorCellNodeKey!=null&&on(e)&&f.is(ys(e))){const s=e.getKey();this.tableSelection=this.tableSelection.clone()||uu(),this.focusCellNodeKey=s,this.tableSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),or(this.tableSelection),t.dispatchCommand(qo,void 0),du(t,this.table,this.tableSelection)}}})}setAnchorCellForSelection(d){this.isHighlightingCells=!1,this.anchorCell=d,this.anchorX=d.x,this.anchorY=d.y,this.editor.update(()=>{const g=yr(d.elem);if(on(g)){const t=g.getKey();this.tableSelection=this.tableSelection!=null?this.tableSelection.clone():uu(),this.anchorCellNodeKey=t}})}formatCells(d){this.editor.update(()=>{const g=je();Xn(g)||Pn(11);const t=hf(),f=t.anchor,r=t.focus;g.getNodes().forEach(n=>{on(n)&&n.getTextContentSize()!==0&&(f.set(n.getKey(),0,"element"),r.set(n.getKey(),n.getChildrenSize(),"element"),t.formatText(d))}),or(g),this.editor.dispatchCommand(qo,void 0)})}clearText(){const d=this.editor;d.update(()=>{const g=Hn(this.tableNodeKey);if(!Jn(g))throw new Error("Expected TableNode.");const t=je();Xn(t)||Pn(11);const f=t.getNodes().filter(on);f.length!==this.table.columns*this.table.rows?(f.forEach(r=>{if(he(r)){const n=Qn(),e=Zn();n.append(e),r.append(n),r.getChildren().forEach(s=>{s!==n&&s.remove()})}}),du(d,this.table,null),or(null),d.dispatchCommand(qo,void 0)):(g.selectPrevious(),g.remove(),Dn().selectStart())})}}const H1="__lexicalTableSelection",Am=y=>B1?(y||window).getSelection():null;function q1(y,d,g,t){const f=g.getRootElement();if(f===null)throw new Error("No root element.");const r=new $1(g,y.getKey()),n=g._window||window;(function(o,a){o[H1]=a})(d,r);const e=()=>{const o=()=>{r.isSelecting=!1,n.removeEventListener("mouseup",o),n.removeEventListener("mousemove",a)},a=c=>{setTimeout(()=>{if(1&~c.buttons&&r.isSelecting)return r.isSelecting=!1,n.removeEventListener("mouseup",o),void n.removeEventListener("mousemove",a);const u=Nm(c.target);u===null||r.anchorX===u.x&&r.anchorY===u.y||(c.preventDefault(),r.setFocusCellForSelection(u))},0)};return{onMouseMove:a,onMouseUp:o}};d.addEventListener("mousedown",o=>{setTimeout(()=>{if(o.button!==0||!n)return;const a=Nm(o.target);a!==null&&(va(o),r.setAnchorCellForSelection(a));const{onMouseUp:c,onMouseMove:u}=e();r.isSelecting=!0,n.addEventListener("mouseup",c),n.addEventListener("mousemove",u)},0)});const s=o=>{o.button===0&&g.update(()=>{const a=je(),c=o.target;Xn(a)&&a.tableKey===r.tableNodeKey&&f.contains(c)&&r.clearHighlight()})};n.addEventListener("mousedown",s),r.listenersToRemove.add(()=>n.removeEventListener("mousedown",s)),r.listenersToRemove.add(g.registerCommand(_d,o=>Rl(g,o,"down",y,r),us)),r.listenersToRemove.add(g.registerCommand(vd,o=>Rl(g,o,"up",y,r),us)),r.listenersToRemove.add(g.registerCommand(Sc,o=>Rl(g,o,"backward",y,r),us)),r.listenersToRemove.add(g.registerCommand(wc,o=>Rl(g,o,"forward",y,r),us)),r.listenersToRemove.add(g.registerCommand(Cc,o=>{const a=je();if(Xn(a)){const c=_n(a.focus.getNode(),on);if(on(c))return va(o),c.selectEnd(),!0}return!1},us)),[sa,xi,lo].forEach(o=>{r.listenersToRemove.add(g.registerCommand(o,(a=>()=>{const c=je();if(!Pi(c,y))return!1;if(Xn(c))return r.clearText(),!0;if(_e(c)){const u=_n(c.anchor.getNode(),w=>on(w));if(!on(u))return!1;const h=c.anchor.getNode(),p=c.focus.getNode(),m=y.isParentOf(h),b=y.isParentOf(p);if(m&&!b||b&&!m)return r.clearText(),!0;const _=_n(c.anchor.getNode(),w=>he(w)),v=_&&_n(_,w=>he(w)&&on(w.getParent()));if(!he(v)||!he(_))return!1;if(a===xi&&v.getPreviousSibling()===null)return!0}return!1})(o),Zr))});const i=o=>{const a=je();if(!Pi(a,y)){const c=a?a.getNodes():null;if(c){const u=c.find(h=>Jn(h)&&h.getKey()===r.tableNodeKey);if(Jn(u)){const h=u.getParent();if(!h)return!1;const p=u.getNextSibling()||u.getPreviousSibling();u.remove(),p?p.selectStart():h.selectStart()}}return!0}if(Xn(a))return o.preventDefault(),o.stopPropagation(),r.clearText(),!0;if(_e(a)){const c=_n(a.anchor.getNode(),u=>on(u));if(!on(c))return!1}return!1};function l(o){const a=y.getCordsFromCellNode(o,r.table);return y.getDOMCellFromCordsOrThrow(a.x,a.y,r.table)}return r.listenersToRemove.add(g.registerCommand(fl,i,Zr)),r.listenersToRemove.add(g.registerCommand(pl,i,Zr)),r.listenersToRemove.add(g.registerCommand(Cr,o=>{const a=je();if(!Pi(a,y))return!1;if(Xn(a))return r.formatCells(o),!0;if(_e(a)){const c=_n(a.anchor.getNode(),u=>on(u));if(!on(c))return!1}return!1},Zr)),r.listenersToRemove.add(g.registerCommand(Za,o=>{const a=je();if(!Xn(a)||!Pi(a,y))return!1;const c=a.anchor.getNode(),u=a.focus.getNode();if(!on(c)||!on(u))return!1;const[h,p,m]=gs(y,c,u),b=Math.max(p.startRow,m.startRow),_=Math.max(p.startColumn,m.startColumn),v=Math.min(p.startRow,m.startRow),w=Math.min(p.startColumn,m.startColumn);for(let x=v;x<=b;x++)for(let S=w;S<=_;S++){const E=h[x][S].cell;E.setFormat(o);const k=E.getChildren();for(let D=0;D<k.length;D++){const N=k[D];he(N)&&!N.isInline()&&N.setFormat(o)}}return!0},Zr)),r.listenersToRemove.add(g.registerCommand(_i,o=>{const a=je();if(!Pi(a,y))return!1;if(Xn(a))return r.clearHighlight(),!1;if(_e(a)){const c=_n(a.anchor.getNode(),u=>on(u));if(!on(c))return!1;if(typeof o=="string"){const u=Lm(g,a,y);if(u)return Dm(u,y,[Zn(o)]),!0}}return!1},Zr)),t&&r.listenersToRemove.add(g.registerCommand(dh,o=>{const a=je();if(!_e(a)||!a.isCollapsed()||!Pi(a,y))return!1;const c=Af(a.anchor.getNode());if(c===null)return!1;va(o);const u=y.getCordsFromCellNode(c,r.table);return Im(r,y,u.x,u.y,o.shiftKey?"backward":"forward"),!0},Zr)),r.listenersToRemove.add(g.registerCommand(hh,o=>y.isSelected(),us)),r.listenersToRemove.add(g.registerCommand(ch,o=>{const{nodes:a,selection:c}=o,u=c.getStartEndPoints(),h=Xn(c),p=_e(c)&&_n(c.anchor.getNode(),P=>on(P))!==null&&_n(c.focus.getNode(),P=>on(P))!==null||h;if(a.length!==1||!Jn(a[0])||!p||u===null)return!1;const[m]=u,b=a[0],_=b.getChildren(),v=b.getFirstChildOrThrow().getChildrenSize(),w=b.getChildrenSize(),x=_n(m.getNode(),P=>on(P)),S=x&&_n(x,P=>Mr(P)),E=S&&_n(S,P=>Jn(P));if(!on(x)||!Mr(S)||!Jn(E))return!1;const k=S.getIndexWithinParent(),D=Math.min(E.getChildrenSize()-1,k+w-1),N=x.getIndexWithinParent(),O=Math.min(S.getChildrenSize()-1,N+v-1),R=Math.min(N,O),A=Math.min(k,D),z=Math.max(N,O),H=Math.max(k,D),$=E.getChildren();let M,J,K=0;for(let P=A;P<=H;P++){const U=$[P];if(!Mr(U))return!1;const V=_[K];if(!Mr(V))return!1;const G=U.getChildren(),F=V.getChildren();let q=0;for(let T=R;T<=z;T++){const I=G[T];if(!on(I))return!1;const L=F[q];if(!on(L))return!1;P===A&&T===R?M=I.getKey():P===H&&T===z&&(J=I.getKey());const B=I.getChildren();L.getChildren().forEach(Y=>{Pe(Y)&&Qn().append(Y),I.append(Y)}),B.forEach(Y=>Y.remove()),q++}K++}if(M&&J){const P=uu();P.set(a[0].getKey(),M,J),or(P)}return!0},Zr)),r.listenersToRemove.add(g.registerCommand(qo,()=>{const o=je(),a=pa();if(_e(o)){const{anchor:c,focus:u}=o,h=c.getNode(),p=u.getNode(),m=Af(h),b=Af(p),_=!(!m||!y.is(ys(m))),v=!(!b||!y.is(ys(b))),w=_!==v,x=_&&v,S=o.isBackward();if(w){const E=o.clone();if(v){const[k]=gs(y,b,b),D=k[0][0].cell,N=k[k.length-1].at(-1).cell;E.focus.set(S?D.getKey():N.getKey(),S?D.getChildrenSize():N.getChildrenSize(),"element")}else E.anchor.set(y.getParentOrThrow().getKey(),S?y.getIndexWithinParent()+1:y.getIndexWithinParent(),"element");or(E),Pm(g,r)}else x&&(m.is(b)||(r.setAnchorCellForSelection(l(m)),r.setFocusCellForSelection(l(b),!0),r.isSelecting||setTimeout(()=>{const{onMouseUp:E,onMouseMove:k}=e();r.isSelecting=!0,n.addEventListener("mouseup",E),n.addEventListener("mousemove",k)},0)))}else if(o&&Xn(o)&&o.is(a)&&o.tableKey===y.getKey()){const c=Am(g._window);if(c&&c.anchorNode&&c.focusNode){const u=yr(c.focusNode),h=u&&!y.is(ys(u)),p=yr(c.anchorNode),m=p&&y.is(ys(p));if(h&&m&&c.rangeCount>0){const b=Av(c,g);b&&(b.anchor.set(y.getKey(),o.isBackward()?y.getChildrenSize():0,"element"),c.removeAllRanges(),or(b))}}}return o&&!o.is(a)&&(Xn(o)||Xn(a))&&r.tableSelection&&!r.tableSelection.is(a)?(Xn(o)&&o.tableKey===r.tableNodeKey?r.updateTableTableSelection(o):!Xn(o)&&Xn(a)&&a.tableKey===r.tableNodeKey&&r.updateTableTableSelection(null),!1):(r.hasHijackedSelectionStyles&&!y.isSelected()?function(c,u){u.enableHighlightStyle(),Tf(u.table,h=>{const p=h.elem;h.highlighted=!1,Mm(c,h),p.getAttribute("style")||p.removeAttribute("style")})}(g,r):!r.hasHijackedSelectionStyles&&y.isSelected()&&Pm(g,r),!1)},Zr)),r.listenersToRemove.add(g.registerCommand(Ya,()=>{const o=je();if(!_e(o)||!o.isCollapsed()||!Pi(o,y))return!1;const a=Lm(g,o,y);return!!a&&(Dm(a,y),!0)},Zr)),r}function Nm(y){let d=y;for(;d!=null;){const g=d.nodeName;if(g==="TD"||g==="TH"){const t=d._cell;return t===void 0?null:t}d=d.parentNode}return null}function Il(y){const d=[],g={columns:0,domRows:d,rows:0};let t=y.firstChild,f=0,r=0;for(d.length=0;t!=null;){const n=t.nodeName;if(n==="TD"||n==="TH"){const i={elem:t,hasBackgroundColor:t.style.backgroundColor!=="",highlighted:!1,x:f,y:r};t._cell=i;let l=d[r];l===void 0&&(l=d[r]=[]),l[f]=i}else{const i=t.firstChild;if(i!=null){t=i;continue}}const e=t.nextSibling;if(e!=null){f++,t=e;continue}const s=t.parentNode;if(s!=null){const i=s.nextSibling;if(i==null)break;r++,f=0,t=i}}return g.columns=f+1,g.rows=r+1,g}function du(y,d,g){const t=new Set(g?g.getNodes():[]);Tf(d,(f,r)=>{const n=f.elem;t.has(r)?(f.highlighted=!0,Rm(y,f)):(f.highlighted=!1,Mm(y,f),n.getAttribute("style")||n.removeAttribute("style"))})}function Tf(y,d){const{domRows:g}=y;for(let t=0;t<g.length;t++){const f=g[t];if(f)for(let r=0;r<f.length;r++){const n=f[r];if(!n)continue;const e=yr(n.elem);e!==null&&d(n,e,{x:r,y:t})}}}function Pm(y,d){d.disableHighlightStyle(),Tf(d.table,g=>{g.highlighted=!0,Rm(y,g)})}const Im=(y,d,g,t,f)=>{const r=f==="forward";switch(f){case"backward":case"forward":return g!==(r?y.table.columns-1:0)?fu(d.getCellNodeFromCordsOrThrow(g+(r?1:-1),t,y.table),r):t!==(r?y.table.rows-1:0)?fu(d.getCellNodeFromCordsOrThrow(r?0:y.table.columns-1,t+(r?1:-1),y.table),r):r?d.selectNext():d.selectPrevious(),!0;case"up":return t!==0?fu(d.getCellNodeFromCordsOrThrow(g,t-1,y.table),!1):d.selectPrevious(),!0;case"down":return t!==y.table.rows-1?fu(d.getCellNodeFromCordsOrThrow(g,t+1,y.table),!0):d.selectNext(),!0;default:return!1}},J1=(y,d,g,t,f)=>{const r=f==="forward";switch(f){case"backward":case"forward":return g!==(r?y.table.columns-1:0)&&y.setFocusCellForSelection(d.getDOMCellFromCordsOrThrow(g+(r?1:-1),t,y.table)),!0;case"up":return t!==0&&(y.setFocusCellForSelection(d.getDOMCellFromCordsOrThrow(g,t-1,y.table)),!0);case"down":return t!==y.table.rows-1&&(y.setFocusCellForSelection(d.getDOMCellFromCordsOrThrow(g,t+1,y.table)),!0);default:return!1}};function Pi(y,d){if(_e(y)||Xn(y)){const g=d.isParentOf(y.anchor.getNode()),t=d.isParentOf(y.focus.getNode());return g&&t}return!1}function fu(y,d){d?y.selectStart():y.selectEnd()}const jf="172,206,247";function Rm(y,d){const g=d.elem,t=yr(g);on(t)||Pn(131),t.getBackgroundColor()===null?g.style.setProperty("background-color",`rgb(${jf})`):g.style.setProperty("background-image",`linear-gradient(to right, rgba(${jf},0.85), rgba(${jf},0.85))`),g.style.setProperty("caret-color","transparent")}function Mm(y,d){const g=d.elem,t=yr(g);on(t)||Pn(131),t.getBackgroundColor()===null&&g.style.removeProperty("background-color"),g.style.removeProperty("background-image"),g.style.removeProperty("caret-color")}function Af(y){const d=_n(y,on);return on(d)?d:null}function ys(y){const d=_n(y,Jn);return Jn(d)?d:null}function Rl(y,d,g,t,f){if((g==="up"||g==="down")&&function(n){const e=n.getRootElement();return e?e.hasAttribute("aria-controls")&&e.getAttribute("aria-controls")==="typeahead-menu":!1}(y))return!1;const r=je();if(!Pi(r,t)){if(_e(r)){if(r.isCollapsed()&&g==="backward"){const n=r.anchor.type,e=r.anchor.offset;if(n!=="element"&&(n!=="text"||e!==0))return!1;const s=r.anchor.getNode();if(!s)return!1;const i=_n(s,o=>he(o)&&!o.isInline());if(!i)return!1;const l=i.getPreviousSibling();return!(!l||!Jn(l))&&(va(d),l.selectEnd(),!0)}if(d.shiftKey&&(g==="up"||g==="down")){const n=r.anchor.getNode();if(wo(n)){const e=r.getNodes()[0];if(e){const s=_n(e,on);if(s&&t.isParentOf(s)){const i=t.getFirstDescendant(),l=t.getLastDescendant();if(!i||!l)return!1;const[o]=ms(i),[a]=ms(l),c=t.getCordsFromCellNode(o,f.table),u=t.getCordsFromCellNode(a,f.table),h=t.getDOMCellFromCordsOrThrow(c.x,c.y,f.table),p=t.getDOMCellFromCordsOrThrow(u.x,u.y,f.table);return f.setAnchorCellForSelection(h),f.setFocusCellForSelection(p,!0),!0}}return!1}{const e=_n(n,i=>he(i)&&!i.isInline());if(!e)return!1;const s=g==="down"?e.getNextSibling():e.getPreviousSibling();if(Jn(s)&&f.tableNodeKey===s.getKey()){const i=s.getFirstDescendant(),l=s.getLastDescendant();if(!i||!l)return!1;const[o]=ms(i),[a]=ms(l),c=r.clone();return c.focus.set((g==="up"?o:a).getKey(),g==="up"?0:a.getChildrenSize(),"element"),or(c),!0}}}}return!1}if(_e(r)&&r.isCollapsed()){const{anchor:n,focus:e}=r,s=_n(n.getNode(),on),i=_n(e.getNode(),on);if(!on(s)||!s.is(i))return!1;const l=ys(s);if(l!==t&&l!=null){const m=y.getElementByKey(l.getKey());if(m!=null)return f.table=Il(m),Rl(y,d,g,l,f)}if(g==="backward"||g==="forward"){const m=n.type,b=n.offset,_=n.getNode();if(!_)return!1;const v=r.getNodes();return(v.length!==1||!On(v[0]))&&!!function(w,x,S,E){return function(k,D,N){return k==="element"&&(N==="backward"?D.getPreviousSibling()===null:D.getNextSibling()===null)}(w,S,E)||function(k,D,N,O){const R=_n(N,z=>he(z)&&!z.isInline());if(!R)return!1;const A=O==="backward"?D===0:D===N.getTextContentSize();return k==="text"&&A&&(O==="backward"?R.getPreviousSibling()===null:R.getNextSibling()===null)}(w,x,S,E)}(m,b,_,g)&&function(w,x,S,E){const k=_n(x,on);if(!on(k))return!1;const[D,N]=gs(S,k,k);if(!function(R,A,z){const H=R[0][0],$=R[R.length-1][R[0].length-1],{startColumn:M,startRow:J}=A;return z==="backward"?M===H.startColumn&&J===H.startRow:M===$.startColumn&&J===$.startRow}(D,N,E))return!1;const O=function(R,A,z){const H=_n(R,M=>he(M)&&!M.isInline());if(!H)return;const $=A==="backward"?H.getPreviousSibling():H.getNextSibling();return $&&Jn($)?$:A==="backward"?z.getPreviousSibling():z.getNextSibling()}(x,E,S);return!O||Jn(O)?!1:(va(w),E==="backward"?O.selectEnd():O.selectStart(),!0)}(d,_,t,g)}const o=y.getElementByKey(s.__key),a=y.getElementByKey(n.key);if(a==null||o==null)return!1;let c;if(n.type==="element")c=a.getBoundingClientRect();else{const m=window.getSelection();if(m===null||m.rangeCount===0)return!1;c=m.getRangeAt(0).getBoundingClientRect()}const u=g==="up"?s.getFirstChild():s.getLastChild();if(u==null)return!1;const h=y.getElementByKey(u.__key);if(h==null)return!1;const p=h.getBoundingClientRect();if(g==="up"?p.top>c.top-c.height:c.bottom+c.height>p.bottom){va(d);const m=t.getCordsFromCellNode(s,f.table);if(!d.shiftKey)return Im(f,t,m.x,m.y,g);{const b=t.getDOMCellFromCordsOrThrow(m.x,m.y,f.table);f.setAnchorCellForSelection(b),f.setFocusCellForSelection(b,!0)}return!0}}else if(Xn(r)){const{anchor:n,focus:e}=r,s=_n(n.getNode(),on),i=_n(e.getNode(),on),[l]=r.getNodes(),o=y.getElementByKey(l.getKey());if(!on(s)||!on(i)||!Jn(l)||o==null)return!1;f.updateTableTableSelection(r);const a=Il(o),c=t.getCordsFromCellNode(s,a),u=t.getDOMCellFromCordsOrThrow(c.x,c.y,a);if(f.setAnchorCellForSelection(u),va(d),d.shiftKey){const h=t.getCordsFromCellNode(i,a);return J1(f,l,h.x,h.y,g)}return i.selectEnd(),!0}return!1}function va(y){y.preventDefault(),y.stopImmediatePropagation(),y.stopPropagation()}function Dm(y,d,g){const t=Qn();y==="first"?d.insertBefore(t):d.insertAfter(t),t.append(...g||[]),t.selectEnd()}function Lm(y,d,g){const t=g.getParent();if(!t)return;const f=y.getElementByKey(t.getKey());if(!f)return;const r=window.getSelection();if(!r||r.anchorNode!==f)return;const n=_n(d.anchor.getNode(),p=>on(p));if(!n)return;const e=_n(n,p=>Jn(p));if(!Jn(e)||!e.is(g))return;const[s,i]=gs(g,n,n),l=s[0][0],o=s[s.length-1][s[0].length-1],{startRow:a,startColumn:c}=i,u=a===l.startRow&&c===l.startColumn,h=a===o.startRow&&c===o.startColumn;return u?"first":h?"last":void 0}class To extends Eo{static getType(){return"table"}static clone(d){return new To(d.__key)}static importDOM(){return{table:d=>({conversion:W1,priority:1})}}static importJSON(d){return Nf()}constructor(d){super(d)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(d,g){const t=document.createElement("table");return Ai(t,d.theme.table),t}updateDOM(){return!1}exportDOM(d){return{...super.exportDOM(d),after:g=>{if(g){const t=g.cloneNode(),f=document.createElement("colgroup"),r=document.createElement("tbody");Sl(g)&&r.append(...g.children);const n=this.getFirstChildOrThrow();if(!Mr(n))throw new Error("Expected to find row node.");const e=n.getChildrenSize();for(let s=0;s<e;s++){const i=document.createElement("col");f.append(i)}return t.replaceChildren(f,r),t}}}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(d,g){const{rows:t,domRows:f}=g;for(let r=0;r<t;r++){const n=f[r];if(n==null)continue;const e=n.findIndex(s=>{if(!s)return;const{elem:i}=s;return yr(i)===d});if(e!==-1)return{x:e,y:r}}throw new Error("Cell not found in table.")}getDOMCellFromCords(d,g,t){const{domRows:f}=t,r=f[g];if(r==null)return null;const n=r[d];return n??null}getDOMCellFromCordsOrThrow(d,g,t){const f=this.getDOMCellFromCords(d,g,t);if(!f)throw new Error("Cell not found at cords.");return f}getCellNodeFromCords(d,g,t){const f=this.getDOMCellFromCords(d,g,t);if(f==null)return null;const r=yr(f.elem);return on(r)?r:null}getCellNodeFromCordsOrThrow(d,g,t){const f=this.getCellNodeFromCords(d,g,t);if(!f)throw new Error("Node at cords not TableCellNode.");return f}canSelectBefore(){return!0}canIndent(){return!1}}function W1(y){return{node:Nf()}}function Nf(){return Vo(new To)}function Jn(y){return y instanceof To}const Bm=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],Fm=Bm[Math.floor(Math.random()*Bm.length)],V1=Be.createContext({clientID:0,color:Fm[1],isCollabActive:!1,name:Fm[0],yjsDocMap:new Map});function K1(y,d){const g=Be.useContext(V1);return y!=null&&(g.name=y),d!=null&&(g.color=d),g}const G1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Be.useLayoutEffect:Be.useEffect;function Y1({onClear:y}){const[d]=Tr();return G1(()=>d.registerCommand(Sd,g=>(d.update(()=>{if(y==null){const t=Dn(),f=je(),r=Qn();t.clear(),t.append(r),f!==null&&r.select(),_e(f)&&(f.format=0)}else y()}),!0),an),[d,y]),null}function Pf(y,d){return Pf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,t){return g.__proto__=t,g},Pf(y,d)}var zm={error:null},Z1=function(y){var d,g;function t(){for(var r,n=arguments.length,e=new Array(n),s=0;s<n;s++)e[s]=arguments[s];return(r=y.call.apply(y,[this].concat(e))||this).state=zm,r.resetErrorBoundary=function(){for(var i,l=arguments.length,o=new Array(l),a=0;a<l;a++)o[a]=arguments[a];r.props.onReset==null||(i=r.props).onReset.apply(i,o),r.reset()},r}g=y,(d=t).prototype=Object.create(g.prototype),d.prototype.constructor=d,Pf(d,g),t.getDerivedStateFromError=function(r){return{error:r}};var f=t.prototype;return f.reset=function(){this.setState(zm)},f.componentDidCatch=function(r,n){var e,s;(e=(s=this.props).onError)==null||e.call(s,r,n)},f.componentDidUpdate=function(r,n){var e,s,i,l,o=this.state.error,a=this.props.resetKeys;o!==null&&n.error!==null&&((i=r.resetKeys)===void 0&&(i=[]),(l=a)===void 0&&(l=[]),i.length!==l.length||i.some(function(c,u){return!Object.is(c,l[u])}))&&((e=(s=this.props).onResetKeysChange)==null||e.call(s,r.resetKeys,a),this.reset())},f.render=function(){var r=this.state.error,n=this.props,e=n.fallbackRender,s=n.FallbackComponent,i=n.fallback;if(r!==null){var l={error:r,resetErrorBoundary:this.resetErrorBoundary};if(Yn.isValidElement(i))return i;if(typeof e=="function")return e(l);if(s)return Yn.createElement(s,l);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Yn.Component);function Q1({children:y,onError:d}){return Se.jsx(Z1,{fallback:Se.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:d,children:y})}const X1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Be.useLayoutEffect:Be.useEffect;function t_({ignoreHistoryMergeTagChange:y=!0,ignoreSelectionChange:d=!1,onChange:g}){const[t]=Tr();return X1(()=>{if(g)return t.registerUpdateListener(({editorState:f,dirtyElements:r,dirtyLeaves:n,prevEditorState:e,tags:s})=>{d&&r.size===0&&n.size===0||y&&s.has("history-merge")||e.isEmpty()||g(f,t,s)})},[t,y,d,g]),null}const bs=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,e_=bs&&"documentMode"in document?document.documentMode:null,n_=!(!bs||!("InputEvent"in window)||e_)&&"getTargetRanges"in new window.InputEvent("input"),r_=bs&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),o_=bs&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,i_=bs&&/^(?=.*Chrome).*/i.test(navigator.userAgent),a_=bs&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!i_;function Um(y,d){d.update(()=>{if(y!==null){const g=Ni(y,KeyboardEvent)?null:y.clipboardData,t=je();if(t!==null&&g!=null){y.preventDefault();const f=pm(d);f!==null&&g.setData("text/html",f),g.setData("text/plain",t.getTextContent())}}})}function s_(y){return ko(y.registerCommand(lo,d=>{const g=je();return!!_e(g)&&(g.deleteCharacter(d),!0)},an),y.registerCommand(sa,d=>{const g=je();return!!_e(g)&&(g.deleteWord(d),!0)},an),y.registerCommand(xi,d=>{const g=je();return!!_e(g)&&(g.deleteLine(d),!0)},an),y.registerCommand(_i,d=>{const g=je();if(!_e(g))return!1;if(typeof d=="string")g.insertText(d);else{const t=d.dataTransfer;if(t!=null)hm(t,g);else{const f=d.data;f&&g.insertText(f)}}return!0},an),y.registerCommand(xc,()=>{const d=je();return!!_e(d)&&(d.removeText(),!0)},an),y.registerCommand(vi,d=>{const g=je();return!!_e(g)&&(g.insertLineBreak(d),!0)},an),y.registerCommand(Ya,()=>{const d=je();return!!_e(d)&&(d.insertLineBreak(),!0)},an),y.registerCommand(Sc,d=>{const g=je();if(!_e(g))return!1;const t=d,f=t.shiftKey;return!!eu(g,!0)&&(t.preventDefault(),nu(g,f,!0),!0)},an),y.registerCommand(wc,d=>{const g=je();if(!_e(g))return!1;const t=d,f=t.shiftKey;return!!eu(g,!1)&&(t.preventDefault(),nu(g,f,!1),!0)},an),y.registerCommand(fl,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),y.dispatchCommand(lo,!0))},an),y.registerCommand(pl,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),y.dispatchCommand(lo,!1))},an),y.registerCommand(dl,d=>{const g=je();if(!_e(g))return!1;if(d!==null){if((o_||r_||a_)&&n_)return!1;d.preventDefault()}return y.dispatchCommand(vi,!1)},an),y.registerCommand(Ec,()=>(Uh(),!0),an),y.registerCommand(hl,d=>{const g=je();return!!_e(g)&&(Um(d,y),!0)},an),y.registerCommand(gl,d=>{const g=je();return!!_e(g)&&(function(t,f){Um(t,f),f.update(()=>{const r=je();_e(r)&&r.removeText()})}(d,y),!0)},an),y.registerCommand(ll,d=>{const g=je();return!!_e(g)&&(function(t,f){t.preventDefault(),f.update(()=>{const r=je(),{clipboardData:n}=t;n!=null&&_e(r)&&hm(n,r)},{tag:"paste"})}(d,y),!0)},an),y.registerCommand(xd,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),!0)},an),y.registerCommand(wd,d=>{const g=je();return!!_e(g)&&(d.preventDefault(),!0)},an))}const If=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?Be.useLayoutEffect:Be.useEffect;function $m(y){return y.getEditorState().read(sm(y.isComposing()))}function l_({contentEditable:y,placeholder:d,ErrorBoundary:g}){const[t]=Tr(),f=function(r,n){const[e,s]=Be.useState(()=>r.getDecorators());return If(()=>r.registerDecoratorListener(i=>{so.flushSync(()=>{s(i)})}),[r]),Be.useEffect(()=>{s(r.getDecorators())},[r]),Be.useMemo(()=>{const i=[],l=Object.keys(e);for(let o=0;o<l.length;o++){const a=l[o],c=Se.jsx(n,{onError:h=>r._onError(h),children:Se.jsx(Be.Suspense,{fallback:null,children:e[a]})}),u=r.getElementByKey(a);u!==null&&i.push(so.createPortal(c,u,a))}return i},[n,e,r])}(t,g);return function(r){If(()=>ko(s_(r),lm(r)),[r])}(t),Se.jsxs(Se.Fragment,{children:[y,Se.jsx(c_,{content:d}),f]})}function c_({content:y}){const[d]=Tr(),g=function(f){const[r,n]=Be.useState(()=>$m(f));return If(()=>{function e(){const s=$m(f);n(s)}return e(),ko(f.registerUpdateListener(()=>{e()}),f.registerEditableListener(()=>{e()}))},[f]),r}(d),t=om();return g?typeof y=="function"?y(t):y:null}var u_={967:(y,d,g)=>{const t=["docId","username","apiKey","domain","hooks","editorInstanceHooks","appServer","demo"];function f(c,u){var h=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(c,m).enumerable})),h.push.apply(h,p)}return h}function r(c){for(var u=1;u<arguments.length;u++){var h=arguments[u]!=null?arguments[u]:{};u%2?f(Object(h),!0).forEach(function(p){n(c,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(h)):f(Object(h)).forEach(function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(h,p))})}return c}function n(c,u,h){return(u=function(p){var m=function(b,_){if(typeof b!="object"||!b)return b;var v=b[Symbol.toPrimitive];if(v!==void 0){var w=v.call(b,"string");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(b)}(p);return typeof m=="symbol"?m:m+""}(u))in c?Object.defineProperty(c,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):c[u]=h,c}let e;e=g(668);let s=null;d.conf=function(c){c.autoStart=!1,s&&s.init(c)};const i=async function(c){if(s)return s.start(c)};d.start=i;const l=function(c){s&&(s.stop(),s=null)};d.stop=l;const o=function(c,u){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(s)return s.diff({state1:c,state2:u,config:h})};d.diff=o;const a=function(){if(s)return s.sync(...arguments)};d.sync=a,d.initSync=function(c){return s?s.initSync(c):c},y.exports={start:i,sync:a,diff:o,stop:l,createConfig:c=>{let{docId:u,username:h,apiKey:p,domain:m,hooks:b,editorInstanceHooks:_,appServer:v={},demo:w=!1}=c;return r(r({},function(x,S){if(x==null)return{};var E,k,D=function(O,R){if(O==null)return{};var A={};for(var z in O)if({}.hasOwnProperty.call(O,z)){if(R.indexOf(z)>=0)continue;A[z]=O[z]}return A}(x,S);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(x);for(k=0;k<N.length;k++)E=N[k],S.indexOf(E)>=0||{}.propertyIsEnumerable.call(x,E)&&(D[E]=x[E])}return D}(c,t)),{},{docId:u,username:h,apiKey:p,autoStart:!0,demo:w,domain:m,hooks:b,editorInstance:r({type:"lexical"},_),app:"json",json:{keyNames:{default:"codoxId"},filters:{version:!0},appServer:v,semantics:{paths:{"state.root.children.children.text":"MERGE","state.root.children.children.children.text":"MERGE"},string:"MERGE"}}})},get instance(){return s},createNewInstance:()=>{s=new e}}},668:(y,d,g)=>{y.exports=function t(f,r,n){function e(l,o){if(!r[l]){if(!f[l]){var a=void 0;if(!o&&a)return require(l,!0);if(s)return s(l,!0);throw(o=new Error("Cannot find module '"+l+"'")).code="MODULE_NOT_FOUND",o}a=r[l]={exports:{}},f[l][0].call(a.exports,function(c){return e(f[l][1][c]||c)},a,a.exports,t,f,r,n)}return r[l].exports}for(var s=void 0,i=0;i<n.length;i++)e(n[i]);return e}({1:[function(t,f,r){f.exports=function(n,e){(e==null||e>n.length)&&(e=n.length);for(var s=0,i=new Array(e);s<e;s++)i[s]=n[s];return i},f.exports.__esModule=!0,f.exports.default=f.exports},{}],2:[function(t,f,r){f.exports=function(n){if(Array.isArray(n))return n},f.exports.__esModule=!0,f.exports.default=f.exports},{}],3:[function(t,f,r){var n=t("./arrayLikeToArray.js");f.exports=function(e){if(Array.isArray(e))return n(e)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./arrayLikeToArray.js":1}],4:[function(t,f,r){f.exports=function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n},f.exports.__esModule=!0,f.exports.default=f.exports},{}],5:[function(t,f,r){f.exports=function(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")},f.exports.__esModule=!0,f.exports.default=f.exports},{}],6:[function(t,f,r){var n=t("./setPrototypeOf.js"),e=t("./isNativeReflectConstruct.js");function s(i,l,o){return e()?f.exports=s=Reflect.construct.bind():f.exports=s=function(a,c,u){var h=[null];return h.push.apply(h,c),c=new(Function.bind.apply(a,h)),u&&n(c,u.prototype),c},f.exports.__esModule=!0,f.exports.default=f.exports,s.apply(null,arguments)}f.exports=s,f.exports.__esModule=!0,f.exports.default=f.exports},{"./isNativeReflectConstruct.js":13,"./setPrototypeOf.js":19}],7:[function(t,f,r){function n(e,s){for(var i=0;i<s.length;i++){var l=s[i];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}f.exports=function(e,s,i){return s&&n(e.prototype,s),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},f.exports.__esModule=!0,f.exports.default=f.exports},{}],8:[function(t,f,r){f.exports=function(n,e,s){return e in n?Object.defineProperty(n,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[e]=s,n},f.exports.__esModule=!0,f.exports.default=f.exports},{}],9:[function(t,f,r){function n(e){return f.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},f.exports.__esModule=!0,f.exports.default=f.exports,n(e)}f.exports=n,f.exports.__esModule=!0,f.exports.default=f.exports},{}],10:[function(t,f,r){var n=t("./setPrototypeOf.js");f.exports=function(e,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(s&&s.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),s&&n(e,s)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./setPrototypeOf.js":19}],11:[function(t,f,r){f.exports=function(n){return n&&n.__esModule?n:{default:n}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],12:[function(t,f,r){f.exports=function(n){return Function.toString.call(n).indexOf("[native code]")!==-1},f.exports.__esModule=!0,f.exports.default=f.exports},{}],13:[function(t,f,r){f.exports=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],14:[function(t,f,r){f.exports=function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)},f.exports.__esModule=!0,f.exports.default=f.exports},{}],15:[function(t,f,r){f.exports=function(n,e){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var i,l,o=[],a=!0,c=!1;try{for(s=s.call(n);!(a=(i=s.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(u){c=!0,l=u}finally{try{a||s.return==null||s.return()}finally{if(c)throw l}}return o}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],16:[function(t,f,r){f.exports=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
43
43
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},f.exports.__esModule=!0,f.exports.default=f.exports},{}],17:[function(t,f,r){f.exports=function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
44
44
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},f.exports.__esModule=!0,f.exports.default=f.exports},{}],18:[function(t,f,r){var n=t("./typeof.js").default,e=t("./assertThisInitialized.js");f.exports=function(s,i){if(i&&(n(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e(s)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./assertThisInitialized.js":4,"./typeof.js":22}],19:[function(t,f,r){function n(e,s){return f.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},f.exports.__esModule=!0,f.exports.default=f.exports,n(e,s)}f.exports=n,f.exports.__esModule=!0,f.exports.default=f.exports},{}],20:[function(t,f,r){var n=t("./arrayWithHoles.js"),e=t("./iterableToArrayLimit.js"),s=t("./unsupportedIterableToArray.js"),i=t("./nonIterableRest.js");f.exports=function(l,o){return n(l)||e(l,o)||s(l,o)||i()},f.exports.__esModule=!0,f.exports.default=f.exports},{"./arrayWithHoles.js":2,"./iterableToArrayLimit.js":15,"./nonIterableRest.js":16,"./unsupportedIterableToArray.js":23}],21:[function(t,f,r){var n=t("./arrayWithoutHoles.js"),e=t("./iterableToArray.js"),s=t("./unsupportedIterableToArray.js"),i=t("./nonIterableSpread.js");f.exports=function(l){return n(l)||e(l)||s(l)||i()},f.exports.__esModule=!0,f.exports.default=f.exports},{"./arrayWithoutHoles.js":3,"./iterableToArray.js":14,"./nonIterableSpread.js":17,"./unsupportedIterableToArray.js":23}],22:[function(t,f,r){function n(e){return f.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},f.exports.__esModule=!0,f.exports.default=f.exports,n(e)}f.exports=n,f.exports.__esModule=!0,f.exports.default=f.exports},{}],23:[function(t,f,r){var n=t("./arrayLikeToArray.js");f.exports=function(e,s){if(e){if(typeof e=="string")return n(e,s);var i=Object.prototype.toString.call(e).slice(8,-1);return(i=i==="Object"&&e.constructor?e.constructor.name:i)==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,s):void 0}},f.exports.__esModule=!0,f.exports.default=f.exports},{"./arrayLikeToArray.js":1}],24:[function(t,f,r){var n=t("./getPrototypeOf.js"),e=t("./setPrototypeOf.js"),s=t("./isNativeFunction.js"),i=t("./construct.js");function l(o){var a=typeof Map=="function"?new Map:void 0;return f.exports=l=function(c){if(c===null||!s(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(c))return a.get(c);a.set(c,u)}function u(){return i(c,arguments,n(this).constructor)}return u.prototype=Object.create(c.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),e(u,c)},f.exports.__esModule=!0,f.exports.default=f.exports,l(o)}f.exports=l,f.exports.__esModule=!0,f.exports.default=f.exports},{"./construct.js":6,"./getPrototypeOf.js":9,"./isNativeFunction.js":12,"./setPrototypeOf.js":19}],25:[function(t,f,r){f.exports=function n(e,s){if(e===s)return!0;if(e&&s&&typeof e=="object"&&typeof s=="object"){if(e.constructor!==s.constructor)return!1;var i,l,o;if(Array.isArray(e)){if((i=e.length)!=s.length)return!1;for(l=i;l--!=0;)if(!n(e[l],s[l]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((i=(o=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(l=i;l--!=0;)if(!Object.prototype.hasOwnProperty.call(s,o[l]))return!1;for(l=i;l--!=0;){var a=o[l];if(!n(e[a],s[a]))return!1}return!0}return e!=e&&s!=s}},{}],26:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return u.default}});var n=h(t("./v1.js")),e=h(t("./v3.js")),s=h(t("./v4.js")),i=h(t("./v5.js")),l=h(t("./nil.js")),o=h(t("./version.js")),a=h(t("./validate.js")),c=h(t("./stringify.js")),u=h(t("./parse.js"));function h(p){return p&&p.__esModule?p:{default:p}}},{"./nil.js":28,"./parse.js":29,"./stringify.js":33,"./v1.js":34,"./v3.js":35,"./v4.js":37,"./v5.js":38,"./validate.js":39,"./version.js":40}],27:[function(t,f,r){function n(c){return 14+(c+64>>>9<<4)+1}function e(c,u){var h=(65535&c)+(65535&u);return(c>>16)+(u>>16)+(h>>16)<<16|65535&h}function s(c,u,h,p,m,b){return e((u=e(e(u,c),e(p,b)))<<m|u>>>32-m,h)}function i(c,u,h,p,m,b,_){return s(u&h|~u&p,c,u,m,b,_)}function l(c,u,h,p,m,b,_){return s(u&p|h&~p,c,u,m,b,_)}function o(c,u,h,p,m,b,_){return s(u^h^p,c,u,m,b,_)}function a(c,u,h,p,m,b,_){return s(h^(u|~p),c,u,m,b,_)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(c){if(typeof c=="string"){const p=unescape(encodeURIComponent(c));c=new Uint8Array(p.length);for(let m=0;m<p.length;++m)c[m]=p.charCodeAt(m)}{var u=function(_,v){_[v>>5]|=128<<v%32,_[n(v)-1]=v;let w=1732584193,x=-271733879,S=-1732584194,E=271733878;for(let R=0;R<_.length;R+=16){var k=w,D=x,N=S,O=E;w=i(w,x,S,E,_[R],7,-680876936),E=i(E,w,x,S,_[R+1],12,-389564586),S=i(S,E,w,x,_[R+2],17,606105819),x=i(x,S,E,w,_[R+3],22,-1044525330),w=i(w,x,S,E,_[R+4],7,-176418897),E=i(E,w,x,S,_[R+5],12,1200080426),S=i(S,E,w,x,_[R+6],17,-1473231341),x=i(x,S,E,w,_[R+7],22,-45705983),w=i(w,x,S,E,_[R+8],7,1770035416),E=i(E,w,x,S,_[R+9],12,-1958414417),S=i(S,E,w,x,_[R+10],17,-42063),x=i(x,S,E,w,_[R+11],22,-1990404162),w=i(w,x,S,E,_[R+12],7,1804603682),E=i(E,w,x,S,_[R+13],12,-40341101),S=i(S,E,w,x,_[R+14],17,-1502002290),x=i(x,S,E,w,_[R+15],22,1236535329),w=l(w,x,S,E,_[R+1],5,-165796510),E=l(E,w,x,S,_[R+6],9,-1069501632),S=l(S,E,w,x,_[R+11],14,643717713),x=l(x,S,E,w,_[R],20,-373897302),w=l(w,x,S,E,_[R+5],5,-701558691),E=l(E,w,x,S,_[R+10],9,38016083),S=l(S,E,w,x,_[R+15],14,-660478335),x=l(x,S,E,w,_[R+4],20,-405537848),w=l(w,x,S,E,_[R+9],5,568446438),E=l(E,w,x,S,_[R+14],9,-1019803690),S=l(S,E,w,x,_[R+3],14,-187363961),x=l(x,S,E,w,_[R+8],20,1163531501),w=l(w,x,S,E,_[R+13],5,-1444681467),E=l(E,w,x,S,_[R+2],9,-51403784),S=l(S,E,w,x,_[R+7],14,1735328473),x=l(x,S,E,w,_[R+12],20,-1926607734),w=o(w,x,S,E,_[R+5],4,-378558),E=o(E,w,x,S,_[R+8],11,-2022574463),S=o(S,E,w,x,_[R+11],16,1839030562),x=o(x,S,E,w,_[R+14],23,-35309556),w=o(w,x,S,E,_[R+1],4,-1530992060),E=o(E,w,x,S,_[R+4],11,1272893353),S=o(S,E,w,x,_[R+7],16,-155497632),x=o(x,S,E,w,_[R+10],23,-1094730640),w=o(w,x,S,E,_[R+13],4,681279174),E=o(E,w,x,S,_[R],11,-358537222),S=o(S,E,w,x,_[R+3],16,-722521979),x=o(x,S,E,w,_[R+6],23,76029189),w=o(w,x,S,E,_[R+9],4,-640364487),E=o(E,w,x,S,_[R+12],11,-421815835),S=o(S,E,w,x,_[R+15],16,530742520),x=o(x,S,E,w,_[R+2],23,-995338651),w=a(w,x,S,E,_[R],6,-198630844),E=a(E,w,x,S,_[R+7],10,1126891415),S=a(S,E,w,x,_[R+14],15,-1416354905),x=a(x,S,E,w,_[R+5],21,-57434055),w=a(w,x,S,E,_[R+12],6,1700485571),E=a(E,w,x,S,_[R+3],10,-1894986606),S=a(S,E,w,x,_[R+10],15,-1051523),x=a(x,S,E,w,_[R+1],21,-2054922799),w=a(w,x,S,E,_[R+8],6,1873313359),E=a(E,w,x,S,_[R+15],10,-30611744),S=a(S,E,w,x,_[R+6],15,-1560198380),x=a(x,S,E,w,_[R+13],21,1309151649),w=a(w,x,S,E,_[R+4],6,-145523070),E=a(E,w,x,S,_[R+11],10,-1120210379),S=a(S,E,w,x,_[R+2],15,718787259),x=a(x,S,E,w,_[R+9],21,-343485551),w=e(w,k),x=e(x,D),S=e(S,N),E=e(E,O)}return[w,x,S,E]}(function(_){if(_.length===0)return[];const v=8*_.length,w=new Uint32Array(n(v));for(let x=0;x<v;x+=8)w[x>>5]|=(255&_[x/8])<<x%32;return w}(c),8*c.length);const p=[],m=32*u.length,b="0123456789abcdef";for(let _=0;_<m;_+=8){var h=u[_>>5]>>>_%32&255;h=parseInt(b.charAt(h>>>4&15)+b.charAt(15&h),16),p.push(h)}return p}}},{}],28:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default="00000000-0000-0000-0000-000000000000"},{}],29:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(t=t("./validate.js"))&&t.__esModule?t:{default:t};r.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");var s;const i=new Uint8Array(16);return i[0]=(s=parseInt(e.slice(0,8),16))>>>24,i[1]=s>>>16&255,i[2]=s>>>8&255,i[3]=255&s,i[4]=(s=parseInt(e.slice(9,13),16))>>>8,i[5]=255&s,i[6]=(s=parseInt(e.slice(14,18),16))>>>8,i[7]=255&s,i[8]=(s=parseInt(e.slice(19,23),16))>>>8,i[9]=255&s,i[10]=(s=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=s/4294967296&255,i[12]=s>>>24&255,i[13]=s>>>16&255,i[14]=s>>>8&255,i[15]=255&s,i}},{"./validate.js":39}],30:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],31:[function(t,f,r){let n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){if(!n&&!(n=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(e)};const e=new Uint8Array(16)},{}],32:[function(t,f,r){function n(e,s){return e<<s|e>>>32-s}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(e){var s=[1518500249,1859775393,2400959708,3395469782];const i=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){const u=unescape(encodeURIComponent(e));e=[];for(let h=0;h<u.length;++h)e.push(u.charCodeAt(h))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);var l=e.length/4+2,o=Math.ceil(l/16);const a=new Array(o);for(let u=0;u<o;++u){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=e[64*u+4*p]<<24|e[64*u+4*p+1]<<16|e[64*u+4*p+2]<<8|e[64*u+4*p+3];a[u]=h}a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295;for(let u=0;u<o;++u){const h=new Uint32Array(80);for(let w=0;w<16;++w)h[w]=a[u][w];for(let w=16;w<80;++w)h[w]=n(h[w-3]^h[w-8]^h[w-14]^h[w-16],1);let p=i[0],m=i[1],b=i[2],_=i[3],v=i[4];for(let w=0;w<80;++w){var c=Math.floor(w/20);c=n(p,5)+function(x,S,E,k){switch(x){case 0:return S&E^~S&k;case 1:case 3:return S^E^k;case 2:return S&E^S&k^E&k}}(c,m,b,_)+v+s[c]+h[w]>>>0,v=_,_=b,b=n(m,30)>>>0,m=p,p=c}i[0]=i[0]+p>>>0,i[1]=i[1]+m>>>0,i[2]=i[2]+b>>>0,i[3]=i[3]+_>>>0,i[4]=i[4]+v>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},{}],33:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(t=t("./validate.js"))&&t.__esModule?t:{default:t};const e=[];for(let s=0;s<256;++s)e.push((s+256).toString(16).substr(1));r.default=function(s){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(s=(e[s[i+0]]+e[s[i+1]]+e[s[i+2]]+e[s[i+3]]+"-"+e[s[i+4]]+e[s[i+5]]+"-"+e[s[i+6]]+e[s[i+7]]+"-"+e[s[i+8]]+e[s[i+9]]+"-"+e[s[i+10]]+e[s[i+11]]+e[s[i+12]]+e[s[i+13]]+e[s[i+14]]+e[s[i+15]]).toLowerCase(),(0,n.default)(s))return s;throw TypeError("Stringified UUID is invalid")}},{"./validate.js":39}],34:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(t("./rng.js")),e=s(t("./stringify.js"));function s(c){return c&&c.__esModule?c:{default:c}}let i,l,o=0,a=0;r.default=function(c,u,h){var p=u&&h||0;const m=u||new Array(16);let b=(c=c||{}).node||i,_=c.clockseq!==void 0?c.clockseq:l,v=(b!=null&&_!=null||(h=c.random||(c.rng||n.default)(),b==null&&(b=i=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),_==null&&(_=l=16383&(h[6]<<8|h[7]))),c.msecs!==void 0?c.msecs:Date.now()),w=c.nsecs!==void 0?c.nsecs:a+1;if((h=v-o+(w-a)/1e4)<0&&c.clockseq===void 0&&(_=_+1&16383),1e4<=(w=(h<0||v>o)&&c.nsecs===void 0?0:w))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=v,a=w,l=_,h=(1e4*(268435455&(v+=122192928e5))+w)%4294967296,m[p++]=h>>>24&255,m[p++]=h>>>16&255,m[p++]=h>>>8&255,m[p++]=255&h,c=v/4294967296*1e4&268435455,m[p++]=c>>>8&255,m[p++]=255&c,m[p++]=c>>>24&15|16,m[p++]=c>>>16&255,m[p++]=_>>>8|128,m[p++]=255&_;for(let x=0;x<6;++x)m[p+x]=b[x];return u||(0,e.default)(m)}},{"./rng.js":31,"./stringify.js":33}],35:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e(t("./v35.js"));function e(s){return s&&s.__esModule?s:{default:s}}t=e(t("./md5.js")),n=(0,n.default)("v3",48,t.default),r.default=n},{"./md5.js":27,"./v35.js":36}],36:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(o,a,c){function u(h,p,m,b){if(typeof h=="string"&&(h=function(v){v=unescape(encodeURIComponent(v));const w=[];for(let x=0;x<v.length;++x)w.push(v.charCodeAt(x));return w}(h)),(p=typeof p=="string"?(0,e.default)(p):p).length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let _=new Uint8Array(16+h.length);if(_.set(p),_.set(h,p.length),(_=c(_))[6]=15&_[6]|a,_[8]=63&_[8]|128,m){b=b||0;for(let v=0;v<16;++v)m[b+v]=_[v];return m}return(0,n.default)(_)}try{u.name=o}catch{}return u.DNS=i,u.URL=l,u},r.URL=r.DNS=void 0;var n=s(t("./stringify.js")),e=s(t("./parse.js"));function s(o){return o&&o.__esModule?o:{default:o}}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8",l=(r.DNS=i,"6ba7b811-9dad-11d1-80b4-00c04fd430c8");r.URL=l},{"./parse.js":29,"./stringify.js":33}],37:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(t("./rng.js")),e=s(t("./stringify.js"));function s(i){return i&&i.__esModule?i:{default:i}}r.default=function(i,l,o){const a=(i=i||{}).random||(i.rng||n.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,l){o=o||0;for(let c=0;c<16;++c)l[o+c]=a[c];return l}return(0,e.default)(a)}},{"./rng.js":31,"./stringify.js":33}],38:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e(t("./v35.js"));function e(s){return s&&s.__esModule?s:{default:s}}t=e(t("./sha1.js")),n=(0,n.default)("v5",80,t.default),r.default=n},{"./sha1.js":32,"./v35.js":36}],39:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(t=t("./regex.js"))&&t.__esModule?t:{default:t};r.default=function(e){return typeof e=="string"&&n.default.test(e)}},{"./regex.js":30}],40:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(t=t("./validate.js"))&&t.__esModule?t:{default:t};r.default=function(e){if((0,n.default)(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")}},{"./validate.js":39}],41:[function(t,f,r){var n=(s=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/toConsumableArray")),e=s(t("@babel/runtime/helpers/classCallCheck")),s=s(t("@babel/runtime/helpers/createClass")),i=t("./logger").log4,l=(b=t("./type")).isRealObject,o=b.isObjectId,a=b.isDefined,c=b.isPrimitiveArray,u=b.getType,h=t("./utils"),p=t("./path").samePath,m=t("./errors").OperationError,b=((0,s.default)(_,[{key:"isMatchingObjects",value:function(v,w,x){return w=(v=this._utils.getObjectIdentifiers({input:v,output:w,path:x})).inputId,x=v.outputId,v=v.sameId,o(w)&&o(x)&&v}},{key:"haveObjectIds",value:function(v,w,x){return!!(v.li&&w.ld||v.ld&&w.li)&&(!!(Array.isArray(v.ld)&&Array.isArray(w.li)||Array.isArray(w.ld)&&Array.isArray(v.li))||(v=this._utils.getOpTargetObject(v),w=this._utils.getOpTargetObject(w),w=(v=this._utils.getObjectIdentifiers({input:v,output:w,path:x})).inputId,x=v.outputId,v.sameId,o(w)&&o(x)))}},{key:"isMatchingOpPair",value:function(v,w,x){return!!((v.li&&w.ld||v.ld&&w.li)&&(Array.isArray(v.ld)&&Array.isArray(w.li)&&this.sameTargetArray(v.ld,w.li)||Array.isArray(w.ld)&&Array.isArray(v.li)&&this.sameTargetArray(w.ld,v.li)||this.isMatchingObjects(this._utils.getOpTargetObject(v),this._utils.getOpTargetObject(w),x)))}},{key:"isObjReplace",value:function(v,w){return!(!v||!w||v.oi!=null||v.od===void 0||w.od!=null||w.oi===void 0||!p(v.p,w.p))}},{key:"isReplace",value:function(v,w){var x,S=["list","code","table"];return!(!v||!w||!((v.li&&w.ld||v.ld&&w.li)&&p(v.p,w.p)&&this.haveObjectIds(v,w,v.p))||(x=(v.ld!==void 0?v:w).ld,v=(v.li!==void 0?v:w).li,x.type=="paragraph"&&x.children!==void 0&&x.children.length==0&&v.type=="paragraph"&&v.children!==void 0&&0<v.children.length||!S.includes(x.type)&&S.includes(v.type)||S.includes(x.type)&&!S.includes(v.type)))}},{key:"isMove",value:function(v,w){return!(!v||!w||p(v.p,w.p)||!this.isMatchingOpPair(v,w,v.p))}},{key:"isIdentity",value:function(v,w){return i("isIdentity",v,w,!0),!(!v||!w)&&p(v.p,w.p)&&this.isMatchingOpPair(v,w,v.p)}},{key:"arrayDiff",value:function(v,w){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:[],S=3<arguments.length?arguments[3]:void 0;if(i("Start performing arrayDiff: beforeState = ",v,!0),i("Start performing arrayDiff: afterState",w,!0),!Array.isArray(v))throw new m("beforeState snapshot is not an array");if(!Array.isArray(w))throw new m("afterState snapshot is not an array");var E=[],k=0,D=0,N=0,O=0;for(k=0,D=0;D<w.length&&k<v.length;k++){i("arrayDiff: loop at",{i:k,j:D},!0);var R,A=v[k],z=k-N;z=[].concat((0,n.default)(x),[z]),this.isMatchingObjects(v[k],w[D],x)?(R=S(A,w[D],z),i("arrayDiff: same target object (id) -> recursively diff result = ",{r:R},!0),E=E.concat(R),D++):(R={p:z,ld:this._utils.deLabel(A)},E.push(R),i("arrayDiff: different target object (id) -> create a ld op = ",{op:R,i:k,dCount:++N},!0))}for(var H=k;H<v.length;H++){var $=v[H],M=H-N;M={p:[].concat((0,n.default)(x),[M]),ld:deLabel($)},E.push(M),i("arrayDiff: handle beforeState tail, create a ld op",{op:M,pos:H},!0),N++}for(var J=D;J<w.length;J++){var K=w[J],P=J;P={p:[].concat((0,n.default)(x),[P]),li:deLabel(K)},E.push(P),i("arrayDiff: handle afterState tail, create a li op",{op:P,pos:J},!0),O++}return{ops:E,dCount:N,iCount:O}}},{key:"arrayOfArrayDiff",value:function(){var v,w,x=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},S=x.before,E=x.after,k=x.path,D=x.commonHeaderLen,N=x.diff,O=x.isObjectArray,R=x.isInternal,A=[],z=0,H=0,$=0;for(z=0,H=0;H<E.length&&z<S.length;z++)!O&&(this.sameTargetArray(S[z],E[H])||c(S[z])&&c(E[H])||u(S[z])=="array"&&u(E[H]=="array"))||O&&this.isMatchingObjects(S[z],E[H],k)?(i(`
|
|
45
45
|
arrayOfArrayDiff: the same array -> recursive invocation of diff: i = `+z+"; j = "+H),i("before[i] = ",S[z]),i("after[j] = ",E[H]),v=N(S[z],E[H],[].concat((0,n.default)(k),[z+D-$]),R),A=A.concat(v),i("arrayOfArrayDiff: the same array -> recursively generate r = ",v),i("arrayOfArrayDiff: the same array -> ops = ",A),H++):(v=z-$+D,w={p:[].concat((0,n.default)(k),[v]),ld:S[z]},A.push(w),i(`
|
|
@@ -57,7 +57,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
57
57
|
|
|
58
58
|
`),"\x1B[0m"]}var e,s=(i=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/toConsumableArray")),i=i(t("@babel/runtime/helpers/defineProperty")),l=((a=t("../diffSpec")).defaultKeyNameValue,a.semantics),o=t("../errors").ConfigError,a={invalid_config:"invalid_config",invalid_config_filters:"invalid_config_filters",invalid_config_key_names_type:"invalid_config_key_names_type",invalid_config_semantics_type:"invalid_config_semantics_type",invalid_config_spec_value_shape:"invalid_config_spec_value_shape",invalid_config_spec_semantics:"invalid_config_spec_semantics",invalid_config_spec_paths_format:"invalid_config_spec_paths_format",invalid_array_structure:"invalid_array_structure",keys_in_list_missing:"keys_in_list_missing",object_key_missing:"object_key_missing",invalid_key_type:"invalid_key_type",no_mix_objects_arrays_in_array:"no_mix_objects_arrays_in_array",no_functions:"no_functions",multi_keys_in_object:"multi_keys_in_object",key_names_missing_in_object:"key_names_missing_in_object",bigint_not_supported:"bigint_not_supported",unique_key_from_list_for_array_objects:"unique_key_from_list_for_array_objects",no_prototypes_allowed:"no_prototypes_allowed"},c=(t={invalid_spec_boolean_semantics:"invalid_spec_boolean_semantics",json_warn:"json_warn",invalid_top_level_spec_name:"invalid_top_level_spec_name",warn_for_paths_type_defs:"warn_for_paths_type_defs",warn_for_not_applied_type_defs:"warn_for_not_applied_type_defs",key_names_missing:"key_names_missing",not_same_data_types:"not_same_data_types",missing_keynames_path:"missing_keynames_path"},(0,i.default)(e={},a.invalid_config,function(){return"Config must be an object"}),(0,i.default)(e,a.invalid_config_filters,function(){return"Config 'filters' must be an object with key-values pairs and values set to 'true'"}),(0,i.default)(e,a.invalid_config_key_names_type,function(){return"Config 'keyNames' invalid property: must be object {default?: String, overrides?: {'[path]': String}}"}),(0,i.default)(e,a.invalid_config_semantics_type,function(){return"Config 'semantics' property must be an object, if specified"}),(0,i.default)(e,a.invalid_config_spec_value_shape,function(){return"Config 'semantics' values must be strings"}),(0,i.default)(e,a.invalid_config_spec_semantics,function(){return'Semantics must be either "'.concat(l.MERGE,'" or "').concat(l.REPLACE,'"')}),(0,i.default)(e,a.invalid_config_spec_paths_format,function(){return"'paths' must be object, if specified"}),(0,i.default)(e,a.invalid_array_structure,function(h){return"no mixing of primitives and objects in arrays: ".concat(JSON.stringify(h))}),(0,i.default)(e,a.object_key_missing,function(h,p){return"All objects in ".concat(JSON.stringify(p)," must have same identifier keys from '").concat(JSON.stringify(h),"' key names")}),(0,i.default)(e,a.invalid_key_type,function(h){return"invalid key type (only non-empty string or number allowed) for object ".concat(JSON.stringify(h)," ")}),(0,i.default)(e,a.no_mix_objects_arrays_in_array,function(h){return"no mixing of objects and arrays allowed inside array: ".concat(JSON.stringify(h))}),(0,i.default)(e,a.no_functions,function(h){return h?"no functions allowed in data model. Function ".concat(h," detected"):"no functions allowed in data model"}),(0,i.default)(e,a.multi_keys_in_object,function(h){for(var p=arguments.length,m=new Array(1<p?p-1:0),b=1;b<p;b++)m[b-1]=arguments[b];return"multiple key values ".concat(JSON.stringify(m)," found found in ").concat(JSON.stringify(h),".")}),(0,i.default)(e,a.key_names_missing_in_object,function(h){for(var p=arguments.length,m=new Array(1<p?p-1:0),b=1;b<p;b++)m[b-1]=arguments[b];return"The object does not have a valid key from ".concat(JSON.stringify(m)," field: ").concat(JSON.stringify(h),`
|
|
59
59
|
.`)}),(0,i.default)(e,a.keys_in_list_missing,function(){return"keyNames array must contain at least one element"}),(0,i.default)(e,a.bigint_not_supported,function(){return"BitInt data type is detected. It is not supported yet"}),(0,i.default)(e,a.unique_key_from_list_for_array_objects,function(h,p){return'one unique key from "'.concat(JSON.stringify(p),'" must be present in all objects in array ').concat(JSON.stringify(h))}),(0,i.default)(e,a.no_prototypes_allowed,function(){return"Instances of classes and function constructors are not allowed"}),e),u=((0,i.default)(e={},t.key_names_missing,function(){return n("Not all objects of array contain identifiers. Array total replacement will be applied.")}),(0,i.default)(e,t.invalid_top_level_spec_name,function(){return n("Unrecognized type detected and will be ignored. Allowed types are: 'string','boolean', 'number', 'paths'")}),(0,i.default)(e,t.invalid_spec_boolean_semantics,function(){return n('Default "'.concat(l.REPLACE,'" semantics will be applied to booleans'))}),(0,i.default)(e,t.warn_for_paths_type_defs,function(){return n("'type' found in spec paths - 'type' will be applied only for string 'MUTATION' semantics and only if 'type' is 'TEXT' or 'RICHTEXT'")}),(0,i.default)(e,t.warn_for_not_applied_type_defs,function(){return n("spec 'type' found for '".concat(l.REPLACE,"' semantics and will be omitted. 'type' definition might be applied only to 'MUTATION' semantics."))}),(0,i.default)(e,t.json_warn,function(h){return n("".concat(h,`
|
|
60
|
-
json will treated as string`))}),(0,i.default)(e,t.not_same_data_types,function(h,p){return n('Different data types detected for "'.concat(JSON.stringify(h),'" and "').concat(JSON.stringify(p),'". Replacement will be applied'))}),e);f.exports={throwValidationError:function(h){for(var p=arguments.length,m=new Array(1<p?p-1:0),b=1;b<p;b++)m[b-1]=arguments[b];throw new o(c[h]?c[h].apply(c,m):"unhandled error")},outputWarnMessage:function(h){if(u[h]){for(var p,m=arguments.length,b=new Array(1<m?m-1:0),_=1;_<m;_++)b[_-1]=arguments[_];return h=u[h].apply(u,b),Array.isArray(h)?(p=console).warn.apply(p,(0,s.default)(h)):console.warn(h)}},VALIDATION_ERRORS_TYPES:a,VALIDATION_WARN_TYPES:t,validationErrorsMsgFactory:c,validationWarnMsgFactory:u}},{"../diffSpec":45,"../errors":46,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/toConsumableArray":21}],58:[function(t,f,r){t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/toConsumableArray"));var n,e=((n=t("../../codox-shared/src/com/log")).ins,n.stringify);(n=t("../../codox-shared/src/com/util")).clone,n.logClone,f.exports=function(s,i,l,o){function a(u,h){l(u),l(h);for(var p,m=[],b=0;b<h.length;b++){for(var _=h[b],v=[],w=0;w<u.length;){var x=[],S=u[w],E=x;if(i(v,S,p=_,0),i(E,p,S,1),w++,x.length!==1){if(x.length===0){for(var k=w;k<u.length;k++)o(v,u[k]);_=null;break}for(var D=a(u.slice(w),x),N=0;N<D[0].length;N++)o(v,D[0][N]);for(var O=0;O<D[1].length;O++)o(m,D[1][O]);_=null;break}_=x[0]}_!=null&&o(m,_),u=v}return[u,m]}function c(u,h,p){if(e(u),e(h),p!==0&&p!==1)throw new Error("Type needs to be '0' or '1'. Got '".concat(p,"' "));return h.length===0?u:u.length===1&&h.length===1?i([],u[0],h[0],p):p===0?a(u,h)[0]:p=a(h,u)[1]}s.transform=c,s.lTransform=function(u,h,p){if(h.length===0)return u;for(var m=0;m<h.length;m++){var b;if((b=c([u],[b=h[m]],p)).length==0){u=null;break}u=b[0]}return u}}},{"../../codox-shared/src/com/log":218,"../../codox-shared/src/com/util":219,"@babel/runtime/helpers/interopRequireDefault":65,"@babel/runtime/helpers/toConsumableArray":71}],59:[function(t,f,r){f.exports={type:t("./json")}},{"./json":60}],60:[function(t,f,r){var n,e=(l=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/slicedToArray")),s=l(t("@babel/runtime/helpers/typeof")),i=l(t("@babel/runtime/helpers/toConsumableArray")),l=t("./bootstrapTransform"),o=t("./pt"),a=t("../../codox-rt-type/src/").rtf,c=(t("../../codox-shared/src/com/lib").io2qoDft,t("../../wave/js/domains/api/qjs-util").contentToDelta),u=t("../../codox-shared/src/dtf/dtf"),h=(n=t("../../codox-shared/src/com/log")).ins,p=n.stringify,m=(n=t("../../codox-shared/src/com/util")).clone,b=n.logClone,_=function(T){return Object.prototype.toString.call(T)=="[object Array]"},v={name:"json"},w={};function x(T){T.t="pt";var I={p:T.p.pop()};T.si!=null&&(I.i=T.si),T.sd!=null&&(I.d=T.sd),T.o=[I]}function S(T){T.p.push(T.o[0].p),T.o[0].i!=null&&(T.si=T.o[0].i),T.o[0].d!=null&&(T.sd=T.o[0].d),delete T.o}v.registerSubtype=function(T){w[T.name]=T},v.create=function(T){return T==null?null:m(T)},v.invertComponent=function(T){var I={p:T.p};return T.t&&w[T.t]&&(I.t=T.t,I.o=w[T.t].invert(T.o)),T.si!==void 0&&(I.sd=T.si),T.sd!==void 0&&(I.si=T.sd),T.oi!==void 0&&(I.od=T.oi),T.od!==void 0&&(I.oi=T.od),T.li!==void 0&&(I.ld=T.li),T.ld!==void 0&&(I.li=T.ld),T.na!==void 0&&(I.na=-T.na),T.lm!==void 0&&(I.lm=T.p[T.p.length-1],I.p=T.p.slice(0,T.p.length-1).concat([T.lm])),I},v.invert=function(T){for(var I=T.slice().reverse(),L=[],B=0;B<I.length;B++)L.push(v.invertComponent(I[B]));return L},v.checkValidOp=function(T){for(var I=0;I<T.length;I++)if(!_(T[I].p))throw new Error("Missing path")},v.checkList=function(T){if(!_(T))throw new Error("Referenced element not a list "+p(T))},v.checkObj=function(T){if(!((I=T)&&I.constructor==Object||Array.isArray(I)))throw new Error("Referenced element not an object (it was "+p(T)+")");var I},v.dirty=function(T){v.checkValidOp(T),T=m(T);for(var I={},L=0;L<T.length;L++){var B=T[L],Y=B.p.length;B.si===void 0&&B.sd===void 0||--Y;for(var Z=I,rt=0;rt<Y;rt++){var Q=B.p[rt];Z[Q]==null&&(Z[Q]={}),Z=Z[Q]}Z.dirty=!0}return I},v.apply=function T(I,L){if(b(I),h(L),!_(L))throw new Error("not an array");v.checkValidOp(L);var B={data:I};L=m(L);for(var Y=0;Y<L.length;Y++){var Z=L[Y];Z.o!=null||Z.si===void 0&&Z.sd===void 0||x(Z);for(var rt,Q,tt=B,nt="data",et=!1,at=[],ct=0;ct<Z.p.length;ct++){var gt=Z.p[ct],wt=tt;if(tt=tt[nt],typeof(nt=gt)=="string"&&nt.search(/^codoxVP-/)==0){h(wt),h(tt),h(nt),nt=nt.replace(/^codoxVP-/,""),h(nt),at=Z.p.slice(ct+1),h(at),et=!0;break}if(wt==null)throw new Error("Path invalid")}if(et){for(var St=!1,Mt=0;Mt<tt.length;Mt++)if(h(tt[Mt]),tt[Mt].attributes!==void 0&&tt[Mt].attributes.embedNode!==void 0&&tt[Mt].attributes.embedNode.codoxDId==nt){Z.p=at,T(tt[Mt].attributes.embedNode,[Z]),St=!0,h(tt[Mt]);break}St||h(tt)}else if(Z.t)Z.t==="pt"?tt[nt]=w[Z.t].apply(tt[nt],Z.o):Z.t==="rt"?(p(Z),tt[nt]=a.cap(tt[nt],Z.cop),Z.v=tt[nt],h(Z)):Z.t==="qd"&&(h(Z.cop),b(tt),h(nt),Q=c({ops:Z.cop}),rt=!0,tt[nt].ops!==void 0?tt[nt]=c(tt[nt]):(rt=!1,tt[nt]=c({ops:tt[nt]})),Q=u.dap(tt[nt],Q),tt[nt]=rt?Q:Q.ops,b(tt));else if(Z.na!==void 0){if(typeof tt[nt]!="number")throw new Error("Referenced element not a number");tt[nt]+=Z.na}else if(Z.li!==void 0&&Z.ld!==void 0)v.checkList(tt),tt.splice(nt,1,Z.li);else if(Z.li!==void 0)v.checkList(tt),Z.liObj!==void 0?(h(Z.liObj),tt.splice.apply(tt,[nt,0].concat((0,i.default)(Z.liObj)))):tt.splice(nt,0,Z.li),h(tt);else if(Z.ld!==void 0)v.checkList(tt),h(nt),h(Z.ldLen),h(tt),Z.ldLen!==void 0?(Z.ldLen,tt.splice(nt,Z.ldLen)):tt.splice(nt,1),h(tt),h(nt),h(Z.ld);else if(Z.lm!==void 0)v.checkList(tt),_(Z.lm)?(rt=tt[nt],tt.splice(nt,1),Q=[{p:Z.lm,li:rt}],B.data=T(B.data,Q)):Z.lm!=nt&&(Lt=tt[nt],tt.splice(nt,1),tt.splice(Z.lm,0,Lt));else if(Z.od!==void 0&&Z.oi!==void 0){if(v.checkObj(tt),p(Z),(0,s.default)(Z.od)!="object"||(0,s.default)(Z.oi)!="object"||Z.od===null||Z.oi===null||Array.isArray(Z.od)||Array.isArray(Z.oi))if((0,s.default)(Z.od)=="object"&&(0,s.default)(Z.oi)=="object"&&(Array.isArray(Z.od)||Array.isArray(Z.oi)))tt[nt]=Z.oi;else{if((0,s.default)(Z.od)==="object"&&(0,s.default)(Z.oi)==="object"&&Z.od!==null&&Z.oi!==null)throw new Error("codox_apply (or): invalid or: "+p(Z));tt[nt]=Z.oi}else{var Lt=Object.keys(Z.od),Pt=(0,e.default)(Lt,1)[0],yt=Object.keys(Z.oi);Pt!==(yt=(0,e.default)(yt,1)[0])&&delete tt[nt][Pt],tt[nt]["".concat(yt)]=Z.oi[yt]}p(tt[nt])}else if(Z.oi!==void 0){if(v.checkObj(tt),p(Z),(0,s.default)(Z.oi)!="object")throw new Error("invalid instruction in op oi: "+p(Z));Pt=Object.keys(Z.oi),yt=(0,e.default)(Pt,1)[0],tt[nt]["".concat(yt)]=Z.oi[yt],p(tt[nt])}else{if(Z.od===void 0)throw new Error("invalid / missing instruction in op: "+p(Z));if(v.checkObj(tt),p(Z),(0,s.default)(Z.od)!="object")throw new Error("invalid in op od: "+p(Z));var jt=Object.keys(Z.od);jt=(0,e.default)(jt,1)[0],delete tt[nt]["".concat(jt)],p(tt[nt])}}return B.data},v.shatter=function(T){for(var I=[],L=0;L<T.length;L++)I.push([T[L]]);return I},v.incrementalApply=function(T,I,L){for(var B=0;B<I.length;B++){var Y=[I[B]];L(Y,T=v.apply(T,Y))}return T};var E=v.pathMatches=function(T,I,L){if(T.length!=I.length)return!1;for(var B=0;B<T.length;B++)if(T[B]!==I[B]&&(!L||B!==T.length-1))return!1;return!0},k=(v.append=function(T,I){if(I!=null)if(I=m(I),T.length!=0){var L=T[T.length-1];if(I.si==null&&I.sd==null||L.si==null&&L.sd==null||(x(I),x(L)),E(I.p,L.p))if(I.t&&L.t&&I.t==L.t&&w[I.t]){if(L.o=w[I.t].compose(L.o,I.o),I.si!=null||I.sd!=null){for(var B=I.p,Y=0;Y<L.o.length-1;Y++)I.o=[L.o.pop()],I.p=B.slice(),S(I),T.push(I);S(L)}}else L.na!=null&&I.na!=null?T[T.length-1]={p:L.p,na:L.na+I.na}:L.li!==void 0&&I.li==null&&I.ld==L.li?L.ld!==void 0?delete L.li:T.pop():L.od!==void 0&&L.oi==null&&I.oi!==void 0&&I.od==null?L.oi=I.oi:L.oi!==void 0&&I.od!==void 0?I.oi!==void 0?L.oi=I.oi:L.od!==void 0?delete L.oi:T.pop():I.lm!==void 0&&I.p[I.p.length-1]==I.lm||T.push(I);else I.si==null&&I.sd==null||L.si==null&&L.sd==null||(S(I),S(L)),T.push(I)}else T.push(I)},v.compose=function(T,I){v.checkValidOp(T),v.checkValidOp(I);for(var L=m(T),B=0;B<I.length;B++)v.append(L,I[B]);return L},v.normalize=function(T){var I=[];T=_(T)?T:[T];for(var L=0;L<T.length;L++){var B=T[L];B.p==null&&(B.p=[]),v.append(I,B)}return I},v.commonLengthForOps=function(T,I){try{var L=T.p.length,B=I.p.length;if(T.na==null&&!T.t||L++,I.na==null&&!I.t||B++,L==0||B==0||B<L)return null;L--;for(var Y=0;Y<L;Y++)if(T.p[Y]!==I.p[Y])return null;return L}catch(Z){console.error(Z)}},v.canOpAffectPath=function(T,I){return v.commonLengthForOps({p:I},T)!=null},0),D=1,N=2,O=3,R=4,A=5,z=6,H=7,$=8,M=9,J=10;function K(T,I,L,B){if(L==null)return I;I=m(I);var Y,Z,rt,Q,tt,nt,et,at,ct,gt,wt,St,Mt=v.commonLengthForOps(L,I),Lt=v.commonLengthForOps(I,L),Pt=I.p.length,yt=L.p.length,jt=(I.na==null&&!I.t||Pt++,L.na==null&&!L.t||yt++,Mt!==null),At=jt&&yt<Pt;if(I.lmld==null&&Lt!=null&&Pt<yt&&(I.p[Lt],L.p[Lt]),!jt)return p(I),p(L),I;p(I),p(L);try{var It=function(Zt){if(Zt.na!==void 0)return k;if(Zt.li!==void 0&&Zt.ld!==void 0)return D;if(Zt.li!==void 0)return N;if(Zt.ld!==void 0)return O;if(Zt.lm!==void 0)return R;if(Zt.oi!==void 0&&Zt.od!==void 0)return A;if(Zt.oi!==void 0)return z;if(Zt.od!==void 0)return H;if(Zt.t&&Zt.t=="pt")return $;if(Zt.t&&Zt.t=="rt")return M;if(Zt.t&&Zt.t=="qd")return J;throw new Error("Unknown optype: ".concat(JSON.stringify(Zt)))}(L);switch(It){case k:return St=L,p(wt=I),p(St),wt;case A:return et=L,at=B,ct=Mt,gt=At,p(nt=I),p(et),gt?nt.p[ct]==et.p[ct]?(p(nt),p(et),null):(p(nt),p(et),nt):nt.p[ct]==et.p[ct]?nt.oi===void 0||at==1?(p(nt),p(et),null):(nt.od=et.oi,nt):(p(nt),p(et),nt);case z:return Z=L,rt=B,Q=Mt,tt=At,p(Y=I),p(Z),tt||Y.oi===void 0||Y.p[Q]!=Z.p[Q]?(p(Y),p(Z),Y):rt==0?(Y={p:Y.p.slice(),od:Z.oi,oi:Y.oi},p(Y),p(Z),Y):(p(Y),p(Z),null);case H:var Ot=I,Et=L,Ct=Mt,Nt=At;if(p(Ot),p(Et),Nt)return Ot.p[Ct]==Et.p[Ct]?(p(Ot),p(Et),null):(p(Ot),p(Et),Ot);if(Ot.p[Ct]==Et.p[Ct]){if(Ot.oi===void 0||Ot.od===void 0)return p(Ot),p(Et),null;delete Ot.od,p(Ot)}return p(Ot),p(Et),Ot;case N:var ht=I,dt=L,Ft=B,Jt=Mt,Xt=At,Qt=(p(ht),p(dt),dt.p[Jt]),ve=0;if(Xt)return Qt<=ht.p[Jt]&&(dt.liObj!==void 0?ht.p[Jt]+=dt.liObj.length:ht.p[Jt]++),p(ht),ht;if(ht.li!==void 0&&ht.ld==null)p(ht),p(dt),Qt==ht.p[Jt]?P(ht,dt,0,Ft,Jt):Qt<ht.p[Jt]&&(dt.liObj!==void 0?(p(ht),p(dt),ht.p[Jt]+=dt.liObj.length):ht.p[Jt]++);else if(ht.lm!==void 0)Qt<=ht.p[Jt]?(dt.liObj!==void 0?ht.p[Jt]+=dt.liObj.length:ht.p[Jt]++,p(ht),p(dt)):(Qt--,ve++),Qt<ht.lm?(dt.liObj!==void 0?ht.lm+=dt.liObj.length:ht.lm++,p(ht),p(dt)):Qt==ht.lm?P(ht,dt,ve,Ft,Jt):(p(ht),p(dt));else{if(ht.ld!==void 0&&ht.li==null&&ht.ldLen!==void 0&&dt.li!==void 0&&dt.liObj!==void 0)return dt.p[Jt]>=ht.p[Jt]+ht.ldLen||(ht.p[Jt]>=dt.p[Jt]?ht.p[Jt]+=dt.liObj.length:ht.ldLen=ht.ldLen+dt.liObj.length),h(ht),ht;Qt<=ht.p[Jt]&&(dt.liObj!==void 0?ht.p[Jt]+=dt.liObj.length:ht.p[Jt]++),p(ht),p(dt)}return p(ht),p(dt),ht;case O:var kt=I,ee=L,pe=Mt,Le=At;if(h(kt),h(ee),Le)return ee.ldLen!==void 0?(ee.p[pe]<=kt.p[pe]&&kt.p[pe]<ee.p[pe]+ee.ldLen?kt=null:(ee.p[pe]+ee.ldLen<=kt.p[pe]&&(kt.p[pe]-=ee.ldLen),p(kt)),kt):ee.p[pe]==kt.p[pe]?null:(ee.p[pe]<kt.p[pe]&&kt.p[pe]--,p(kt),kt);if(kt.lm!==void 0){Le=ee.p[pe];var Be=kt.p[pe],qe=kt.lm;if(ee.ldLen!==void 0)return ee.p[pe]<=kt.p[pe]&&kt.p[pe]<ee.p[pe]+ee.ldLen?kt=null:(ee.p[pe]+ee.ldLen<=kt.p[pe]?(kt.p[pe]-=ee.ldLen,p(kt)):(Le--,p(kt)),Le+ee.ldLen<=qe?(kt.lm-=ee.ldLen,kt.ic==null&&(kt.ic=0),kt.ic+=ee.ldLen):Le<qe&&qe<Le+ee.ldLen?(kt.ld={type:"lm"},kt.ldLen=1,delete kt.lm):p(kt),kt);if(Le==Be)return null;Le<Be?kt.p[pe]--:Le--,Le<qe&&(kt.lm--,kt.ic==null&&(kt.ic=0),kt.ic++)}else{if(kt.ld!==void 0&&kt.ldLen!==void 0&&ee.ldLen!==void 0)return ee.p[pe]>=kt.p[pe]+kt.ldLen||(kt.p[pe]>=ee.p[pe]+ee.ldLen?kt.p[pe]=kt.p[pe]-ee.ldLen:ee.p[pe]<=kt.p[pe]&&kt.p[pe]+kt.ldLen<=ee.p[pe]+ee.ldLen?kt=null:ee.p[pe]<=kt.p[pe]&&kt.p[pe]+kt.ldLen>ee.p[pe]+ee.ldLen?(kt.ldLen=kt.p[pe]+kt.ldLen-(ee.p[pe]+ee.ldLen),kt.p[pe]=ee.p[pe],kt.ld=ee.ld):ee.p[pe]>kt.p[pe]&&ee.p[pe]+ee.ldLen>=kt.p[pe]+kt.ldLen?kt.ldLen=ee.p[pe]-kt.p[pe]:kt.ldLen=kt.ldLen-ee.ldLen),h(kt),kt;if(kt.li!==void 0&&kt.ld==null&&kt.liObj!==void 0&&ee.ldLen!==void 0)return kt.p[pe]<=ee.p[pe]||(kt.p[pe]>=ee.p[pe]+ee.ldLen?(kt.p[pe]-=ee.ldLen,kt.ic==null&&(kt.ic=0),kt.ic+=ee.ldLen):kt=null),h(kt),kt;if(ee.ldLen!==void 0){if(ee.p[pe]+ee.ldLen<=kt.p[pe])kt.p[pe]-=ee.ldLen,kt.li!==void 0&&kt.ld!==void 0&&(kt.ic==null&&(kt.ic=0),kt.ic+=ee.ldLen);else if(ee.p[pe]<=kt.p[pe]&&kt.p[pe]<ee.p[pe]+ee.ldLen){if(ee.p[pe]==kt.p[pe]&&kt.ld!==void 0&&kt.li!==void 0)return delete kt.ld,kt.liObj=[kt.li],kt.li={},p(kt),p(ee),kt;kt=null}return kt}if(ee.p[pe]<kt.p[pe])kt.p[pe]--,(kt.li!==void 0||kt.li!==void 0&&kt.ld!==void 0)&&(kt.ic==null&&(kt.ic=0),kt.ic++);else if(ee.p[pe]==kt.p[pe]&&kt.ld!==void 0){if(kt.li===void 0)return null;delete kt.ld}}return p(kt),p(ee),kt;case D:var ze=I,Ie=L,He=B,hn=Mt,Tt=At;if(p(ze),p(Ie),Tt)return Ie.p[hn]==ze.p[hn]?(p(ze),p(Ie),null):(p(ze),p(Ie),ze);if(Ie.p[hn]==ze.p[hn]){if(ze.ld!==void 0){if(ze.li===void 0||He!=0)return p(ze),p(Ie),null;ze.ld=m(Ie.li),p(ze),p(Ie)}}else p(ze),p(Ie);return p(ze),p(Ie),ze;case R:var ae,de,we,Oe,Rt=I,Ut=L,se=B,bt=Mt,ft=At;if(p(Rt),p(Ut),ft)return ft=Ut.p[bt],Oe=Ut.lm,(xt=Rt.p[bt])==ft?Rt.p[bt]=Oe:(ft<xt&&Rt.p[bt]--,Rt.p[bt]>=Oe&&(Rt.p[bt]++,p(Rt),p(Ut))),p(Rt),p(Ut),Rt;if(Rt.lm!==void 0)return p(Rt),p(Ut),ft=Rt.p[bt],xt=Rt.p[bt],Oe=Rt.lm,we=de=Ut.p[bt],ce=Bt=Ut.lm,Rt.ic==null&&(Rt.ic=0),Ut.ic==null&&(Ut.ic=0),ae=0,ft==de?Oe!=Bt&&se==0?(Rt.p[bt]=Bt,p(Rt),p(Ut),Rt):(p(Rt),p(Ut),null):(de<ft?(Rt.p[bt]--,xt=Rt.p[bt]):we--,(Rt.p[bt]>Bt||Rt.p[bt]==Bt)&&Rt.p[bt]++,we<Oe&&(Rt.lm--,Rt.ic++),xt<Bt&&(ce--,ae++),Rt.lm>ce?Rt.lm++:Rt.lm==ce&&P(Rt,Ut,ae,se,0),p(Rt),p(Ut),Rt);if(Rt.ld!==void 0&&Rt.ldLen!==void 0){if(Rt.p[bt]+Rt.ldLen<=Ut.p[bt])p(Rt),p(Ut);else if(Ut.p[bt]<Rt.p[bt])Rt.p[bt]--,p(Rt),p(Ut);else if(Rt.p[bt]<=Ut.p[bt]&&Ut.p[bt]<Rt.p[bt]+Rt.ldLen){if(Rt.ldLen--,!(Rt.p[bt]<Ut.lm&&Ut.lm<Rt.p[bt]+Rt.ldLen))return Rt.p[bt]+Rt.ldLen<=Ut.lm?Ut.lm-=Rt.ldLen:(Rt.p[bt]++,p(Rt)),p(Ut),(de=m(Ut)).p[bt]=Ut.lm,de.ld={type:"newLdLen"},de.ldLen=1,delete de.lm,(ft=[]).push(Rt),ft.push(de),p(ft),p(Ut),ft;p(Rt),p(Ut)}else p(Rt),p(Ut);return Rt.p[bt]+Rt.ldLen<=Ut.lm?(p(Rt),p(Ut)):Rt.p[bt]>=Ut.lm?(Rt.p[bt]++,p(Rt),p(Ut)):Rt.p[bt]<Ut.lm&&Ut.lm<Rt.p[bt]+Rt.ldLen?(Rt.ldLen++,p(Rt),p(Ut)):(p(Rt),p(Ut)),Rt}if(Rt.li!==void 0&&Rt.liObj!==void 0)return Rt.p[bt]<=Ut.p[bt]?(p(Rt),p(Ut)):Ut.p[bt]<Rt.p[bt]?(Rt.p[bt]--,p(Rt),p(Ut)):(p(Rt),p(Ut)),Rt.p[bt]<=Ut.lm?(p(Rt),p(Ut)):Rt.p[bt]>Ut.lm?(Rt.p[bt]++,p(Rt),p(Ut)):(p(Rt),p(Ut)),Rt;if(Rt.li!==void 0&&Rt.ld==null)return p(Rt),p(Ut),we=Ut.p[bt],Oe=Ut.lm,Rt.p[bt]>we&&(Rt.p[bt]--,Rt.ic==null&&(Rt.ic=0),Rt.ic++),Rt.p[bt]>Oe&&Rt.p[bt]++,Rt.p[bt]==Oe&&P(Rt,Ut,0,se,bt),p(Rt),p(Ut),Rt;p(Rt),p(Ut);var xt=Ut.p[bt],Bt=Ut.lm,ce=Rt.p[bt];return ce==xt?Rt.p[bt]=Bt:(xt<ce&&(Rt.p[bt]--,Rt.li!==void 0&&Rt.ld!==void 0&&(Rt.ic==null&&(Rt.ic=0),Rt.ic++)),Rt.p[bt]>=Bt&&Rt.p[bt]++),p(Rt),p(Ut),Rt;case $:var Ce=I,Te=L,Ne=B,Ge=(p(Ce),p(Te),Te);if(Ce.si==null&&Ce.sd==null||Te.si==null&&Te.sd==null||(p(Ce),p(Te),x(Ce),x(Ge=m(Te)),p(Ce),p(Ge)),Ge.t&&w[Ge.t]){if(Ce.t&&Ce.t==Ge.t){var be=w[Ce.t].transform(Ce.o,Ge.o,Ne);if(p(be),Ce.si==null&&Ce.sd==null)return!_(be)||0<be.length?(Ce.o=be,Ce):null;for(var pt=Ce.p,Dt=[],$t=0;$t<be.length;$t++)Ce.o=[be[$t]],Ce.p=pt.slice(),S(Ce),v.append(Dt,Ce),p(Dt);return Dt}return Ce}return;case M:var qt=I,Wt=L,oe=B;return p(qt),p(Wt),oe=oe==0?"A":"B",qt.cop?(qt=m(qt),Wt=a.ct(qt.cop,Wt.cop,oe),qt=(qt.cop=Wt).length==0?null:qt):(p(qt),qt);case J:var X=I,lt=L,vt=B;if(h(X),h(lt),lt.p[lt.p.length-1]=="codoxText"&&X.p.length>lt.p.length&&typeof X.p[lt.p.length]=="string"&&X.p[lt.p.length].search(/^codoxVP-/)==0){if(lt.delEmbedId!==void 0){var Vt=X.p[lt.p.length].replace(/^codoxVP-/,"");h(lt.delEmbedId);for(var te=0;lt.delEmbedId.length;te++)if(Vt==lt.delEmbedId[te])return null}return X}return vt=vt==1,X.cop?(X=m(X),vt=u.tf(lt.cop,X.cop,vt),X=(X.cop=vt).length==0?null:X):(p(X),X);default:throw new Error("json-ot: unkown op type ".concat(It))}}catch(Zt){console.error(Zt)}}function P(T,I,L,B,Y){function Z(rt,Q){Q=Q.liObj?Q.liObj.length:1,rt.lm!==void 0?rt.lm+=Q:rt.p[Y]+=Q}`codox: resolveFT (in)
|
|
60
|
+
json will treated as string`))}),(0,i.default)(e,t.not_same_data_types,function(h,p){return n('Different data types detected for "'.concat(JSON.stringify(h),'" and "').concat(JSON.stringify(p),'". Replacement will be applied'))}),e);f.exports={throwValidationError:function(h){for(var p=arguments.length,m=new Array(1<p?p-1:0),b=1;b<p;b++)m[b-1]=arguments[b];throw new o(c[h]?c[h].apply(c,m):"unhandled error")},outputWarnMessage:function(h){if(u[h]){for(var p,m=arguments.length,b=new Array(1<m?m-1:0),_=1;_<m;_++)b[_-1]=arguments[_];return h=u[h].apply(u,b),Array.isArray(h)?(p=console).warn.apply(p,(0,s.default)(h)):console.warn(h)}},VALIDATION_ERRORS_TYPES:a,VALIDATION_WARN_TYPES:t,validationErrorsMsgFactory:c,validationWarnMsgFactory:u}},{"../diffSpec":45,"../errors":46,"@babel/runtime/helpers/defineProperty":8,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/toConsumableArray":21}],58:[function(t,f,r){t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/toConsumableArray"));var n,e=((n=t("../../codox-shared/src/com/log")).ins,n.stringify);(n=t("../../codox-shared/src/com/util")).clone,n.logClone,f.exports=function(s,i,l,o){function a(u,h){l(u),l(h);for(var p,m=[],b=0;b<h.length;b++){for(var _=h[b],v=[],w=0;w<u.length;){var x=[],S=u[w],E=x;if(i(v,S,p=_,0),i(E,p,S,1),w++,x.length!==1){if(x.length===0){for(var k=w;k<u.length;k++)o(v,u[k]);_=null;break}for(var D=a(u.slice(w),x),N=0;N<D[0].length;N++)o(v,D[0][N]);for(var O=0;O<D[1].length;O++)o(m,D[1][O]);_=null;break}_=x[0]}_!=null&&o(m,_),u=v}return[u,m]}function c(u,h,p){if(e(u),e(h),p!==0&&p!==1)throw new Error("Type needs to be '0' or '1'. Got '".concat(p,"' "));return h.length===0?u:u.length===1&&h.length===1?i([],u[0],h[0],p):p===0?a(u,h)[0]:p=a(h,u)[1]}s.transform=c,s.lTransform=function(u,h,p){if(h.length===0)return u;for(var m=0;m<h.length;m++){var b;if((b=c([u],[b=h[m]],p)).length==0){u=null;break}u=b[0]}return u}}},{"../../codox-shared/src/com/log":218,"../../codox-shared/src/com/util":219,"@babel/runtime/helpers/interopRequireDefault":65,"@babel/runtime/helpers/toConsumableArray":71}],59:[function(t,f,r){f.exports={type:t("./json")}},{"./json":60}],60:[function(t,f,r){var n,e=(l=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/slicedToArray")),s=l(t("@babel/runtime/helpers/typeof")),i=l(t("@babel/runtime/helpers/toConsumableArray")),l=t("./bootstrapTransform"),o=t("./pt"),a=t("../../codox-rt-type/src/").rtf,c=(t("../../codox-shared/src/com/lib").io2qoDft,t("../../wave/js/domains/api/qjs-util").contentToDelta),u=t("../../codox-shared/src/dtf/dtf"),h=(n=t("../../codox-shared/src/com/log")).ins,p=n.stringify,m=(n=t("../../codox-shared/src/com/util")).clone,b=n.logClone,_=function(T){return Object.prototype.toString.call(T)=="[object Array]"},v={name:"json"},w={};function x(T){T.t="pt";var I={p:T.p.pop()};T.si!=null&&(I.i=T.si),T.sd!=null&&(I.d=T.sd),T.o=[I]}function S(T){T.p.push(T.o[0].p),T.o[0].i!=null&&(T.si=T.o[0].i),T.o[0].d!=null&&(T.sd=T.o[0].d),delete T.o}v.registerSubtype=function(T){w[T.name]=T},v.create=function(T){return T==null?null:m(T)},v.invertComponent=function(T){var I={p:T.p};return T.t&&w[T.t]&&(I.t=T.t,I.o=w[T.t].invert(T.o)),T.si!==void 0&&(I.sd=T.si),T.sd!==void 0&&(I.si=T.sd),T.oi!==void 0&&(I.od=T.oi),T.od!==void 0&&(I.oi=T.od),T.li!==void 0&&(I.ld=T.li),T.ld!==void 0&&(I.li=T.ld),T.na!==void 0&&(I.na=-T.na),T.lm!==void 0&&(I.lm=T.p[T.p.length-1],I.p=T.p.slice(0,T.p.length-1).concat([T.lm])),I},v.invert=function(T){for(var I=T.slice().reverse(),L=[],B=0;B<I.length;B++)L.push(v.invertComponent(I[B]));return L},v.checkValidOp=function(T){for(var I=0;I<T.length;I++)if(!_(T[I].p))throw new Error("Missing path")},v.checkList=function(T){if(!_(T))throw new Error("Referenced element not a list "+p(T))},v.checkObj=function(T){if(!((I=T)&&I.constructor==Object||Array.isArray(I)))throw new Error("Referenced element not an object (it was "+p(T)+")");var I},v.dirty=function(T){v.checkValidOp(T),T=m(T);for(var I={},L=0;L<T.length;L++){var B=T[L],Y=B.p.length;B.si===void 0&&B.sd===void 0||--Y;for(var Z=I,rt=0;rt<Y;rt++){var Q=B.p[rt];Z[Q]==null&&(Z[Q]={}),Z=Z[Q]}Z.dirty=!0}return I},v.apply=function T(I,L){if(b(I),h(L),!_(L))throw new Error("not an array");v.checkValidOp(L);var B={data:I};L=m(L);for(var Y=0;Y<L.length;Y++){var Z=L[Y];Z.o!=null||Z.si===void 0&&Z.sd===void 0||x(Z);for(var rt,Q,tt=B,nt="data",et=!1,at=[],ct=0;ct<Z.p.length;ct++){var gt=Z.p[ct],wt=tt;if(tt=tt[nt],typeof(nt=gt)=="string"&&nt.search(/^codoxVP-/)==0){h(wt),h(tt),h(nt),nt=nt.replace(/^codoxVP-/,""),h(nt),at=Z.p.slice(ct+1),h(at),et=!0;break}if(wt==null)throw new Error("Path invalid")}if(et){for(var St=!1,Mt=0;Mt<tt.length;Mt++)if(h(tt[Mt]),tt[Mt].attributes!==void 0&&tt[Mt].attributes.embedNode!==void 0&&tt[Mt].attributes.embedNode.codoxDId==nt){Z.p=at,T(tt[Mt].attributes.embedNode,[Z]),St=!0,h(tt[Mt]);break}St||h(tt)}else if(Z.t)Z.t==="pt"?tt[nt]=w[Z.t].apply(tt[nt],Z.o):Z.t==="rt"?(p(Z),tt[nt]=a.cap(tt[nt],Z.cop),Z.v=tt[nt],h(Z)):Z.t==="qd"&&(h(Z.cop),b(tt),h(nt),Q=c({ops:Z.cop}),rt=!0,tt[nt].ops!==void 0?tt[nt]=c(tt[nt]):(rt=!1,tt[nt]=c({ops:tt[nt]})),Q=u.dap(tt[nt],Q),tt[nt]=rt?Q:Q.ops,b(tt));else if(Z.na!==void 0){if(typeof tt[nt]!="number")throw new Error("Referenced element not a number");tt[nt]+=Z.na}else if(Z.li!==void 0&&Z.ld!==void 0)v.checkList(tt),tt.splice(nt,1,Z.li);else if(Z.li!==void 0)v.checkList(tt),Z.liObj!==void 0?(h(Z.liObj),tt.splice.apply(tt,[nt,0].concat((0,i.default)(Z.liObj)))):tt.splice(nt,0,Z.li),h(tt);else if(Z.ld!==void 0)v.checkList(tt),h(nt),h(Z.ldLen),h(tt),Z.ldLen!==void 0?(Z.ldLen,tt.splice(nt,Z.ldLen)):tt.splice(nt,1),h(tt),h(nt),h(Z.ld);else if(Z.lm!==void 0)v.checkList(tt),_(Z.lm)?(rt=tt[nt],tt.splice(nt,1),Q=[{p:Z.lm,li:rt}],B.data=T(B.data,Q)):Z.lm!=nt&&(Lt=tt[nt],tt.splice(nt,1),tt.splice(Z.lm,0,Lt));else if(Z.od!==void 0&&Z.oi!==void 0){if(v.checkObj(tt),p(Z),(0,s.default)(Z.od)!="object"||(0,s.default)(Z.oi)!="object"||Z.od===null||Z.oi===null||Array.isArray(Z.od)||Array.isArray(Z.oi))if((0,s.default)(Z.od)=="object"&&(0,s.default)(Z.oi)=="object"&&(Array.isArray(Z.od)||Array.isArray(Z.oi)))tt[nt]=Z.oi;else{if((0,s.default)(Z.od)==="object"&&(0,s.default)(Z.oi)==="object"&&Z.od!==null&&Z.oi!==null)throw new Error("codox_apply (or): invalid or: "+p(Z));tt[nt]=Z.oi}else{var Lt=Object.keys(Z.od),Pt=(0,e.default)(Lt,1)[0],yt=Object.keys(Z.oi);Pt!==(yt=(0,e.default)(yt,1)[0])&&delete tt[nt][Pt],tt[nt]["".concat(yt)]=Z.oi[yt]}p(tt[nt])}else if(Z.oi!==void 0){if(v.checkObj(tt),p(Z),(0,s.default)(Z.oi)!="object")throw new Error("invalid instruction in op oi: "+p(Z));Pt=Object.keys(Z.oi),yt=(0,e.default)(Pt,1)[0],tt[nt]["".concat(yt)]=Z.oi[yt],p(tt[nt])}else{if(Z.od===void 0)throw new Error("invalid / missing instruction in op: "+p(Z));if(v.checkObj(tt),p(Z),(0,s.default)(Z.od)!="object")throw new Error("invalid in op od: "+p(Z));var jt=Object.keys(Z.od);jt=(0,e.default)(jt,1)[0],delete tt[nt]["".concat(jt)],p(tt[nt])}}return B.data},v.shatter=function(T){for(var I=[],L=0;L<T.length;L++)I.push([T[L]]);return I},v.incrementalApply=function(T,I,L){for(var B=0;B<I.length;B++){var Y=[I[B]];L(Y,T=v.apply(T,Y))}return T};var E=v.pathMatches=function(T,I,L){if(T.length!=I.length)return!1;for(var B=0;B<T.length;B++)if(T[B]!==I[B]&&(!L||B!==T.length-1))return!1;return!0},k=(v.append=function(T,I){if(I!=null)if(I=m(I),T.length!=0){var L=T[T.length-1];if(I.si==null&&I.sd==null||L.si==null&&L.sd==null||(x(I),x(L)),E(I.p,L.p))if(I.t&&L.t&&I.t==L.t&&w[I.t]){if(L.o=w[I.t].compose(L.o,I.o),I.si!=null||I.sd!=null){for(var B=I.p,Y=0;Y<L.o.length-1;Y++)I.o=[L.o.pop()],I.p=B.slice(),S(I),T.push(I);S(L)}}else L.na!=null&&I.na!=null?T[T.length-1]={p:L.p,na:L.na+I.na}:L.li!==void 0&&I.li==null&&I.ld==L.li?L.ld!==void 0?delete L.li:T.pop():L.od!==void 0&&L.oi==null&&I.oi!==void 0&&I.od==null?L.oi=I.oi:L.oi!==void 0&&I.od!==void 0?I.oi!==void 0?L.oi=I.oi:L.od!==void 0?delete L.oi:T.pop():I.lm!==void 0&&I.p[I.p.length-1]==I.lm||T.push(I);else I.si==null&&I.sd==null||L.si==null&&L.sd==null||(S(I),S(L)),T.push(I)}else T.push(I)},v.compose=function(T,I){v.checkValidOp(T),v.checkValidOp(I);for(var L=m(T),B=0;B<I.length;B++)v.append(L,I[B]);return L},v.normalize=function(T){var I=[];T=_(T)?T:[T];for(var L=0;L<T.length;L++){var B=T[L];B.p==null&&(B.p=[]),v.append(I,B)}return I},v.commonLengthForOps=function(T,I){try{var L=T.p.length,B=I.p.length;if(T.na==null&&!T.t||L++,I.na==null&&!I.t||B++,L==0||B==0||B<L)return null;L--;for(var Y=0;Y<L;Y++)if(T.p[Y]!==I.p[Y])return null;return L}catch(Z){console.error(Z)}},v.canOpAffectPath=function(T,I){return v.commonLengthForOps({p:I},T)!=null},0),D=1,N=2,O=3,R=4,A=5,z=6,H=7,$=8,M=9,J=10;function K(T,I,L,B){if(L==null)return I;I=m(I);var Y,Z,rt,Q,tt,nt,et,at,ct,gt,wt,St,Mt=v.commonLengthForOps(L,I),Lt=v.commonLengthForOps(I,L),Pt=I.p.length,yt=L.p.length,jt=(I.na==null&&!I.t||Pt++,L.na==null&&!L.t||yt++,Mt!==null),At=jt&&yt<Pt;if(I.lmld==null&&Lt!=null&&Pt<yt&&(I.p[Lt],L.p[Lt]),!jt)return p(I),p(L),I;p(I),p(L);try{var It=function(Zt){if(Zt.na!==void 0)return k;if(Zt.li!==void 0&&Zt.ld!==void 0)return D;if(Zt.li!==void 0)return N;if(Zt.ld!==void 0)return O;if(Zt.lm!==void 0)return R;if(Zt.oi!==void 0&&Zt.od!==void 0)return A;if(Zt.oi!==void 0)return z;if(Zt.od!==void 0)return H;if(Zt.t&&Zt.t=="pt")return $;if(Zt.t&&Zt.t=="rt")return M;if(Zt.t&&Zt.t=="qd")return J;throw new Error("Unknown optype: ".concat(JSON.stringify(Zt)))}(L);switch(It){case k:return St=L,p(wt=I),p(St),wt;case A:return et=L,at=B,ct=Mt,gt=At,p(nt=I),p(et),gt?nt.p[ct]==et.p[ct]?(p(nt),p(et),null):(p(nt),p(et),nt):nt.p[ct]==et.p[ct]?nt.oi===void 0||at==1?(p(nt),p(et),null):(nt.od=et.oi,nt):(p(nt),p(et),nt);case z:return Z=L,rt=B,Q=Mt,tt=At,p(Y=I),p(Z),tt||Y.oi===void 0||Y.p[Q]!=Z.p[Q]?(p(Y),p(Z),Y):rt==0?(Y={p:Y.p.slice(),od:Z.oi,oi:Y.oi},p(Y),p(Z),Y):(p(Y),p(Z),null);case H:var Ot=I,Et=L,Ct=Mt,Nt=At;if(p(Ot),p(Et),Nt)return Ot.p[Ct]==Et.p[Ct]?(p(Ot),p(Et),null):(p(Ot),p(Et),Ot);if(Ot.p[Ct]==Et.p[Ct]){if(Ot.oi===void 0||Ot.od===void 0)return p(Ot),p(Et),null;delete Ot.od,p(Ot)}return p(Ot),p(Et),Ot;case N:var ht=I,dt=L,Ft=B,Jt=Mt,Xt=At,Qt=(p(ht),p(dt),dt.p[Jt]),ve=0;if(Xt)return Qt<=ht.p[Jt]&&(dt.liObj!==void 0?ht.p[Jt]+=dt.liObj.length:ht.p[Jt]++),p(ht),ht;if(ht.li!==void 0&&ht.ld==null)p(ht),p(dt),Qt==ht.p[Jt]?P(ht,dt,0,Ft,Jt):Qt<ht.p[Jt]&&(dt.liObj!==void 0?(p(ht),p(dt),ht.p[Jt]+=dt.liObj.length):ht.p[Jt]++);else if(ht.lm!==void 0)Qt<=ht.p[Jt]?(dt.liObj!==void 0?ht.p[Jt]+=dt.liObj.length:ht.p[Jt]++,p(ht),p(dt)):(Qt--,ve++),Qt<ht.lm?(dt.liObj!==void 0?ht.lm+=dt.liObj.length:ht.lm++,p(ht),p(dt)):Qt==ht.lm?P(ht,dt,ve,Ft,Jt):(p(ht),p(dt));else{if(ht.ld!==void 0&&ht.li==null&&ht.ldLen!==void 0&&dt.li!==void 0&&dt.liObj!==void 0)return dt.p[Jt]>=ht.p[Jt]+ht.ldLen||(ht.p[Jt]>=dt.p[Jt]?ht.p[Jt]+=dt.liObj.length:ht.ldLen=ht.ldLen+dt.liObj.length),h(ht),ht;Qt<=ht.p[Jt]&&(dt.liObj!==void 0?ht.p[Jt]+=dt.liObj.length:ht.p[Jt]++),p(ht),p(dt)}return p(ht),p(dt),ht;case O:var kt=I,ee=L,pe=Mt,Le=At;if(h(kt),h(ee),Le)return ee.ldLen!==void 0?(ee.p[pe]<=kt.p[pe]&&kt.p[pe]<ee.p[pe]+ee.ldLen?kt=null:(ee.p[pe]+ee.ldLen<=kt.p[pe]&&(kt.p[pe]-=ee.ldLen),p(kt)),kt):ee.p[pe]==kt.p[pe]?null:(ee.p[pe]<kt.p[pe]&&kt.p[pe]--,p(kt),kt);if(kt.lm!==void 0){Le=ee.p[pe];var Fe=kt.p[pe],qe=kt.lm;if(ee.ldLen!==void 0)return ee.p[pe]<=kt.p[pe]&&kt.p[pe]<ee.p[pe]+ee.ldLen?kt=null:(ee.p[pe]+ee.ldLen<=kt.p[pe]?(kt.p[pe]-=ee.ldLen,p(kt)):(Le--,p(kt)),Le+ee.ldLen<=qe?(kt.lm-=ee.ldLen,kt.ic==null&&(kt.ic=0),kt.ic+=ee.ldLen):Le<qe&&qe<Le+ee.ldLen?(kt.ld={type:"lm"},kt.ldLen=1,delete kt.lm):p(kt),kt);if(Le==Fe)return null;Le<Fe?kt.p[pe]--:Le--,Le<qe&&(kt.lm--,kt.ic==null&&(kt.ic=0),kt.ic++)}else{if(kt.ld!==void 0&&kt.ldLen!==void 0&&ee.ldLen!==void 0)return ee.p[pe]>=kt.p[pe]+kt.ldLen||(kt.p[pe]>=ee.p[pe]+ee.ldLen?kt.p[pe]=kt.p[pe]-ee.ldLen:ee.p[pe]<=kt.p[pe]&&kt.p[pe]+kt.ldLen<=ee.p[pe]+ee.ldLen?kt=null:ee.p[pe]<=kt.p[pe]&&kt.p[pe]+kt.ldLen>ee.p[pe]+ee.ldLen?(kt.ldLen=kt.p[pe]+kt.ldLen-(ee.p[pe]+ee.ldLen),kt.p[pe]=ee.p[pe],kt.ld=ee.ld):ee.p[pe]>kt.p[pe]&&ee.p[pe]+ee.ldLen>=kt.p[pe]+kt.ldLen?kt.ldLen=ee.p[pe]-kt.p[pe]:kt.ldLen=kt.ldLen-ee.ldLen),h(kt),kt;if(kt.li!==void 0&&kt.ld==null&&kt.liObj!==void 0&&ee.ldLen!==void 0)return kt.p[pe]<=ee.p[pe]||(kt.p[pe]>=ee.p[pe]+ee.ldLen?(kt.p[pe]-=ee.ldLen,kt.ic==null&&(kt.ic=0),kt.ic+=ee.ldLen):kt=null),h(kt),kt;if(ee.ldLen!==void 0){if(ee.p[pe]+ee.ldLen<=kt.p[pe])kt.p[pe]-=ee.ldLen,kt.li!==void 0&&kt.ld!==void 0&&(kt.ic==null&&(kt.ic=0),kt.ic+=ee.ldLen);else if(ee.p[pe]<=kt.p[pe]&&kt.p[pe]<ee.p[pe]+ee.ldLen){if(ee.p[pe]==kt.p[pe]&&kt.ld!==void 0&&kt.li!==void 0)return delete kt.ld,kt.liObj=[kt.li],kt.li={},p(kt),p(ee),kt;kt=null}return kt}if(ee.p[pe]<kt.p[pe])kt.p[pe]--,(kt.li!==void 0||kt.li!==void 0&&kt.ld!==void 0)&&(kt.ic==null&&(kt.ic=0),kt.ic++);else if(ee.p[pe]==kt.p[pe]&&kt.ld!==void 0){if(kt.li===void 0)return null;delete kt.ld}}return p(kt),p(ee),kt;case D:var ze=I,Ie=L,He=B,hn=Mt,Tt=At;if(p(ze),p(Ie),Tt)return Ie.p[hn]==ze.p[hn]?(p(ze),p(Ie),null):(p(ze),p(Ie),ze);if(Ie.p[hn]==ze.p[hn]){if(ze.ld!==void 0){if(ze.li===void 0||He!=0)return p(ze),p(Ie),null;ze.ld=m(Ie.li),p(ze),p(Ie)}}else p(ze),p(Ie);return p(ze),p(Ie),ze;case R:var ae,de,we,Oe,Rt=I,Ut=L,se=B,bt=Mt,ft=At;if(p(Rt),p(Ut),ft)return ft=Ut.p[bt],Oe=Ut.lm,(xt=Rt.p[bt])==ft?Rt.p[bt]=Oe:(ft<xt&&Rt.p[bt]--,Rt.p[bt]>=Oe&&(Rt.p[bt]++,p(Rt),p(Ut))),p(Rt),p(Ut),Rt;if(Rt.lm!==void 0)return p(Rt),p(Ut),ft=Rt.p[bt],xt=Rt.p[bt],Oe=Rt.lm,we=de=Ut.p[bt],ce=Bt=Ut.lm,Rt.ic==null&&(Rt.ic=0),Ut.ic==null&&(Ut.ic=0),ae=0,ft==de?Oe!=Bt&&se==0?(Rt.p[bt]=Bt,p(Rt),p(Ut),Rt):(p(Rt),p(Ut),null):(de<ft?(Rt.p[bt]--,xt=Rt.p[bt]):we--,(Rt.p[bt]>Bt||Rt.p[bt]==Bt)&&Rt.p[bt]++,we<Oe&&(Rt.lm--,Rt.ic++),xt<Bt&&(ce--,ae++),Rt.lm>ce?Rt.lm++:Rt.lm==ce&&P(Rt,Ut,ae,se,0),p(Rt),p(Ut),Rt);if(Rt.ld!==void 0&&Rt.ldLen!==void 0){if(Rt.p[bt]+Rt.ldLen<=Ut.p[bt])p(Rt),p(Ut);else if(Ut.p[bt]<Rt.p[bt])Rt.p[bt]--,p(Rt),p(Ut);else if(Rt.p[bt]<=Ut.p[bt]&&Ut.p[bt]<Rt.p[bt]+Rt.ldLen){if(Rt.ldLen--,!(Rt.p[bt]<Ut.lm&&Ut.lm<Rt.p[bt]+Rt.ldLen))return Rt.p[bt]+Rt.ldLen<=Ut.lm?Ut.lm-=Rt.ldLen:(Rt.p[bt]++,p(Rt)),p(Ut),(de=m(Ut)).p[bt]=Ut.lm,de.ld={type:"newLdLen"},de.ldLen=1,delete de.lm,(ft=[]).push(Rt),ft.push(de),p(ft),p(Ut),ft;p(Rt),p(Ut)}else p(Rt),p(Ut);return Rt.p[bt]+Rt.ldLen<=Ut.lm?(p(Rt),p(Ut)):Rt.p[bt]>=Ut.lm?(Rt.p[bt]++,p(Rt),p(Ut)):Rt.p[bt]<Ut.lm&&Ut.lm<Rt.p[bt]+Rt.ldLen?(Rt.ldLen++,p(Rt),p(Ut)):(p(Rt),p(Ut)),Rt}if(Rt.li!==void 0&&Rt.liObj!==void 0)return Rt.p[bt]<=Ut.p[bt]?(p(Rt),p(Ut)):Ut.p[bt]<Rt.p[bt]?(Rt.p[bt]--,p(Rt),p(Ut)):(p(Rt),p(Ut)),Rt.p[bt]<=Ut.lm?(p(Rt),p(Ut)):Rt.p[bt]>Ut.lm?(Rt.p[bt]++,p(Rt),p(Ut)):(p(Rt),p(Ut)),Rt;if(Rt.li!==void 0&&Rt.ld==null)return p(Rt),p(Ut),we=Ut.p[bt],Oe=Ut.lm,Rt.p[bt]>we&&(Rt.p[bt]--,Rt.ic==null&&(Rt.ic=0),Rt.ic++),Rt.p[bt]>Oe&&Rt.p[bt]++,Rt.p[bt]==Oe&&P(Rt,Ut,0,se,bt),p(Rt),p(Ut),Rt;p(Rt),p(Ut);var xt=Ut.p[bt],Bt=Ut.lm,ce=Rt.p[bt];return ce==xt?Rt.p[bt]=Bt:(xt<ce&&(Rt.p[bt]--,Rt.li!==void 0&&Rt.ld!==void 0&&(Rt.ic==null&&(Rt.ic=0),Rt.ic++)),Rt.p[bt]>=Bt&&Rt.p[bt]++),p(Rt),p(Ut),Rt;case $:var Ce=I,Te=L,Ne=B,Ge=(p(Ce),p(Te),Te);if(Ce.si==null&&Ce.sd==null||Te.si==null&&Te.sd==null||(p(Ce),p(Te),x(Ce),x(Ge=m(Te)),p(Ce),p(Ge)),Ge.t&&w[Ge.t]){if(Ce.t&&Ce.t==Ge.t){var be=w[Ce.t].transform(Ce.o,Ge.o,Ne);if(p(be),Ce.si==null&&Ce.sd==null)return!_(be)||0<be.length?(Ce.o=be,Ce):null;for(var pt=Ce.p,Dt=[],$t=0;$t<be.length;$t++)Ce.o=[be[$t]],Ce.p=pt.slice(),S(Ce),v.append(Dt,Ce),p(Dt);return Dt}return Ce}return;case M:var qt=I,Wt=L,oe=B;return p(qt),p(Wt),oe=oe==0?"A":"B",qt.cop?(qt=m(qt),Wt=a.ct(qt.cop,Wt.cop,oe),qt=(qt.cop=Wt).length==0?null:qt):(p(qt),qt);case J:var X=I,lt=L,vt=B;if(h(X),h(lt),lt.p[lt.p.length-1]=="codoxText"&&X.p.length>lt.p.length&&typeof X.p[lt.p.length]=="string"&&X.p[lt.p.length].search(/^codoxVP-/)==0){if(lt.delEmbedId!==void 0){var Vt=X.p[lt.p.length].replace(/^codoxVP-/,"");h(lt.delEmbedId);for(var te=0;lt.delEmbedId.length;te++)if(Vt==lt.delEmbedId[te])return null}return X}return vt=vt==1,X.cop?(X=m(X),vt=u.tf(lt.cop,X.cop,vt),X=(X.cop=vt).length==0?null:X):(p(X),X);default:throw new Error("json-ot: unkown op type ".concat(It))}}catch(Zt){console.error(Zt)}}function P(T,I,L,B,Y){function Z(rt,Q){Q=Q.liObj?Q.liObj.length:1,rt.lm!==void 0?rt.lm+=Q:rt.p[Y]+=Q}`codox: resolveFT (in)
|
|
61
61
|
c = `.concat(p(T),`
|
|
62
62
|
otherC = `).concat(p(I),`
|
|
63
63
|
otherCic = `).concat(L,"; type = ").concat(B,"; common = ").concat(Y),T.ic=T.ic||0,I.ic=I.ic||0,T.ic>I.ic+L?(Z(T,I),`codox: resolve a FT (++).
|
|
@@ -72,7 +72,7 @@ otherC = `).concat(p(I),`
|
|
|
72
72
|
otherCic = `).concat(L,"; type = ").concat(B):`codox: resolve a FT (no change).
|
|
73
73
|
c = `.concat(p(T),`
|
|
74
74
|
otherC = `).concat(p(I),`
|
|
75
|
-
otherCic = `).concat(L,"; type = ").concat(B,"; common = ").concat(Y)}function U(T,I,L,B){p(I),p(L);var Y,Z,rt={p:L.p.slice(),ld:0,lmld:!0},Q={p:L.lm.slice(),li:0,lmli:!0},tt=(L.orglm!==void 0&&(rt.orglm=L.orglm,Q.orglm=L.orglm),L.ic!==void 0&&(Q.ic=L.ic),K(0,I,rt,B));return p(tt),tt==null||I.ld!==void 0&&I.li!==void 0&&tt.ld==null?I.lmld==null?((tt=m(I)).p=Q.p.slice(),p(tt),Y=I.p.length,(Z=L.p.length)<Y&&(tt.p=tt.p.concat(I.p.slice(Z))),p(tt),tt):(p(tt),null):(p(tt),p(Q),tt=K(0,tt,Q,B),p(tt),p(rt),!G(I,rt)||G(I,Q)||I.lmld!==void 0||I.ld===void 0&&I.od===void 0?(p(tt),tt):(Y=null,Z=function(nt,et){var at=null,ct={data:nt},gt="data";p(et),p(ct[gt]),p(gt),p(nt);for(var wt=0;wt<et.length;wt++){var St=et[wt];if(ct=(at=ct)[gt],p(ct[gt=St]),p(gt),p(nt),at==null)throw new Error("Path invalid")}return p(ct[gt]),p(gt),p(nt),ct[gt]}(Y=I.ld!==void 0?m(I.ld):m(I.od),L.p.slice(I.p.length)),p(Z),rt={p:L.lm.slice(),ld:Z},p(rt),Q={p:L.p.slice(I.p.length),ld:Z},I.ld!==void 0?tt.ld=v.apply(Y,[Q]):tt.od=v.apply(Y,[Q]),p(Q),p(tt),p(rt),p(tt),L=K(0,rt,tt,B),p(L),(Z=[tt]).push(L),Z))}function V(T,I,L,B){p(I),p(L);var Y={p:I.p.slice(),ld:0,lmld:!0},Z={p:I.lm.slice(),li:0,lmli:!0},rt=(I.orglm!==void 0&&(Y.orglm=I.orglm,Z.orglm=I.orglm),I.ic!==void 0&&(Z.ic=I.ic),K(0,Y,L,B));if(L.lm!==void 0){var Q=m(L.p);if(Q[L.p.length-1]=L.lm,function(tt,nt){if(!Array.isArray(tt)||!Array.isArray(nt))throw new Error("ESTOP: p1/p2 is not an array!");if(tt.length===nt.length){for(var et=0;et<tt.length;et++)if(tt[et]!==nt[et])return;return 1}}(rt.p,Q))return null}else if(rt==null)return L.ld!==void 0&&L.li!==void 0&&L.p.length==I.p.length?I:(p(rt),null);return p(L),p(Y),Q=K(0,L,Y,F(B)),p(Q),L=m(I),(Y=K(0,Z,Q,B))!==null?(L=q(rt,Y),p(L)):(L={p:I.p.slice(),ld:0},p(L)),L}function G(T,I){if(T.p.length>=I.p.length)return!1;for(var L=0;L<T.p.length;L++)if(T.p[L]!==I.p[L])return!1;return!0}function F(T){return T==0?1:T==1?0:void 0}function q(T,I){var L=[];return L={p:T.p.slice(),lm:I.p},I.ic!==void 0&&(L.ic=I.ic),p(L),L}v.transformComponent=function(T,I,L,B){var Y=I.lm!==void 0&&_(I.lm)||L.lm!==void 0&&_(L.lm)?function(rt,Q,tt,nt){var et,at,ct,gt,wt,St,Mt,Lt;return p(Q),p(tt),Q.lm!==void 0&&_(Q.lm)&&tt.lm!==void 0&&_(tt.lm)?(at=tt,ct=nt,p(et=Q),p(at),gt={p:et.p.slice(),ld:0,lmld:!0},wt={p:et.lm.slice(),li:0,lmli:!0},et.orglm!==void 0&&(gt.orglm=et.orglm,wt.orglm=et.orglm),et.ic!==void 0&&(wt.ic=et.ic),St=null,Mt=null,(Lt=U(0,gt,at,ct))==null?et.p.length==at.p.length&&ct==0?((St=m(et)).p=at.lm.slice(),p(St),St):G(at,et)?(p(at),p(et),(Lt={}).p=at.lm.slice(),Lt.ld=0,p(Lt),Lt.p=Lt.p.concat(et.p.slice(at.p.length)),p(Lt),Mt=U(0,wt,at,ct),p(Mt),St=q(Lt,Mt),p(St),St):(p(Lt),null):(p(at),et=V(0,at,gt,F(ct)),p(et),p(wt),p(et),et!=null?(Mt=et.lm!==void 0?(p(et),U(0,wt,et,ct)):(p(et),K(0,wt,et,ct)))==null?(p(Lt),Lt):(St=q(Lt,Mt),p(St),St):(St=G(gt,at)?(et={p:at.lm.slice(),li:0,lmli:!0},at.ic!==void 0&&(et.ic=at.ic),p(et),et=K(0,et,gt,F(ct)),p(et),q(Lt,Mt=K(0,wt,et,ct))):q(Lt,wt),p(St),St))):tt.lm!==void 0&&_(tt.lm)?U(0,Q,tt,nt):Q.lm!==void 0&&_(Q.lm)?V(0,Q,tt,nt):(p(Q),void p(tt))}(0,I,L,B):K(0,I,L,B);if(_(Y))for(var Z=0;Z<Y.length;Z++)p(Y[Z]),Y[Z].sd!==void 0||Y[Z].si!==void 0?T.push(Y[Z]):v.append(T,Y[Z]);else v.append(T,Y);return p(T),T},v.isPrefix=G,v.init=function(T){a.rtfi(T)},l(v,v.transformComponent,v.checkValidOp,v.append),v.registerSubtype(o),f.exports=v},{"../../codox-rt-type/src/":143,"../../codox-shared/src/com/lib":217,"../../codox-shared/src/com/log":218,"../../codox-shared/src/com/util":219,"../../codox-shared/src/dtf/dtf":220,"../../wave/js/domains/api/qjs-util":519,"./bootstrapTransform":58,"./pt":61,"@babel/runtime/helpers/interopRequireDefault":65,"@babel/runtime/helpers/slicedToArray":70,"@babel/runtime/helpers/toConsumableArray":71,"@babel/runtime/helpers/typeof":72}],61:[function(t,f,r){function n(a,c,u){return a.slice(0,c)+u+a.slice(c)}function e(a){if(typeof a.p!="number")throw new Error("component missing position field");if(typeof a.i=="string"==(typeof a.d=="string"))throw new Error("component needs an i or d field");if(a.p<0)throw new Error("position cannot be negative")}function s(a){for(var c=0;c<a.length;c++)e(a[c])}function i(a,c,u){return c.i!=null?c.p<a||c.p===a&&u?a+c.i.length:a:a<=c.p?a:a<=c.p+c.d.length?c.p:a-c.d.length}f=f.exports={name:"pt",create:function(a){if(a!=null&&typeof a!="string")throw new Error("Initial data must be a string");return a||""}};var l=(f.apply=function(a,c){var u;s(c);for(var h=0;h<c.length;h++){var p=c[h];if(p.i!=null)a=n(a,p.p,p.i);else{if(u=a.slice(p.p,p.p+p.d.length),p.d!==u)throw new Error("Delete component '"+p.d+"' does not match deleted text '"+u+"'");a=a.slice(0,p.p)+a.slice(p.p+p.d.length)}}return a},f._append=function(a,c){var u;c.i!==""&&c.d!==""&&(a.length===0?a.push(c):(u=a[a.length-1]).i!=null&&c.i!=null&&u.p<=c.p&&c.p<=u.p+u.i.length?a[a.length-1]={i:n(u.i,c.p-u.p,c.i),p:u.p}:u.d!=null&&c.d!=null&&c.p<=u.p&&u.p<=c.p+c.d.length?a[a.length-1]={d:n(c.d,u.p-c.p,u.d),p:c.p}:a.push(c))}),o=(f.compose=function(a,c){s(a),s(c);for(var u=a.slice(),h=0;h<c.length;h++)l(u,c[h]);return u},f.normalize=function(a){var c=[];a.i==null&&a.p==null||(a=[a]);for(var u=0;u<a.length;u++){var h=a[u];h.p==null&&(h.p=0),l(c,h)}return c},f.transformCursor=function(a,c,u){for(var h=u==="right",p=0;p<c.length;p++)a=i(a,c[p],h);return a},f._tc=function(a,c,u,h){if(e(c),e(u),c.i!=null)l(a,{i:c.i,p:i(c.p,u,h===1)});else if(u.i!=null)h=c.d,c.p<u.p&&(l(a,{d:h.slice(0,u.p-c.p),p:c.p}),h=h.slice(u.p-c.p)),h!==""&&l(a,{d:h,p:c.p+u.i.length});else if(c.p>=u.p+u.d.length)l(a,{d:c.d,p:c.p-u.d.length});else if(c.p+c.d.length<=u.p)l(a,c);else{h={d:"",p:c.p};var p=(c.p<u.p&&(h.d=c.d.slice(0,u.p-c.p)),c.p+c.d.length>u.p+u.d.length&&(h.d+=c.d.slice(u.p+u.d.length-c.p)),Math.max(c.p,u.p)),m=Math.min(c.p+c.d.length,u.p+u.d.length);if(c.d.slice(p-c.p,m-c.p)!==u.d.slice(p-u.p,m-u.p))throw new Error("Delete ops delete different text in the same region of the document");h.d!==""&&(h.p=i(h.p,u),l(a,h))}return a});f.invert=function(a){a=a.slice().reverse();for(var c,u=0;u<a.length;u++)a[u]=(c=a[u]).i!=null?{d:c.i,p:c.p}:{i:c.d,p:c.p};return a},t("./bootstrapTransform")(f,o,s,l)},{"./bootstrapTransform":58}],62:[function(t,f,r){arguments[4][1][0].apply(r,arguments)},{dup:1}],63:[function(t,f,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],64:[function(t,f,r){arguments[4][3][0].apply(r,arguments)},{"./arrayLikeToArray.js":62,dup:3}],65:[function(t,f,r){arguments[4][11][0].apply(r,arguments)},{dup:11}],66:[function(t,f,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],67:[function(t,f,r){arguments[4][15][0].apply(r,arguments)},{dup:15}],68:[function(t,f,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],69:[function(t,f,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],70:[function(t,f,r){arguments[4][20][0].apply(r,arguments)},{"./arrayWithHoles.js":63,"./iterableToArrayLimit.js":67,"./nonIterableRest.js":68,"./unsupportedIterableToArray.js":73,dup:20}],71:[function(t,f,r){arguments[4][21][0].apply(r,arguments)},{"./arrayWithoutHoles.js":64,"./iterableToArray.js":66,"./nonIterableSpread.js":69,"./unsupportedIterableToArray.js":73,dup:21}],72:[function(t,f,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],73:[function(t,f,r){arguments[4][23][0].apply(r,arguments)},{"./arrayLikeToArray.js":62,dup:23}],74:[function(t,f,r){var n=t("./toPropertyKey.js");f.exports=function(e,s,i){return(s=n(s))in e?Object.defineProperty(e,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[s]=i,e},f.exports.__esModule=!0,f.exports.default=f.exports},{"./toPropertyKey.js":77}],75:[function(t,f,r){f.exports=function(n){return n&&n.__esModule?n:{default:n}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],76:[function(t,f,r){var n=t("./typeof.js").default;f.exports=function(e,s){if(n(e)!=="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i===void 0)return(s==="string"?String:Number)(e);if(i=i.call(e,s||"default"),n(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")},f.exports.__esModule=!0,f.exports.default=f.exports},{"./typeof.js":78}],77:[function(t,f,r){var n=t("./typeof.js").default,e=t("./toPrimitive.js");f.exports=function(s){return s=e(s,"string"),n(s)==="symbol"?s:String(s)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./toPrimitive.js":76,"./typeof.js":78}],78:[function(t,f,r){function n(e){return f.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},f.exports.__esModule=!0,f.exports.default=f.exports,n(e)}f.exports=n,f.exports.__esModule=!0,f.exports.default=f.exports},{}],79:[function(t,f,r){var n=t("call-bind/callBound")("ArrayBuffer.prototype.byteLength",!0),e=t("is-array-buffer");f.exports=function(s){return e(s)?n?n(s):s.byteLength:NaN}},{"call-bind/callBound":81,"is-array-buffer":103}],80:[function(t,f,r){(function(n){(function(){var e=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],s=typeof globalThis>"u"?n:globalThis;f.exports=function(){for(var i=[],l=0;l<e.length;l++)typeof s[e[l]]=="function"&&(i[i.length]=e[l]);return i}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],81:[function(t,f,r){var n=t("get-intrinsic"),e=t("./"),s=e(n("String.prototype.indexOf"));f.exports=function(i,l){return typeof(l=n(i,!!l))=="function"&&-1<s(i,".prototype.")?e(l):l}},{"./":82,"get-intrinsic":92}],82:[function(t,f,r){var n=t("function-bind"),e=(t=t("get-intrinsic"))("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),i=t("%Reflect.apply%",!0)||n.call(s,e),l=t("%Object.getOwnPropertyDescriptor%",!0),o=t("%Object.defineProperty%",!0),a=t("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}function c(){return i(n,e,arguments)}f.exports=function(u){var h=i(n,s,arguments);return l&&o&&l(h,"length").configurable&&o(h,"length",{value:1+a(0,u.length-(arguments.length-1))}),h},o?o(f.exports,"apply",{value:c}):f.exports.apply=c},{"function-bind":90,"get-intrinsic":92}],83:[function(t,f,r){var n=t("object.assign"),e=t("call-bind/callBound"),s=t("regexp.prototype.flags"),i=t("get-intrinsic"),l=t("es-get-iterator"),o=t("side-channel"),a=t("object-is"),c=t("is-arguments"),u=t("isarray"),h=t("is-array-buffer"),p=t("is-date-object"),m=t("is-regex"),b=t("is-shared-array-buffer"),_=t("object-keys"),v=t("which-boxed-primitive"),w=t("which-collection"),x=t("which-typed-array"),S=t("array-buffer-byte-length"),E=e("SharedArrayBuffer.prototype.byteLength",!0),k=e("Date.prototype.getTime"),D=Object.getPrototypeOf,N=e("Object.prototype.toString"),O=i("%Set%",!0),R=e("Map.prototype.has",!0),A=e("Map.prototype.get",!0),z=e("Map.prototype.size",!0),H=e("Set.prototype.add",!0),$=e("Set.prototype.delete",!0),M=e("Set.prototype.has",!0),J=e("Set.prototype.size",!0);function K(F,q,T,I){for(var L,B=l(F);(L=B.next())&&!L.done;)if(V(q,L.value,T,I))return $(F,L.value),1}function P(F){return F===void 0?null:typeof F!="object"?typeof F!="symbol"&&(typeof F!="string"&&typeof F!="number"||+F==+F):void 0}function U(F,q,T,I,L,B){for(var Y,Z=l(F);(Y=Z.next())&&!Y.done;)if(V(T,Y=Y.value,L,B)&&V(I,A(q,Y),L,B))return $(F,Y),1}function V(F,q,T,I){if((T=T||{}).strict?a(F,q):F===q)return!0;if(v(F)!==v(q))return!1;if(!F||!q||typeof F!="object"&&typeof q!="object")return T.strict?a(F,q):F==q;var L,B,Y,Z=I.has(F),rt=I.has(q);if(Z&&rt){if(I.get(F)===I.get(q))return!0}else L={};Z||I.set(F,L),rt||I.set(q,L);var Q=F,tt=q,nt=T,et=I;if(typeof Q!=typeof tt||Q==null||tt==null||N(Q)!==N(tt)||c(Q)!==c(tt)||(Z=u(Q))!==(rt=u(tt))||(Z=Q instanceof Error)!=(rt=tt instanceof Error)||(Z||rt)&&(Q.name!==tt.name||Q.message!==tt.message)||(Z=m(Q))!==(rt=m(tt))||(Z||rt)&&(Q.source!==tt.source||s(Q)!==s(tt))||(Z=p(Q))!==(rt=p(tt))||(Z||rt)&&k(Q)!==k(tt)||nt.strict&&D&&D(Q)!==D(tt)||(Z=x(Q),rt=x(tt),(Z||rt)&&Z!==rt)||(Z=G(Q))!==(rt=G(tt)))return!1;if(Z||rt){if(Q.length!==tt.length)return!1;for(B=0;B<Q.length;B++)if(Q[B]!==tt[B])return!1;return!0}if((Z=h(Q))!==(rt=h(tt)))return!1;if(Z||rt)return S(Q)===S(tt)&&typeof Uint8Array=="function"&&V(new Uint8Array(Q),new Uint8Array(tt),nt,et);if((Z=b(Q))!==(rt=b(tt)))return!1;if(Z||rt)return E(Q)===E(tt)&&typeof Uint8Array=="function"&&V(new Uint8Array(Q),new Uint8Array(tt),nt,et);if(typeof Q!=typeof tt)return!1;var at=_(Q),ct=_(tt);if(at.length!==ct.length)return!1;for(at.sort(),ct.sort(),B=at.length-1;0<=B;B--)if(at[B]!=ct[B])return!1;for(B=at.length-1;0<=B;B--)if(!V(Q[Y=at[B]],tt[Y],nt,et))return!1;if((Z=w(Q))===(rt=w(tt))){if(Z!=="Set"&&rt!=="Set")return Z!=="Map"||function(It,Ot,Et,Ct){if(z(It)!==z(Ot))return!1;for(var Nt,ht,dt,Ft,Jt,Xt=l(It),Qt=l(Ot);(Ft=Xt.next())&&!Ft.done;)if(dt=Ft.value[0],Ft=Ft.value[1],dt&&typeof dt=="object")ht=ht||new O,H(ht,dt);else if((Jt=A(Ot,dt))===void 0&&!R(Ot,dt)||!V(Ft,Jt,Et,Ct)){if(Et.strict||!function(ve,kt,ee,pe,Le,Be){if((ee=P(ee))!=null)return ee;var qe=A(kt,ee);return Le=n({},Le,{strict:!1}),(qe!==void 0||R(kt,ee))&&V(pe,qe,Le,Be)&&!R(ve,ee)&&V(pe,qe,Le,Be)}(It,Ot,dt,Ft,Et,Ct))return!1;ht=ht||new O,H(ht,dt)}if(ht){for(;(Nt=Qt.next())&&!Nt.done;)if(dt=Nt.value[0],Jt=Nt.value[1],dt&&typeof dt=="object"){if(!U(ht,It,dt,Jt,Et,Ct))return!1}else if(!(Et.strict||It.has(dt)&&V(A(It,dt),Jt,Et,Ct)||U(ht,It,dt,Jt,n({},Et,{strict:!1}),Ct)))return!1;return J(ht)===0}return!0}(Q,tt,nt,et);var gt=Q,wt=tt,St=nt,Mt=et;if(J(gt)!==J(wt))return!1;for(var Lt,Pt,yt,jt=l(gt),At=l(wt);(Lt=jt.next())&&!Lt.done;)if(Lt.value&&typeof Lt.value=="object")yt=yt||new O,H(yt,Lt.value);else if(!M(wt,Lt.value)){if(St.strict||!function(It,Ot,Et){return(Et=P(Et))!=null?Et:M(Ot,Et)&&!M(It,Et)}(gt,wt,Lt.value))return!1;yt=yt||new O,H(yt,Lt.value)}if(yt){for(;(Pt=At.next())&&!Pt.done;)if(Pt.value&&typeof Pt.value=="object"){if(!K(yt,Pt.value,St.strict,Mt))return!1}else if(!St.strict&&!M(gt,Pt.value)&&!K(yt,Pt.value,St.strict,Mt))return!1;return J(yt)===0}return!0}return!1}function G(F){return!(!F||typeof F!="object"||typeof F.length!="number"||typeof F.copy!="function"||typeof F.slice!="function"||0<F.length&&typeof F[0]!="number"||!(F.constructor&&F.constructor.isBuffer&&F.constructor.isBuffer(F)))}f.exports=function(F,q,T){return V(F,q,T,o())}},{"array-buffer-byte-length":79,"call-bind/callBound":81,"es-get-iterator":86,"get-intrinsic":92,"is-arguments":102,"is-array-buffer":103,"is-date-object":107,"is-regex":110,"is-shared-array-buffer":112,isarray:84,"object-is":120,"object-keys":124,"object.assign":127,"regexp.prototype.flags":131,"side-channel":134,"which-boxed-primitive":136,"which-collection":137,"which-typed-array":138}],84:[function(t,f,r){var n={}.toString;f.exports=Array.isArray||function(e){return n.call(e)=="[object Array]"}},{}],85:[function(t,f,r){function n(u,h){var p=2<arguments.length?arguments[2]:{},m=e(h);s&&(m=l.call(m,Object.getOwnPropertySymbols(h)));for(var b=0;b<m.length;b+=1)(function(_,v,w,x){if(v in _){if(x===!0){if(_[v]===w)return}else if(!a(x)||!x())return}c?o(_,v,{configurable:!0,enumerable:!1,value:w,writable:!0}):_[v]=w})(u,m[b],h[m[b]],p[m[b]])}var e=t("object-keys"),s=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,l=Array.prototype.concat,o=Object.defineProperty,a=function(u){return typeof u=="function"&&i.call(u)==="[object Function]"},c=(t=t("has-property-descriptors")(),o&&t);n.supportsDescriptors=!!c,f.exports=n},{"has-property-descriptors":95,"object-keys":124}],86:[function(t,f,r){(function(n){(function(){var e,s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S,E,k,D=t("is-arguments"),N=t("stop-iteration-iterator");t("has-symbols")()||t("has-symbols/shams")()?(e=Symbol.iterator,f.exports=function(O){return O!=null&&O[e]!==void 0?O[e]():D(O)?Array.prototype[e].call(O):void 0}):(s=t("isarray"),i=t("is-string"),l=(o=t("get-intrinsic"))("%Map%",!0),o=o("%Set%",!0),a=t("call-bind/callBound"),c=a("Array.prototype.push"),u=a("String.prototype.charCodeAt"),h=a("String.prototype.slice"),p=function(O){var R=0;return{next:function(){var A,z=R>=O.length;return z||(A=O[R],R+=1),{done:z,value:A}}}},m=function(O,R){return s(O)||D(O)?p(O):i(O)?(A=0,{next:function(){var z=function($,M){if($.length<=M+1)return M+1;var J=u($,M);return J<55296||56319<J||(J=u($,M+1))<56320||57343<J?M+1:M+2}(O,A),H=h(O,A,z);return{done:(A=z)>O.length,value:H}}}):R&&O["_es6-shim iterator_"]!==void 0?O["_es6-shim iterator_"]():void 0;var A},l||o?(b=t("is-map"),_=t("is-set"),v=a("Map.prototype.forEach",!0),w=a("Set.prototype.forEach",!0),n!==void 0&&n.versions&&n.versions.node||(x=a("Map.prototype.iterator",!0),S=a("Set.prototype.iterator",!0)),E=a("Map.prototype.@@iterator",!0)||a("Map.prototype._es6-shim iterator_",!0),k=a("Set.prototype.@@iterator",!0)||a("Set.prototype._es6-shim iterator_",!0),f.exports=function(O){return function(R){if(b(R)){if(x)return N(x(R));if(E)return E(R);var A;if(v)return A=[],v(R,function(H,$){c(A,[$,H])}),p(A)}var z;if(_(R))return S?N(S(R)):k?k(R):w?(z=[],w(R,function(H){c(z,H)}),p(z)):void 0}(O)||m(O)}):f.exports=function(O){if(O!=null)return m(O,!0)})}).call(this)}).call(this,t("_process"))},{_process:386,"call-bind/callBound":81,"get-intrinsic":92,"has-symbols":97,"has-symbols/shams":98,"is-arguments":102,"is-map":108,"is-set":111,"is-string":113,isarray:87,"stop-iteration-iterator":135}],87:[function(t,f,r){arguments[4][84][0].apply(r,arguments)},{dup:84}],88:[function(t,f,r){var n=t("is-callable"),e=Object.prototype.toString,s=Object.prototype.hasOwnProperty;f.exports=function(i,l,o){if(!n(l))throw new TypeError("iterator must be a function");var a;if(3<=arguments.length&&(a=o),e.call(i)==="[object Array]")for(var c=i,u=l,h=a,p=0,m=c.length;p<m;p++)s.call(c,p)&&(h==null?u(c[p],p,c):u.call(h,c[p],p,c));else if(typeof i=="string")for(var b=i,_=l,v=a,w=0,x=b.length;w<x;w++)v==null?_(b.charAt(w),w,b):_.call(v,b.charAt(w),w,b);else{var S,E=i,k=l,D=a;for(S in E)s.call(E,S)&&(D==null?k(E[S],S,E):k.call(D,E[S],S,E))}}},{"is-callable":106}],89:[function(t,f,r){var n=Array.prototype.slice,e=Object.prototype.toString;f.exports=function(s){var i=this;if(typeof i!="function"||e.call(i)!=="[object Function]")throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var l,o,a=n.call(arguments,1),c=Math.max(0,i.length-a.length),u=[],h=0;h<c;h++)u.push("$"+h);return l=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(function(){var p;return this instanceof l?(p=i.apply(this,a.concat(n.call(arguments))),Object(p)===p?p:this):i.apply(s,a.concat(n.call(arguments)))}),i.prototype&&((o=function(){}).prototype=i.prototype,l.prototype=new o,o.prototype=null),l}},{}],90:[function(t,f,r){t=t("./implementation"),f.exports=Function.prototype.bind||t},{"./implementation":89}],91:[function(t,f,r){function n(){return typeof(function(){}).name=="string"}var e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}n.functionsHaveConfigurableNames=function(){if(!n()||!e)return!1;var i=e(function(){},"name");return!!i&&!!i.configurable};var s=Function.prototype.bind;n.boundFunctionsHaveNames=function(){return n()&&typeof s=="function"&&(function(){}).bind().name!==""},f.exports=n},{}],92:[function(t,f,r){var n,e=SyntaxError,s=Function,i=TypeError,l=function(R){try{return s('"use strict"; return ('+R+").constructor;")()}catch{}},o=Object.getOwnPropertyDescriptor;if(o)try{o({},"")}catch{o=null}function a(){throw new i}var c=o?function(){try{return a}catch{try{return o(arguments,"callee").get}catch{return a}}}():a,u=t("has-symbols")(),h=t("has-proto")(),p=Object.getPrototypeOf||(h?function(R){return R.__proto__}:null),m={},b=(h=typeof Uint8Array<"u"&&p?p(Uint8Array):n,{"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":u&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&p?p(p([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map<"u"&&u&&p?p(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set<"u"&&u&&p?p(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&p?p(""[Symbol.iterator]()):n,"%Symbol%":u?Symbol:n,"%SyntaxError%":e,"%ThrowTypeError%":c,"%TypedArray%":h,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet});if(p)try{null.error}catch(R){u=p(p(R)),b["%Error.prototype%"]=u}function _(R){var A,z;return R==="%AsyncFunction%"?A=l("async function () {}"):R==="%GeneratorFunction%"?A=l("function* () {}"):R==="%AsyncGeneratorFunction%"?A=l("async function* () {}"):R==="%AsyncGenerator%"?(z=_("%AsyncGeneratorFunction%"))&&(A=z.prototype):R==="%AsyncIteratorPrototype%"&&(z=_("%AsyncGenerator%"))&&p&&(A=p(z.prototype)),b[R]=A}var v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=(c=t("function-bind"),t("has")),x=c.call(Function.call,Array.prototype.concat),S=c.call(Function.apply,Array.prototype.splice),E=c.call(Function.call,String.prototype.replace),k=c.call(Function.call,String.prototype.slice),D=c.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g;f.exports=function(R,A){if(typeof R!="string"||R.length===0)throw new i("intrinsic name must be a non-empty string");if(1<arguments.length&&typeof A!="boolean")throw new i('"allowMissing" argument must be a boolean');if(D(/^%?[^%]*%?$/,R)===null)throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=function(F){var q=k(F,0,1),T=k(F,-1);if(q==="%"&&T!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(T==="%"&&q!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var I=[];return E(F,N,function(L,B,Y,Z){I[I.length]=Y?E(Z,O,"$1"):B||L}),I}(R),H=0<z.length?z[0]:"",$=function(F,q){var T,I=F;if(w(v,I)&&(I="%"+(T=v[I])[0]+"%"),w(b,I)){var L=b[I];if((L=L===m?_(I):L)!==void 0||q)return{alias:T,name:I,value:L};throw new i("intrinsic "+F+" exists, but is not available. Please file an issue!")}throw new e("intrinsic "+F+" does not exist!")}("%"+H+"%",A),M=($.name,$.value),J=!1;($=$.alias)&&(H=$[0],S(z,x([0,1],$)));for(var K=1,P=!0;K<z.length;K+=1){var U=z[K],V=k(U,0,1),G=k(U,-1);if((V==='"'||V==="'"||V==="`"||G==='"'||G==="'"||G==="`")&&V!==G)throw new e("property names with quotes must have matching quotes");if(U!=="constructor"&&P||(J=!0),w(b,V="%"+(H+="."+U)+"%"))M=b[V];else if(M!=null){if(!(U in M)){if(A)return;throw new i("base intrinsic for "+R+" exists, but the property is not available.")}M=o&&K+1>=z.length?(P=!!(G=o(M,U)))&&"get"in G&&!("originalValue"in G.get)?G.get:M[U]:(P=w(M,U),M[U]),P&&!J&&(b[V]=M)}}return M}},{"function-bind":90,has:100,"has-proto":96,"has-symbols":97}],93:[function(t,f,r){if(t=t("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0))try{t([],"length")}catch{t=null}f.exports=t},{"get-intrinsic":92}],94:[function(t,f,r){var n=typeof BigInt<"u"&&BigInt;f.exports=function(){return typeof n=="function"&&typeof BigInt=="function"&&typeof n(42)=="bigint"&&typeof BigInt(42)=="bigint"}},{}],95:[function(t,f,r){function n(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1}var e=t("get-intrinsic")("%Object.defineProperty%",!0);n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},f.exports=n},{"get-intrinsic":92}],96:[function(t,f,r){var n={foo:{}},e=Object;f.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof e)}},{}],97:[function(t,f,r){var n=typeof Symbol<"u"&&Symbol,e=t("./shams");f.exports=function(){return typeof n=="function"&&typeof Symbol=="function"&&typeof n("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&e()}},{"./shams":98}],98:[function(t,f,r){f.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},e=Symbol("test"),s=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;for(e in n[e]=42,n)return!1;return!(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0||(s=Object.getOwnPropertySymbols(n)).length!==1||s[0]!==e||!Object.prototype.propertyIsEnumerable.call(n,e)||typeof Object.getOwnPropertyDescriptor=="function"&&((s=Object.getOwnPropertyDescriptor(n,e)).value!==42||s.enumerable!==!0))}},{}],99:[function(t,f,r){var n=t("has-symbols/shams");f.exports=function(){return n()&&!!Symbol.toStringTag}},{"has-symbols/shams":98}],100:[function(t,f,r){t=t("function-bind"),f.exports=t.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":90}],101:[function(t,f,r){var n=t("get-intrinsic"),e=t("has"),s=t("side-channel")(),i=n("%TypeError%"),l={assert:function(o,a){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");if(s.assert(o),!l.has(o,a))throw new i("`"+a+"` is not present on `O`")},get:function(o,a){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");return(o=s.get(o))&&o["$"+a]},has:function(o,a){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");return!!(o=s.get(o))&&e(o,"$"+a)},set:function(o,a,c){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");var u=s.get(o);u||s.set(o,u={}),u["$"+a]=c}};Object.freeze&&Object.freeze(l),f.exports=l},{"get-intrinsic":92,has:100,"side-channel":134}],102:[function(t,f,r){function n(l){return!(s&&l&&typeof l=="object"&&Symbol.toStringTag in l)&&i(l)==="[object Arguments]"}function e(l){return!!n(l)||l!==null&&typeof l=="object"&&typeof l.length=="number"&&0<=l.length&&i(l)!=="[object Array]"&&i(l.callee)==="[object Function]"}var s=t("has-tostringtag/shams")(),i=t("call-bind/callBound")("Object.prototype.toString");t=function(){return n(arguments)}(),n.isLegacyArguments=e,f.exports=t?n:e},{"call-bind/callBound":81,"has-tostringtag/shams":99}],103:[function(t,f,r){var n=t("call-bind"),e=t("call-bind/callBound"),s=t("get-intrinsic"),i=t("is-typed-array"),l=(t=s("ArrayBuffer",!0),s("Float32Array",!0)),o=e("ArrayBuffer.prototype.byteLength",!0),a=(s=t&&!o&&new t().slice)&&n(s);f.exports=o||a?function(c){if(!c||typeof c!="object")return!1;try{return o?o(c):a(c,0),!0}catch{return!1}}:l?function(c){try{return new l(c).buffer===c&&!i(c)}catch(u){return typeof c=="object"&&u.name==="RangeError"}}:function(c){return!1}},{"call-bind":82,"call-bind/callBound":81,"get-intrinsic":92,"is-typed-array":115}],104:[function(t,f,r){var n;t("has-bigints")()?(n=BigInt.prototype.valueOf,f.exports=function(e){return e!=null&&typeof e!="boolean"&&typeof e!="string"&&typeof e!="number"&&typeof e!="symbol"&&typeof e!="function"&&(typeof e=="bigint"||function(s){try{return n.call(s),!0}catch{}return!1}(e))}):f.exports=function(e){return!1}},{"has-bigints":94}],105:[function(t,f,r){var n=t("call-bind/callBound"),e=n("Boolean.prototype.toString"),s=n("Object.prototype.toString"),i=t("has-tostringtag/shams")();f.exports=function(l){return typeof l=="boolean"||l!==null&&typeof l=="object"&&(i&&Symbol.toStringTag in l?function(o){try{return e(o),!0}catch{return!1}}(l):s(l)==="[object Boolean]")}},{"call-bind/callBound":81,"has-tostringtag/shams":99}],106:[function(t,f,r){var n,e,s=Function.prototype.toString,i=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof i=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw e}}),e={},i(function(){throw 42},null,n)}catch(m){m!==e&&(i=null)}else i=null;function l(m){try{var b=s.call(m);return a.test(b)}catch{return}}function o(m){try{return!l(m)&&(s.call(m),!0)}catch{return!1}}var a=/^\s*class\b/,c=Object.prototype.toString,u=typeof Symbol=="function"&&!!Symbol.toStringTag,h=!(0 in[,]),p=function(){return!1};typeof document=="object"&&c.call(document.all)==c.call(document.all)&&(p=function(m){if(!(!h&&m||m!==void 0&&typeof m!="object"))try{var b=c.call(m);return(b==="[object HTMLAllCollection]"||b==="[object HTML document.all class]"||b==="[object HTMLCollection]"||b==="[object Object]")&&m("")==null}catch{}return!1}),f.exports=i?function(m){if(p(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;try{i(m,null,n)}catch(b){if(b!==e)return!1}return!l(m)&&o(m)}:function(m){if(p(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;if(u)return o(m);if(l(m))return!1;var b=c.call(m);return!(b!=="[object Function]"&&b!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(b))&&o(m)}},{}],107:[function(t,f,r){var n=Date.prototype.getDay,e=Object.prototype.toString,s=t("has-tostringtag/shams")();f.exports=function(i){if(typeof i!="object"||i===null)return!1;if(!s)return e.call(i)==="[object Date]";var l=i;try{return n.call(l),!0}catch{return!1}}},{"has-tostringtag/shams":99}],108:[function(t,f,r){var n,e=typeof Map=="function"&&Map.prototype?Map:null,s=typeof Set=="function"&&Set.prototype?Set:null,i=(e||(n=function(o){return!1}),e?Map.prototype.has:null),l=s?Set.prototype.has:null;f.exports=(n=n||i?n:function(o){return!1})||function(o){if(!o||typeof o!="object")return!1;try{if(i.call(o),l)try{l.call(o)}catch{return!0}return o instanceof e}catch{}return!1}},{}],109:[function(t,f,r){var n=Number.prototype.toString,e=Object.prototype.toString,s=t("has-tostringtag/shams")();f.exports=function(i){return typeof i=="number"||typeof i=="object"&&(s?function(l){try{return n.call(l),!0}catch{return!1}}(i):e.call(i)==="[object Number]")}},{"has-tostringtag/shams":99}],110:[function(t,f,r){var n,e,s,i,l,o=t("call-bind/callBound"),a=((t=t("has-tostringtag/shams")())&&(n=o("Object.prototype.hasOwnProperty"),e=o("RegExp.prototype.exec"),s={},l={toString:i=function(){throw s},valueOf:i},typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=i)),o("Object.prototype.toString")),c=Object.getOwnPropertyDescriptor;f.exports=t?function(u){if(!u||typeof u!="object")return!1;var h=c(u,"lastIndex");if(!h||!n(h,"value"))return!1;try{e(u,l)}catch(p){return p===s}}:function(u){return!(!u||typeof u!="object"&&typeof u!="function")&&a(u)==="[object RegExp]"}},{"call-bind/callBound":81,"has-tostringtag/shams":99}],111:[function(t,f,r){var n,e=typeof Map=="function"&&Map.prototype?Map:null,s=typeof Set=="function"&&Set.prototype?Set:null,i=(s||(n=function(o){return!1}),e?Map.prototype.has:null),l=s?Set.prototype.has:null;f.exports=(n=n||l?n:function(o){return!1})||function(o){if(!o||typeof o!="object")return!1;try{if(l.call(o),i)try{i.call(o)}catch{return!0}return o instanceof s}catch{}return!1}},{}],112:[function(t,f,r){var n=t("call-bind/callBound")("SharedArrayBuffer.prototype.byteLength",!0);f.exports=n?function(e){if(!e||typeof e!="object")return!1;try{return n(e),!0}catch{return!1}}:function(e){return!1}},{"call-bind/callBound":81}],113:[function(t,f,r){var n=String.prototype.valueOf,e=Object.prototype.toString,s=t("has-tostringtag/shams")();f.exports=function(i){return typeof i=="string"||typeof i=="object"&&(s?function(l){try{return n.call(l),!0}catch{return!1}}(i):e.call(i)==="[object String]")}},{"has-tostringtag/shams":99}],114:[function(t,f,r){var n,e,s=Object.prototype.toString;t("has-symbols")()?(n=Symbol.prototype.toString,e=/^Symbol\(.*\)$/,f.exports=function(i){if(typeof i=="symbol")return!0;if(s.call(i)!=="[object Symbol]")return!1;try{return typeof(l=i).valueOf()=="symbol"&&e.test(n.call(l))}catch{return!1}var l}):f.exports=function(i){return!1}},{"has-symbols":97}],115:[function(t,f,r){(function(n){(function(){var e=t("for-each"),s=t("available-typed-arrays"),i=t("call-bind/callBound"),l=i("Object.prototype.toString"),o=t("has-tostringtag/shams")(),a=t("gopd"),c=typeof globalThis>"u"?n:globalThis,u=s(),h=i("Array.prototype.indexOf",!0)||function(_,v){for(var w=0;w<_.length;w+=1)if(_[w]===v)return w;return-1},p=i("String.prototype.slice"),m={},b=Object.getPrototypeOf;o&&a&&b&&e(u,function(_){var v,w=new c[_];Symbol.toStringTag in w&&(w=b(w),(v=a(w,Symbol.toStringTag))||(w=b(w),v=a(w,Symbol.toStringTag)),m[_]=v.get)}),f.exports=function(_){return!(!_||typeof _!="object")&&(o&&Symbol.toStringTag in _?!!a&&(v=_,w=!1,e(m,function(x,S){if(!w)try{w=x.call(v)===S}catch{}}),w):(_=p(l(_),8,-1),-1<h(u,_)));var v,w}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":80,"call-bind/callBound":81,"for-each":88,gopd:93,"has-tostringtag/shams":99}],116:[function(t,f,r){var n,e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,s=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,i=e?e.prototype.has:null,l=s?s.prototype.has:null;f.exports=(n=(n=e?n:function(o){return!1})||i?n:function(o){return!1})||function(o){if(!o||typeof o!="object")return!1;try{if(i.call(o,i),l)try{l.call(o,l)}catch{return!0}return o instanceof e}catch{}return!1}},{}],117:[function(t,f,r){var n,e=t("get-intrinsic"),s=(t=t("call-bind/callBound"),e("%WeakSet%",!0)),i=t("WeakSet.prototype.has",!0);i?(n=t("WeakMap.prototype.has",!0),f.exports=function(l){if(!l||typeof l!="object")return!1;try{if(i(l,i),n)try{n(l,n)}catch{return!0}return l instanceof s}catch{}return!1}):f.exports=function(l){return!1}},{"call-bind/callBound":81,"get-intrinsic":92}],118:[function(t,f,r){var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=n&&e&&typeof e.get=="function"?e.get:null,i=n&&Map.prototype.forEach,l=(e=typeof Set=="function"&&Set.prototype,n=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,e&&n&&typeof n.get=="function"?n.get:null),o=e&&Set.prototype.forEach,a=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,c=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,u=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,p=Object.prototype.toString,m=Function.prototype.toString,b=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,k=Array.prototype.join,D=Array.prototype.slice,N=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,z=typeof Symbol=="function"&&typeof Symbol.iterator=="object",H=typeof Symbol=="function"&&Symbol.toStringTag?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect:Object).getPrototypeOf||([].__proto__===Array.prototype?function(nt){return nt.__proto__}:null);function J(nt,et){if(nt===1/0||nt===-1/0||nt!=nt||nt&&-1e3<nt&&nt<1e3||S.call(/e/,et))return et;var at=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof nt=="number"){var ct=nt<0?-N(-nt):N(nt);if(ct!==nt)return nt=String(ct),ct=_.call(et,nt.length+1),v.call(nt,at,"$&_")+"."+v.call(v.call(ct,/([0-9]{3})/g,"$&_"),/_$/,"")}return v.call(et,at,"$&_")}var K=t("./util.inspect"),P=F(n=K.custom)?n:null;function U(nt,et,at){return(at=(at.quoteStyle||et)==="double"?'"':"'")+nt+at}function V(nt){return!(I(nt)!=="[object Array]"||H&&typeof nt=="object"&&H in nt)}function G(nt){return!(I(nt)!=="[object RegExp]"||H&&typeof nt=="object"&&H in nt)}function F(nt){if(z)return nt&&typeof nt=="object"&&nt instanceof Symbol;if(typeof nt=="symbol")return 1;if(nt&&typeof nt=="object"&&A)try{return A.call(nt),1}catch{}}f.exports=function nt(et,at,ct,gt){var wt=at||{};if(T(wt,"quoteStyle")&&wt.quoteStyle!=="single"&&wt.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(T(wt,"maxStringLength")&&(typeof wt.maxStringLength=="number"?wt.maxStringLength<0&&wt.maxStringLength!==1/0:wt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');if(typeof(at=!T(wt,"customInspect")||wt.customInspect)!="boolean"&&at!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(T(wt,"indent")&&wt.indent!==null&&wt.indent!==" "&&!(parseInt(wt.indent,10)===wt.indent&&0<wt.indent))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(T(wt,"numericSeparator")&&typeof wt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var St,Mt,Lt,Pt,yt,jt,At=wt.numericSeparator;if(et===void 0)return"undefined";if(et===null)return"null";if(typeof et=="boolean")return et?"true":"false";if(typeof et=="string")return function dt(Ft,Jt){if(Ft.length>Jt.maxStringLength)return Xt="... "+(Xt=Ft.length-Jt.maxStringLength)+" more character"+(1<Xt?"s":""),dt(_.call(Ft,0,Jt.maxStringLength),Jt)+Xt;var Xt=v.call(v.call(Ft,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,B);return U(Xt,"single",Jt)}(et,wt);if(typeof et=="number"){if(et===0)return 0<1/0/et?"0":"-0";var It=String(et);return At?J(et,It):It}if(typeof et=="bigint")return It=String(et)+"n",At?J(et,It):It;if((At=wt.depth===void 0?5:wt.depth)<=(ct=ct===void 0?0:ct)&&0<At&&typeof et=="object")return V(et)?"[Array]":"[Object]";if(It=function(dt,Ft){var Jt;if(dt.indent===" ")Jt=" ";else{if(!(typeof dt.indent=="number"&&0<dt.indent))return null;Jt=k.call(Array(dt.indent+1)," ")}return{base:Jt,prev:k.call(Array(Ft+1),Jt)}}(wt,ct),gt===void 0)gt=[];else if(0<=L(gt,et))return"[Circular]";function Ot(dt,Ft,Jt){return Ft&&(gt=D.call(gt)).push(Ft),Jt?(Ft={depth:wt.depth},T(wt,"quoteStyle")&&(Ft.quoteStyle=wt.quoteStyle),nt(dt,Ft,ct+1,gt)):nt(dt,wt,ct+1,gt)}if(typeof et=="function"&&!G(et))return"[Function"+((ht=function(dt){return dt.name?dt.name:(dt=b.call(m.call(dt),/^function\s*([\w$]+)/))?dt[1]:null}(et))?": "+ht:" (anonymous)")+"]"+(0<(ht=tt(et,Ot)).length?" { "+k.call(ht,", ")+" }":"");if(F(et))return ht=z?v.call(String(et),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(et),typeof et!="object"||z?ht:Y(ht);if(function(dt){if(dt&&typeof dt=="object")return typeof HTMLElement<"u"&&dt instanceof HTMLElement?1:typeof dt.nodeName=="string"&&typeof dt.getAttribute=="function"}(et)){for(var Et="<"+x.call(String(et.nodeName)),Ct=et.attributes||[],Nt=0;Nt<Ct.length;Nt++)Et+=" "+Ct[Nt].name+"="+U((St=Ct[Nt].value,v.call(String(St),/"/g,""")),"double",wt);return Et+=">",et.childNodes&&et.childNodes.length&&(Et+="..."),Et+"</"+x.call(String(et.nodeName))+">"}if(V(et)){if(et.length===0)return"[]";var ht=tt(et,Ot);return It&&!function(dt){for(var Ft=0;Ft<dt.length;Ft++)if(0<=L(dt[Ft],`
|
|
75
|
+
otherCic = `).concat(L,"; type = ").concat(B,"; common = ").concat(Y)}function U(T,I,L,B){p(I),p(L);var Y,Z,rt={p:L.p.slice(),ld:0,lmld:!0},Q={p:L.lm.slice(),li:0,lmli:!0},tt=(L.orglm!==void 0&&(rt.orglm=L.orglm,Q.orglm=L.orglm),L.ic!==void 0&&(Q.ic=L.ic),K(0,I,rt,B));return p(tt),tt==null||I.ld!==void 0&&I.li!==void 0&&tt.ld==null?I.lmld==null?((tt=m(I)).p=Q.p.slice(),p(tt),Y=I.p.length,(Z=L.p.length)<Y&&(tt.p=tt.p.concat(I.p.slice(Z))),p(tt),tt):(p(tt),null):(p(tt),p(Q),tt=K(0,tt,Q,B),p(tt),p(rt),!G(I,rt)||G(I,Q)||I.lmld!==void 0||I.ld===void 0&&I.od===void 0?(p(tt),tt):(Y=null,Z=function(nt,et){var at=null,ct={data:nt},gt="data";p(et),p(ct[gt]),p(gt),p(nt);for(var wt=0;wt<et.length;wt++){var St=et[wt];if(ct=(at=ct)[gt],p(ct[gt=St]),p(gt),p(nt),at==null)throw new Error("Path invalid")}return p(ct[gt]),p(gt),p(nt),ct[gt]}(Y=I.ld!==void 0?m(I.ld):m(I.od),L.p.slice(I.p.length)),p(Z),rt={p:L.lm.slice(),ld:Z},p(rt),Q={p:L.p.slice(I.p.length),ld:Z},I.ld!==void 0?tt.ld=v.apply(Y,[Q]):tt.od=v.apply(Y,[Q]),p(Q),p(tt),p(rt),p(tt),L=K(0,rt,tt,B),p(L),(Z=[tt]).push(L),Z))}function V(T,I,L,B){p(I),p(L);var Y={p:I.p.slice(),ld:0,lmld:!0},Z={p:I.lm.slice(),li:0,lmli:!0},rt=(I.orglm!==void 0&&(Y.orglm=I.orglm,Z.orglm=I.orglm),I.ic!==void 0&&(Z.ic=I.ic),K(0,Y,L,B));if(L.lm!==void 0){var Q=m(L.p);if(Q[L.p.length-1]=L.lm,function(tt,nt){if(!Array.isArray(tt)||!Array.isArray(nt))throw new Error("ESTOP: p1/p2 is not an array!");if(tt.length===nt.length){for(var et=0;et<tt.length;et++)if(tt[et]!==nt[et])return;return 1}}(rt.p,Q))return null}else if(rt==null)return L.ld!==void 0&&L.li!==void 0&&L.p.length==I.p.length?I:(p(rt),null);return p(L),p(Y),Q=K(0,L,Y,F(B)),p(Q),L=m(I),(Y=K(0,Z,Q,B))!==null?(L=q(rt,Y),p(L)):(L={p:I.p.slice(),ld:0},p(L)),L}function G(T,I){if(T.p.length>=I.p.length)return!1;for(var L=0;L<T.p.length;L++)if(T.p[L]!==I.p[L])return!1;return!0}function F(T){return T==0?1:T==1?0:void 0}function q(T,I){var L=[];return L={p:T.p.slice(),lm:I.p},I.ic!==void 0&&(L.ic=I.ic),p(L),L}v.transformComponent=function(T,I,L,B){var Y=I.lm!==void 0&&_(I.lm)||L.lm!==void 0&&_(L.lm)?function(rt,Q,tt,nt){var et,at,ct,gt,wt,St,Mt,Lt;return p(Q),p(tt),Q.lm!==void 0&&_(Q.lm)&&tt.lm!==void 0&&_(tt.lm)?(at=tt,ct=nt,p(et=Q),p(at),gt={p:et.p.slice(),ld:0,lmld:!0},wt={p:et.lm.slice(),li:0,lmli:!0},et.orglm!==void 0&&(gt.orglm=et.orglm,wt.orglm=et.orglm),et.ic!==void 0&&(wt.ic=et.ic),St=null,Mt=null,(Lt=U(0,gt,at,ct))==null?et.p.length==at.p.length&&ct==0?((St=m(et)).p=at.lm.slice(),p(St),St):G(at,et)?(p(at),p(et),(Lt={}).p=at.lm.slice(),Lt.ld=0,p(Lt),Lt.p=Lt.p.concat(et.p.slice(at.p.length)),p(Lt),Mt=U(0,wt,at,ct),p(Mt),St=q(Lt,Mt),p(St),St):(p(Lt),null):(p(at),et=V(0,at,gt,F(ct)),p(et),p(wt),p(et),et!=null?(Mt=et.lm!==void 0?(p(et),U(0,wt,et,ct)):(p(et),K(0,wt,et,ct)))==null?(p(Lt),Lt):(St=q(Lt,Mt),p(St),St):(St=G(gt,at)?(et={p:at.lm.slice(),li:0,lmli:!0},at.ic!==void 0&&(et.ic=at.ic),p(et),et=K(0,et,gt,F(ct)),p(et),q(Lt,Mt=K(0,wt,et,ct))):q(Lt,wt),p(St),St))):tt.lm!==void 0&&_(tt.lm)?U(0,Q,tt,nt):Q.lm!==void 0&&_(Q.lm)?V(0,Q,tt,nt):(p(Q),void p(tt))}(0,I,L,B):K(0,I,L,B);if(_(Y))for(var Z=0;Z<Y.length;Z++)p(Y[Z]),Y[Z].sd!==void 0||Y[Z].si!==void 0?T.push(Y[Z]):v.append(T,Y[Z]);else v.append(T,Y);return p(T),T},v.isPrefix=G,v.init=function(T){a.rtfi(T)},l(v,v.transformComponent,v.checkValidOp,v.append),v.registerSubtype(o),f.exports=v},{"../../codox-rt-type/src/":143,"../../codox-shared/src/com/lib":217,"../../codox-shared/src/com/log":218,"../../codox-shared/src/com/util":219,"../../codox-shared/src/dtf/dtf":220,"../../wave/js/domains/api/qjs-util":519,"./bootstrapTransform":58,"./pt":61,"@babel/runtime/helpers/interopRequireDefault":65,"@babel/runtime/helpers/slicedToArray":70,"@babel/runtime/helpers/toConsumableArray":71,"@babel/runtime/helpers/typeof":72}],61:[function(t,f,r){function n(a,c,u){return a.slice(0,c)+u+a.slice(c)}function e(a){if(typeof a.p!="number")throw new Error("component missing position field");if(typeof a.i=="string"==(typeof a.d=="string"))throw new Error("component needs an i or d field");if(a.p<0)throw new Error("position cannot be negative")}function s(a){for(var c=0;c<a.length;c++)e(a[c])}function i(a,c,u){return c.i!=null?c.p<a||c.p===a&&u?a+c.i.length:a:a<=c.p?a:a<=c.p+c.d.length?c.p:a-c.d.length}f=f.exports={name:"pt",create:function(a){if(a!=null&&typeof a!="string")throw new Error("Initial data must be a string");return a||""}};var l=(f.apply=function(a,c){var u;s(c);for(var h=0;h<c.length;h++){var p=c[h];if(p.i!=null)a=n(a,p.p,p.i);else{if(u=a.slice(p.p,p.p+p.d.length),p.d!==u)throw new Error("Delete component '"+p.d+"' does not match deleted text '"+u+"'");a=a.slice(0,p.p)+a.slice(p.p+p.d.length)}}return a},f._append=function(a,c){var u;c.i!==""&&c.d!==""&&(a.length===0?a.push(c):(u=a[a.length-1]).i!=null&&c.i!=null&&u.p<=c.p&&c.p<=u.p+u.i.length?a[a.length-1]={i:n(u.i,c.p-u.p,c.i),p:u.p}:u.d!=null&&c.d!=null&&c.p<=u.p&&u.p<=c.p+c.d.length?a[a.length-1]={d:n(c.d,u.p-c.p,u.d),p:c.p}:a.push(c))}),o=(f.compose=function(a,c){s(a),s(c);for(var u=a.slice(),h=0;h<c.length;h++)l(u,c[h]);return u},f.normalize=function(a){var c=[];a.i==null&&a.p==null||(a=[a]);for(var u=0;u<a.length;u++){var h=a[u];h.p==null&&(h.p=0),l(c,h)}return c},f.transformCursor=function(a,c,u){for(var h=u==="right",p=0;p<c.length;p++)a=i(a,c[p],h);return a},f._tc=function(a,c,u,h){if(e(c),e(u),c.i!=null)l(a,{i:c.i,p:i(c.p,u,h===1)});else if(u.i!=null)h=c.d,c.p<u.p&&(l(a,{d:h.slice(0,u.p-c.p),p:c.p}),h=h.slice(u.p-c.p)),h!==""&&l(a,{d:h,p:c.p+u.i.length});else if(c.p>=u.p+u.d.length)l(a,{d:c.d,p:c.p-u.d.length});else if(c.p+c.d.length<=u.p)l(a,c);else{h={d:"",p:c.p};var p=(c.p<u.p&&(h.d=c.d.slice(0,u.p-c.p)),c.p+c.d.length>u.p+u.d.length&&(h.d+=c.d.slice(u.p+u.d.length-c.p)),Math.max(c.p,u.p)),m=Math.min(c.p+c.d.length,u.p+u.d.length);if(c.d.slice(p-c.p,m-c.p)!==u.d.slice(p-u.p,m-u.p))throw new Error("Delete ops delete different text in the same region of the document");h.d!==""&&(h.p=i(h.p,u),l(a,h))}return a});f.invert=function(a){a=a.slice().reverse();for(var c,u=0;u<a.length;u++)a[u]=(c=a[u]).i!=null?{d:c.i,p:c.p}:{i:c.d,p:c.p};return a},t("./bootstrapTransform")(f,o,s,l)},{"./bootstrapTransform":58}],62:[function(t,f,r){arguments[4][1][0].apply(r,arguments)},{dup:1}],63:[function(t,f,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],64:[function(t,f,r){arguments[4][3][0].apply(r,arguments)},{"./arrayLikeToArray.js":62,dup:3}],65:[function(t,f,r){arguments[4][11][0].apply(r,arguments)},{dup:11}],66:[function(t,f,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],67:[function(t,f,r){arguments[4][15][0].apply(r,arguments)},{dup:15}],68:[function(t,f,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],69:[function(t,f,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],70:[function(t,f,r){arguments[4][20][0].apply(r,arguments)},{"./arrayWithHoles.js":63,"./iterableToArrayLimit.js":67,"./nonIterableRest.js":68,"./unsupportedIterableToArray.js":73,dup:20}],71:[function(t,f,r){arguments[4][21][0].apply(r,arguments)},{"./arrayWithoutHoles.js":64,"./iterableToArray.js":66,"./nonIterableSpread.js":69,"./unsupportedIterableToArray.js":73,dup:21}],72:[function(t,f,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],73:[function(t,f,r){arguments[4][23][0].apply(r,arguments)},{"./arrayLikeToArray.js":62,dup:23}],74:[function(t,f,r){var n=t("./toPropertyKey.js");f.exports=function(e,s,i){return(s=n(s))in e?Object.defineProperty(e,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[s]=i,e},f.exports.__esModule=!0,f.exports.default=f.exports},{"./toPropertyKey.js":77}],75:[function(t,f,r){f.exports=function(n){return n&&n.__esModule?n:{default:n}},f.exports.__esModule=!0,f.exports.default=f.exports},{}],76:[function(t,f,r){var n=t("./typeof.js").default;f.exports=function(e,s){if(n(e)!=="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i===void 0)return(s==="string"?String:Number)(e);if(i=i.call(e,s||"default"),n(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")},f.exports.__esModule=!0,f.exports.default=f.exports},{"./typeof.js":78}],77:[function(t,f,r){var n=t("./typeof.js").default,e=t("./toPrimitive.js");f.exports=function(s){return s=e(s,"string"),n(s)==="symbol"?s:String(s)},f.exports.__esModule=!0,f.exports.default=f.exports},{"./toPrimitive.js":76,"./typeof.js":78}],78:[function(t,f,r){function n(e){return f.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},f.exports.__esModule=!0,f.exports.default=f.exports,n(e)}f.exports=n,f.exports.__esModule=!0,f.exports.default=f.exports},{}],79:[function(t,f,r){var n=t("call-bind/callBound")("ArrayBuffer.prototype.byteLength",!0),e=t("is-array-buffer");f.exports=function(s){return e(s)?n?n(s):s.byteLength:NaN}},{"call-bind/callBound":81,"is-array-buffer":103}],80:[function(t,f,r){(function(n){(function(){var e=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],s=typeof globalThis>"u"?n:globalThis;f.exports=function(){for(var i=[],l=0;l<e.length;l++)typeof s[e[l]]=="function"&&(i[i.length]=e[l]);return i}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],81:[function(t,f,r){var n=t("get-intrinsic"),e=t("./"),s=e(n("String.prototype.indexOf"));f.exports=function(i,l){return typeof(l=n(i,!!l))=="function"&&-1<s(i,".prototype.")?e(l):l}},{"./":82,"get-intrinsic":92}],82:[function(t,f,r){var n=t("function-bind"),e=(t=t("get-intrinsic"))("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),i=t("%Reflect.apply%",!0)||n.call(s,e),l=t("%Object.getOwnPropertyDescriptor%",!0),o=t("%Object.defineProperty%",!0),a=t("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}function c(){return i(n,e,arguments)}f.exports=function(u){var h=i(n,s,arguments);return l&&o&&l(h,"length").configurable&&o(h,"length",{value:1+a(0,u.length-(arguments.length-1))}),h},o?o(f.exports,"apply",{value:c}):f.exports.apply=c},{"function-bind":90,"get-intrinsic":92}],83:[function(t,f,r){var n=t("object.assign"),e=t("call-bind/callBound"),s=t("regexp.prototype.flags"),i=t("get-intrinsic"),l=t("es-get-iterator"),o=t("side-channel"),a=t("object-is"),c=t("is-arguments"),u=t("isarray"),h=t("is-array-buffer"),p=t("is-date-object"),m=t("is-regex"),b=t("is-shared-array-buffer"),_=t("object-keys"),v=t("which-boxed-primitive"),w=t("which-collection"),x=t("which-typed-array"),S=t("array-buffer-byte-length"),E=e("SharedArrayBuffer.prototype.byteLength",!0),k=e("Date.prototype.getTime"),D=Object.getPrototypeOf,N=e("Object.prototype.toString"),O=i("%Set%",!0),R=e("Map.prototype.has",!0),A=e("Map.prototype.get",!0),z=e("Map.prototype.size",!0),H=e("Set.prototype.add",!0),$=e("Set.prototype.delete",!0),M=e("Set.prototype.has",!0),J=e("Set.prototype.size",!0);function K(F,q,T,I){for(var L,B=l(F);(L=B.next())&&!L.done;)if(V(q,L.value,T,I))return $(F,L.value),1}function P(F){return F===void 0?null:typeof F!="object"?typeof F!="symbol"&&(typeof F!="string"&&typeof F!="number"||+F==+F):void 0}function U(F,q,T,I,L,B){for(var Y,Z=l(F);(Y=Z.next())&&!Y.done;)if(V(T,Y=Y.value,L,B)&&V(I,A(q,Y),L,B))return $(F,Y),1}function V(F,q,T,I){if((T=T||{}).strict?a(F,q):F===q)return!0;if(v(F)!==v(q))return!1;if(!F||!q||typeof F!="object"&&typeof q!="object")return T.strict?a(F,q):F==q;var L,B,Y,Z=I.has(F),rt=I.has(q);if(Z&&rt){if(I.get(F)===I.get(q))return!0}else L={};Z||I.set(F,L),rt||I.set(q,L);var Q=F,tt=q,nt=T,et=I;if(typeof Q!=typeof tt||Q==null||tt==null||N(Q)!==N(tt)||c(Q)!==c(tt)||(Z=u(Q))!==(rt=u(tt))||(Z=Q instanceof Error)!=(rt=tt instanceof Error)||(Z||rt)&&(Q.name!==tt.name||Q.message!==tt.message)||(Z=m(Q))!==(rt=m(tt))||(Z||rt)&&(Q.source!==tt.source||s(Q)!==s(tt))||(Z=p(Q))!==(rt=p(tt))||(Z||rt)&&k(Q)!==k(tt)||nt.strict&&D&&D(Q)!==D(tt)||(Z=x(Q),rt=x(tt),(Z||rt)&&Z!==rt)||(Z=G(Q))!==(rt=G(tt)))return!1;if(Z||rt){if(Q.length!==tt.length)return!1;for(B=0;B<Q.length;B++)if(Q[B]!==tt[B])return!1;return!0}if((Z=h(Q))!==(rt=h(tt)))return!1;if(Z||rt)return S(Q)===S(tt)&&typeof Uint8Array=="function"&&V(new Uint8Array(Q),new Uint8Array(tt),nt,et);if((Z=b(Q))!==(rt=b(tt)))return!1;if(Z||rt)return E(Q)===E(tt)&&typeof Uint8Array=="function"&&V(new Uint8Array(Q),new Uint8Array(tt),nt,et);if(typeof Q!=typeof tt)return!1;var at=_(Q),ct=_(tt);if(at.length!==ct.length)return!1;for(at.sort(),ct.sort(),B=at.length-1;0<=B;B--)if(at[B]!=ct[B])return!1;for(B=at.length-1;0<=B;B--)if(!V(Q[Y=at[B]],tt[Y],nt,et))return!1;if((Z=w(Q))===(rt=w(tt))){if(Z!=="Set"&&rt!=="Set")return Z!=="Map"||function(It,Ot,Et,Ct){if(z(It)!==z(Ot))return!1;for(var Nt,ht,dt,Ft,Jt,Xt=l(It),Qt=l(Ot);(Ft=Xt.next())&&!Ft.done;)if(dt=Ft.value[0],Ft=Ft.value[1],dt&&typeof dt=="object")ht=ht||new O,H(ht,dt);else if((Jt=A(Ot,dt))===void 0&&!R(Ot,dt)||!V(Ft,Jt,Et,Ct)){if(Et.strict||!function(ve,kt,ee,pe,Le,Fe){if((ee=P(ee))!=null)return ee;var qe=A(kt,ee);return Le=n({},Le,{strict:!1}),(qe!==void 0||R(kt,ee))&&V(pe,qe,Le,Fe)&&!R(ve,ee)&&V(pe,qe,Le,Fe)}(It,Ot,dt,Ft,Et,Ct))return!1;ht=ht||new O,H(ht,dt)}if(ht){for(;(Nt=Qt.next())&&!Nt.done;)if(dt=Nt.value[0],Jt=Nt.value[1],dt&&typeof dt=="object"){if(!U(ht,It,dt,Jt,Et,Ct))return!1}else if(!(Et.strict||It.has(dt)&&V(A(It,dt),Jt,Et,Ct)||U(ht,It,dt,Jt,n({},Et,{strict:!1}),Ct)))return!1;return J(ht)===0}return!0}(Q,tt,nt,et);var gt=Q,wt=tt,St=nt,Mt=et;if(J(gt)!==J(wt))return!1;for(var Lt,Pt,yt,jt=l(gt),At=l(wt);(Lt=jt.next())&&!Lt.done;)if(Lt.value&&typeof Lt.value=="object")yt=yt||new O,H(yt,Lt.value);else if(!M(wt,Lt.value)){if(St.strict||!function(It,Ot,Et){return(Et=P(Et))!=null?Et:M(Ot,Et)&&!M(It,Et)}(gt,wt,Lt.value))return!1;yt=yt||new O,H(yt,Lt.value)}if(yt){for(;(Pt=At.next())&&!Pt.done;)if(Pt.value&&typeof Pt.value=="object"){if(!K(yt,Pt.value,St.strict,Mt))return!1}else if(!St.strict&&!M(gt,Pt.value)&&!K(yt,Pt.value,St.strict,Mt))return!1;return J(yt)===0}return!0}return!1}function G(F){return!(!F||typeof F!="object"||typeof F.length!="number"||typeof F.copy!="function"||typeof F.slice!="function"||0<F.length&&typeof F[0]!="number"||!(F.constructor&&F.constructor.isBuffer&&F.constructor.isBuffer(F)))}f.exports=function(F,q,T){return V(F,q,T,o())}},{"array-buffer-byte-length":79,"call-bind/callBound":81,"es-get-iterator":86,"get-intrinsic":92,"is-arguments":102,"is-array-buffer":103,"is-date-object":107,"is-regex":110,"is-shared-array-buffer":112,isarray:84,"object-is":120,"object-keys":124,"object.assign":127,"regexp.prototype.flags":131,"side-channel":134,"which-boxed-primitive":136,"which-collection":137,"which-typed-array":138}],84:[function(t,f,r){var n={}.toString;f.exports=Array.isArray||function(e){return n.call(e)=="[object Array]"}},{}],85:[function(t,f,r){function n(u,h){var p=2<arguments.length?arguments[2]:{},m=e(h);s&&(m=l.call(m,Object.getOwnPropertySymbols(h)));for(var b=0;b<m.length;b+=1)(function(_,v,w,x){if(v in _){if(x===!0){if(_[v]===w)return}else if(!a(x)||!x())return}c?o(_,v,{configurable:!0,enumerable:!1,value:w,writable:!0}):_[v]=w})(u,m[b],h[m[b]],p[m[b]])}var e=t("object-keys"),s=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,l=Array.prototype.concat,o=Object.defineProperty,a=function(u){return typeof u=="function"&&i.call(u)==="[object Function]"},c=(t=t("has-property-descriptors")(),o&&t);n.supportsDescriptors=!!c,f.exports=n},{"has-property-descriptors":95,"object-keys":124}],86:[function(t,f,r){(function(n){(function(){var e,s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S,E,k,D=t("is-arguments"),N=t("stop-iteration-iterator");t("has-symbols")()||t("has-symbols/shams")()?(e=Symbol.iterator,f.exports=function(O){return O!=null&&O[e]!==void 0?O[e]():D(O)?Array.prototype[e].call(O):void 0}):(s=t("isarray"),i=t("is-string"),l=(o=t("get-intrinsic"))("%Map%",!0),o=o("%Set%",!0),a=t("call-bind/callBound"),c=a("Array.prototype.push"),u=a("String.prototype.charCodeAt"),h=a("String.prototype.slice"),p=function(O){var R=0;return{next:function(){var A,z=R>=O.length;return z||(A=O[R],R+=1),{done:z,value:A}}}},m=function(O,R){return s(O)||D(O)?p(O):i(O)?(A=0,{next:function(){var z=function($,M){if($.length<=M+1)return M+1;var J=u($,M);return J<55296||56319<J||(J=u($,M+1))<56320||57343<J?M+1:M+2}(O,A),H=h(O,A,z);return{done:(A=z)>O.length,value:H}}}):R&&O["_es6-shim iterator_"]!==void 0?O["_es6-shim iterator_"]():void 0;var A},l||o?(b=t("is-map"),_=t("is-set"),v=a("Map.prototype.forEach",!0),w=a("Set.prototype.forEach",!0),n!==void 0&&n.versions&&n.versions.node||(x=a("Map.prototype.iterator",!0),S=a("Set.prototype.iterator",!0)),E=a("Map.prototype.@@iterator",!0)||a("Map.prototype._es6-shim iterator_",!0),k=a("Set.prototype.@@iterator",!0)||a("Set.prototype._es6-shim iterator_",!0),f.exports=function(O){return function(R){if(b(R)){if(x)return N(x(R));if(E)return E(R);var A;if(v)return A=[],v(R,function(H,$){c(A,[$,H])}),p(A)}var z;if(_(R))return S?N(S(R)):k?k(R):w?(z=[],w(R,function(H){c(z,H)}),p(z)):void 0}(O)||m(O)}):f.exports=function(O){if(O!=null)return m(O,!0)})}).call(this)}).call(this,t("_process"))},{_process:386,"call-bind/callBound":81,"get-intrinsic":92,"has-symbols":97,"has-symbols/shams":98,"is-arguments":102,"is-map":108,"is-set":111,"is-string":113,isarray:87,"stop-iteration-iterator":135}],87:[function(t,f,r){arguments[4][84][0].apply(r,arguments)},{dup:84}],88:[function(t,f,r){var n=t("is-callable"),e=Object.prototype.toString,s=Object.prototype.hasOwnProperty;f.exports=function(i,l,o){if(!n(l))throw new TypeError("iterator must be a function");var a;if(3<=arguments.length&&(a=o),e.call(i)==="[object Array]")for(var c=i,u=l,h=a,p=0,m=c.length;p<m;p++)s.call(c,p)&&(h==null?u(c[p],p,c):u.call(h,c[p],p,c));else if(typeof i=="string")for(var b=i,_=l,v=a,w=0,x=b.length;w<x;w++)v==null?_(b.charAt(w),w,b):_.call(v,b.charAt(w),w,b);else{var S,E=i,k=l,D=a;for(S in E)s.call(E,S)&&(D==null?k(E[S],S,E):k.call(D,E[S],S,E))}}},{"is-callable":106}],89:[function(t,f,r){var n=Array.prototype.slice,e=Object.prototype.toString;f.exports=function(s){var i=this;if(typeof i!="function"||e.call(i)!=="[object Function]")throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var l,o,a=n.call(arguments,1),c=Math.max(0,i.length-a.length),u=[],h=0;h<c;h++)u.push("$"+h);return l=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(function(){var p;return this instanceof l?(p=i.apply(this,a.concat(n.call(arguments))),Object(p)===p?p:this):i.apply(s,a.concat(n.call(arguments)))}),i.prototype&&((o=function(){}).prototype=i.prototype,l.prototype=new o,o.prototype=null),l}},{}],90:[function(t,f,r){t=t("./implementation"),f.exports=Function.prototype.bind||t},{"./implementation":89}],91:[function(t,f,r){function n(){return typeof(function(){}).name=="string"}var e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}n.functionsHaveConfigurableNames=function(){if(!n()||!e)return!1;var i=e(function(){},"name");return!!i&&!!i.configurable};var s=Function.prototype.bind;n.boundFunctionsHaveNames=function(){return n()&&typeof s=="function"&&(function(){}).bind().name!==""},f.exports=n},{}],92:[function(t,f,r){var n,e=SyntaxError,s=Function,i=TypeError,l=function(R){try{return s('"use strict"; return ('+R+").constructor;")()}catch{}},o=Object.getOwnPropertyDescriptor;if(o)try{o({},"")}catch{o=null}function a(){throw new i}var c=o?function(){try{return a}catch{try{return o(arguments,"callee").get}catch{return a}}}():a,u=t("has-symbols")(),h=t("has-proto")(),p=Object.getPrototypeOf||(h?function(R){return R.__proto__}:null),m={},b=(h=typeof Uint8Array<"u"&&p?p(Uint8Array):n,{"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":u&&p?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&p?p(p([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map<"u"&&u&&p?p(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set<"u"&&u&&p?p(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&p?p(""[Symbol.iterator]()):n,"%Symbol%":u?Symbol:n,"%SyntaxError%":e,"%ThrowTypeError%":c,"%TypedArray%":h,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet});if(p)try{null.error}catch(R){u=p(p(R)),b["%Error.prototype%"]=u}function _(R){var A,z;return R==="%AsyncFunction%"?A=l("async function () {}"):R==="%GeneratorFunction%"?A=l("function* () {}"):R==="%AsyncGeneratorFunction%"?A=l("async function* () {}"):R==="%AsyncGenerator%"?(z=_("%AsyncGeneratorFunction%"))&&(A=z.prototype):R==="%AsyncIteratorPrototype%"&&(z=_("%AsyncGenerator%"))&&p&&(A=p(z.prototype)),b[R]=A}var v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=(c=t("function-bind"),t("has")),x=c.call(Function.call,Array.prototype.concat),S=c.call(Function.apply,Array.prototype.splice),E=c.call(Function.call,String.prototype.replace),k=c.call(Function.call,String.prototype.slice),D=c.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g;f.exports=function(R,A){if(typeof R!="string"||R.length===0)throw new i("intrinsic name must be a non-empty string");if(1<arguments.length&&typeof A!="boolean")throw new i('"allowMissing" argument must be a boolean');if(D(/^%?[^%]*%?$/,R)===null)throw new e("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=function(F){var q=k(F,0,1),T=k(F,-1);if(q==="%"&&T!=="%")throw new e("invalid intrinsic syntax, expected closing `%`");if(T==="%"&&q!=="%")throw new e("invalid intrinsic syntax, expected opening `%`");var I=[];return E(F,N,function(L,B,Y,Z){I[I.length]=Y?E(Z,O,"$1"):B||L}),I}(R),H=0<z.length?z[0]:"",$=function(F,q){var T,I=F;if(w(v,I)&&(I="%"+(T=v[I])[0]+"%"),w(b,I)){var L=b[I];if((L=L===m?_(I):L)!==void 0||q)return{alias:T,name:I,value:L};throw new i("intrinsic "+F+" exists, but is not available. Please file an issue!")}throw new e("intrinsic "+F+" does not exist!")}("%"+H+"%",A),M=($.name,$.value),J=!1;($=$.alias)&&(H=$[0],S(z,x([0,1],$)));for(var K=1,P=!0;K<z.length;K+=1){var U=z[K],V=k(U,0,1),G=k(U,-1);if((V==='"'||V==="'"||V==="`"||G==='"'||G==="'"||G==="`")&&V!==G)throw new e("property names with quotes must have matching quotes");if(U!=="constructor"&&P||(J=!0),w(b,V="%"+(H+="."+U)+"%"))M=b[V];else if(M!=null){if(!(U in M)){if(A)return;throw new i("base intrinsic for "+R+" exists, but the property is not available.")}M=o&&K+1>=z.length?(P=!!(G=o(M,U)))&&"get"in G&&!("originalValue"in G.get)?G.get:M[U]:(P=w(M,U),M[U]),P&&!J&&(b[V]=M)}}return M}},{"function-bind":90,has:100,"has-proto":96,"has-symbols":97}],93:[function(t,f,r){if(t=t("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0))try{t([],"length")}catch{t=null}f.exports=t},{"get-intrinsic":92}],94:[function(t,f,r){var n=typeof BigInt<"u"&&BigInt;f.exports=function(){return typeof n=="function"&&typeof BigInt=="function"&&typeof n(42)=="bigint"&&typeof BigInt(42)=="bigint"}},{}],95:[function(t,f,r){function n(){if(e)try{return e({},"a",{value:1}),!0}catch{return!1}return!1}var e=t("get-intrinsic")("%Object.defineProperty%",!0);n.hasArrayLengthDefineBug=function(){if(!n())return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},f.exports=n},{"get-intrinsic":92}],96:[function(t,f,r){var n={foo:{}},e=Object;f.exports=function(){return{__proto__:n}.foo===n.foo&&!({__proto__:null}instanceof e)}},{}],97:[function(t,f,r){var n=typeof Symbol<"u"&&Symbol,e=t("./shams");f.exports=function(){return typeof n=="function"&&typeof Symbol=="function"&&typeof n("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&e()}},{"./shams":98}],98:[function(t,f,r){f.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},e=Symbol("test"),s=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;for(e in n[e]=42,n)return!1;return!(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0||(s=Object.getOwnPropertySymbols(n)).length!==1||s[0]!==e||!Object.prototype.propertyIsEnumerable.call(n,e)||typeof Object.getOwnPropertyDescriptor=="function"&&((s=Object.getOwnPropertyDescriptor(n,e)).value!==42||s.enumerable!==!0))}},{}],99:[function(t,f,r){var n=t("has-symbols/shams");f.exports=function(){return n()&&!!Symbol.toStringTag}},{"has-symbols/shams":98}],100:[function(t,f,r){t=t("function-bind"),f.exports=t.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":90}],101:[function(t,f,r){var n=t("get-intrinsic"),e=t("has"),s=t("side-channel")(),i=n("%TypeError%"),l={assert:function(o,a){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");if(s.assert(o),!l.has(o,a))throw new i("`"+a+"` is not present on `O`")},get:function(o,a){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");return(o=s.get(o))&&o["$"+a]},has:function(o,a){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");return!!(o=s.get(o))&&e(o,"$"+a)},set:function(o,a,c){if(!o||typeof o!="object"&&typeof o!="function")throw new i("`O` is not an object");if(typeof a!="string")throw new i("`slot` must be a string");var u=s.get(o);u||s.set(o,u={}),u["$"+a]=c}};Object.freeze&&Object.freeze(l),f.exports=l},{"get-intrinsic":92,has:100,"side-channel":134}],102:[function(t,f,r){function n(l){return!(s&&l&&typeof l=="object"&&Symbol.toStringTag in l)&&i(l)==="[object Arguments]"}function e(l){return!!n(l)||l!==null&&typeof l=="object"&&typeof l.length=="number"&&0<=l.length&&i(l)!=="[object Array]"&&i(l.callee)==="[object Function]"}var s=t("has-tostringtag/shams")(),i=t("call-bind/callBound")("Object.prototype.toString");t=function(){return n(arguments)}(),n.isLegacyArguments=e,f.exports=t?n:e},{"call-bind/callBound":81,"has-tostringtag/shams":99}],103:[function(t,f,r){var n=t("call-bind"),e=t("call-bind/callBound"),s=t("get-intrinsic"),i=t("is-typed-array"),l=(t=s("ArrayBuffer",!0),s("Float32Array",!0)),o=e("ArrayBuffer.prototype.byteLength",!0),a=(s=t&&!o&&new t().slice)&&n(s);f.exports=o||a?function(c){if(!c||typeof c!="object")return!1;try{return o?o(c):a(c,0),!0}catch{return!1}}:l?function(c){try{return new l(c).buffer===c&&!i(c)}catch(u){return typeof c=="object"&&u.name==="RangeError"}}:function(c){return!1}},{"call-bind":82,"call-bind/callBound":81,"get-intrinsic":92,"is-typed-array":115}],104:[function(t,f,r){var n;t("has-bigints")()?(n=BigInt.prototype.valueOf,f.exports=function(e){return e!=null&&typeof e!="boolean"&&typeof e!="string"&&typeof e!="number"&&typeof e!="symbol"&&typeof e!="function"&&(typeof e=="bigint"||function(s){try{return n.call(s),!0}catch{}return!1}(e))}):f.exports=function(e){return!1}},{"has-bigints":94}],105:[function(t,f,r){var n=t("call-bind/callBound"),e=n("Boolean.prototype.toString"),s=n("Object.prototype.toString"),i=t("has-tostringtag/shams")();f.exports=function(l){return typeof l=="boolean"||l!==null&&typeof l=="object"&&(i&&Symbol.toStringTag in l?function(o){try{return e(o),!0}catch{return!1}}(l):s(l)==="[object Boolean]")}},{"call-bind/callBound":81,"has-tostringtag/shams":99}],106:[function(t,f,r){var n,e,s=Function.prototype.toString,i=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof i=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw e}}),e={},i(function(){throw 42},null,n)}catch(m){m!==e&&(i=null)}else i=null;function l(m){try{var b=s.call(m);return a.test(b)}catch{return}}function o(m){try{return!l(m)&&(s.call(m),!0)}catch{return!1}}var a=/^\s*class\b/,c=Object.prototype.toString,u=typeof Symbol=="function"&&!!Symbol.toStringTag,h=!(0 in[,]),p=function(){return!1};typeof document=="object"&&c.call(document.all)==c.call(document.all)&&(p=function(m){if(!(!h&&m||m!==void 0&&typeof m!="object"))try{var b=c.call(m);return(b==="[object HTMLAllCollection]"||b==="[object HTML document.all class]"||b==="[object HTMLCollection]"||b==="[object Object]")&&m("")==null}catch{}return!1}),f.exports=i?function(m){if(p(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;try{i(m,null,n)}catch(b){if(b!==e)return!1}return!l(m)&&o(m)}:function(m){if(p(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;if(u)return o(m);if(l(m))return!1;var b=c.call(m);return!(b!=="[object Function]"&&b!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(b))&&o(m)}},{}],107:[function(t,f,r){var n=Date.prototype.getDay,e=Object.prototype.toString,s=t("has-tostringtag/shams")();f.exports=function(i){if(typeof i!="object"||i===null)return!1;if(!s)return e.call(i)==="[object Date]";var l=i;try{return n.call(l),!0}catch{return!1}}},{"has-tostringtag/shams":99}],108:[function(t,f,r){var n,e=typeof Map=="function"&&Map.prototype?Map:null,s=typeof Set=="function"&&Set.prototype?Set:null,i=(e||(n=function(o){return!1}),e?Map.prototype.has:null),l=s?Set.prototype.has:null;f.exports=(n=n||i?n:function(o){return!1})||function(o){if(!o||typeof o!="object")return!1;try{if(i.call(o),l)try{l.call(o)}catch{return!0}return o instanceof e}catch{}return!1}},{}],109:[function(t,f,r){var n=Number.prototype.toString,e=Object.prototype.toString,s=t("has-tostringtag/shams")();f.exports=function(i){return typeof i=="number"||typeof i=="object"&&(s?function(l){try{return n.call(l),!0}catch{return!1}}(i):e.call(i)==="[object Number]")}},{"has-tostringtag/shams":99}],110:[function(t,f,r){var n,e,s,i,l,o=t("call-bind/callBound"),a=((t=t("has-tostringtag/shams")())&&(n=o("Object.prototype.hasOwnProperty"),e=o("RegExp.prototype.exec"),s={},l={toString:i=function(){throw s},valueOf:i},typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=i)),o("Object.prototype.toString")),c=Object.getOwnPropertyDescriptor;f.exports=t?function(u){if(!u||typeof u!="object")return!1;var h=c(u,"lastIndex");if(!h||!n(h,"value"))return!1;try{e(u,l)}catch(p){return p===s}}:function(u){return!(!u||typeof u!="object"&&typeof u!="function")&&a(u)==="[object RegExp]"}},{"call-bind/callBound":81,"has-tostringtag/shams":99}],111:[function(t,f,r){var n,e=typeof Map=="function"&&Map.prototype?Map:null,s=typeof Set=="function"&&Set.prototype?Set:null,i=(s||(n=function(o){return!1}),e?Map.prototype.has:null),l=s?Set.prototype.has:null;f.exports=(n=n||l?n:function(o){return!1})||function(o){if(!o||typeof o!="object")return!1;try{if(l.call(o),i)try{i.call(o)}catch{return!0}return o instanceof s}catch{}return!1}},{}],112:[function(t,f,r){var n=t("call-bind/callBound")("SharedArrayBuffer.prototype.byteLength",!0);f.exports=n?function(e){if(!e||typeof e!="object")return!1;try{return n(e),!0}catch{return!1}}:function(e){return!1}},{"call-bind/callBound":81}],113:[function(t,f,r){var n=String.prototype.valueOf,e=Object.prototype.toString,s=t("has-tostringtag/shams")();f.exports=function(i){return typeof i=="string"||typeof i=="object"&&(s?function(l){try{return n.call(l),!0}catch{return!1}}(i):e.call(i)==="[object String]")}},{"has-tostringtag/shams":99}],114:[function(t,f,r){var n,e,s=Object.prototype.toString;t("has-symbols")()?(n=Symbol.prototype.toString,e=/^Symbol\(.*\)$/,f.exports=function(i){if(typeof i=="symbol")return!0;if(s.call(i)!=="[object Symbol]")return!1;try{return typeof(l=i).valueOf()=="symbol"&&e.test(n.call(l))}catch{return!1}var l}):f.exports=function(i){return!1}},{"has-symbols":97}],115:[function(t,f,r){(function(n){(function(){var e=t("for-each"),s=t("available-typed-arrays"),i=t("call-bind/callBound"),l=i("Object.prototype.toString"),o=t("has-tostringtag/shams")(),a=t("gopd"),c=typeof globalThis>"u"?n:globalThis,u=s(),h=i("Array.prototype.indexOf",!0)||function(_,v){for(var w=0;w<_.length;w+=1)if(_[w]===v)return w;return-1},p=i("String.prototype.slice"),m={},b=Object.getPrototypeOf;o&&a&&b&&e(u,function(_){var v,w=new c[_];Symbol.toStringTag in w&&(w=b(w),(v=a(w,Symbol.toStringTag))||(w=b(w),v=a(w,Symbol.toStringTag)),m[_]=v.get)}),f.exports=function(_){return!(!_||typeof _!="object")&&(o&&Symbol.toStringTag in _?!!a&&(v=_,w=!1,e(m,function(x,S){if(!w)try{w=x.call(v)===S}catch{}}),w):(_=p(l(_),8,-1),-1<h(u,_)));var v,w}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":80,"call-bind/callBound":81,"for-each":88,gopd:93,"has-tostringtag/shams":99}],116:[function(t,f,r){var n,e=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,s=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,i=e?e.prototype.has:null,l=s?s.prototype.has:null;f.exports=(n=(n=e?n:function(o){return!1})||i?n:function(o){return!1})||function(o){if(!o||typeof o!="object")return!1;try{if(i.call(o,i),l)try{l.call(o,l)}catch{return!0}return o instanceof e}catch{}return!1}},{}],117:[function(t,f,r){var n,e=t("get-intrinsic"),s=(t=t("call-bind/callBound"),e("%WeakSet%",!0)),i=t("WeakSet.prototype.has",!0);i?(n=t("WeakMap.prototype.has",!0),f.exports=function(l){if(!l||typeof l!="object")return!1;try{if(i(l,i),n)try{n(l,n)}catch{return!0}return l instanceof s}catch{}return!1}):f.exports=function(l){return!1}},{"call-bind/callBound":81,"get-intrinsic":92}],118:[function(t,f,r){var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=n&&e&&typeof e.get=="function"?e.get:null,i=n&&Map.prototype.forEach,l=(e=typeof Set=="function"&&Set.prototype,n=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,e&&n&&typeof n.get=="function"?n.get:null),o=e&&Set.prototype.forEach,a=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,c=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,u=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,p=Object.prototype.toString,m=Function.prototype.toString,b=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,k=Array.prototype.join,D=Array.prototype.slice,N=Math.floor,O=typeof BigInt=="function"?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,z=typeof Symbol=="function"&&typeof Symbol.iterator=="object",H=typeof Symbol=="function"&&Symbol.toStringTag?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect:Object).getPrototypeOf||([].__proto__===Array.prototype?function(nt){return nt.__proto__}:null);function J(nt,et){if(nt===1/0||nt===-1/0||nt!=nt||nt&&-1e3<nt&&nt<1e3||S.call(/e/,et))return et;var at=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof nt=="number"){var ct=nt<0?-N(-nt):N(nt);if(ct!==nt)return nt=String(ct),ct=_.call(et,nt.length+1),v.call(nt,at,"$&_")+"."+v.call(v.call(ct,/([0-9]{3})/g,"$&_"),/_$/,"")}return v.call(et,at,"$&_")}var K=t("./util.inspect"),P=F(n=K.custom)?n:null;function U(nt,et,at){return(at=(at.quoteStyle||et)==="double"?'"':"'")+nt+at}function V(nt){return!(I(nt)!=="[object Array]"||H&&typeof nt=="object"&&H in nt)}function G(nt){return!(I(nt)!=="[object RegExp]"||H&&typeof nt=="object"&&H in nt)}function F(nt){if(z)return nt&&typeof nt=="object"&&nt instanceof Symbol;if(typeof nt=="symbol")return 1;if(nt&&typeof nt=="object"&&A)try{return A.call(nt),1}catch{}}f.exports=function nt(et,at,ct,gt){var wt=at||{};if(T(wt,"quoteStyle")&&wt.quoteStyle!=="single"&&wt.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(T(wt,"maxStringLength")&&(typeof wt.maxStringLength=="number"?wt.maxStringLength<0&&wt.maxStringLength!==1/0:wt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');if(typeof(at=!T(wt,"customInspect")||wt.customInspect)!="boolean"&&at!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(T(wt,"indent")&&wt.indent!==null&&wt.indent!==" "&&!(parseInt(wt.indent,10)===wt.indent&&0<wt.indent))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(T(wt,"numericSeparator")&&typeof wt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var St,Mt,Lt,Pt,yt,jt,At=wt.numericSeparator;if(et===void 0)return"undefined";if(et===null)return"null";if(typeof et=="boolean")return et?"true":"false";if(typeof et=="string")return function dt(Ft,Jt){if(Ft.length>Jt.maxStringLength)return Xt="... "+(Xt=Ft.length-Jt.maxStringLength)+" more character"+(1<Xt?"s":""),dt(_.call(Ft,0,Jt.maxStringLength),Jt)+Xt;var Xt=v.call(v.call(Ft,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,B);return U(Xt,"single",Jt)}(et,wt);if(typeof et=="number"){if(et===0)return 0<1/0/et?"0":"-0";var It=String(et);return At?J(et,It):It}if(typeof et=="bigint")return It=String(et)+"n",At?J(et,It):It;if((At=wt.depth===void 0?5:wt.depth)<=(ct=ct===void 0?0:ct)&&0<At&&typeof et=="object")return V(et)?"[Array]":"[Object]";if(It=function(dt,Ft){var Jt;if(dt.indent===" ")Jt=" ";else{if(!(typeof dt.indent=="number"&&0<dt.indent))return null;Jt=k.call(Array(dt.indent+1)," ")}return{base:Jt,prev:k.call(Array(Ft+1),Jt)}}(wt,ct),gt===void 0)gt=[];else if(0<=L(gt,et))return"[Circular]";function Ot(dt,Ft,Jt){return Ft&&(gt=D.call(gt)).push(Ft),Jt?(Ft={depth:wt.depth},T(wt,"quoteStyle")&&(Ft.quoteStyle=wt.quoteStyle),nt(dt,Ft,ct+1,gt)):nt(dt,wt,ct+1,gt)}if(typeof et=="function"&&!G(et))return"[Function"+((ht=function(dt){return dt.name?dt.name:(dt=b.call(m.call(dt),/^function\s*([\w$]+)/))?dt[1]:null}(et))?": "+ht:" (anonymous)")+"]"+(0<(ht=tt(et,Ot)).length?" { "+k.call(ht,", ")+" }":"");if(F(et))return ht=z?v.call(String(et),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(et),typeof et!="object"||z?ht:Y(ht);if(function(dt){if(dt&&typeof dt=="object")return typeof HTMLElement<"u"&&dt instanceof HTMLElement?1:typeof dt.nodeName=="string"&&typeof dt.getAttribute=="function"}(et)){for(var Et="<"+x.call(String(et.nodeName)),Ct=et.attributes||[],Nt=0;Nt<Ct.length;Nt++)Et+=" "+Ct[Nt].name+"="+U((St=Ct[Nt].value,v.call(String(St),/"/g,""")),"double",wt);return Et+=">",et.childNodes&&et.childNodes.length&&(Et+="..."),Et+"</"+x.call(String(et.nodeName))+">"}if(V(et)){if(et.length===0)return"[]";var ht=tt(et,Ot);return It&&!function(dt){for(var Ft=0;Ft<dt.length;Ft++)if(0<=L(dt[Ft],`
|
|
76
76
|
`))return;return 1}(ht)?"["+Q(ht,It)+"]":"[ "+k.call(ht,", ")+" ]"}if(!(I(ht=et)!=="[object Error]"||H&&typeof ht=="object"&&H in ht))return Pt=tt(et,Ot),"cause"in Error.prototype||!("cause"in et)||$.call(et,"cause")?Pt.length===0?"["+String(et)+"]":"{ ["+String(et)+"] "+k.call(Pt,", ")+" }":"{ ["+String(et)+"] "+k.call(E.call("[cause]: "+Ot(et.cause),Pt),", ")+" }";if(typeof et=="object"&&at){if(P&&typeof et[P]=="function"&&K)return K(et,{depth:At-ct});if(at!=="symbol"&&typeof et.inspect=="function")return et.inspect()}return function(dt){if(s&&dt&&typeof dt=="object")try{s.call(dt);try{l.call(dt)}catch{return 1}return dt instanceof Map}catch{}}(et)?(Mt=[],i&&i.call(et,function(dt,Ft){Mt.push(Ot(Ft,et,!0)+" => "+Ot(dt,et))}),rt("Map",s.call(et),Mt,It)):function(dt){if(l&&dt&&typeof dt=="object")try{l.call(dt);try{s.call(dt)}catch{return 1}return dt instanceof Set}catch{}}(et)?(Lt=[],o&&o.call(et,function(dt){Lt.push(Ot(dt,et))}),rt("Set",l.call(et),Lt,It)):function(dt){if(a&&dt&&typeof dt=="object")try{a.call(dt,a);try{c.call(dt,c)}catch{return 1}return dt instanceof WeakMap}catch{}}(et)?Z("WeakMap"):function(dt){if(c&&dt&&typeof dt=="object")try{c.call(dt,c);try{a.call(dt,a)}catch{return 1}return dt instanceof WeakSet}catch{}}(et)?Z("WeakSet"):function(dt){if(u&&dt&&typeof dt=="object")try{return u.call(dt),1}catch{}}(et)?Z("WeakRef"):I(Pt=et)!=="[object Number]"||H&&typeof Pt=="object"&&H in Pt?function(dt){if(dt&&typeof dt=="object"&&O)try{return O.call(dt),1}catch{}}(et)?Y(Ot(O.call(et))):I(At=et)!=="[object Boolean]"||H&&typeof At=="object"&&H in At?I(at=et)!=="[object String]"||H&&typeof at=="object"&&H in at?(I(At=et)!=="[object Date]"||H&&typeof At=="object"&&H in At)&&!G(et)?(at=tt(et,Ot),At=M?M(et)===Object.prototype:et instanceof Object||et.constructor===Object,yt=et instanceof Object?"":"null prototype",jt=!At&&H&&Object(et)===et&&H in et?_.call(I(et),8,-1):yt?"Object":"",At=(!At&&typeof et.constructor=="function"&&et.constructor.name?et.constructor.name+" ":"")+(jt||yt?"["+k.call(E.call([],jt||[],yt||[]),": ")+"] ":""),at.length===0?At+"{}":It?At+"{"+Q(at,It)+"}":At+"{ "+k.call(at,", ")+" }"):String(et):Y(Ot(String(et))):Y(h.call(et)):Y(Ot(Number(et)))};var q=Object.prototype.hasOwnProperty||function(nt){return nt in this};function T(nt,et){return q.call(nt,et)}function I(nt){return p.call(nt)}function L(nt,et){if(nt.indexOf)return nt.indexOf(et);for(var at=0,ct=nt.length;at<ct;at++)if(nt[at]===et)return at;return-1}function B(nt){var et={8:"b",9:"t",10:"n",12:"f",13:"r"}[nt=nt.charCodeAt(0)];return et?"\\"+et:"\\x"+(nt<16?"0":"")+w.call(nt.toString(16))}function Y(nt){return"Object("+nt+")"}function Z(nt){return nt+" { ? }"}function rt(nt,et,at,ct){return nt+" ("+et+") {"+(ct?Q(at,ct):k.call(at,", "))+"}"}function Q(nt,et){if(nt.length===0)return"";var at=`
|
|
77
77
|
`+et.prev+et.base;return at+k.call(nt,","+at)+`
|
|
78
78
|
`+et.prev}function tt(nt,et){var at=V(nt),ct=[];if(at){ct.length=nt.length;for(var gt=0;gt<nt.length;gt++)ct[gt]=T(nt,gt)?et(nt[gt],nt):""}var wt,St=typeof R=="function"?R(nt):[];if(z)for(var Mt={},Lt=0;Lt<St.length;Lt++)Mt["$"+St[Lt]]=St[Lt];for(wt in nt)!T(nt,wt)||at&&String(Number(wt))===wt&&wt<nt.length||z&&Mt["$"+wt]instanceof Symbol||(S.call(/[^\w$]/,wt)?ct.push(et(wt,nt)+": "+et(nt[wt],nt)):ct.push(wt+": "+et(nt[wt],nt)));if(typeof R=="function")for(var Pt=0;Pt<St.length;Pt++)$.call(nt,St[Pt])&&ct.push("["+et(St[Pt])+"]: "+et(nt[St[Pt]],nt));return ct}},{"./util.inspect":369}],119:[function(t,f,r){function n(e){return e!=e}f.exports=function(e,s){return e===0&&s===0?1/e==1/s:e===s||!(!n(e)||!n(s))}},{}],120:[function(t,f,r){var n=t("define-properties"),e=t("call-bind"),s=t("./implementation"),i=t("./polyfill");t=t("./shim"),n(e=e(i(),Object),{getPolyfill:i,implementation:s,shim:t}),f.exports=e},{"./implementation":119,"./polyfill":121,"./shim":122,"call-bind":82,"define-properties":85}],121:[function(t,f,r){var n=t("./implementation");f.exports=function(){return typeof Object.is=="function"?Object.is:n}},{"./implementation":119}],122:[function(t,f,r){var n=t("./polyfill"),e=t("define-properties");f.exports=function(){var s=n();return e(Object,{is:s},{is:function(){return Object.is!==s}}),s}},{"./polyfill":121,"define-properties":85}],123:[function(t,f,r){var n,e,s,i,l,o,a,c,u,h;Object.keys||(n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,s=t("./isArguments"),t=Object.prototype.propertyIsEnumerable,i=!t.call({toString:null},"toString"),l=t.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(p){var m=p.constructor;return m&&m.prototype===p},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var p in window)try{if(!c["$"+p]&&n.call(window,p)&&window[p]!==null&&typeof window[p]=="object")try{a(window[p])}catch{return!0}}catch{return!0}return!1}(),h=function(p){var m=p!==null&&typeof p=="object",b=e.call(p)==="[object Function]",_=s(p),v=m&&e.call(p)==="[object String]",w=[];if(!m&&!b&&!_)throw new TypeError("Object.keys called on a non-object");var x=l&&b;if(v&&0<p.length&&!n.call(p,0))for(var S=0;S<p.length;++S)w.push(String(S));if(_&&0<p.length)for(var E=0;E<p.length;++E)w.push(String(E));else for(var k in p)x&&k==="prototype"||!n.call(p,k)||w.push(String(k));if(i)for(var D=function(O){if(typeof window>"u"||!u)return a(O);try{return a(O)}catch{return!1}}(p),N=0;N<o.length;++N)D&&o[N]==="constructor"||!n.call(p,o[N])||w.push(o[N]);return w}),f.exports=h},{"./isArguments":125}],124:[function(t,f,r){var n=Array.prototype.slice,e=t("./isArguments"),s=Object.keys,i=s?function(o){return s(o)}:t("./implementation"),l=Object.keys;i.shim=function(){return Object.keys?function(){var o=Object.keys(arguments);return o&&o.length===arguments.length}(1,2)||(Object.keys=function(o){return e(o)?l(n.call(o)):l(o)}):Object.keys=i,Object.keys||i},f.exports=i},{"./implementation":123,"./isArguments":125}],125:[function(t,f,r){var n=Object.prototype.toString;f.exports=function(e){var s=n.call(e);return s==="[object Arguments]"||s!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&0<=e.length&&n.call(e.callee)==="[object Function]"}},{}],126:[function(t,f,r){var n=t("object-keys"),e=t("has-symbols/shams")(),s=(t=t("call-bind/callBound"),Object),i=t("Array.prototype.push"),l=t("Object.prototype.propertyIsEnumerable"),o=e?Object.getOwnPropertySymbols:null;f.exports=function(a,c){if(a==null)throw new TypeError("target must be an object");var u=s(a);if(arguments.length===1)return u;for(var h=1;h<arguments.length;++h){var p=s(arguments[h]),m=n(p),b=e&&(Object.getOwnPropertySymbols||o);if(b)for(var _=b(p),v=0;v<_.length;++v){var w=_[v];l(p,w)&&i(m,w)}for(var x=0;x<m.length;++x){var S,E=m[x];l(p,E)&&(S=p[E],u[E]=S)}}return u}},{"call-bind/callBound":81,"has-symbols/shams":98,"object-keys":124}],127:[function(t,f,r){function n(a,c){return o(Object,arguments)}var e=t("define-properties"),s=t("call-bind"),i=t("./implementation"),l=t("./polyfill"),o=(t=t("./shim"),s.apply(l()));e(n,{getPolyfill:l,implementation:i,shim:t}),f.exports=n},{"./implementation":126,"./polyfill":128,"./shim":129,"call-bind":82,"define-properties":85}],128:[function(t,f,r){var n=t("./implementation");f.exports=function(){return!Object.assign||function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",s=e.split(""),i={},l=0;l<s.length;++l)i[s[l]]=s[l];var o,a="";for(o in Object.assign({},i))a+=o;return e!==a}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1}()?n:Object.assign}},{"./implementation":126}],129:[function(t,f,r){var n=t("define-properties"),e=t("./polyfill");f.exports=function(){var s=e();return n(Object,{assign:s},{assign:function(){return Object.assign!==s}}),s}},{"./polyfill":128,"define-properties":85}],130:[function(t,f,r){t=t("functions-have-names").functionsHaveConfigurableNames();var n=Object,e=TypeError;f.exports=function(){if(this!=null&&this!==n(this))throw new e("RegExp.prototype.flags getter called on non-object");var s="";return this.hasIndices&&(s+="d"),this.global&&(s+="g"),this.ignoreCase&&(s+="i"),this.multiline&&(s+="m"),this.dotAll&&(s+="s"),this.unicode&&(s+="u"),this.unicodeSets&&(s+="v"),this.sticky&&(s+="y"),s},t&&Object.defineProperty&&Object.defineProperty(f.exports,"name",{value:"get flags"})},{"functions-have-names":91}],131:[function(t,f,r){var n=t("define-properties"),e=t("call-bind"),s=t("./implementation"),i=t("./polyfill");t=t("./shim"),n(e=e(i()),{getPolyfill:i,implementation:s,shim:t}),f.exports=e},{"./implementation":130,"./polyfill":132,"./shim":133,"call-bind":82,"define-properties":85}],132:[function(t,f,r){var n=t("./implementation"),e=t("define-properties").supportsDescriptors,s=Object.getOwnPropertyDescriptor;f.exports=function(){if(e&&/a/gim.flags==="gim"){var i=s(RegExp.prototype,"flags");if(i&&typeof i.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var l="",o={};if(Object.defineProperty(o,"hasIndices",{get:function(){l+="d"}}),Object.defineProperty(o,"sticky",{get:function(){l+="y"}}),l==="dy")return i.get}}return n}},{"./implementation":130,"define-properties":85}],133:[function(t,f,r){var n=t("define-properties").supportsDescriptors,e=t("./polyfill"),s=Object.getOwnPropertyDescriptor,i=Object.defineProperty,l=TypeError,o=Object.getPrototypeOf,a=/a/;f.exports=function(){if(!n||!o)throw new l("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var c=e(),u=o(a),h=s(u,"flags");return h&&h.get===c||i(u,"flags",{configurable:!0,enumerable:!1,get:c}),c}},{"./polyfill":132,"define-properties":85}],134:[function(t,f,r){function n(_,v){for(var w,x=_;(w=x.next)!==null;x=w)if(w.key===v)return x.next=w.next,w.next=_.next,_.next=w}var e=t("get-intrinsic"),s=t("call-bind/callBound"),i=t("object-inspect"),l=e("%TypeError%"),o=e("%WeakMap%",!0),a=e("%Map%",!0),c=s("WeakMap.prototype.get",!0),u=s("WeakMap.prototype.set",!0),h=s("WeakMap.prototype.has",!0),p=s("Map.prototype.get",!0),m=s("Map.prototype.set",!0),b=s("Map.prototype.has",!0);f.exports=function(){var _,v,w,x={assert:function(S){if(!x.has(S))throw new l("Side channel does not contain "+i(S))},get:function(S){if(o&&S&&(typeof S=="object"||typeof S=="function")){if(_)return c(_,S)}else if(a){if(v)return p(v,S)}else{var E;if(w)return(E=n(E=w,S))&&E.value}},has:function(S){if(o&&S&&(typeof S=="object"||typeof S=="function")){if(_)return h(_,S)}else if(a){if(v)return b(v,S)}else if(w)return!!n(w,S);return!1},set:function(S,E){var k,D;o&&S&&(typeof S=="object"||typeof S=="function")?(_=_||new o,u(_,S,E)):a?(v=v||new a,m(v,S,E)):(D=n(k=w=w||{key:{},next:null},S))?D.value=E:k.next={key:S,next:k.next,value:E}}};return x}},{"call-bind/callBound":81,"get-intrinsic":92,"object-inspect":118}],135:[function(t,f,r){var n=t("internal-slot"),e=SyntaxError,s=typeof StopIteration=="object"?StopIteration:null;f.exports=function(i){if(!s)throw new e("this environment lacks StopIteration");n.set(i,"[[Done]]",!1);var l={next:function(){var o=n.get(this,"[[Iterator]]"),a=n.get(o,"[[Done]]");try{return{done:a,value:a?void 0:o.next()}}catch(c){if(n.set(o,"[[Done]]",!0),c!==s)throw c;return{done:!0,value:void 0}}}};return n.set(l,"[[Iterator]]",i),l}},{"internal-slot":101}],136:[function(t,f,r){var n=t("is-string"),e=t("is-number-object"),s=t("is-boolean-object"),i=t("is-symbol"),l=t("is-bigint");f.exports=function(o){return o==null||typeof o!="object"&&typeof o!="function"?null:n(o)?"String":e(o)?"Number":s(o)?"Boolean":i(o)?"Symbol":l(o)?"BigInt":void 0}},{"is-bigint":104,"is-boolean-object":105,"is-number-object":109,"is-string":113,"is-symbol":114}],137:[function(t,f,r){var n=t("is-map"),e=t("is-set"),s=t("is-weakmap"),i=t("is-weakset");f.exports=function(l){if(l&&typeof l=="object"){if(n(l))return"Map";if(e(l))return"Set";if(s(l))return"WeakMap";if(i(l))return"WeakSet"}return!1}},{"is-map":108,"is-set":111,"is-weakmap":116,"is-weakset":117}],138:[function(t,f,r){(function(n){(function(){var e=t("for-each"),s=t("available-typed-arrays"),i=t("call-bind/callBound"),l=t("gopd"),o=i("Object.prototype.toString"),a=t("has-tostringtag/shams")(),c=typeof globalThis>"u"?n:globalThis,u=(s=s(),i("String.prototype.slice")),h={},p=Object.getPrototypeOf,m=(a&&l&&p&&e(s,function(b){var _,v;typeof c[b]=="function"&&(_=new c[b],Symbol.toStringTag in _&&(_=p(_),(v=l(_,Symbol.toStringTag))||(_=p(_),v=l(_,Symbol.toStringTag)),h[b]=v.get))}),t("is-typed-array"));f.exports=function(b){return!!m(b)&&(a&&Symbol.toStringTag in b?(_=b,v=!1,e(h,function(w,x){if(!v)try{var S=w.call(_);S===x&&(v=S)}catch{}}),v):u(o(b),8,-1));var _,v}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{"available-typed-arrays":80,"call-bind/callBound":81,"for-each":88,gopd:93,"has-tostringtag/shams":99,"is-typed-array":115}],139:[function(t,f,r){var n,e=(n=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/typeof")),s=n(t("@babel/runtime/helpers/defineProperty")),i=(n=t("./utils.js")).clone,l=n.ins,o=(n=t("../../codox-shared/src/dtf/dtf.js")).c2d,a=n.d2c,c=n.cp,u=t("../../wave/js/domains/api/qjs-util").contentToDelta;function h(x){l(x);for(var S=p(x),E=0,k=0;k<S.length;k++){for(var D=S[k],N=0,O=0;O<D.length;O++){var R=D[O];N=N+R.offset+R.length}E<N&&(E=N)}return E}function p(x){var S=[];if(0<x.length){var E=[],k=x[0];E.push(k);for(var D=1;D<x.length;D++){var N=x[D];N.style==k.style?(E.push(N),k=N):(S.push(i(E)),(E=[]).push(k=N))}S.push(i(E))}return S}function m(x){for(var S=x.restList,E=x.attName,k=x.attValue,D=x.outputOps,N=0;S.length;){var O,R=S.shift();R.length!==0?(0<R.offset&&(O={retain:R.offset-N},D.push(O),N=R.offset),O={retain:R.length,attributes:(0,s.default)({},E,k)},D.push(O),N+=R.length):console.log(`deriveAopFromStyleRanges: skip this empty oneop =
|
|
@@ -104,11 +104,11 @@ Valid keys: `+JSON.stringify(Object.keys(E),null," "));if($=$(z,A,N,O,R+"."+A,s
|
|
|
104
104
|
`+S+C}var L=!1;function B(C,j){if(!C||L)return"";L=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(j)if(j=function(){throw Error()},Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(mt){var it=mt}Reflect.construct(C,[],j)}else{try{j.call()}catch(mt){it=mt}C.call(j.prototype)}else{try{throw Error()}catch(mt){it=mt}C()}}catch(mt){if(mt&&it&&typeof mt.stack=="string"){for(var ot=mt.stack.split(`
|
|
105
105
|
`),st=it.stack.split(`
|
|
106
106
|
`),ut=ot.length-1,_t=st.length-1;1<=ut&&0<=_t&&ot[ut]!==st[_t];)_t--;for(;1<=ut&&0<=_t;ut--,_t--)if(ot[ut]!==st[_t]){if(ut!==1||_t!==1)do if(ut--,--_t<0||ot[ut]!==st[_t])return`
|
|
107
|
-
`+ot[ut].replace(" at new "," at ");while(1<=ut&&0<=_t);break}}}finally{L=!1,Error.prepareStackTrace=W}return(C=C?C.displayName||C.name:"")?I(C):""}function Y(C){if(C==null)return null;if(typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case N:return"Fragment";case D:return"Portal";case R:return"Profiler";case O:return"StrictMode";case $:return"Suspense";case M:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case z:return(C.displayName||"Context")+".Consumer";case A:return(C._context.displayName||"Context")+".Provider";case H:var j=(j=C.render).displayName||j.name||"";return C.displayName||(j!==""?"ForwardRef("+j+")":"ForwardRef");case J:return Y(C.type);case P:return Y(C._render);case K:j=C._payload,C=C._init;try{return Y(C(j))}catch{}}return null}function Z(C){switch(typeof C){case"boolean":case"number":case"object":case"string":case"undefined":return C;default:return""}}function rt(C){var j=C.type;return(C=C.nodeName)&&C.toLowerCase()==="input"&&(j==="checkbox"||j==="radio")}function Q(C){C._valueTracker||(C._valueTracker=function(j){var W,it,ot=rt(j)?"checked":"value",st=Object.getOwnPropertyDescriptor(j.constructor.prototype,ot),ut=""+j[ot];if(!j.hasOwnProperty(ot)&&st!==void 0&&typeof st.get=="function"&&typeof st.set=="function")return W=st.get,it=st.set,Object.defineProperty(j,ot,{configurable:!0,get:function(){return W.call(this)},set:function(_t){ut=""+_t,it.call(this,_t)}}),Object.defineProperty(j,ot,{enumerable:st.enumerable}),{getValue:function(){return ut},setValue:function(_t){ut=""+_t},stopTracking:function(){j._valueTracker=null,delete j[ot]}}}(C))}function tt(C){if(C){var j=C._valueTracker;if(!j)return 1;var W=j.getValue(),it="";return(C=it=C?rt(C)?C.checked?"true":"false":C.value:it)!==W&&(j.setValue(C),1)}}function nt(C){if((C=C||(typeof document<"u"?document:void 0))===void 0)return null;try{return C.activeElement||C.body}catch{return C.body}}function et(C,j){var W=j.checked;return e({},j,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:W??C._wrapperState.initialChecked})}function at(C,j){var W=j.defaultValue==null?"":j.defaultValue,it=j.checked!=null?j.checked:j.defaultChecked;W=Z(j.value!=null?j.value:W),C._wrapperState={initialChecked:it,initialValue:W,controlled:j.type==="checkbox"||j.type==="radio"?j.checked!=null:j.value!=null}}function ct(C,j){(j=j.checked)!=null&&x(C,"checked",j,!1)}function gt(C,j){ct(C,j);var W=Z(j.value),it=j.type;if(W!=null)it==="number"?(W===0&&C.value===""||C.value!=W)&&(C.value=""+W):C.value!==""+W&&(C.value=""+W);else if(it==="submit"||it==="reset")return void C.removeAttribute("value");j.hasOwnProperty("value")?St(C,j.type,W):j.hasOwnProperty("defaultValue")&&St(C,j.type,Z(j.defaultValue)),j.checked==null&&j.defaultChecked!=null&&(C.defaultChecked=!!j.defaultChecked)}function wt(C,j,W){if(j.hasOwnProperty("value")||j.hasOwnProperty("defaultValue")){var it=j.type;if(!(it!=="submit"&&it!=="reset"||j.value!==void 0&&j.value!==null))return;j=""+C._wrapperState.initialValue,W||j===C.value||(C.value=j),C.defaultValue=j}(W=C.name)!==""&&(C.name=""),C.defaultChecked=!!C._wrapperState.initialChecked,W!==""&&(C.name=W)}function St(C,j,W){j==="number"&&nt(C.ownerDocument)===C||(W==null?C.defaultValue=""+C._wrapperState.initialValue:C.defaultValue!==""+W&&(C.defaultValue=""+W))}function Mt(C,j){var W,it;return C=e({children:void 0},j),W=j.children,it="",n.Children.forEach(W,function(ot){ot!=null&&(it+=ot)}),(j=it)&&(C.children=j),C}function Lt(C,j,W,it){if(C=C.options,j){j={};for(var ot=0;ot<W.length;ot++)j["$"+W[ot]]=!0;for(W=0;W<C.length;W++)ot=j.hasOwnProperty("$"+C[W].value),C[W].selected!==ot&&(C[W].selected=ot),ot&&it&&(C[W].defaultSelected=!0)}else{for(W=""+Z(W),j=null,ot=0;ot<C.length;ot++){if(C[ot].value===W)return C[ot].selected=!0,void(it&&(C[ot].defaultSelected=!0));j!==null||C[ot].disabled||(j=C[ot])}j!==null&&(j.selected=!0)}}function Pt(C,j){if(j.dangerouslySetInnerHTML!=null)throw Error(i(91));return e({},j,{value:void 0,defaultValue:void 0,children:""+C._wrapperState.initialValue})}function yt(C,j){var W=j.value;if(W==null){if(W=j.children,j=j.defaultValue,W!=null){if(j!=null)throw Error(i(92));if(Array.isArray(W)){if(!(W.length<=1))throw Error(i(93));W=W[0]}j=W}W=j=j??""}C._wrapperState={initialValue:Z(W)}}function jt(C,j){var W=Z(j.value),it=Z(j.defaultValue);W!=null&&((W=""+W)!==C.value&&(C.value=W),j.defaultValue==null&&C.defaultValue!==W&&(C.defaultValue=W)),it!=null&&(C.defaultValue=""+it)}function At(C){var j=C.textContent;j===C._wrapperState.initialValue&&j!==""&&j!==null&&(C.value=j)}var It="http://www.w3.org/1999/xhtml";function Ot(C){switch(C){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Et(C,j){return C==null||C==="http://www.w3.org/1999/xhtml"?Ot(j):C==="http://www.w3.org/2000/svg"&&j==="foreignObject"?"http://www.w3.org/1999/xhtml":C}Nt=function(C,j){if(C.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in C)C.innerHTML=j;else{for((Ct=Ct||document.createElement("div")).innerHTML="<svg>"+j.valueOf().toString()+"</svg>",j=Ct.firstChild;C.firstChild;)C.removeChild(C.firstChild);for(;j.firstChild;)C.appendChild(j.firstChild)}};var Ct,Nt,ht=typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(C,j,W,it){MSApp.execUnsafeLocalFunction(function(){return Nt(C,j)})}:Nt;function dt(C,j){if(j){var W=C.firstChild;if(W&&W===C.lastChild&&W.nodeType===3)return void(W.nodeValue=j)}C.textContent=j}var Ft={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jt=["Webkit","ms","Moz","O"];function Xt(C,j,W){return j==null||typeof j=="boolean"||j===""?"":W||typeof j!="number"||j===0||Ft.hasOwnProperty(C)&&Ft[C]?(""+j).trim():j+"px"}function Qt(C,j){for(var W in C=C.style,j){var it,ot;j.hasOwnProperty(W)&&(it=W.indexOf("--")===0,ot=Xt(W,j[W],it),W==="float"&&(W="cssFloat"),it?C.setProperty(W,ot):C[W]=ot)}}Object.keys(Ft).forEach(function(C){Jt.forEach(function(j){j=j+C.charAt(0).toUpperCase()+C.substring(1),Ft[j]=Ft[C]})});var ve=e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kt(C,j){if(j){if(ve[C]&&(j.children!=null||j.dangerouslySetInnerHTML!=null))throw Error(i(137,C));if(j.dangerouslySetInnerHTML!=null){if(j.children!=null)throw Error(i(60));if(typeof j.dangerouslySetInnerHTML!="object"||!("__html"in j.dangerouslySetInnerHTML))throw Error(i(61))}if(j.style!=null&&typeof j.style!="object")throw Error(i(62))}}function ee(C,j){if(C.indexOf("-")===-1)return typeof j.is=="string";switch(C){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function pe(C){return(C=(C=C.target||C.srcElement||window).correspondingUseElement?C.correspondingUseElement:C).nodeType===3?C.parentNode:C}var Le=null,Be=null,qe=null;function ze(C){if(C=Ql(C)){if(typeof Le!="function")throw Error(i(280));var j=C.stateNode;j&&(j=Bu(j),Le(C.stateNode,C.type,j))}}function Ie(C){Be?qe?qe.push(C):qe=[C]:Be=C}function He(){if(Be){var C=Be,j=qe;if(qe=Be=null,ze(C),j)for(C=0;C<j.length;C++)ze(j[C])}}function hn(C,j){return C(j)}function Tt(C,j,W,it,ot){return C(j,W,it,ot)}function ae(){}var de=!1,we=!1;function Oe(){Be===null&&qe===null||(ae(),He())}function Rt(C,j){var W=C.stateNode;if(W===null)return null;var it=Bu(W);if(it===null)return null;switch(W=it[j],j){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":C=!(it=(it=!it.disabled)?it:!((C=C.type)==="button"||C==="input"||C==="select"||C==="textarea"));break;default:C=!1}if(C)return null;if(W&&typeof W!="function")throw Error(i(231,j,typeof W));return W}var Ut=!1;if(t)try{var se={};Object.defineProperty(se,"passive",{get:function(){Ut=!0}}),window.addEventListener("test",se,se),window.removeEventListener("test",se,se)}catch{Ut=!1}var bt=!1,ft=null,xt=!1,Bt=null,ce={onError:function(C){bt=!0,ft=C}};function Ce(C,j,W,it,ot,st,ut,_t,mt){bt=!1,ft=null,(function(Ht,ie,ue,Me,mn,Kt,re,ge,De){var Re=Array.prototype.slice.call(arguments,3);try{ie.apply(ue,Re)}catch(Ze){this.onError(Ze)}}).apply(ce,arguments)}function Te(C){var j=C,W=C;if(C.alternate)for(;j.return;)j=j.return;else for(C=j;1026&(j=C).flags&&(W=j.return),C=j.return;);return j.tag===3?W:null}function Ne(C){if(C.tag===13){var j=C.memoizedState;if(j===null&&(C=C.alternate)!==null&&(j=C.memoizedState),j!==null)return j.dehydrated}return null}function Ge(C){if(Te(C)!==C)throw Error(i(188))}function be(C){if(!(C=function(W){var it=W.alternate;if(!it){if((it=Te(W))===null)throw Error(i(188));return it!==W?null:W}for(var ot=W,st=it;;){var ut=ot.return;if(ut===null)break;var _t=ut.alternate;if(_t===null){if((st=ut.return)===null)break;ot=st}else{if(ut.child===_t.child){for(_t=ut.child;_t;){if(_t===ot)return Ge(ut),W;if(_t===st)return Ge(ut),it;_t=_t.sibling}throw Error(i(188))}if(ot.return!==st.return)ot=ut,st=_t;else{for(var mt=!1,Ht=ut.child;Ht;){if(Ht===ot){mt=!0,ot=ut,st=_t;break}if(Ht===st){mt=!0,st=ut,ot=_t;break}Ht=Ht.sibling}if(!mt){for(Ht=_t.child;Ht;){if(Ht===ot){mt=!0,ot=_t,st=ut;break}if(Ht===st){mt=!0,st=_t,ot=ut;break}Ht=Ht.sibling}if(!mt)throw Error(i(189))}}if(ot.alternate!==st)throw Error(i(190))}}if(ot.tag!==3)throw Error(i(188));return ot.stateNode.current===ot?W:it}(C)))return null;for(var j=C;;){if(j.tag===5||j.tag===6)return j;if(j.child)j=(j.child.return=j).child;else{if(j===C)break;for(;!j.sibling;){if(!j.return||j.return===C)return null;j=j.return}j.sibling.return=j.return,j=j.sibling}}return null}function pt(C,j){for(var W=C.alternate;j!==null;){if(j===C||j===W)return 1;j=j.return}}var Dt,$t,qt,Wt=!1,oe=[],X=null,lt=null,vt=null,Vt=new Map,te=new Map,Zt=[],Yt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function me(C,j,W,it,ot){return{blockedOn:C,domEventName:j,eventSystemFlags:16|W,nativeEvent:ot,targetContainers:[it]}}function Ee(C,j){switch(C){case"focusin":case"focusout":X=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":vt=null;break;case"pointerover":case"pointerout":Vt.delete(j.pointerId);break;case"gotpointercapture":case"lostpointercapture":te.delete(j.pointerId)}}function Ue(C,j,W,it,ot,st){return C===null||C.nativeEvent!==st?(C=me(j,W,it,ot,st),j===null||(j=Ql(j))!==null&&$t(j)):(C.eventSystemFlags|=it,j=C.targetContainers,ot!==null&&j.indexOf(ot)===-1&&j.push(ot)),C}function Ae(C){if(C.blockedOn===null){for(var j=C.targetContainers;0<j.length;){var W=No(C.domEventName,C.eventSystemFlags,j[0],C.nativeEvent);if(W!==null)return(j=Ql(W))!==null&&$t(j),C.blockedOn=W,0;j.shift()}return 1}}function We(C,j,W){Ae(C)&&W.delete(j)}function nn(){for(Wt=!1;0<oe.length;){var C=oe[0];if(C.blockedOn!==null){(C=Ql(C.blockedOn))!==null&&Dt(C);break}for(var j=C.targetContainers;0<j.length;){var W=No(C.domEventName,C.eventSystemFlags,j[0],C.nativeEvent);if(W!==null){C.blockedOn=W;break}j.shift()}C.blockedOn===null&&oe.shift()}X!==null&&Ae(X)&&(X=null),lt!==null&&Ae(lt)&&(lt=null),vt!==null&&Ae(vt)&&(vt=null),Vt.forEach(We),te.forEach(We)}function cn(C,j){C.blockedOn===j&&(C.blockedOn=null,Wt||(Wt=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,nn)))}function An(C){function j(ot){return cn(ot,C)}if(0<oe.length){cn(oe[0],C);for(var W=1;W<oe.length;W++){var it=oe[W];it.blockedOn===C&&(it.blockedOn=null)}}for(X!==null&&cn(X,C),lt!==null&&cn(lt,C),vt!==null&&cn(vt,C),Vt.forEach(j),te.forEach(j),W=0;W<Zt.length;W++)(it=Zt[W]).blockedOn===C&&(it.blockedOn=null);for(;0<Zt.length&&(W=Zt[0]).blockedOn===null;)(function(ot){var st=Ua(ot.target);if(st!==null){var ut=Te(st);if(ut!==null){if((st=ut.tag)===13){if((st=Ne(ut))!==null)return ot.blockedOn=st,ot.lanePriority,s.unstable_runWithPriority(ot.priority,function(){qt(ut)})}else if(st===3&&ut.stateNode.hydrate)return ot.blockedOn=ut.tag===3?ut.stateNode.containerInfo:null}}ot.blockedOn=null})(W),W.blockedOn===null&&Zt.shift()}function un(C,j){var W={};return W[C.toLowerCase()]=j.toLowerCase(),W["Webkit"+C]="webkit"+j,W["Moz"+C]="moz"+j,W}var bn={animationend:un("Animation","AnimationEnd"),animationiteration:un("Animation","AnimationIteration"),animationstart:un("Animation","AnimationStart"),transitionend:un("Transition","TransitionEnd")},Nn={},Ln={};function er(C){if(Nn[C])return Nn[C];if(!bn[C])return C;var j,W=bn[C];for(j in W)if(W.hasOwnProperty(j)&&j in Ln)return Nn[C]=W[j];return C}t&&(Ln=document.createElement("div").style,"AnimationEvent"in window||(delete bn.animationend.animation,delete bn.animationiteration.animation,delete bn.animationstart.animation),"TransitionEvent"in window||delete bn.transitionend.transition);var nr=er("animationend"),ka=er("animationiteration"),Ui=er("animationstart"),to=er("transitionend"),Lr=new Map,Hr=new Map,wn=["abort","abort",nr,"animationEnd",ka,"animationIteration",Ui,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",to,"transitionEnd","waiting","waiting"];function $i(C,j){for(var W=0;W<C.length;W+=2){var it=C[W],ot="on"+((ot=C[W+1])[0].toUpperCase()+ot.slice(1));Hr.set(it,j),Lr.set(it,ot),a(ot,[it])}}(0,s.unstable_now)();var gn=8;function In(C){if(1&C)return gn=15,1;if(2&C)return gn=14,2;if(4&C)return gn=13,4;var j=24&C;return j!==0?(gn=12,j):32&C?(gn=11,32):(j=192&C)!=0?(gn=10,j):256&C?(gn=9,256):(j=3584&C)!=0?(gn=8,j):4096&C?(gn=7,4096):(j=4186112&C)!=0?(gn=6,j):(j=62914560&C)!=0?(gn=5,j):67108864&C?(gn=4,67108864):134217728&C?(gn=3,134217728):(j=805306368&C)!=0?(gn=2,j):1073741824&C?(gn=1,1073741824):(gn=8,C)}function Ao(C,j){var W=C.pendingLanes;if(W===0)return gn=0;var it,ot=0,st=0,ut=C.expiredLanes,_t=C.suspendedLanes,mt=C.pingedLanes;if(ut!==0?(ot=ut,st=gn=15):(ut=134217727&W)!=0?(it=ut&~_t)!=0?(ot=In(it),st=gn):(mt&=ut)!=0&&(ot=In(mt),st=gn):(ut=W&~_t)!=0?(ot=In(ut),st=gn):mt!==0&&(ot=In(mt),st=gn),ot===0)return 0;if(ot=W&(((ot=31-yo(ot))<0?0:1<<ot)<<1)-1,j!==0&&j!==ot&&!(j&_t)){if(In(j),st<=gn)return j;gn=st}if((j=C.entangledLanes)!==0)for(C=C.entanglements,j&=ot;0<j;)ot|=C[W=31-yo(j)],j&=~(st=1<<W);return ot}function jr(C){return(C=-1073741825&C.pendingLanes)!=0?C:1073741824&C?1073741824:0}function eo(C,j){switch(C){case 15:return 1;case 14:return 2;case 12:return(C=Br(24&~j))===0?eo(10,j):C;case 10:return(C=Br(192&~j))===0?eo(8,j):C;case 8:return(C=Br(3584&~j))===0&&(C=Br(4186112&~j))===0&&(C=512),C;case 2:return(j=Br(805306368&~j))===0?268435456:j}throw Error(i(358,C))}function Br(C){return C&-C}function _r(C){for(var j=[],W=0;W<31;W++)j.push(C);return j}function Oa(C,j,W){C.pendingLanes|=j;var it=j-1;C.suspendedLanes&=it,C.pingedLanes&=it,(C=C.eventTimes)[j=31-yo(j)]=W}var yo=Math.clz32||function(C){return C===0?32:31-(qr(C)/vn|0)|0},qr=Math.log,vn=Math.LN2,Nu=s.unstable_UserBlockingPriority,Hl=s.unstable_runWithPriority,Jr=!0;function Pu(C,j,W,it){de||ae();var ot=Ta,st=de;de=!0;try{Tt(ot,C,j,W,it)}finally{(de=st)||Oe()}}function ql(C,j,W,it){Hl(Nu,Ta.bind(null,C,j,W,it))}function Ta(C,j,W,it){var ot;if(Jr)if((ot=!(4&j))&&0<oe.length&&-1<Yt.indexOf(C))C=me(null,C,j,W,it),oe.push(C);else{var st=No(C,j,W,it);if(st===null)ot&&Ee(C,it);else{if(ot){if(-1<Yt.indexOf(C))return C=me(st,C,j,W,it),void oe.push(C);if(function(ut,_t,mt,Ht,ie){switch(_t){case"focusin":return X=Ue(X,ut,_t,mt,Ht,ie),1;case"dragenter":return lt=Ue(lt,ut,_t,mt,Ht,ie),1;case"mouseover":return vt=Ue(vt,ut,_t,mt,Ht,ie),1;case"pointerover":var ue=ie.pointerId;return Vt.set(ue,Ue(Vt.get(ue)||null,ut,_t,mt,Ht,ie)),1;case"gotpointercapture":return ue=ie.pointerId,te.set(ue,Ue(te.get(ue)||null,ut,_t,mt,Ht,ie)),1}}(st,C,j,W,it))return;Ee(C,it)}ay(C,j,it,null,W)}}}function No(C,j,W,it){var ot=pe(it);if((ot=Ua(ot))!==null){var st=Te(ot);if(st===null)ot=null;else{var ut=st.tag;if(ut===13){if((ot=Ne(st))!==null)return ot;ot=null}else if(ut===3){if(st.stateNode.hydrate)return st.tag===3?st.stateNode.containerInfo:null;ot=null}else st!==ot&&(ot=null)}}return ay(C,j,it,ot,W),null}var Po=null,Io=null,ai=null;function Ls(){if(ai)return ai;for(var C=Io,j=C.length,W=("value"in Po)?Po.value:Po.textContent,it=W.length,ot=0;ot<j&&C[ot]===W[ot];ot++);for(var st=j-ot,ut=1;ut<=st&&C[j-ut]===W[it-ut];ut++);return ai=W.slice(ot,1<ut?1-ut:void 0)}function Bs(C){var j=C.keyCode;return"charCode"in C?(C=C.charCode)===0&&j===13&&(C=13):C=j,32<=(C=C===10?13:C)||C===13?C:0}function ja(){return!0}function Aa(){return!1}function hr(C){function j(W,it,ot,st,ut){for(var _t in this._reactName=W,this._targetInst=ot,this.type=it,this.nativeEvent=st,this.target=ut,this.currentTarget=null,C)C.hasOwnProperty(_t)&&(W=C[_t],this[_t]=W?W(st):st[_t]);return this.isDefaultPrevented=(st.defaultPrevented!=null?st.defaultPrevented:st.returnValue===!1)?ja:Aa,this.isPropagationStopped=Aa,this}return e(j.prototype,{preventDefault:function(){this.defaultPrevented=!0;var W=this.nativeEvent;W&&(W.preventDefault?W.preventDefault():typeof W.returnValue!="unknown"&&(W.returnValue=!1),this.isDefaultPrevented=ja)},stopPropagation:function(){var W=this.nativeEvent;W&&(W.stopPropagation?W.stopPropagation():typeof W.cancelBubble!="unknown"&&(W.cancelBubble=!0),this.isPropagationStopped=ja)},persist:function(){},isPersistent:ja}),j}se={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(C){return C.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0};var Na,Pa,si,li=hr(se),Fs=hr(ur=e({},se,{view:0,detail:0})),zn=e({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hi,button:0,buttons:0,relatedTarget:function(C){return C.relatedTarget===void 0?C.fromElement===C.srcElement?C.toElement:C.fromElement:C.relatedTarget},movementX:function(C){return"movementX"in C?C.movementX:(C!==si&&(Pa=si&&C.type==="mousemove"?(Na=C.screenX-si.screenX,C.screenY-si.screenY):Na=0,si=C),Na)},movementY:function(C){return"movementY"in C?C.movementY:Pa}}),ci=hr(zn),Ia=hr(e({},zn,{dataTransfer:0})),Ar=hr(e({},ur,{relatedTarget:0})),Ra=hr(e({},se,{animationName:0,elapsedTime:0,pseudoElement:0})),Ro=hr(e({},se,{clipboardData:function(C){return("clipboardData"in C?C:window).clipboardData}})),bo=hr(e({},se,{data:0})),Mo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ma={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Do(C){var j=this.nativeEvent;return j.getModifierState?j.getModifierState(C):!!(C=vo[C])&&!!j[C]}function Hi(){return Do}var qi=hr(e({},ur,{key:function(C){if(C.key){var j=Mo[C.key]||C.key;if(j!=="Unidentified")return j}return C.type==="keypress"?(C=Bs(C))===13?"Enter":String.fromCharCode(C):C.type==="keydown"||C.type==="keyup"?Ma[C.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hi,charCode:function(C){return C.type==="keypress"?Bs(C):0},keyCode:function(C){return C.type==="keydown"||C.type==="keyup"?C.keyCode:0},which:function(C){return C.type==="keypress"?Bs(C):C.type==="keydown"||C.type==="keyup"?C.keyCode:0}})),Da=hr(e({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zs=hr(e({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hi})),ui=hr(e({},se,{propertyName:0,elapsedTime:0,pseudoElement:0})),Us=hr(e({},zn,{deltaX:function(C){return"deltaX"in C?C.deltaX:"wheelDeltaX"in C?-C.wheelDeltaX:0},deltaY:function(C){return"deltaY"in C?C.deltaY:"wheelDeltaY"in C?-C.wheelDeltaY:"wheelDelta"in C?-C.wheelDelta:0},deltaZ:0,deltaMode:0})),Iu=[9,13,27,32],La=t&&"CompositionEvent"in window,ur=null,Ba=(t&&"documentMode"in document&&(ur=document.documentMode),t&&"TextEvent"in window&&!ur),Ji=t&&(!La||ur&&8<ur&&ur<=11),Fa=String.fromCharCode(32),Jl=!1;function Wl(C,j){switch(C){case"keyup":return Iu.indexOf(j.keyCode)!==-1;case"keydown":return j.keyCode!==229;case"keypress":case"mousedown":case"focusout":return 1;default:return}}function Lo(C){return typeof(C=C.detail)=="object"&&"data"in C?C.data:null}var di=!1,Wi={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $s(C){var j=C&&C.nodeName&&C.nodeName.toLowerCase();return j==="input"?Wi[C.type]:j==="textarea"}function za(C,j,W,it){Ie(it),0<(j=Mu(j,"onChange")).length&&(W=new li("onChange","change",null,W,it),C.push({event:W,listeners:j}))}var zt=null,ne=null;function fe(C){ey(C,0)}function ke(C){if(tt(Vs(C)))return C}function sn(C,j){if(C==="change")return j}var tn=!1;function en(){zt&&(zt.detachEvent("onpropertychange",Ve),ne=zt=null)}function Ve(C){if(C.propertyName==="value"&&ke(ne)){var j=[];if(za(j,ne,C,pe(C)),C=fe,de)C(j);else{de=!0;try{hn(C,j)}finally{de=!1,Oe()}}}}function Un(C,j,W){C==="focusin"?(en(),ne=W,(zt=j).attachEvent("onpropertychange",Ve)):C==="focusout"&&en()}function ar(C){if(C==="selectionchange"||C==="keyup"||C==="keydown")return ke(ne)}function Vl(C,j){if(C==="click")return ke(j)}function Ru(C,j){if(C==="input"||C==="change")return ke(j)}t&&(ur=t&&((se="oninput"in document)||((zn=document.createElement("div")).setAttribute("oninput","return;"),se=typeof zn.oninput=="function"),se),tn=ur&&(!document.documentMode||9<document.documentMode));var rr=typeof Object.is=="function"?Object.is:function(C,j){return C===j&&(C!==0||1/C==1/j)||C!=C&&j!=j},GS=Object.prototype.hasOwnProperty;function Kl(C,j){if(rr(C,j))return!0;if(typeof C!="object"||C===null||typeof j!="object"||j===null)return!1;var W=Object.keys(C),it=Object.keys(j);if(W.length!==it.length)return!1;for(it=0;it<W.length;it++)if(!GS.call(j,W[it])||!rr(C[W[it]],j[W[it]]))return!1;return!0}function K0(C){for(;C&&C.firstChild;)C=C.firstChild;return C}function G0(C,j){var W,it=K0(C);for(C=0;it;){if(it.nodeType===3){if(W=C+it.textContent.length,C<=j&&j<=W)return{node:it,offset:j-C};C=W}t:{for(;it;){if(it.nextSibling){it=it.nextSibling;break t}it=it.parentNode}it=void 0}it=K0(it)}}function Y0(){for(var C=window,j=nt();j instanceof C.HTMLIFrameElement;){try{var W=typeof j.contentWindow.location.href=="string"}catch{W=!1}if(!W)break;j=nt((C=j.contentWindow).document)}return j}function Xf(C){var j=C&&C.nodeName&&C.nodeName.toLowerCase();return j&&(j==="input"&&(C.type==="text"||C.type==="search"||C.type==="tel"||C.type==="url"||C.type==="password")||j==="textarea"||C.contentEditable==="true")}var YS=t&&"documentMode"in document&&document.documentMode<=11,Hs=null,tp=null,Gl=null,ep=!1;function Z0(C,j,W){var it=W.window===W?W.document:W.nodeType===9?W:W.ownerDocument;ep||Hs==null||Hs!==nt(it)||(it="selectionStart"in(it=Hs)&&Xf(it)?{start:it.selectionStart,end:it.selectionEnd}:{anchorNode:(it=(it.ownerDocument&&it.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:it.anchorOffset,focusNode:it.focusNode,focusOffset:it.focusOffset},Gl&&Kl(Gl,it)||(Gl=it,0<(it=Mu(tp,"onSelect")).length&&(j=new li("onSelect","select",null,j,W),C.push({event:j,listeners:it}),j.target=Hs)))}$i("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),$i("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),$i(wn,2);for(var Q0="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),np=0;np<Q0.length;np++)Hr.set(Q0[np],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),X0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yl));function ty(C,j,W){var it=C.type||"unknown-event";C.currentTarget=W,function(){var ot;Ce.apply(this,arguments),bt&&(ot=ft,bt=!1,ft=null,xt||(xt=!0,Bt=ot))}(it,j,void 0,C),C.currentTarget=null}function ey(C,j){j=!!(4&j);for(var W=0;W<C.length;W++){var it=(ot=C[W]).event,ot=ot.listeners;t:{var st=void 0;if(j)for(var ut=ot.length-1;0<=ut;ut--){var _t=(Ht=ot[ut]).instance,mt=Ht.currentTarget,Ht=Ht.listener;if(_t!==st&&it.isPropagationStopped())break t;ty(it,Ht,mt),st=_t}else for(ut=0;ut<ot.length;ut++){if(_t=(Ht=ot[ut]).instance,mt=Ht.currentTarget,Ht=Ht.listener,_t!==st&&it.isPropagationStopped())break t;ty(it,Ht,mt),st=_t}}}if(xt)throw C=Bt,xt=!1,Bt=null,C}function Rn(C,j){var W=fy(j),it=C+"__bubble";W.has(it)||(iy(j,C,2,!1),W.add(it))}var ny="_reactListening"+Math.random().toString(36).slice(2);function ry(C){C[ny]||(C[ny]=!0,l.forEach(function(j){X0.has(j)||oy(j,!1,C,null),oy(j,!0,C,null)}))}function oy(C,j,W,it,ot){ot=4<arguments.length&&ot!==void 0?ot:0;var st=W;if(C==="selectionchange"&&W.nodeType!==9&&(st=W.ownerDocument),it!==null&&!j&&X0.has(C)){if(C!=="scroll")return;ot|=2,st=it}it=C+"__"+(j?"capture":"bubble"),(W=fy(st)).has(it)||(j&&(ot|=4),iy(st,C,ot,j),W.add(it))}function iy(C,j,W,it){var ot=Hr.get(j);switch(ot===void 0?2:ot){case 0:ot=Pu;break;case 1:ot=ql;break;default:ot=Ta}W=ot.bind(null,j,W,C),ot=!(!Ut||j!=="touchstart"&&j!=="touchmove"&&j!=="wheel")||void 0,it?ot!==void 0?C.addEventListener(j,W,{capture:!0,passive:ot}):C.addEventListener(j,W,!0):ot!==void 0?C.addEventListener(j,W,{passive:ot}):C.addEventListener(j,W,!1)}function ay(C,j,W,it,ot){var st=it;if(!(1&j||2&j||it===null))t:for(;;){if(it===null)return;var ut=it.tag;if(ut===3||ut===4){var _t=it.stateNode.containerInfo;if(_t===ot||_t.nodeType===8&&_t.parentNode===ot)break;if(ut===4)for(ut=it.return;ut!==null;){var mt=ut.tag;if((mt===3||mt===4)&&((mt=ut.stateNode.containerInfo)===ot||mt.nodeType===8&&mt.parentNode===ot))return;ut=ut.return}for(;_t!==null;){if((ut=Ua(_t))===null)return;if((mt=ut.tag)===5||mt===6){it=st=ut;continue t}_t=_t.parentNode}}it=it.return}var Ht=function(){var ue,Me,mn,Kt=st,re=pe(W),ge=[];t:{var De=Lr.get(C);if(De!==void 0){var Re=li,Ze=C;switch(C){case"keypress":if(Bs(W)===0)break t;case"keydown":case"keyup":Re=qi;break;case"focusin":Ze="focus",Re=Ar;break;case"focusout":Ze="blur",Re=Ar;break;case"beforeblur":case"afterblur":Re=Ar;break;case"click":if(W.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Re=ci;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Re=Ia;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Re=zs;break;case nr:case ka:case Ui:Re=Ra;break;case to:Re=ui;break;case"scroll":Re=Fs;break;case"wheel":Re=Us;break;case"copy":case"cut":case"paste":Re=Ro;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Re=Da}for(var ln=!(Qe=!!(4&j))&&C==="scroll",Xe=Qe?De!==null?De+"Capture":null:De,Qe=[],xn=Kt;xn!==null;){var kn,jn=(kn=xn).stateNode;if(kn.tag===5&&jn!==null&&(kn=jn,Xe!==null&&(jn=Rt(xn,Xe))!=null&&Qe.push(Zl(xn,jn,kn))),ln)break;xn=xn.return}0<Qe.length&&(De=new Re(De,Ze,null,W,re),ge.push({event:De,listeners:Qe}))}}if(!(7&j)){if(Re=C==="mouseout"||C==="pointerout",(!(De=C==="mouseover"||C==="pointerover")||16&j||!(Ze=W.relatedTarget||W.fromElement)||!Ua(Ze)&&!Ze[Ws])&&(Re||De)&&(De=re.window===re?re:(De=re.ownerDocument)?De.defaultView||De.parentWindow:window,Re?(Re=Kt,(Ze=(Ze=W.relatedTarget||W.toElement)?Ua(Ze):null)!==null&&(Ze!==(ln=Te(Ze))||Ze.tag!==5&&Ze.tag!==6)&&(Ze=null)):(Re=null,Ze=Kt),Re!==Ze)){if(Qe=ci,jn="onMouseLeave",Xe="onMouseEnter",xn="mouse",C!=="pointerout"&&C!=="pointerover"||(Qe=Da,jn="onPointerLeave",Xe="onPointerEnter",xn="pointer"),ln=Re==null?De:Vs(Re),kn=Ze==null?De:Vs(Ze),(De=new Qe(jn,xn+"leave",Re,W,re)).target=ln,De.relatedTarget=kn,jn=null,Ua(re)===Kt&&((Qe=new Qe(Xe,xn+"enter",Ze,W,re)).target=kn,Qe.relatedTarget=ln,jn=Qe),ln=jn,Re&&Ze)t:{for(Xe=Ze,xn=0,kn=Qe=Re;kn;kn=qs(kn))xn++;for(kn=0,jn=Xe;jn;jn=qs(jn))kn++;for(;0<xn-kn;)Qe=qs(Qe),xn--;for(;0<kn-xn;)Xe=qs(Xe),kn--;for(;xn--;){if(Qe===Xe||Xe!==null&&Qe===Xe.alternate)break t;Qe=qs(Qe),Xe=qs(Xe)}Qe=null}else Qe=null;Re!==null&&sy(ge,De,Re,Qe,!1),Ze!==null&&ln!==null&&sy(ge,ln,Ze,Qe,!0)}switch((Re=(De=Kt?Vs(Kt):window).nodeName&&De.nodeName.toLowerCase())==="select"||Re==="input"&&De.type==="file"?ue=sn:$s(De)?tn?ue=Ru:(ue=ar,Me=Un):!(Re=De.nodeName)||Re.toLowerCase()!=="input"||De.type!=="checkbox"&&De.type!=="radio"||(ue=Vl),(ue=ue&&ue(C,Kt))?za(ge,ue,W,re):(Me&&Me(C,De,Kt),C==="focusout"&&(Me=De._wrapperState)&&Me.controlled&&De.type==="number"&&St(De,"number",De.value)),Me=Kt?Vs(Kt):window,C){case"focusin":!$s(Me)&&Me.contentEditable!=="true"||(Hs=Me,tp=Kt,Gl=null);break;case"focusout":Gl=tp=Hs=null;break;case"mousedown":ep=!0;break;case"contextmenu":case"mouseup":case"dragend":ep=!1,Z0(ge,W,re);break;case"selectionchange":if(YS)break;case"keydown":case"keyup":Z0(ge,W,re)}if(La)t:{switch(C){case"compositionstart":var pn="onCompositionStart";break t;case"compositionend":pn="onCompositionEnd";break t;case"compositionupdate":pn="onCompositionUpdate";break t}pn=void 0}else di?Wl(C,W)&&(pn="onCompositionEnd"):C==="keydown"&&W.keyCode===229&&(pn="onCompositionStart");pn&&(Ji&&W.locale!=="ko"&&(di||pn!=="onCompositionStart"?pn==="onCompositionEnd"&&di&&(mn=Ls()):(Io="value"in(Po=re)?Po.value:Po.textContent,di=!0)),0<(Me=Mu(Kt,pn)).length&&(pn=new bo(pn,C,null,W,re),ge.push({event:pn,listeners:Me}),(mn||(mn=Lo(W))!==null)&&(pn.data=mn))),(mn=(Ba?function(yn,dn){switch(yn){case"compositionend":return Lo(dn);case"keypress":return dn.which!==32?null:(Jl=!0,Fa);case"textInput":return(yn=dn.data)===Fa&&Jl?null:yn;default:return null}}:function(yn,dn){if(di)return yn==="compositionend"||!La&&Wl(yn,dn)?(yn=Ls(),ai=Io=Po=null,di=!1,yn):null;switch(yn){case"paste":default:return null;case"keypress":if(!(dn.ctrlKey||dn.altKey||dn.metaKey)||dn.ctrlKey&&dn.altKey){if(dn.char&&1<dn.char.length)return dn.char;if(dn.which)return String.fromCharCode(dn.which)}return null;case"compositionend":return Ji&&dn.locale!=="ko"?null:dn.data}})(C,W))&&0<(Kt=Mu(Kt,"onBeforeInput")).length&&(re=new bo("onBeforeInput","beforeinput",null,W,re),ge.push({event:re,listeners:Kt}),re.data=mn)}ey(ge,j)},ie=void 0;if(we)Ht();else{we=!0;try{b2(Ht,ie)}finally{we=!1,Oe()}}}function Zl(C,j,W){return{instance:C,listener:j,currentTarget:W}}function Mu(C,j){for(var W=j+"Capture",it=[];C!==null;){var ot=C,st=ot.stateNode;ot.tag===5&&st!==null&&(ot=st,(st=Rt(C,W))!=null&&it.unshift(Zl(C,st,ot)),(st=Rt(C,j))!=null&&it.push(Zl(C,st,ot))),C=C.return}return it}function qs(C){if(C===null)return null;for(;(C=C.return)&&C.tag!==5;);return C||null}function sy(C,j,W,it,ot){for(var st=j._reactName,ut=[];W!==null&&W!==it;){var _t=W,mt=_t.alternate,Ht=_t.stateNode;if(mt!==null&&mt===it)break;_t.tag===5&&Ht!==null&&(_t=Ht,ot?(mt=Rt(W,st))!=null&&ut.unshift(Zl(W,mt,_t)):(mt=Rt(W,st))!=null&&ut.push(Zl(W,mt,_t))),W=W.return}ut.length!==0&&C.push({event:j,listeners:ut})}function Du(){}var rp=null,op=null;function ly(C,j){switch(C){case"button":case"input":case"select":case"textarea":return j.autoFocus}}function ip(C,j){return C==="textarea"||C==="option"||C==="noscript"||typeof j.children=="string"||typeof j.children=="number"||typeof j.dangerouslySetInnerHTML=="object"&&j.dangerouslySetInnerHTML!==null&&j.dangerouslySetInnerHTML.__html!=null}var cy=typeof setTimeout=="function"?setTimeout:void 0,ZS=typeof clearTimeout=="function"?clearTimeout:void 0;function ap(C){(C.nodeType===1||C.nodeType===9&&(C=C.body)!=null)&&(C.textContent="")}function Js(C){for(;C!=null;C=C.nextSibling){var j=C.nodeType;if(j===1||j===3)break}return C}function uy(C){C=C.previousSibling;for(var j=0;C;){if(C.nodeType===8){var W=C.data;if(W==="$"||W==="$!"||W==="$?"){if(j===0)return C;j--}else W==="/$"&&j++}C=C.previousSibling}return null}var sp=0,Vi="__reactFiber$"+(zn=Math.random().toString(36).slice(2)),Lu="__reactProps$"+zn,Ws="__reactContainer$"+zn,dy="__reactEvents$"+zn;function Ua(C){var j=C[Vi];if(j)return j;for(var W=C.parentNode;W;){if(j=W[Ws]||W[Vi]){if(W=j.alternate,j.child!==null||W!==null&&W.child!==null)for(C=uy(C);C!==null;){if(W=C[Vi])return W;C=uy(C)}return j}W=(C=W).parentNode}return null}function Ql(C){return!(C=C[Vi]||C[Ws])||C.tag!==5&&C.tag!==6&&C.tag!==13&&C.tag!==3?null:C}function Vs(C){if(C.tag===5||C.tag===6)return C.stateNode;throw Error(i(33))}function Bu(C){return C[Lu]||null}function fy(C){var j=C[dy];return j===void 0?C[dy]=new Set:j}var lp=[],Xl=-1;function Ki(C){return{current:C}}function Bn(C){Xl<0||(C.current=lp[Xl],lp[Xl]=null,Xl--)}function Wn(C,j){lp[++Xl]=C.current,C.current=j}var Gi={},xr=Ki(Gi),Fr=Ki(!1),$a=Gi;function Ks(C,j){var W=C.type.contextTypes;if(!W)return Gi;var it=C.stateNode;if(it&&it.__reactInternalMemoizedUnmaskedChildContext===j)return it.__reactInternalMemoizedMaskedChildContext;var ot,st={};for(ot in W)st[ot]=j[ot];return it&&((C=C.stateNode).__reactInternalMemoizedUnmaskedChildContext=j,C.__reactInternalMemoizedMaskedChildContext=st),st}function Wr(C){return C.childContextTypes!=null}function cp(){Bn(Fr),Bn(xr)}function py(C,j,W){if(xr.current!==Gi)throw Error(i(168));Wn(xr,j),Wn(Fr,W)}function hy(C,j,W){var it,ot=C.stateNode;if(C=j.childContextTypes,typeof ot.getChildContext!="function")return W;for(it in ot=ot.getChildContext())if(!(it in C))throw Error(i(108,Y(j)||"Unknown",it));return e({},W,ot)}function Fu(C){C=(C=C.stateNode)&&C.__reactInternalMemoizedMergedChildContext||Gi,$a=xr.current,Wn(xr,C),Wn(Fr,Fr.current)}function gy(C,j,W){var it=C.stateNode;if(!it)throw Error(i(169));W?(C=hy(C,j,$a),it.__reactInternalMemoizedMergedChildContext=C,Bn(Fr),Bn(xr),Wn(xr,C)):Bn(Fr),Wn(Fr,W)}var up=null,Ha=null,QS=s.unstable_runWithPriority,dp=s.unstable_scheduleCallback,fp=s.unstable_cancelCallback,XS=s.unstable_shouldYield,pp=(se=s.unstable_requestPaint,s.unstable_now),t2=s.unstable_getCurrentPriorityLevel,zu=s.unstable_ImmediatePriority,my=s.unstable_UserBlockingPriority,yy=s.unstable_NormalPriority,by=s.unstable_LowPriority,vy=s.unstable_IdlePriority,hp={},e2=se!==void 0?se:function(){},fi=null,Uu=null,gp=!1,_y=pp(),wr=_y<1e4?pp:function(){return pp()-_y};function Gs(){switch(t2()){case zu:return 99;case my:return 98;case yy:return 97;case by:return 96;case vy:return 95;default:throw Error(i(332))}}function xy(C){switch(C){case 99:return zu;case 98:return my;case 97:return yy;case 96:return by;case 95:return vy;default:throw Error(i(332))}}function qa(C,j){return C=xy(C),QS(C,j)}function tc(C,j,W){return C=xy(C),dp(C,j,W)}function Bo(){var C;Uu!==null&&(C=Uu,Uu=null,fp(C)),wy()}function wy(){if(!gp&&fi!==null){gp=!0;var C=0;try{var j=fi;qa(99,function(){for(;C<j.length;C++)for(var W=j[C];(W=W(!0))!==null;);}),fi=null}catch(W){throw fi!==null&&(fi=fi.slice(C+1)),dp(zu,Bo),W}finally{gp=!1}}}var n2=E.ReactCurrentBatchConfig;function _o(C,j){if(C&&C.defaultProps){for(var W in j=e({},j),C=C.defaultProps)j[W]===void 0&&(j[W]=C[W]);return j}return j}var $u=Ki(null),Hu=null,Ys=null,qu=null;function mp(){qu=Ys=Hu=null}function yp(C){var j=$u.current;Bn($u),C.type._context._currentValue=j}function Sy(C,j){for(;C!==null;){var W=C.alternate;if((C.childLanes&j)===j){if(W===null||(W.childLanes&j)===j)break;W.childLanes|=j}else C.childLanes|=j,W!==null&&(W.childLanes|=j);C=C.return}}function Zs(C,j){(qu=Ys=null)!==(C=(Hu=C).dependencies)&&C.firstContext!==null&&(C.lanes&j&&(xo=!0),C.firstContext=null)}function no(C,j){if(qu!==C&&j!==!1&&j!==0)if(typeof j=="number"&&j!==1073741823||(qu=C,j=1073741823),j={context:C,observedBits:j,next:null},Ys===null){if(Hu===null)throw Error(i(308));Ys=j,Hu.dependencies={lanes:0,firstContext:j,responders:null}}else Ys=Ys.next=j;return C._currentValue}var Yi=!1;function bp(C){C.updateQueue={baseState:C.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Cy(C,j){C=C.updateQueue,j.updateQueue===C&&(j.updateQueue={baseState:C.baseState,firstBaseUpdate:C.firstBaseUpdate,lastBaseUpdate:C.lastBaseUpdate,shared:C.shared,effects:C.effects})}function Zi(C,j){return{eventTime:C,lane:j,tag:0,payload:null,callback:null,next:null}}function Qi(C,j){var W;(C=C.updateQueue)!==null&&((W=(C=C.shared).pending)===null?j.next=j:(j.next=W.next,W.next=j),C.pending=j)}function Ey(C,j){var W=C.updateQueue,it=C.alternate;if(it!==null&&W===(it=it.updateQueue)){var ot=null,st=null;if((W=W.firstBaseUpdate)!==null){do var ut={eventTime:W.eventTime,lane:W.lane,tag:W.tag,payload:W.payload,callback:W.callback,next:null};while(st===null?ot=st=ut:st=st.next=ut,(W=W.next)!==null);st===null?ot=st=j:st=st.next=j}else ot=st=j;return W={baseState:it.baseState,firstBaseUpdate:ot,lastBaseUpdate:st,shared:it.shared,effects:it.effects},void(C.updateQueue=W)}(C=W.lastBaseUpdate)===null?W.firstBaseUpdate=j:C.next=j,W.lastBaseUpdate=j}function ec(C,j,W,it){var ot,st,ut,_t,mt=C.updateQueue,Ht=(Yi=!1,mt.firstBaseUpdate),ie=mt.lastBaseUpdate;if((Kt=mt.shared.pending)!==null&&(mt.shared.pending=null,st=(ot=Kt).next,(ot.next=null)===ie?Ht=st:ie.next=st,ie=ot,(ut=C.alternate)!==null&&(_t=(ut=ut.updateQueue).lastBaseUpdate)!==ie&&(_t===null?ut.firstBaseUpdate=st:_t.next=st,ut.lastBaseUpdate=ot)),Ht!==null){for(_t=mt.baseState,ie=0,ut=st=ot=null;;){Kt=Ht.lane;var ue=Ht.eventTime;if((it&Kt)===Kt){ut!==null&&(ut=ut.next={eventTime:ue,lane:0,tag:Ht.tag,payload:Ht.payload,callback:Ht.callback,next:null});t:{var Me=C,mn=Ht,Kt=j;switch(ue=W,mn.tag){case 1:if(typeof(Me=mn.payload)=="function"){_t=Me.call(ue,_t,Kt);break t}_t=Me;break t;case 3:Me.flags=-4097&Me.flags|64;case 0:if((Kt=typeof(Me=mn.payload)=="function"?Me.call(ue,_t,Kt):Me)==null)break t;_t=e({},_t,Kt);break t;case 2:Yi=!0}}Ht.callback!==null&&(C.flags|=32,(Kt=mt.effects)===null?mt.effects=[Ht]:Kt.push(Ht))}else ue={eventTime:ue,lane:Kt,tag:Ht.tag,payload:Ht.payload,callback:Ht.callback,next:null},ut===null?(st=ut=ue,ot=_t):ut=ut.next=ue,ie|=Kt;if((Ht=Ht.next)===null){if((Kt=mt.shared.pending)===null)break;Ht=Kt.next,Kt.next=null,mt.lastBaseUpdate=Kt,mt.shared.pending=null}}ut===null&&(ot=_t),mt.baseState=ot,mt.firstBaseUpdate=st,mt.lastBaseUpdate=ut,pc|=ie,C.lanes=ie,C.memoizedState=_t}}function ky(C,j,W){if(C=j.effects,(j.effects=null)!==C)for(j=0;j<C.length;j++){var it=C[j],ot=it.callback;if(ot!==null){if(it.callback=null,it=W,typeof ot!="function")throw Error(i(191,ot));ot.call(it)}}}var Oy=new n.Component().refs;function Ju(C,j,W,it){W=(W=W(it,j=C.memoizedState))==null?j:e({},j,W),C.memoizedState=W,C.lanes===0&&(C.updateQueue.baseState=W)}var Wu={isMounted:function(C){return!!(C=C._reactInternals)&&Te(C)===C},enqueueSetState:function(C,j,W){C=C._reactInternals;var it=Kr(),ot=na(C),st=Zi(it,ot);st.payload=j,W!=null&&(st.callback=W),Qi(C,st),ra(C,ot,it)},enqueueReplaceState:function(C,j,W){C=C._reactInternals;var it=Kr(),ot=na(C),st=Zi(it,ot);st.tag=1,st.payload=j,W!=null&&(st.callback=W),Qi(C,st),ra(C,ot,it)},enqueueForceUpdate:function(C,j){C=C._reactInternals;var W=Kr(),it=na(C),ot=Zi(W,it);ot.tag=2,j!=null&&(ot.callback=j),Qi(C,ot),ra(C,it,W)}};function Ty(C,j,W,it,ot,st,ut){return typeof(C=C.stateNode).shouldComponentUpdate=="function"?C.shouldComponentUpdate(it,st,ut):!(j.prototype&&j.prototype.isPureReactComponent&&Kl(W,it)&&Kl(ot,st))}function jy(C,j,W){var it=!1,ot=Gi,st=j.contextType;j=new j(W,st=typeof st=="object"&&st!==null?no(st):(ot=Wr(j)?$a:xr.current,(it=(it=j.contextTypes)!=null)?Ks(C,ot):Gi)),C.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=Wu,(C.stateNode=j)._reactInternals=C,it&&((C=C.stateNode).__reactInternalMemoizedUnmaskedChildContext=ot,C.__reactInternalMemoizedMaskedChildContext=st)}function Ay(C,j,W,it){C=j.state,typeof j.componentWillReceiveProps=="function"&&j.componentWillReceiveProps(W,it),typeof j.UNSAFE_componentWillReceiveProps=="function"&&j.UNSAFE_componentWillReceiveProps(W,it),j.state!==C&&Wu.enqueueReplaceState(j,j.state,null)}function vp(C,j,W,it){var ot=C.stateNode,st=(ot.props=W,ot.state=C.memoizedState,ot.refs=Oy,bp(C),j.contextType);typeof st=="object"&&st!==null?ot.context=no(st):(st=Wr(j)?$a:xr.current,ot.context=Ks(C,st)),ec(C,W,ot,it),ot.state=C.memoizedState,typeof(st=j.getDerivedStateFromProps)=="function"&&(Ju(C,0,st,W),ot.state=C.memoizedState),typeof j.getDerivedStateFromProps=="function"||typeof ot.getSnapshotBeforeUpdate=="function"||typeof ot.UNSAFE_componentWillMount!="function"&&typeof ot.componentWillMount!="function"||(j=ot.state,typeof ot.componentWillMount=="function"&&ot.componentWillMount(),typeof ot.UNSAFE_componentWillMount=="function"&&ot.UNSAFE_componentWillMount(),j!==ot.state&&Wu.enqueueReplaceState(ot,ot.state,null),ec(C,W,ot,it),ot.state=C.memoizedState),typeof ot.componentDidMount=="function"&&(C.flags|=4)}var Vu=Array.isArray;function nc(C,j,W){if((C=W.ref)!==null&&typeof C!="function"&&typeof C!="object"){if(W._owner){if(W=W._owner){if(W.tag!==1)throw Error(i(309));var it=W.stateNode}if(!it)throw Error(i(147,C));var ot=""+C;return j!==null&&j.ref!==null&&typeof j.ref=="function"&&j.ref._stringRef===ot?j.ref:((j=function(st){var ut=it.refs;ut===Oy&&(ut=it.refs={}),st===null?delete ut[ot]:ut[ot]=st})._stringRef=ot,j)}if(typeof C!="string")throw Error(i(284));if(!W._owner)throw Error(i(290,C))}return C}function Ku(C,j){if(C.type!=="textarea")throw Error(i(31,Object.prototype.toString.call(j)==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":j))}function Ny(C){function j(Kt,re){var ge;C&&((ge=Kt.lastEffect)!==null?(ge.nextEffect=re,Kt.lastEffect=re):Kt.firstEffect=Kt.lastEffect=re,re.nextEffect=null,re.flags=8)}function W(Kt,re){if(!C)return null;for(;re!==null;)j(Kt,re),re=re.sibling;return null}function it(Kt,re){for(Kt=new Map;re!==null;)re.key!==null?Kt.set(re.key,re):Kt.set(re.index,re),re=re.sibling;return Kt}function ot(Kt,re){return(Kt=aa(Kt,re)).index=0,Kt.sibling=null,Kt}function st(Kt,re,ge){return Kt.index=ge,C?(ge=Kt.alternate)===null||(ge=ge.index)<re?(Kt.flags=2,re):ge:re}function ut(Kt){return C&&Kt.alternate===null&&(Kt.flags=2),Kt}function _t(Kt,re,ge,De){return re===null||re.tag!==6?(re=Qp(ge,Kt.mode,De)).return=Kt:(re=ot(re,ge)).return=Kt,re}function mt(Kt,re,ge,De){return re!==null&&re.elementType===ge.type?(De=ot(re,ge.props)).ref=nc(0,re,ge):(De=dd(ge.type,ge.key,ge.props,null,Kt.mode,De)).ref=nc(0,re,ge),De.return=Kt,De}function Ht(Kt,re,ge,De){return re===null||re.tag!==4||re.stateNode.containerInfo!==ge.containerInfo||re.stateNode.implementation!==ge.implementation?(re=Xp(ge,Kt.mode,De)).return=Kt:(re=ot(re,ge.children||[])).return=Kt,re}function ie(Kt,re,ge,De,Re){return re===null||re.tag!==7?(re=al(ge,Kt.mode,De,Re)).return=Kt:(re=ot(re,ge)).return=Kt,re}function ue(Kt,re,ge){if(typeof re=="string"||typeof re=="number")return(re=Qp(""+re,Kt.mode,ge)).return=Kt,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case k:return(ge=dd(re.type,re.key,re.props,null,Kt.mode,ge)).ref=nc(0,null,re),ge.return=Kt,ge;case D:return(re=Xp(re,Kt.mode,ge)).return=Kt,re}if(Vu(re)||T(re))return(re=al(re,Kt.mode,ge,null)).return=Kt,re;Ku(Kt,re)}return null}function Me(Kt,re,ge,De){var Re=re!==null?re.key:null;if(typeof ge=="string"||typeof ge=="number")return Re!==null?null:_t(Kt,re,""+ge,De);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case k:return ge.key===Re?ge.type===N?ie(Kt,re,ge.props.children,De,Re):mt(Kt,re,ge,De):null;case D:return ge.key===Re?Ht(Kt,re,ge,De):null}if(Vu(ge)||T(ge))return Re!==null?null:ie(Kt,re,ge,De,null);Ku(Kt,ge)}return null}function mn(Kt,re,ge,De,Re){if(typeof De=="string"||typeof De=="number")return _t(re,Kt=Kt.get(ge)||null,""+De,Re);if(typeof De=="object"&&De!==null){switch(De.$$typeof){case k:return Kt=Kt.get(De.key===null?ge:De.key)||null,De.type===N?ie(re,Kt,De.props.children,Re,De.key):mt(re,Kt,De,Re);case D:return Ht(re,Kt=Kt.get(De.key===null?ge:De.key)||null,De,Re)}if(Vu(De)||T(De))return ie(re,Kt=Kt.get(ge)||null,De,Re,null);Ku(re,De)}return null}return function(Kt,re,ge,De){var Re=typeof ge=="object"&&ge!==null&&ge.type===N&&ge.key===null,Ze=typeof(ge=Re?ge.props.children:ge)=="object"&&ge!==null;if(Ze)switch(ge.$$typeof){case k:t:{for(Ze=ge.key,Re=re;Re!==null;){if(Re.key===Ze){switch(Re.tag){case 7:if(ge.type!==N)break;W(Kt,Re.sibling),(re=ot(Re,ge.props.children)).return=Kt,Kt=re;break t;default:if(Re.elementType===ge.type){W(Kt,Re.sibling),(re=ot(Re,ge.props)).ref=nc(0,Re,ge),re.return=Kt,Kt=re;break t}}W(Kt,Re);break}j(Kt,Re),Re=Re.sibling}Kt=ge.type===N?((re=al(ge.props.children,Kt.mode,De,ge.key)).return=Kt,re):((De=dd(ge.type,ge.key,ge.props,null,Kt.mode,De)).ref=nc(0,re,ge),De.return=Kt,De)}return ut(Kt);case D:t:{for(Re=ge.key;re!==null;){if(re.key===Re){if(re.tag===4&&re.stateNode.containerInfo===ge.containerInfo&&re.stateNode.implementation===ge.implementation){W(Kt,re.sibling),(re=ot(re,ge.children||[])).return=Kt,Kt=re;break t}W(Kt,re);break}j(Kt,re),re=re.sibling}(re=Xp(ge,Kt.mode,De)).return=Kt,Kt=re}return ut(Kt)}if(typeof ge=="string"||typeof ge=="number")return ge=""+ge,(re=re!==null&&re.tag===6?(W(Kt,re.sibling),ot(re,ge)):(W(Kt,re),Qp(ge,Kt.mode,De))).return=Kt,ut(Kt=re);if(Vu(ge)){for(var ln=Kt,Xe=re,Qe=ge,xn=De,kn=null,jn=null,pn=Xe,yn=Xe=0,dn=null;pn!==null&&yn<Qe.length;yn++){pn.index>yn?(dn=pn,pn=null):dn=pn.sibling;var Mn=Me(ln,pn,Qe[yn],xn);if(Mn===null){pn===null&&(pn=dn);break}C&&pn&&Mn.alternate===null&&j(ln,pn),Xe=st(Mn,Xe,yn),jn===null?kn=Mn:jn.sibling=Mn,jn=Mn,pn=dn}if(yn===Qe.length)return W(ln,pn),kn;if(pn===null){for(;yn<Qe.length;yn++)(pn=ue(ln,Qe[yn],xn))!==null&&(Xe=st(pn,Xe,yn),jn===null?kn=pn:jn.sibling=pn,jn=pn);return kn}for(pn=it(ln,pn);yn<Qe.length;yn++)(dn=mn(pn,ln,yn,Qe[yn],xn))!==null&&(C&&dn.alternate!==null&&pn.delete(dn.key===null?yn:dn.key),Xe=st(dn,Xe,yn),jn===null?kn=dn:jn.sibling=dn,jn=dn);return C&&pn.forEach(function(oh){return j(ln,oh)}),kn}if(T(ge)){var Vn=Kt,ao=re,Ho=ge,rh=De,mi=T(Ho);if(typeof mi!="function")throw Error(i(150));if((Ho=mi.call(Ho))==null)throw Error(i(151));for(var yi=mi=null,dr=ao,bi=ao=0,hd=null,$n=Ho.next();dr!==null&&!$n.done;bi++,$n=Ho.next()){dr.index>bi?(hd=dr,dr=null):hd=dr.sibling;var sl=Me(Vn,dr,$n.value,rh);if(sl===null){dr===null&&(dr=hd);break}C&&dr&&sl.alternate===null&&j(Vn,dr),ao=st(sl,ao,bi),yi===null?mi=sl:yi.sibling=sl,yi=sl,dr=hd}if($n.done)return W(Vn,dr),mi;if(dr===null){for(;!$n.done;bi++,$n=Ho.next())($n=ue(Vn,$n.value,rh))!==null&&(ao=st($n,ao,bi),yi===null?mi=$n:yi.sibling=$n,yi=$n);return mi}for(dr=it(Vn,dr);!$n.done;bi++,$n=Ho.next())($n=mn(dr,Vn,bi,$n.value,rh))!==null&&(C&&$n.alternate!==null&&dr.delete($n.key===null?bi:$n.key),ao=st($n,ao,bi),yi===null?mi=$n:yi.sibling=$n,yi=$n);return C&&dr.forEach(function(oh){return j(Vn,oh)}),mi}if(Ze&&Ku(Kt,ge),ge===void 0&&!Re)switch(Kt.tag){case 1:case 22:case 0:case 11:case 15:throw Error(i(152,Y(Kt.type)||"Component"))}return W(Kt,re)}}var Gu=Ny(!0),Py=Ny(!1),rc={},Fo=Ki(rc),oc=Ki(rc),ic=Ki(rc);function Ja(C){if(C===rc)throw Error(i(174));return C}function _p(C,j){switch(Wn(ic,j),Wn(oc,C),Wn(Fo,rc),C=j.nodeType){case 9:case 11:j=(j=j.documentElement)?j.namespaceURI:Et(null,"");break;default:j=Et(j=(C=C===8?j.parentNode:j).namespaceURI||null,C=C.tagName)}Bn(Fo),Wn(Fo,j)}function Qs(){Bn(Fo),Bn(oc),Bn(ic)}function Iy(C){Ja(ic.current);var j=Ja(Fo.current),W=Et(j,C.type);j!==W&&(Wn(oc,C),Wn(Fo,W))}function xp(C){oc.current===C&&(Bn(Fo),Bn(oc))}var Kn=Ki(0);function Yu(C){for(var j=C;j!==null;){if(j.tag===13){var W=j.memoizedState;if(W!==null&&((W=W.dehydrated)===null||W.data==="$?"||W.data==="$!"))return j}else if(j.tag===19&&j.memoizedProps.revealOrder!==void 0){if(64&j.flags)return j}else if(j.child!==null){j=(j.child.return=j).child;continue}if(j===C)break;for(;j.sibling===null;){if(j.return===null||j.return===C)return null;j=j.return}j.sibling.return=j.return,j=j.sibling}return null}var pi=null,Xi=null,zo=!1;function Ry(C,j){var W=io(5,null,null,0);W.elementType="DELETED",W.type="DELETED",W.stateNode=j,W.return=C,W.flags=8,C.lastEffect!==null?(C.lastEffect.nextEffect=W,C.lastEffect=W):C.firstEffect=C.lastEffect=W}function My(C,j){switch(C.tag){case 5:var W=C.type;return(j=j.nodeType!==1||W.toLowerCase()!==j.nodeName.toLowerCase()?null:j)!==null&&(C.stateNode=j,1);case 6:return(j=C.pendingProps===""||j.nodeType!==3?null:j)!==null&&(C.stateNode=j,1);default:return}}function wp(C){if(zo){var j=Xi;if(j){var W=j;if(!My(C,j)){if(!(j=Js(W.nextSibling))||!My(C,j))return C.flags=-1025&C.flags|2,zo=!1,void(pi=C);Ry(pi,W)}pi=C,Xi=Js(j.firstChild)}else C.flags=-1025&C.flags|2,zo=!1,pi=C}}function Dy(C){for(C=C.return;C!==null&&C.tag!==5&&C.tag!==3&&C.tag!==13;)C=C.return;pi=C}function Zu(C){if(C===pi){if(!zo)return Dy(C),zo=!0,0;var j=C.type;if(C.tag!==5||j!=="head"&&j!=="body"&&!ip(j,C.memoizedProps))for(j=Xi;j;)Ry(C,j),j=Js(j.nextSibling);if(Dy(C),C.tag===13){if(!(C=(C=C.memoizedState)!==null?C.dehydrated:null))throw Error(i(317));t:{for(C=C.nextSibling,j=0;C;){if(C.nodeType===8){var W=C.data;if(W==="/$"){if(j===0){Xi=Js(C.nextSibling);break t}j--}else W!=="$"&&W!=="$!"&&W!=="$?"||j++}C=C.nextSibling}Xi=null}}else Xi=pi?Js(C.stateNode.nextSibling):null;return 1}}function Sp(){Xi=pi=null,zo=!1}var Xs=[];function Cp(){for(var C=0;C<Xs.length;C++)Xs[C]._workInProgressVersionPrimary=null;Xs.length=0}var ac=E.ReactCurrentDispatcher,ro=E.ReactCurrentBatchConfig,sc=0,Gn=null,Nr=null,gr=null,Qu=!1,lc=!1;function zr(){throw Error(i(321))}function Ep(C,j){if(j!==null){for(var W=0;W<j.length&&W<C.length;W++)if(!rr(C[W],j[W]))return;return 1}}function kp(C,j,W,it,ot,st){if(sc=st,(Gn=j).memoizedState=null,j.updateQueue=null,j.lanes=0,ac.current=C===null||C.memoizedState===null?r2:o2,C=W(it,ot),lc){st=0;do if(lc=!1,!(st<25))throw Error(i(301));while(st+=1,gr=Nr=null,j.updateQueue=null,ac.current=i2,C=W(it,ot),lc)}if(ac.current=nd,j=Nr!==null&&Nr.next!==null,sc=0,gr=Nr=Gn=null,Qu=!1,j)throw Error(i(300));return C}function Wa(){var C={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gr===null?Gn.memoizedState=gr=C:gr=gr.next=C,gr}function Va(){C=Nr===null?(C=Gn.alternate)!==null?C.memoizedState:null:Nr.next;var C,j=gr===null?Gn.memoizedState:gr.next;if(j!==null)gr=j,Nr=C;else{if(C===null)throw Error(i(310));C={memoizedState:(Nr=C).memoizedState,baseState:Nr.baseState,baseQueue:Nr.baseQueue,queue:Nr.queue,next:null},gr===null?Gn.memoizedState=gr=C:gr=gr.next=C}return gr}function Uo(C,j){return typeof j=="function"?j(C):j}function cc(C){var j=Va(),W=j.queue;if(W===null)throw Error(i(311));W.lastRenderedReducer=C;var it,ot=(ut=Nr).baseQueue,st=W.pending;if(st!==null&&(ot!==null&&(it=ot.next,ot.next=st.next,st.next=it),ut.baseQueue=ot=st,W.pending=null),ot!==null){ot=ot.next;var ut=ut.baseState,_t=it=st=null,mt=ot;do var Ht,ie=mt.lane;while((sc&ie)===ie?(_t!==null&&(_t=_t.next={lane:0,action:mt.action,eagerReducer:mt.eagerReducer,eagerState:mt.eagerState,next:null}),ut=mt.eagerReducer===C?mt.eagerState:C(ut,mt.action)):(Ht={lane:ie,action:mt.action,eagerReducer:mt.eagerReducer,eagerState:mt.eagerState,next:null},_t===null?(it=_t=Ht,st=ut):_t=_t.next=Ht,Gn.lanes|=ie,pc|=ie),(mt=mt.next)!==null&&mt!==ot);_t===null?st=ut:_t.next=it,rr(ut,j.memoizedState)||(xo=!0),j.memoizedState=ut,j.baseState=st,j.baseQueue=_t,W.lastRenderedState=ut}return[j.memoizedState,W.dispatch]}function uc(C){var j=Va(),W=j.queue;if(W===null)throw Error(i(311));W.lastRenderedReducer=C;var it=W.dispatch,ot=W.pending,st=j.memoizedState;if(ot!==null){W.pending=null;for(var ut=ot=ot.next;st=C(st,ut.action),(ut=ut.next)!==ot;);rr(st,j.memoizedState)||(xo=!0),j.memoizedState=st,j.baseQueue===null&&(j.baseState=st),W.lastRenderedState=st}return[st,it]}function Ly(C,j,W){var it=(it=j._getVersion)(j._source),ot=j._workInProgressVersionPrimary;if(ot!==null?C=ot===it:(C=C.mutableReadLanes,(C=(sc&C)===C)&&(j._workInProgressVersionPrimary=it,Xs.push(j))),C)return W(j._source);throw Xs.push(j),Error(i(350))}function By(C,j,W,it){var ot=Pr;if(ot===null)throw Error(i(349));var st=j._getVersion,ut=st(j._source),_t=ac.current,mt=(ie=_t.useState(function(){return Ly(ot,j,W)}))[1],Ht=ie[0],ie=gr,ue=(Kt=C.memoizedState).refs,Me=ue.getSnapshot,mn=Kt.source,Kt=Kt.subscribe,re=Gn;return C.memoizedState={refs:ue,source:j,subscribe:it},_t.useEffect(function(){ue.getSnapshot=W,ue.setSnapshot=mt;var ge=st(j._source);if(!rr(ut,ge)){ge=W(j._source),rr(Ht,ge)||(mt(ge),ge=na(re),ot.mutableReadLanes|=ge&ot.pendingLanes),ge=ot.mutableReadLanes,ot.entangledLanes|=ge;for(var De=ot.entanglements,Re=ge;0<Re;){var Ze=31-yo(Re),ln=1<<Ze;De[Ze]|=ge,Re&=~ln}}},[W,j,it]),_t.useEffect(function(){return it(j._source,function(){var ge=ue.getSnapshot,De=ue.setSnapshot;try{De(ge(j._source));var Re=na(re);ot.mutableReadLanes|=Re&ot.pendingLanes}catch(Ze){De(function(){throw Ze})}})},[j,it]),rr(Me,W)&&rr(mn,j)&&rr(Kt,it)||((C={pending:null,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:Ht}).dispatch=mt=Ap.bind(null,Gn,C),ie.queue=C,ie.baseQueue=null,Ht=Ly(ot,j,W),ie.memoizedState=ie.baseState=Ht),Ht}function Fy(C,j,W){return By(Va(),C,j,W)}function dc(C){var j=Wa();return typeof C=="function"&&(C=C()),j.memoizedState=j.baseState=C,C=(C=j.queue={pending:null,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:C}).dispatch=Ap.bind(null,Gn,C),[j.memoizedState,C]}function Xu(C,j,W,it){return C={tag:C,create:j,destroy:W,deps:it,next:null},(j=Gn.updateQueue)===null?(Gn.updateQueue=j={lastEffect:null}).lastEffect=C.next=C:(W=j.lastEffect)===null?j.lastEffect=C.next=C:(it=W.next,(W.next=C).next=it,j.lastEffect=C),C}function zy(C){return Wa().memoizedState={current:C}}function td(){return Va().memoizedState}function Op(C,j,W,it){var ot=Wa();Gn.flags|=C,ot.memoizedState=Xu(1|j,W,void 0,it===void 0?null:it)}function Tp(C,j,W,it){var ot=Va(),st=void(it=it===void 0?null:it);if(Nr!==null){var ut=Nr.memoizedState;if(st=ut.destroy,it!==null&&Ep(it,ut.deps))return void Xu(j,W,st,it)}Gn.flags|=C,ot.memoizedState=Xu(1|j,W,st,it)}function Uy(C,j){return Op(516,4,C,j)}function ed(C,j){return Tp(516,4,C,j)}function $y(C,j){return Tp(4,2,C,j)}function Hy(C,j){return typeof j=="function"?(C=C(),j(C),function(){j(null)}):j!=null?(C=C(),j.current=C,function(){j.current=null}):void 0}function qy(C,j,W){return W=W!=null?W.concat([C]):null,Tp(4,2,Hy.bind(null,j,C),W)}function jp(){}function Jy(C,j){var W=Va(),it=(j=j===void 0?null:j,W.memoizedState);return it!==null&&j!==null&&Ep(j,it[1])?it[0]:(W.memoizedState=[C,j],C)}function Wy(C,j){var W=Va(),it=(j=j===void 0?null:j,W.memoizedState);return it!==null&&j!==null&&Ep(j,it[1])?it[0]:(C=C(),W.memoizedState=[C,j],C)}function Ap(C,j,W){var it=Kr(),ot=na(C),st={lane:ot,action:W,eagerReducer:null,eagerState:null,next:null},ut=j.pending;if(ut===null?st.next=st:(st.next=ut.next,ut.next=st),j.pending=st,ut=C.alternate,C===Gn||ut!==null&&ut===Gn)lc=Qu=!0;else{if(C.lanes===0&&(ut===null||ut.lanes===0)&&(ut=j.lastRenderedReducer)!==null)try{var _t=j.lastRenderedState,mt=ut(_t,W);if(st.eagerReducer=ut,st.eagerState=mt,rr(mt,_t))return}catch{}ra(C,ot,it)}}var nd={readContext:no,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useLayoutEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useMutableSource:zr,useOpaqueIdentifier:zr,unstable_isNewReconciler:!1},r2={readContext:no,useCallback:function(C,j){return Wa().memoizedState=[C,j===void 0?null:j],C},useContext:no,useEffect:Uy,useImperativeHandle:function(C,j,W){return W=W!=null?W.concat([C]):null,Op(4,2,Hy.bind(null,j,C),W)},useLayoutEffect:function(C,j){return Op(4,2,C,j)},useMemo:function(C,j){var W=Wa();return j=j===void 0?null:j,C=C(),W.memoizedState=[C,j],C},useReducer:function(C,j,W){var it=Wa();return j=W!==void 0?W(j):j,it.memoizedState=it.baseState=j,C=(C=it.queue={pending:null,dispatch:null,lastRenderedReducer:C,lastRenderedState:j}).dispatch=Ap.bind(null,Gn,C),[it.memoizedState,C]},useRef:zy,useState:dc,useDebugValue:jp,useDeferredValue:function(C){var j=dc(C),W=j[0],it=j[1];return Uy(function(){var ot=ro.transition;ro.transition=1;try{it(C)}finally{ro.transition=ot}},[C]),W},useTransition:function(){var C=dc(!1),j=C[0];return zy(C=(function(W,it){var ot=Gs();qa(ot<98?98:ot,function(){W(!0)}),qa(97<ot?97:ot,function(){var st=ro.transition;ro.transition=1;try{W(!1),it()}finally{ro.transition=st}})}).bind(null,C[1])),[C,j]},useMutableSource:function(C,j,W){var it=Wa();return it.memoizedState={refs:{getSnapshot:j,setSnapshot:null},source:C,subscribe:W},By(it,C,j,W)},useOpaqueIdentifier:function(){var C,j,W;return zo?(C=!1,W={$$typeof:U,toString:W=function(){throw C||(C=!0,j("r:"+(sp++).toString(36))),Error(i(355))},valueOf:W},j=dc(W)[1],!(2&Gn.mode)&&(Gn.flags|=516,Xu(5,function(){j("r:"+(sp++).toString(36))},void 0,null))):dc(W="r:"+(sp++).toString(36)),W},unstable_isNewReconciler:!1},o2={readContext:no,useCallback:Jy,useContext:no,useEffect:ed,useImperativeHandle:qy,useLayoutEffect:$y,useMemo:Wy,useReducer:cc,useRef:td,useState:function(){return cc(Uo)},useDebugValue:jp,useDeferredValue:function(C){var j=cc(Uo),W=j[0],it=j[1];return ed(function(){var ot=ro.transition;ro.transition=1;try{it(C)}finally{ro.transition=ot}},[C]),W},useTransition:function(){var C=cc(Uo)[0];return[td().current,C]},useMutableSource:Fy,useOpaqueIdentifier:function(){return cc(Uo)[0]},unstable_isNewReconciler:!1},i2={readContext:no,useCallback:Jy,useContext:no,useEffect:ed,useImperativeHandle:qy,useLayoutEffect:$y,useMemo:Wy,useReducer:uc,useRef:td,useState:function(){return uc(Uo)},useDebugValue:jp,useDeferredValue:function(C){var j=uc(Uo),W=j[0],it=j[1];return ed(function(){var ot=ro.transition;ro.transition=1;try{it(C)}finally{ro.transition=ot}},[C]),W},useTransition:function(){var C=uc(Uo)[0];return[td().current,C]},useMutableSource:Fy,useOpaqueIdentifier:function(){return uc(Uo)[0]},unstable_isNewReconciler:!1},a2=E.ReactCurrentOwner,xo=!1;function Vr(C,j,W,it){j.child=C===null?Py(j,null,W,it):Gu(j,C.child,W,it)}function Vy(C,j,W,it,ot){W=W.render;var st=j.ref;return Zs(j,ot),it=kp(C,j,W,it,st,ot),C===null||xo?(j.flags|=1,Vr(C,j,it,ot),j.child):(j.updateQueue=C.updateQueue,j.flags&=-517,C.lanes&=~ot,hi(C,j,ot))}function Ky(C,j,W,it,ot,st){var ut;return C===null?typeof(ut=W.type)!="function"||Yp(ut)||ut.defaultProps!==void 0||W.compare!==null||W.defaultProps!==void 0?((C=dd(W.type,null,it,j,j.mode,st)).ref=j.ref,(C.return=j).child=C):(j.tag=15,j.type=ut,Gy(C,j,ut,it,ot,st)):(ut=C.child,ot&st||(ot=ut.memoizedProps,!(W=(W=W.compare)!==null?W:Kl)(ot,it)||C.ref!==j.ref)?(j.flags|=1,(C=aa(ut,it)).ref=j.ref,(C.return=j).child=C):hi(C,j,st))}function Gy(C,j,W,it,ot,st){if(C!==null&&Kl(C.memoizedProps,it)&&C.ref===j.ref){if(xo=!1,!(st&ot))return j.lanes=C.lanes,hi(C,j,st);16384&C.flags&&(xo=!0)}return Np(C,j,W,it,st)}function Yy(C,j,W){var it=j.pendingProps,ot=it.children,st=C!==null?C.memoizedState:null;if(it.mode==="hidden"||it.mode==="unstable-defer-without-hiding")if(4&j.mode){if(!(1073741824&W))return C=st!==null?st.baseLanes|W:W,j.lanes=j.childLanes=1073741824,j.memoizedState={baseLanes:C},ud(0,C),null;j.memoizedState={baseLanes:0},ud(0,st!==null?st.baseLanes:W)}else j.memoizedState={baseLanes:0},ud(0,W);else st!==null?(it=st.baseLanes|W,j.memoizedState=null):it=W,ud(0,it);return Vr(C,j,ot,W),j.child}function Zy(C,j){var W=j.ref;(C===null&&W!==null||C!==null&&C.ref!==W)&&(j.flags|=128)}function Np(C,j,W,it,ot){var st=Ks(j,Wr(W)?$a:xr.current);return Zs(j,ot),W=kp(C,j,W,it,st,ot),C===null||xo?(j.flags|=1,Vr(C,j,W,ot),j.child):(j.updateQueue=C.updateQueue,j.flags&=-517,C.lanes&=~ot,hi(C,j,ot))}function Qy(C,j,W,it,ot){var st,ut,_t,mt,Ht,ie,ue,Me,mn,Kt;return Wr(W)?(st=!0,Fu(j)):st=!1,Zs(j,ot),it=j.stateNode===null?(C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),jy(j,W,it),vp(j,W,it,ot),!0):C===null?(ut=j.stateNode,_t=j.memoizedProps,ut.props=_t,Me=ut.context,mt=typeof(mt=W.contextType)=="object"&&mt!==null?no(mt):Ks(j,mt=Wr(W)?$a:xr.current),(ie=typeof(Ht=W.getDerivedStateFromProps)=="function"||typeof ut.getSnapshotBeforeUpdate=="function")||typeof ut.UNSAFE_componentWillReceiveProps!="function"&&typeof ut.componentWillReceiveProps!="function"||_t===it&&Me===mt||Ay(0,ut,it,mt),Yi=!1,ue=j.memoizedState,ut.state=ue,ec(j,it,ut,ot),Me=j.memoizedState,_t!==it||ue!==Me||Fr.current||Yi?(typeof Ht=="function"&&(Ju(j,0,Ht,it),Me=j.memoizedState),(_t=Yi||Ty(j,W,_t,it,ue,Me,mt))?(ie||typeof ut.UNSAFE_componentWillMount!="function"&&typeof ut.componentWillMount!="function"||(typeof ut.componentWillMount=="function"&&ut.componentWillMount(),typeof ut.UNSAFE_componentWillMount=="function"&&ut.UNSAFE_componentWillMount()),typeof ut.componentDidMount=="function"&&(j.flags|=4)):(typeof ut.componentDidMount=="function"&&(j.flags|=4),j.memoizedProps=it,j.memoizedState=Me),ut.props=it,ut.state=Me,ut.context=mt,_t):(typeof ut.componentDidMount=="function"&&(j.flags|=4),!1)):(ut=j.stateNode,Cy(C,j),_t=j.memoizedProps,mt=j.type===j.elementType?_t:_o(j.type,_t),ut.props=mt,ie=j.pendingProps,ue=ut.context,Me=typeof(Me=W.contextType)=="object"&&Me!==null?no(Me):Ks(j,Me=Wr(W)?$a:xr.current),(Ht=typeof(mn=W.getDerivedStateFromProps)=="function"||typeof ut.getSnapshotBeforeUpdate=="function")||typeof ut.UNSAFE_componentWillReceiveProps!="function"&&typeof ut.componentWillReceiveProps!="function"||_t===ie&&ue===Me||Ay(0,ut,it,Me),Yi=!1,ue=j.memoizedState,ut.state=ue,ec(j,it,ut,ot),Kt=j.memoizedState,_t!==ie||ue!==Kt||Fr.current||Yi?(typeof mn=="function"&&(Ju(j,0,mn,it),Kt=j.memoizedState),(mt=Yi||Ty(j,W,mt,it,ue,Kt,Me))?(Ht||typeof ut.UNSAFE_componentWillUpdate!="function"&&typeof ut.componentWillUpdate!="function"||(typeof ut.componentWillUpdate=="function"&&ut.componentWillUpdate(it,Kt,Me),typeof ut.UNSAFE_componentWillUpdate=="function"&&ut.UNSAFE_componentWillUpdate(it,Kt,Me)),typeof ut.componentDidUpdate=="function"&&(j.flags|=4),typeof ut.getSnapshotBeforeUpdate=="function"&&(j.flags|=256)):(typeof ut.componentDidUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=4),typeof ut.getSnapshotBeforeUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=256),j.memoizedProps=it,j.memoizedState=Kt),ut.props=it,ut.state=Kt,ut.context=Me,mt):(typeof ut.componentDidUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=4),typeof ut.getSnapshotBeforeUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=256),!1)),Pp(C,j,W,it,st,ot)}function Pp(C,j,W,it,ot,st){Zy(C,j);var ut=!!(64&j.flags);if(!it&&!ut)return ot&&gy(j,W,!1),hi(C,j,st);it=j.stateNode,a2.current=j;var _t=ut&&typeof W.getDerivedStateFromError!="function"?null:it.render();return j.flags|=1,C!==null&&ut?(j.child=Gu(j,C.child,null,st),j.child=Gu(j,null,_t,st)):Vr(C,j,_t,st),j.memoizedState=it.state,ot&&gy(j,W,!0),j.child}function Xy(C){var j=C.stateNode;j.pendingContext?py(0,j.pendingContext,j.pendingContext!==j.context):j.context&&py(0,j.context,!1),_p(C,j.containerInfo)}var Ip={dehydrated:null,retryLane:0};function tb(C,j,W){var it,ot=j.pendingProps,st=Kn.current,ut=!1;return(it=(it=!!(64&j.flags))?it:(C===null||C.memoizedState!==null)&&!!(2&st))?(ut=!0,j.flags&=-65):C!==null&&C.memoizedState===null||ot.fallback===void 0||ot.unstable_avoidThisFallback===!0||(st|=1),Wn(Kn,1&st),C===null?(ot.fallback!==void 0&&wp(j),C=ot.children,st=ot.fallback,ut?(C=eb(j,C,st,W),j.child.memoizedState={baseLanes:W},j.memoizedState=Ip,C):typeof ot.unstable_expectedLoadTime=="number"?(C=eb(j,C,st,W),j.child.memoizedState={baseLanes:W},j.memoizedState=Ip,j.lanes=33554432,C):((W=Zp({mode:"visible",children:C},j.mode,W,null)).return=j).child=W):(C.memoizedState,ut?(ot=function(_t,mt,Ht,ie,ue){var Me=mt.mode,mn=_t.child,Kt=(_t=mn.sibling,{mode:"hidden",children:Ht});return 2&Me||mt.child===mn?Ht=aa(mn,Kt):((Ht=mt.child).childLanes=0,Ht.pendingProps=Kt,(mn=Ht.lastEffect)!==null?(mt.firstEffect=Ht.firstEffect,(mt.lastEffect=mn).nextEffect=null):mt.firstEffect=mt.lastEffect=null),_t!==null?ie=aa(_t,ie):(ie=al(ie,Me,ue,null)).flags|=2,ie.return=mt,Ht.return=mt,Ht.sibling=ie,mt.child=Ht,ie}(C,j,ot.children,ot.fallback,W),ut=j.child,st=C.child.memoizedState,ut.memoizedState=st===null?{baseLanes:W}:{baseLanes:st.baseLanes|W},ut.childLanes=C.childLanes&~W,j.memoizedState=Ip,ot):(W=function(_t,mt,Ht,ie){var ue=_t.child;return _t=ue.sibling,Ht=aa(ue,{mode:"visible",children:Ht}),!(2&mt.mode)&&(Ht.lanes=ie),Ht.return=mt,(Ht.sibling=null)!==_t&&(_t.nextEffect=null,_t.flags=8,mt.firstEffect=mt.lastEffect=_t),mt.child=Ht}(C,j,ot.children,W),j.memoizedState=null,W))}function eb(C,j,W,it){var ot=C.mode,st=C.child;return j={mode:"hidden",children:j},2&ot||st===null?st=Zp(j,ot,0,null):(st.childLanes=0,st.pendingProps=j),W=al(W,ot,it,null),st.return=C,W.return=C,st.sibling=W,C.child=st,W}function nb(C,j){C.lanes|=j;var W=C.alternate;W!==null&&(W.lanes|=j),Sy(C.return,j)}function Rp(C,j,W,it,ot,st){var ut=C.memoizedState;ut===null?C.memoizedState={isBackwards:j,rendering:null,renderingStartTime:0,last:it,tail:W,tailMode:ot,lastEffect:st}:(ut.isBackwards=j,ut.rendering=null,ut.renderingStartTime=0,ut.last=it,ut.tail=W,ut.tailMode=ot,ut.lastEffect=st)}function rb(C,j,W){var it=j.pendingProps,ot=it.revealOrder,st=it.tail;if(Vr(C,j,it.children,W),2&(it=Kn.current))it=1&it|2,j.flags|=64;else{if(C!==null&&64&C.flags)t:for(C=j.child;C!==null;){if(C.tag===13)C.memoizedState!==null&&nb(C,W);else if(C.tag===19)nb(C,W);else if(C.child!==null){C=(C.child.return=C).child;continue}if(C===j)break;for(;C.sibling===null;){if(C.return===null||C.return===j)break t;C=C.return}C.sibling.return=C.return,C=C.sibling}it&=1}if(Wn(Kn,it),2&j.mode)switch(ot){case"forwards":for(W=j.child,ot=null;W!==null;)(C=W.alternate)!==null&&Yu(C)===null&&(ot=W),W=W.sibling;(W=ot)===null?(ot=j.child,j.child=null):(ot=W.sibling,W.sibling=null),Rp(j,!1,ot,W,st,j.lastEffect);break;case"backwards":for(ot=j.child,j.child=W=null;ot!==null;){if((C=ot.alternate)!==null&&Yu(C)===null){j.child=ot;break}C=ot.sibling,ot.sibling=W,W=ot,ot=C}Rp(j,!0,W,null,st,j.lastEffect);break;case"together":Rp(j,!1,null,null,void 0,j.lastEffect);break;default:j.memoizedState=null}else j.memoizedState=null;return j.child}function hi(C,j,W){if(C!==null&&(j.dependencies=C.dependencies),pc|=j.lanes,!(W&j.childLanes))return null;if(C!==null&&j.child!==C.child)throw Error(i(153));if(j.child!==null){for(W=aa(C=j.child,C.pendingProps),(j.child=W).return=j;C.sibling!==null;)C=C.sibling,(W=W.sibling=aa(C,C.pendingProps)).return=j;W.sibling=null}return j.child}function fc(C,j){if(!zo)switch(C.tailMode){case"hidden":j=C.tail;for(var W=null;j!==null;)j.alternate!==null&&(W=j),j=j.sibling;W===null?C.tail=null:W.sibling=null;break;case"collapsed":W=C.tail;for(var it=null;W!==null;)W.alternate!==null&&(it=W),W=W.sibling;it===null?j||C.tail===null?C.tail=null:C.tail.sibling=null:it.sibling=null}}function Mp(C,j){try{for(var W="",it=j;W+=function(st){switch(st.tag){case 5:return I(st.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return B(st.type,!1);case 11:return B(st.type.render,!1);case 22:return B(st.type._render,!1);case 1:return B(st.type,!0);default:return""}}(it),it=it.return;);var ot=W}catch(st){ot=`
|
|
107
|
+
`+ot[ut].replace(" at new "," at ");while(1<=ut&&0<=_t);break}}}finally{L=!1,Error.prepareStackTrace=W}return(C=C?C.displayName||C.name:"")?I(C):""}function Y(C){if(C==null)return null;if(typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case N:return"Fragment";case D:return"Portal";case R:return"Profiler";case O:return"StrictMode";case $:return"Suspense";case M:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case z:return(C.displayName||"Context")+".Consumer";case A:return(C._context.displayName||"Context")+".Provider";case H:var j=(j=C.render).displayName||j.name||"";return C.displayName||(j!==""?"ForwardRef("+j+")":"ForwardRef");case J:return Y(C.type);case P:return Y(C._render);case K:j=C._payload,C=C._init;try{return Y(C(j))}catch{}}return null}function Z(C){switch(typeof C){case"boolean":case"number":case"object":case"string":case"undefined":return C;default:return""}}function rt(C){var j=C.type;return(C=C.nodeName)&&C.toLowerCase()==="input"&&(j==="checkbox"||j==="radio")}function Q(C){C._valueTracker||(C._valueTracker=function(j){var W,it,ot=rt(j)?"checked":"value",st=Object.getOwnPropertyDescriptor(j.constructor.prototype,ot),ut=""+j[ot];if(!j.hasOwnProperty(ot)&&st!==void 0&&typeof st.get=="function"&&typeof st.set=="function")return W=st.get,it=st.set,Object.defineProperty(j,ot,{configurable:!0,get:function(){return W.call(this)},set:function(_t){ut=""+_t,it.call(this,_t)}}),Object.defineProperty(j,ot,{enumerable:st.enumerable}),{getValue:function(){return ut},setValue:function(_t){ut=""+_t},stopTracking:function(){j._valueTracker=null,delete j[ot]}}}(C))}function tt(C){if(C){var j=C._valueTracker;if(!j)return 1;var W=j.getValue(),it="";return(C=it=C?rt(C)?C.checked?"true":"false":C.value:it)!==W&&(j.setValue(C),1)}}function nt(C){if((C=C||(typeof document<"u"?document:void 0))===void 0)return null;try{return C.activeElement||C.body}catch{return C.body}}function et(C,j){var W=j.checked;return e({},j,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:W??C._wrapperState.initialChecked})}function at(C,j){var W=j.defaultValue==null?"":j.defaultValue,it=j.checked!=null?j.checked:j.defaultChecked;W=Z(j.value!=null?j.value:W),C._wrapperState={initialChecked:it,initialValue:W,controlled:j.type==="checkbox"||j.type==="radio"?j.checked!=null:j.value!=null}}function ct(C,j){(j=j.checked)!=null&&x(C,"checked",j,!1)}function gt(C,j){ct(C,j);var W=Z(j.value),it=j.type;if(W!=null)it==="number"?(W===0&&C.value===""||C.value!=W)&&(C.value=""+W):C.value!==""+W&&(C.value=""+W);else if(it==="submit"||it==="reset")return void C.removeAttribute("value");j.hasOwnProperty("value")?St(C,j.type,W):j.hasOwnProperty("defaultValue")&&St(C,j.type,Z(j.defaultValue)),j.checked==null&&j.defaultChecked!=null&&(C.defaultChecked=!!j.defaultChecked)}function wt(C,j,W){if(j.hasOwnProperty("value")||j.hasOwnProperty("defaultValue")){var it=j.type;if(!(it!=="submit"&&it!=="reset"||j.value!==void 0&&j.value!==null))return;j=""+C._wrapperState.initialValue,W||j===C.value||(C.value=j),C.defaultValue=j}(W=C.name)!==""&&(C.name=""),C.defaultChecked=!!C._wrapperState.initialChecked,W!==""&&(C.name=W)}function St(C,j,W){j==="number"&&nt(C.ownerDocument)===C||(W==null?C.defaultValue=""+C._wrapperState.initialValue:C.defaultValue!==""+W&&(C.defaultValue=""+W))}function Mt(C,j){var W,it;return C=e({children:void 0},j),W=j.children,it="",n.Children.forEach(W,function(ot){ot!=null&&(it+=ot)}),(j=it)&&(C.children=j),C}function Lt(C,j,W,it){if(C=C.options,j){j={};for(var ot=0;ot<W.length;ot++)j["$"+W[ot]]=!0;for(W=0;W<C.length;W++)ot=j.hasOwnProperty("$"+C[W].value),C[W].selected!==ot&&(C[W].selected=ot),ot&&it&&(C[W].defaultSelected=!0)}else{for(W=""+Z(W),j=null,ot=0;ot<C.length;ot++){if(C[ot].value===W)return C[ot].selected=!0,void(it&&(C[ot].defaultSelected=!0));j!==null||C[ot].disabled||(j=C[ot])}j!==null&&(j.selected=!0)}}function Pt(C,j){if(j.dangerouslySetInnerHTML!=null)throw Error(i(91));return e({},j,{value:void 0,defaultValue:void 0,children:""+C._wrapperState.initialValue})}function yt(C,j){var W=j.value;if(W==null){if(W=j.children,j=j.defaultValue,W!=null){if(j!=null)throw Error(i(92));if(Array.isArray(W)){if(!(W.length<=1))throw Error(i(93));W=W[0]}j=W}W=j=j??""}C._wrapperState={initialValue:Z(W)}}function jt(C,j){var W=Z(j.value),it=Z(j.defaultValue);W!=null&&((W=""+W)!==C.value&&(C.value=W),j.defaultValue==null&&C.defaultValue!==W&&(C.defaultValue=W)),it!=null&&(C.defaultValue=""+it)}function At(C){var j=C.textContent;j===C._wrapperState.initialValue&&j!==""&&j!==null&&(C.value=j)}var It="http://www.w3.org/1999/xhtml";function Ot(C){switch(C){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Et(C,j){return C==null||C==="http://www.w3.org/1999/xhtml"?Ot(j):C==="http://www.w3.org/2000/svg"&&j==="foreignObject"?"http://www.w3.org/1999/xhtml":C}Nt=function(C,j){if(C.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in C)C.innerHTML=j;else{for((Ct=Ct||document.createElement("div")).innerHTML="<svg>"+j.valueOf().toString()+"</svg>",j=Ct.firstChild;C.firstChild;)C.removeChild(C.firstChild);for(;j.firstChild;)C.appendChild(j.firstChild)}};var Ct,Nt,ht=typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(C,j,W,it){MSApp.execUnsafeLocalFunction(function(){return Nt(C,j)})}:Nt;function dt(C,j){if(j){var W=C.firstChild;if(W&&W===C.lastChild&&W.nodeType===3)return void(W.nodeValue=j)}C.textContent=j}var Ft={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jt=["Webkit","ms","Moz","O"];function Xt(C,j,W){return j==null||typeof j=="boolean"||j===""?"":W||typeof j!="number"||j===0||Ft.hasOwnProperty(C)&&Ft[C]?(""+j).trim():j+"px"}function Qt(C,j){for(var W in C=C.style,j){var it,ot;j.hasOwnProperty(W)&&(it=W.indexOf("--")===0,ot=Xt(W,j[W],it),W==="float"&&(W="cssFloat"),it?C.setProperty(W,ot):C[W]=ot)}}Object.keys(Ft).forEach(function(C){Jt.forEach(function(j){j=j+C.charAt(0).toUpperCase()+C.substring(1),Ft[j]=Ft[C]})});var ve=e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kt(C,j){if(j){if(ve[C]&&(j.children!=null||j.dangerouslySetInnerHTML!=null))throw Error(i(137,C));if(j.dangerouslySetInnerHTML!=null){if(j.children!=null)throw Error(i(60));if(typeof j.dangerouslySetInnerHTML!="object"||!("__html"in j.dangerouslySetInnerHTML))throw Error(i(61))}if(j.style!=null&&typeof j.style!="object")throw Error(i(62))}}function ee(C,j){if(C.indexOf("-")===-1)return typeof j.is=="string";switch(C){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function pe(C){return(C=(C=C.target||C.srcElement||window).correspondingUseElement?C.correspondingUseElement:C).nodeType===3?C.parentNode:C}var Le=null,Fe=null,qe=null;function ze(C){if(C=Ql(C)){if(typeof Le!="function")throw Error(i(280));var j=C.stateNode;j&&(j=Bu(j),Le(C.stateNode,C.type,j))}}function Ie(C){Fe?qe?qe.push(C):qe=[C]:Fe=C}function He(){if(Fe){var C=Fe,j=qe;if(qe=Fe=null,ze(C),j)for(C=0;C<j.length;C++)ze(j[C])}}function hn(C,j){return C(j)}function Tt(C,j,W,it,ot){return C(j,W,it,ot)}function ae(){}var de=!1,we=!1;function Oe(){Fe===null&&qe===null||(ae(),He())}function Rt(C,j){var W=C.stateNode;if(W===null)return null;var it=Bu(W);if(it===null)return null;switch(W=it[j],j){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":C=!(it=(it=!it.disabled)?it:!((C=C.type)==="button"||C==="input"||C==="select"||C==="textarea"));break;default:C=!1}if(C)return null;if(W&&typeof W!="function")throw Error(i(231,j,typeof W));return W}var Ut=!1;if(t)try{var se={};Object.defineProperty(se,"passive",{get:function(){Ut=!0}}),window.addEventListener("test",se,se),window.removeEventListener("test",se,se)}catch{Ut=!1}var bt=!1,ft=null,xt=!1,Bt=null,ce={onError:function(C){bt=!0,ft=C}};function Ce(C,j,W,it,ot,st,ut,_t,mt){bt=!1,ft=null,(function(Ht,ie,ue,Me,mn,Kt,re,ge,De){var Re=Array.prototype.slice.call(arguments,3);try{ie.apply(ue,Re)}catch(Ze){this.onError(Ze)}}).apply(ce,arguments)}function Te(C){var j=C,W=C;if(C.alternate)for(;j.return;)j=j.return;else for(C=j;1026&(j=C).flags&&(W=j.return),C=j.return;);return j.tag===3?W:null}function Ne(C){if(C.tag===13){var j=C.memoizedState;if(j===null&&(C=C.alternate)!==null&&(j=C.memoizedState),j!==null)return j.dehydrated}return null}function Ge(C){if(Te(C)!==C)throw Error(i(188))}function be(C){if(!(C=function(W){var it=W.alternate;if(!it){if((it=Te(W))===null)throw Error(i(188));return it!==W?null:W}for(var ot=W,st=it;;){var ut=ot.return;if(ut===null)break;var _t=ut.alternate;if(_t===null){if((st=ut.return)===null)break;ot=st}else{if(ut.child===_t.child){for(_t=ut.child;_t;){if(_t===ot)return Ge(ut),W;if(_t===st)return Ge(ut),it;_t=_t.sibling}throw Error(i(188))}if(ot.return!==st.return)ot=ut,st=_t;else{for(var mt=!1,Ht=ut.child;Ht;){if(Ht===ot){mt=!0,ot=ut,st=_t;break}if(Ht===st){mt=!0,st=ut,ot=_t;break}Ht=Ht.sibling}if(!mt){for(Ht=_t.child;Ht;){if(Ht===ot){mt=!0,ot=_t,st=ut;break}if(Ht===st){mt=!0,st=_t,ot=ut;break}Ht=Ht.sibling}if(!mt)throw Error(i(189))}}if(ot.alternate!==st)throw Error(i(190))}}if(ot.tag!==3)throw Error(i(188));return ot.stateNode.current===ot?W:it}(C)))return null;for(var j=C;;){if(j.tag===5||j.tag===6)return j;if(j.child)j=(j.child.return=j).child;else{if(j===C)break;for(;!j.sibling;){if(!j.return||j.return===C)return null;j=j.return}j.sibling.return=j.return,j=j.sibling}}return null}function pt(C,j){for(var W=C.alternate;j!==null;){if(j===C||j===W)return 1;j=j.return}}var Dt,$t,qt,Wt=!1,oe=[],X=null,lt=null,vt=null,Vt=new Map,te=new Map,Zt=[],Yt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function me(C,j,W,it,ot){return{blockedOn:C,domEventName:j,eventSystemFlags:16|W,nativeEvent:ot,targetContainers:[it]}}function Ee(C,j){switch(C){case"focusin":case"focusout":X=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":vt=null;break;case"pointerover":case"pointerout":Vt.delete(j.pointerId);break;case"gotpointercapture":case"lostpointercapture":te.delete(j.pointerId)}}function Ue(C,j,W,it,ot,st){return C===null||C.nativeEvent!==st?(C=me(j,W,it,ot,st),j===null||(j=Ql(j))!==null&&$t(j)):(C.eventSystemFlags|=it,j=C.targetContainers,ot!==null&&j.indexOf(ot)===-1&&j.push(ot)),C}function Ae(C){if(C.blockedOn===null){for(var j=C.targetContainers;0<j.length;){var W=No(C.domEventName,C.eventSystemFlags,j[0],C.nativeEvent);if(W!==null)return(j=Ql(W))!==null&&$t(j),C.blockedOn=W,0;j.shift()}return 1}}function We(C,j,W){Ae(C)&&W.delete(j)}function nn(){for(Wt=!1;0<oe.length;){var C=oe[0];if(C.blockedOn!==null){(C=Ql(C.blockedOn))!==null&&Dt(C);break}for(var j=C.targetContainers;0<j.length;){var W=No(C.domEventName,C.eventSystemFlags,j[0],C.nativeEvent);if(W!==null){C.blockedOn=W;break}j.shift()}C.blockedOn===null&&oe.shift()}X!==null&&Ae(X)&&(X=null),lt!==null&&Ae(lt)&&(lt=null),vt!==null&&Ae(vt)&&(vt=null),Vt.forEach(We),te.forEach(We)}function cn(C,j){C.blockedOn===j&&(C.blockedOn=null,Wt||(Wt=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,nn)))}function An(C){function j(ot){return cn(ot,C)}if(0<oe.length){cn(oe[0],C);for(var W=1;W<oe.length;W++){var it=oe[W];it.blockedOn===C&&(it.blockedOn=null)}}for(X!==null&&cn(X,C),lt!==null&&cn(lt,C),vt!==null&&cn(vt,C),Vt.forEach(j),te.forEach(j),W=0;W<Zt.length;W++)(it=Zt[W]).blockedOn===C&&(it.blockedOn=null);for(;0<Zt.length&&(W=Zt[0]).blockedOn===null;)(function(ot){var st=Ua(ot.target);if(st!==null){var ut=Te(st);if(ut!==null){if((st=ut.tag)===13){if((st=Ne(ut))!==null)return ot.blockedOn=st,ot.lanePriority,s.unstable_runWithPriority(ot.priority,function(){qt(ut)})}else if(st===3&&ut.stateNode.hydrate)return ot.blockedOn=ut.tag===3?ut.stateNode.containerInfo:null}}ot.blockedOn=null})(W),W.blockedOn===null&&Zt.shift()}function un(C,j){var W={};return W[C.toLowerCase()]=j.toLowerCase(),W["Webkit"+C]="webkit"+j,W["Moz"+C]="moz"+j,W}var bn={animationend:un("Animation","AnimationEnd"),animationiteration:un("Animation","AnimationIteration"),animationstart:un("Animation","AnimationStart"),transitionend:un("Transition","TransitionEnd")},Nn={},Ln={};function er(C){if(Nn[C])return Nn[C];if(!bn[C])return C;var j,W=bn[C];for(j in W)if(W.hasOwnProperty(j)&&j in Ln)return Nn[C]=W[j];return C}t&&(Ln=document.createElement("div").style,"AnimationEvent"in window||(delete bn.animationend.animation,delete bn.animationiteration.animation,delete bn.animationstart.animation),"TransitionEvent"in window||delete bn.transitionend.transition);var nr=er("animationend"),ka=er("animationiteration"),Ui=er("animationstart"),to=er("transitionend"),Lr=new Map,Hr=new Map,wn=["abort","abort",nr,"animationEnd",ka,"animationIteration",Ui,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",to,"transitionEnd","waiting","waiting"];function $i(C,j){for(var W=0;W<C.length;W+=2){var it=C[W],ot="on"+((ot=C[W+1])[0].toUpperCase()+ot.slice(1));Hr.set(it,j),Lr.set(it,ot),a(ot,[it])}}(0,s.unstable_now)();var gn=8;function In(C){if(1&C)return gn=15,1;if(2&C)return gn=14,2;if(4&C)return gn=13,4;var j=24&C;return j!==0?(gn=12,j):32&C?(gn=11,32):(j=192&C)!=0?(gn=10,j):256&C?(gn=9,256):(j=3584&C)!=0?(gn=8,j):4096&C?(gn=7,4096):(j=4186112&C)!=0?(gn=6,j):(j=62914560&C)!=0?(gn=5,j):67108864&C?(gn=4,67108864):134217728&C?(gn=3,134217728):(j=805306368&C)!=0?(gn=2,j):1073741824&C?(gn=1,1073741824):(gn=8,C)}function Ao(C,j){var W=C.pendingLanes;if(W===0)return gn=0;var it,ot=0,st=0,ut=C.expiredLanes,_t=C.suspendedLanes,mt=C.pingedLanes;if(ut!==0?(ot=ut,st=gn=15):(ut=134217727&W)!=0?(it=ut&~_t)!=0?(ot=In(it),st=gn):(mt&=ut)!=0&&(ot=In(mt),st=gn):(ut=W&~_t)!=0?(ot=In(ut),st=gn):mt!==0&&(ot=In(mt),st=gn),ot===0)return 0;if(ot=W&(((ot=31-yo(ot))<0?0:1<<ot)<<1)-1,j!==0&&j!==ot&&!(j&_t)){if(In(j),st<=gn)return j;gn=st}if((j=C.entangledLanes)!==0)for(C=C.entanglements,j&=ot;0<j;)ot|=C[W=31-yo(j)],j&=~(st=1<<W);return ot}function jr(C){return(C=-1073741825&C.pendingLanes)!=0?C:1073741824&C?1073741824:0}function eo(C,j){switch(C){case 15:return 1;case 14:return 2;case 12:return(C=Br(24&~j))===0?eo(10,j):C;case 10:return(C=Br(192&~j))===0?eo(8,j):C;case 8:return(C=Br(3584&~j))===0&&(C=Br(4186112&~j))===0&&(C=512),C;case 2:return(j=Br(805306368&~j))===0?268435456:j}throw Error(i(358,C))}function Br(C){return C&-C}function _r(C){for(var j=[],W=0;W<31;W++)j.push(C);return j}function Oa(C,j,W){C.pendingLanes|=j;var it=j-1;C.suspendedLanes&=it,C.pingedLanes&=it,(C=C.eventTimes)[j=31-yo(j)]=W}var yo=Math.clz32||function(C){return C===0?32:31-(qr(C)/vn|0)|0},qr=Math.log,vn=Math.LN2,Nu=s.unstable_UserBlockingPriority,Hl=s.unstable_runWithPriority,Jr=!0;function Pu(C,j,W,it){de||ae();var ot=Ta,st=de;de=!0;try{Tt(ot,C,j,W,it)}finally{(de=st)||Oe()}}function ql(C,j,W,it){Hl(Nu,Ta.bind(null,C,j,W,it))}function Ta(C,j,W,it){var ot;if(Jr)if((ot=!(4&j))&&0<oe.length&&-1<Yt.indexOf(C))C=me(null,C,j,W,it),oe.push(C);else{var st=No(C,j,W,it);if(st===null)ot&&Ee(C,it);else{if(ot){if(-1<Yt.indexOf(C))return C=me(st,C,j,W,it),void oe.push(C);if(function(ut,_t,mt,Ht,ie){switch(_t){case"focusin":return X=Ue(X,ut,_t,mt,Ht,ie),1;case"dragenter":return lt=Ue(lt,ut,_t,mt,Ht,ie),1;case"mouseover":return vt=Ue(vt,ut,_t,mt,Ht,ie),1;case"pointerover":var ue=ie.pointerId;return Vt.set(ue,Ue(Vt.get(ue)||null,ut,_t,mt,Ht,ie)),1;case"gotpointercapture":return ue=ie.pointerId,te.set(ue,Ue(te.get(ue)||null,ut,_t,mt,Ht,ie)),1}}(st,C,j,W,it))return;Ee(C,it)}ay(C,j,it,null,W)}}}function No(C,j,W,it){var ot=pe(it);if((ot=Ua(ot))!==null){var st=Te(ot);if(st===null)ot=null;else{var ut=st.tag;if(ut===13){if((ot=Ne(st))!==null)return ot;ot=null}else if(ut===3){if(st.stateNode.hydrate)return st.tag===3?st.stateNode.containerInfo:null;ot=null}else st!==ot&&(ot=null)}}return ay(C,j,it,ot,W),null}var Po=null,Io=null,ai=null;function Ls(){if(ai)return ai;for(var C=Io,j=C.length,W=("value"in Po)?Po.value:Po.textContent,it=W.length,ot=0;ot<j&&C[ot]===W[ot];ot++);for(var st=j-ot,ut=1;ut<=st&&C[j-ut]===W[it-ut];ut++);return ai=W.slice(ot,1<ut?1-ut:void 0)}function Bs(C){var j=C.keyCode;return"charCode"in C?(C=C.charCode)===0&&j===13&&(C=13):C=j,32<=(C=C===10?13:C)||C===13?C:0}function ja(){return!0}function Aa(){return!1}function hr(C){function j(W,it,ot,st,ut){for(var _t in this._reactName=W,this._targetInst=ot,this.type=it,this.nativeEvent=st,this.target=ut,this.currentTarget=null,C)C.hasOwnProperty(_t)&&(W=C[_t],this[_t]=W?W(st):st[_t]);return this.isDefaultPrevented=(st.defaultPrevented!=null?st.defaultPrevented:st.returnValue===!1)?ja:Aa,this.isPropagationStopped=Aa,this}return e(j.prototype,{preventDefault:function(){this.defaultPrevented=!0;var W=this.nativeEvent;W&&(W.preventDefault?W.preventDefault():typeof W.returnValue!="unknown"&&(W.returnValue=!1),this.isDefaultPrevented=ja)},stopPropagation:function(){var W=this.nativeEvent;W&&(W.stopPropagation?W.stopPropagation():typeof W.cancelBubble!="unknown"&&(W.cancelBubble=!0),this.isPropagationStopped=ja)},persist:function(){},isPersistent:ja}),j}se={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(C){return C.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0};var Na,Pa,si,li=hr(se),Fs=hr(ur=e({},se,{view:0,detail:0})),zn=e({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hi,button:0,buttons:0,relatedTarget:function(C){return C.relatedTarget===void 0?C.fromElement===C.srcElement?C.toElement:C.fromElement:C.relatedTarget},movementX:function(C){return"movementX"in C?C.movementX:(C!==si&&(Pa=si&&C.type==="mousemove"?(Na=C.screenX-si.screenX,C.screenY-si.screenY):Na=0,si=C),Na)},movementY:function(C){return"movementY"in C?C.movementY:Pa}}),ci=hr(zn),Ia=hr(e({},zn,{dataTransfer:0})),Ar=hr(e({},ur,{relatedTarget:0})),Ra=hr(e({},se,{animationName:0,elapsedTime:0,pseudoElement:0})),Ro=hr(e({},se,{clipboardData:function(C){return("clipboardData"in C?C:window).clipboardData}})),bo=hr(e({},se,{data:0})),Mo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ma={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Do(C){var j=this.nativeEvent;return j.getModifierState?j.getModifierState(C):!!(C=vo[C])&&!!j[C]}function Hi(){return Do}var qi=hr(e({},ur,{key:function(C){if(C.key){var j=Mo[C.key]||C.key;if(j!=="Unidentified")return j}return C.type==="keypress"?(C=Bs(C))===13?"Enter":String.fromCharCode(C):C.type==="keydown"||C.type==="keyup"?Ma[C.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hi,charCode:function(C){return C.type==="keypress"?Bs(C):0},keyCode:function(C){return C.type==="keydown"||C.type==="keyup"?C.keyCode:0},which:function(C){return C.type==="keypress"?Bs(C):C.type==="keydown"||C.type==="keyup"?C.keyCode:0}})),Da=hr(e({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zs=hr(e({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hi})),ui=hr(e({},se,{propertyName:0,elapsedTime:0,pseudoElement:0})),Us=hr(e({},zn,{deltaX:function(C){return"deltaX"in C?C.deltaX:"wheelDeltaX"in C?-C.wheelDeltaX:0},deltaY:function(C){return"deltaY"in C?C.deltaY:"wheelDeltaY"in C?-C.wheelDeltaY:"wheelDelta"in C?-C.wheelDelta:0},deltaZ:0,deltaMode:0})),Iu=[9,13,27,32],La=t&&"CompositionEvent"in window,ur=null,Ba=(t&&"documentMode"in document&&(ur=document.documentMode),t&&"TextEvent"in window&&!ur),Ji=t&&(!La||ur&&8<ur&&ur<=11),Fa=String.fromCharCode(32),Jl=!1;function Wl(C,j){switch(C){case"keyup":return Iu.indexOf(j.keyCode)!==-1;case"keydown":return j.keyCode!==229;case"keypress":case"mousedown":case"focusout":return 1;default:return}}function Lo(C){return typeof(C=C.detail)=="object"&&"data"in C?C.data:null}var di=!1,Wi={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $s(C){var j=C&&C.nodeName&&C.nodeName.toLowerCase();return j==="input"?Wi[C.type]:j==="textarea"}function za(C,j,W,it){Ie(it),0<(j=Mu(j,"onChange")).length&&(W=new li("onChange","change",null,W,it),C.push({event:W,listeners:j}))}var zt=null,ne=null;function fe(C){ey(C,0)}function ke(C){if(tt(Vs(C)))return C}function sn(C,j){if(C==="change")return j}var tn=!1;function en(){zt&&(zt.detachEvent("onpropertychange",Ve),ne=zt=null)}function Ve(C){if(C.propertyName==="value"&&ke(ne)){var j=[];if(za(j,ne,C,pe(C)),C=fe,de)C(j);else{de=!0;try{hn(C,j)}finally{de=!1,Oe()}}}}function Un(C,j,W){C==="focusin"?(en(),ne=W,(zt=j).attachEvent("onpropertychange",Ve)):C==="focusout"&&en()}function ar(C){if(C==="selectionchange"||C==="keyup"||C==="keydown")return ke(ne)}function Vl(C,j){if(C==="click")return ke(j)}function Ru(C,j){if(C==="input"||C==="change")return ke(j)}t&&(ur=t&&((se="oninput"in document)||((zn=document.createElement("div")).setAttribute("oninput","return;"),se=typeof zn.oninput=="function"),se),tn=ur&&(!document.documentMode||9<document.documentMode));var rr=typeof Object.is=="function"?Object.is:function(C,j){return C===j&&(C!==0||1/C==1/j)||C!=C&&j!=j},KS=Object.prototype.hasOwnProperty;function Kl(C,j){if(rr(C,j))return!0;if(typeof C!="object"||C===null||typeof j!="object"||j===null)return!1;var W=Object.keys(C),it=Object.keys(j);if(W.length!==it.length)return!1;for(it=0;it<W.length;it++)if(!KS.call(j,W[it])||!rr(C[W[it]],j[W[it]]))return!1;return!0}function K0(C){for(;C&&C.firstChild;)C=C.firstChild;return C}function G0(C,j){var W,it=K0(C);for(C=0;it;){if(it.nodeType===3){if(W=C+it.textContent.length,C<=j&&j<=W)return{node:it,offset:j-C};C=W}t:{for(;it;){if(it.nextSibling){it=it.nextSibling;break t}it=it.parentNode}it=void 0}it=K0(it)}}function Y0(){for(var C=window,j=nt();j instanceof C.HTMLIFrameElement;){try{var W=typeof j.contentWindow.location.href=="string"}catch{W=!1}if(!W)break;j=nt((C=j.contentWindow).document)}return j}function Qf(C){var j=C&&C.nodeName&&C.nodeName.toLowerCase();return j&&(j==="input"&&(C.type==="text"||C.type==="search"||C.type==="tel"||C.type==="url"||C.type==="password")||j==="textarea"||C.contentEditable==="true")}var GS=t&&"documentMode"in document&&document.documentMode<=11,Hs=null,Xf=null,Gl=null,tp=!1;function Z0(C,j,W){var it=W.window===W?W.document:W.nodeType===9?W:W.ownerDocument;tp||Hs==null||Hs!==nt(it)||(it="selectionStart"in(it=Hs)&&Qf(it)?{start:it.selectionStart,end:it.selectionEnd}:{anchorNode:(it=(it.ownerDocument&&it.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:it.anchorOffset,focusNode:it.focusNode,focusOffset:it.focusOffset},Gl&&Kl(Gl,it)||(Gl=it,0<(it=Mu(Xf,"onSelect")).length&&(j=new li("onSelect","select",null,j,W),C.push({event:j,listeners:it}),j.target=Hs)))}$i("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),$i("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),$i(wn,2);for(var Q0="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ep=0;ep<Q0.length;ep++)Hr.set(Q0[ep],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),X0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yl));function ty(C,j,W){var it=C.type||"unknown-event";C.currentTarget=W,function(){var ot;Ce.apply(this,arguments),bt&&(ot=ft,bt=!1,ft=null,xt||(xt=!0,Bt=ot))}(it,j,void 0,C),C.currentTarget=null}function ey(C,j){j=!!(4&j);for(var W=0;W<C.length;W++){var it=(ot=C[W]).event,ot=ot.listeners;t:{var st=void 0;if(j)for(var ut=ot.length-1;0<=ut;ut--){var _t=(Ht=ot[ut]).instance,mt=Ht.currentTarget,Ht=Ht.listener;if(_t!==st&&it.isPropagationStopped())break t;ty(it,Ht,mt),st=_t}else for(ut=0;ut<ot.length;ut++){if(_t=(Ht=ot[ut]).instance,mt=Ht.currentTarget,Ht=Ht.listener,_t!==st&&it.isPropagationStopped())break t;ty(it,Ht,mt),st=_t}}}if(xt)throw C=Bt,xt=!1,Bt=null,C}function Rn(C,j){var W=fy(j),it=C+"__bubble";W.has(it)||(iy(j,C,2,!1),W.add(it))}var ny="_reactListening"+Math.random().toString(36).slice(2);function ry(C){C[ny]||(C[ny]=!0,l.forEach(function(j){X0.has(j)||oy(j,!1,C,null),oy(j,!0,C,null)}))}function oy(C,j,W,it,ot){ot=4<arguments.length&&ot!==void 0?ot:0;var st=W;if(C==="selectionchange"&&W.nodeType!==9&&(st=W.ownerDocument),it!==null&&!j&&X0.has(C)){if(C!=="scroll")return;ot|=2,st=it}it=C+"__"+(j?"capture":"bubble"),(W=fy(st)).has(it)||(j&&(ot|=4),iy(st,C,ot,j),W.add(it))}function iy(C,j,W,it){var ot=Hr.get(j);switch(ot===void 0?2:ot){case 0:ot=Pu;break;case 1:ot=ql;break;default:ot=Ta}W=ot.bind(null,j,W,C),ot=!(!Ut||j!=="touchstart"&&j!=="touchmove"&&j!=="wheel")||void 0,it?ot!==void 0?C.addEventListener(j,W,{capture:!0,passive:ot}):C.addEventListener(j,W,!0):ot!==void 0?C.addEventListener(j,W,{passive:ot}):C.addEventListener(j,W,!1)}function ay(C,j,W,it,ot){var st=it;if(!(1&j||2&j||it===null))t:for(;;){if(it===null)return;var ut=it.tag;if(ut===3||ut===4){var _t=it.stateNode.containerInfo;if(_t===ot||_t.nodeType===8&&_t.parentNode===ot)break;if(ut===4)for(ut=it.return;ut!==null;){var mt=ut.tag;if((mt===3||mt===4)&&((mt=ut.stateNode.containerInfo)===ot||mt.nodeType===8&&mt.parentNode===ot))return;ut=ut.return}for(;_t!==null;){if((ut=Ua(_t))===null)return;if((mt=ut.tag)===5||mt===6){it=st=ut;continue t}_t=_t.parentNode}}it=it.return}var Ht=function(){var ue,Me,mn,Kt=st,re=pe(W),ge=[];t:{var De=Lr.get(C);if(De!==void 0){var Re=li,Ze=C;switch(C){case"keypress":if(Bs(W)===0)break t;case"keydown":case"keyup":Re=qi;break;case"focusin":Ze="focus",Re=Ar;break;case"focusout":Ze="blur",Re=Ar;break;case"beforeblur":case"afterblur":Re=Ar;break;case"click":if(W.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Re=ci;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Re=Ia;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Re=zs;break;case nr:case ka:case Ui:Re=Ra;break;case to:Re=ui;break;case"scroll":Re=Fs;break;case"wheel":Re=Us;break;case"copy":case"cut":case"paste":Re=Ro;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Re=Da}for(var ln=!(Qe=!!(4&j))&&C==="scroll",Xe=Qe?De!==null?De+"Capture":null:De,Qe=[],xn=Kt;xn!==null;){var kn,jn=(kn=xn).stateNode;if(kn.tag===5&&jn!==null&&(kn=jn,Xe!==null&&(jn=Rt(xn,Xe))!=null&&Qe.push(Zl(xn,jn,kn))),ln)break;xn=xn.return}0<Qe.length&&(De=new Re(De,Ze,null,W,re),ge.push({event:De,listeners:Qe}))}}if(!(7&j)){if(Re=C==="mouseout"||C==="pointerout",(!(De=C==="mouseover"||C==="pointerover")||16&j||!(Ze=W.relatedTarget||W.fromElement)||!Ua(Ze)&&!Ze[Ws])&&(Re||De)&&(De=re.window===re?re:(De=re.ownerDocument)?De.defaultView||De.parentWindow:window,Re?(Re=Kt,(Ze=(Ze=W.relatedTarget||W.toElement)?Ua(Ze):null)!==null&&(Ze!==(ln=Te(Ze))||Ze.tag!==5&&Ze.tag!==6)&&(Ze=null)):(Re=null,Ze=Kt),Re!==Ze)){if(Qe=ci,jn="onMouseLeave",Xe="onMouseEnter",xn="mouse",C!=="pointerout"&&C!=="pointerover"||(Qe=Da,jn="onPointerLeave",Xe="onPointerEnter",xn="pointer"),ln=Re==null?De:Vs(Re),kn=Ze==null?De:Vs(Ze),(De=new Qe(jn,xn+"leave",Re,W,re)).target=ln,De.relatedTarget=kn,jn=null,Ua(re)===Kt&&((Qe=new Qe(Xe,xn+"enter",Ze,W,re)).target=kn,Qe.relatedTarget=ln,jn=Qe),ln=jn,Re&&Ze)t:{for(Xe=Ze,xn=0,kn=Qe=Re;kn;kn=qs(kn))xn++;for(kn=0,jn=Xe;jn;jn=qs(jn))kn++;for(;0<xn-kn;)Qe=qs(Qe),xn--;for(;0<kn-xn;)Xe=qs(Xe),kn--;for(;xn--;){if(Qe===Xe||Xe!==null&&Qe===Xe.alternate)break t;Qe=qs(Qe),Xe=qs(Xe)}Qe=null}else Qe=null;Re!==null&&sy(ge,De,Re,Qe,!1),Ze!==null&&ln!==null&&sy(ge,ln,Ze,Qe,!0)}switch((Re=(De=Kt?Vs(Kt):window).nodeName&&De.nodeName.toLowerCase())==="select"||Re==="input"&&De.type==="file"?ue=sn:$s(De)?tn?ue=Ru:(ue=ar,Me=Un):!(Re=De.nodeName)||Re.toLowerCase()!=="input"||De.type!=="checkbox"&&De.type!=="radio"||(ue=Vl),(ue=ue&&ue(C,Kt))?za(ge,ue,W,re):(Me&&Me(C,De,Kt),C==="focusout"&&(Me=De._wrapperState)&&Me.controlled&&De.type==="number"&&St(De,"number",De.value)),Me=Kt?Vs(Kt):window,C){case"focusin":!$s(Me)&&Me.contentEditable!=="true"||(Hs=Me,Xf=Kt,Gl=null);break;case"focusout":Gl=Xf=Hs=null;break;case"mousedown":tp=!0;break;case"contextmenu":case"mouseup":case"dragend":tp=!1,Z0(ge,W,re);break;case"selectionchange":if(GS)break;case"keydown":case"keyup":Z0(ge,W,re)}if(La)t:{switch(C){case"compositionstart":var pn="onCompositionStart";break t;case"compositionend":pn="onCompositionEnd";break t;case"compositionupdate":pn="onCompositionUpdate";break t}pn=void 0}else di?Wl(C,W)&&(pn="onCompositionEnd"):C==="keydown"&&W.keyCode===229&&(pn="onCompositionStart");pn&&(Ji&&W.locale!=="ko"&&(di||pn!=="onCompositionStart"?pn==="onCompositionEnd"&&di&&(mn=Ls()):(Io="value"in(Po=re)?Po.value:Po.textContent,di=!0)),0<(Me=Mu(Kt,pn)).length&&(pn=new bo(pn,C,null,W,re),ge.push({event:pn,listeners:Me}),(mn||(mn=Lo(W))!==null)&&(pn.data=mn))),(mn=(Ba?function(yn,dn){switch(yn){case"compositionend":return Lo(dn);case"keypress":return dn.which!==32?null:(Jl=!0,Fa);case"textInput":return(yn=dn.data)===Fa&&Jl?null:yn;default:return null}}:function(yn,dn){if(di)return yn==="compositionend"||!La&&Wl(yn,dn)?(yn=Ls(),ai=Io=Po=null,di=!1,yn):null;switch(yn){case"paste":default:return null;case"keypress":if(!(dn.ctrlKey||dn.altKey||dn.metaKey)||dn.ctrlKey&&dn.altKey){if(dn.char&&1<dn.char.length)return dn.char;if(dn.which)return String.fromCharCode(dn.which)}return null;case"compositionend":return Ji&&dn.locale!=="ko"?null:dn.data}})(C,W))&&0<(Kt=Mu(Kt,"onBeforeInput")).length&&(re=new bo("onBeforeInput","beforeinput",null,W,re),ge.push({event:re,listeners:Kt}),re.data=mn)}ey(ge,j)},ie=void 0;if(we)Ht();else{we=!0;try{y2(Ht,ie)}finally{we=!1,Oe()}}}function Zl(C,j,W){return{instance:C,listener:j,currentTarget:W}}function Mu(C,j){for(var W=j+"Capture",it=[];C!==null;){var ot=C,st=ot.stateNode;ot.tag===5&&st!==null&&(ot=st,(st=Rt(C,W))!=null&&it.unshift(Zl(C,st,ot)),(st=Rt(C,j))!=null&&it.push(Zl(C,st,ot))),C=C.return}return it}function qs(C){if(C===null)return null;for(;(C=C.return)&&C.tag!==5;);return C||null}function sy(C,j,W,it,ot){for(var st=j._reactName,ut=[];W!==null&&W!==it;){var _t=W,mt=_t.alternate,Ht=_t.stateNode;if(mt!==null&&mt===it)break;_t.tag===5&&Ht!==null&&(_t=Ht,ot?(mt=Rt(W,st))!=null&&ut.unshift(Zl(W,mt,_t)):(mt=Rt(W,st))!=null&&ut.push(Zl(W,mt,_t))),W=W.return}ut.length!==0&&C.push({event:j,listeners:ut})}function Du(){}var np=null,rp=null;function ly(C,j){switch(C){case"button":case"input":case"select":case"textarea":return j.autoFocus}}function op(C,j){return C==="textarea"||C==="option"||C==="noscript"||typeof j.children=="string"||typeof j.children=="number"||typeof j.dangerouslySetInnerHTML=="object"&&j.dangerouslySetInnerHTML!==null&&j.dangerouslySetInnerHTML.__html!=null}var cy=typeof setTimeout=="function"?setTimeout:void 0,YS=typeof clearTimeout=="function"?clearTimeout:void 0;function ip(C){(C.nodeType===1||C.nodeType===9&&(C=C.body)!=null)&&(C.textContent="")}function Js(C){for(;C!=null;C=C.nextSibling){var j=C.nodeType;if(j===1||j===3)break}return C}function uy(C){C=C.previousSibling;for(var j=0;C;){if(C.nodeType===8){var W=C.data;if(W==="$"||W==="$!"||W==="$?"){if(j===0)return C;j--}else W==="/$"&&j++}C=C.previousSibling}return null}var ap=0,Vi="__reactFiber$"+(zn=Math.random().toString(36).slice(2)),Lu="__reactProps$"+zn,Ws="__reactContainer$"+zn,dy="__reactEvents$"+zn;function Ua(C){var j=C[Vi];if(j)return j;for(var W=C.parentNode;W;){if(j=W[Ws]||W[Vi]){if(W=j.alternate,j.child!==null||W!==null&&W.child!==null)for(C=uy(C);C!==null;){if(W=C[Vi])return W;C=uy(C)}return j}W=(C=W).parentNode}return null}function Ql(C){return!(C=C[Vi]||C[Ws])||C.tag!==5&&C.tag!==6&&C.tag!==13&&C.tag!==3?null:C}function Vs(C){if(C.tag===5||C.tag===6)return C.stateNode;throw Error(i(33))}function Bu(C){return C[Lu]||null}function fy(C){var j=C[dy];return j===void 0?C[dy]=new Set:j}var sp=[],Xl=-1;function Ki(C){return{current:C}}function Bn(C){Xl<0||(C.current=sp[Xl],sp[Xl]=null,Xl--)}function Wn(C,j){sp[++Xl]=C.current,C.current=j}var Gi={},xr=Ki(Gi),Fr=Ki(!1),$a=Gi;function Ks(C,j){var W=C.type.contextTypes;if(!W)return Gi;var it=C.stateNode;if(it&&it.__reactInternalMemoizedUnmaskedChildContext===j)return it.__reactInternalMemoizedMaskedChildContext;var ot,st={};for(ot in W)st[ot]=j[ot];return it&&((C=C.stateNode).__reactInternalMemoizedUnmaskedChildContext=j,C.__reactInternalMemoizedMaskedChildContext=st),st}function Wr(C){return C.childContextTypes!=null}function lp(){Bn(Fr),Bn(xr)}function py(C,j,W){if(xr.current!==Gi)throw Error(i(168));Wn(xr,j),Wn(Fr,W)}function hy(C,j,W){var it,ot=C.stateNode;if(C=j.childContextTypes,typeof ot.getChildContext!="function")return W;for(it in ot=ot.getChildContext())if(!(it in C))throw Error(i(108,Y(j)||"Unknown",it));return e({},W,ot)}function Fu(C){C=(C=C.stateNode)&&C.__reactInternalMemoizedMergedChildContext||Gi,$a=xr.current,Wn(xr,C),Wn(Fr,Fr.current)}function gy(C,j,W){var it=C.stateNode;if(!it)throw Error(i(169));W?(C=hy(C,j,$a),it.__reactInternalMemoizedMergedChildContext=C,Bn(Fr),Bn(xr),Wn(xr,C)):Bn(Fr),Wn(Fr,W)}var cp=null,Ha=null,ZS=s.unstable_runWithPriority,up=s.unstable_scheduleCallback,dp=s.unstable_cancelCallback,QS=s.unstable_shouldYield,fp=(se=s.unstable_requestPaint,s.unstable_now),XS=s.unstable_getCurrentPriorityLevel,zu=s.unstable_ImmediatePriority,my=s.unstable_UserBlockingPriority,yy=s.unstable_NormalPriority,by=s.unstable_LowPriority,vy=s.unstable_IdlePriority,pp={},t2=se!==void 0?se:function(){},fi=null,Uu=null,hp=!1,_y=fp(),wr=_y<1e4?fp:function(){return fp()-_y};function Gs(){switch(XS()){case zu:return 99;case my:return 98;case yy:return 97;case by:return 96;case vy:return 95;default:throw Error(i(332))}}function xy(C){switch(C){case 99:return zu;case 98:return my;case 97:return yy;case 96:return by;case 95:return vy;default:throw Error(i(332))}}function qa(C,j){return C=xy(C),ZS(C,j)}function tc(C,j,W){return C=xy(C),up(C,j,W)}function Bo(){var C;Uu!==null&&(C=Uu,Uu=null,dp(C)),wy()}function wy(){if(!hp&&fi!==null){hp=!0;var C=0;try{var j=fi;qa(99,function(){for(;C<j.length;C++)for(var W=j[C];(W=W(!0))!==null;);}),fi=null}catch(W){throw fi!==null&&(fi=fi.slice(C+1)),up(zu,Bo),W}finally{hp=!1}}}var e2=E.ReactCurrentBatchConfig;function _o(C,j){if(C&&C.defaultProps){for(var W in j=e({},j),C=C.defaultProps)j[W]===void 0&&(j[W]=C[W]);return j}return j}var $u=Ki(null),Hu=null,Ys=null,qu=null;function gp(){qu=Ys=Hu=null}function mp(C){var j=$u.current;Bn($u),C.type._context._currentValue=j}function Sy(C,j){for(;C!==null;){var W=C.alternate;if((C.childLanes&j)===j){if(W===null||(W.childLanes&j)===j)break;W.childLanes|=j}else C.childLanes|=j,W!==null&&(W.childLanes|=j);C=C.return}}function Zs(C,j){(qu=Ys=null)!==(C=(Hu=C).dependencies)&&C.firstContext!==null&&(C.lanes&j&&(xo=!0),C.firstContext=null)}function no(C,j){if(qu!==C&&j!==!1&&j!==0)if(typeof j=="number"&&j!==1073741823||(qu=C,j=1073741823),j={context:C,observedBits:j,next:null},Ys===null){if(Hu===null)throw Error(i(308));Ys=j,Hu.dependencies={lanes:0,firstContext:j,responders:null}}else Ys=Ys.next=j;return C._currentValue}var Yi=!1;function yp(C){C.updateQueue={baseState:C.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Cy(C,j){C=C.updateQueue,j.updateQueue===C&&(j.updateQueue={baseState:C.baseState,firstBaseUpdate:C.firstBaseUpdate,lastBaseUpdate:C.lastBaseUpdate,shared:C.shared,effects:C.effects})}function Zi(C,j){return{eventTime:C,lane:j,tag:0,payload:null,callback:null,next:null}}function Qi(C,j){var W;(C=C.updateQueue)!==null&&((W=(C=C.shared).pending)===null?j.next=j:(j.next=W.next,W.next=j),C.pending=j)}function Ey(C,j){var W=C.updateQueue,it=C.alternate;if(it!==null&&W===(it=it.updateQueue)){var ot=null,st=null;if((W=W.firstBaseUpdate)!==null){do var ut={eventTime:W.eventTime,lane:W.lane,tag:W.tag,payload:W.payload,callback:W.callback,next:null};while(st===null?ot=st=ut:st=st.next=ut,(W=W.next)!==null);st===null?ot=st=j:st=st.next=j}else ot=st=j;return W={baseState:it.baseState,firstBaseUpdate:ot,lastBaseUpdate:st,shared:it.shared,effects:it.effects},void(C.updateQueue=W)}(C=W.lastBaseUpdate)===null?W.firstBaseUpdate=j:C.next=j,W.lastBaseUpdate=j}function ec(C,j,W,it){var ot,st,ut,_t,mt=C.updateQueue,Ht=(Yi=!1,mt.firstBaseUpdate),ie=mt.lastBaseUpdate;if((Kt=mt.shared.pending)!==null&&(mt.shared.pending=null,st=(ot=Kt).next,(ot.next=null)===ie?Ht=st:ie.next=st,ie=ot,(ut=C.alternate)!==null&&(_t=(ut=ut.updateQueue).lastBaseUpdate)!==ie&&(_t===null?ut.firstBaseUpdate=st:_t.next=st,ut.lastBaseUpdate=ot)),Ht!==null){for(_t=mt.baseState,ie=0,ut=st=ot=null;;){Kt=Ht.lane;var ue=Ht.eventTime;if((it&Kt)===Kt){ut!==null&&(ut=ut.next={eventTime:ue,lane:0,tag:Ht.tag,payload:Ht.payload,callback:Ht.callback,next:null});t:{var Me=C,mn=Ht,Kt=j;switch(ue=W,mn.tag){case 1:if(typeof(Me=mn.payload)=="function"){_t=Me.call(ue,_t,Kt);break t}_t=Me;break t;case 3:Me.flags=-4097&Me.flags|64;case 0:if((Kt=typeof(Me=mn.payload)=="function"?Me.call(ue,_t,Kt):Me)==null)break t;_t=e({},_t,Kt);break t;case 2:Yi=!0}}Ht.callback!==null&&(C.flags|=32,(Kt=mt.effects)===null?mt.effects=[Ht]:Kt.push(Ht))}else ue={eventTime:ue,lane:Kt,tag:Ht.tag,payload:Ht.payload,callback:Ht.callback,next:null},ut===null?(st=ut=ue,ot=_t):ut=ut.next=ue,ie|=Kt;if((Ht=Ht.next)===null){if((Kt=mt.shared.pending)===null)break;Ht=Kt.next,Kt.next=null,mt.lastBaseUpdate=Kt,mt.shared.pending=null}}ut===null&&(ot=_t),mt.baseState=ot,mt.firstBaseUpdate=st,mt.lastBaseUpdate=ut,pc|=ie,C.lanes=ie,C.memoizedState=_t}}function ky(C,j,W){if(C=j.effects,(j.effects=null)!==C)for(j=0;j<C.length;j++){var it=C[j],ot=it.callback;if(ot!==null){if(it.callback=null,it=W,typeof ot!="function")throw Error(i(191,ot));ot.call(it)}}}var Oy=new n.Component().refs;function Ju(C,j,W,it){W=(W=W(it,j=C.memoizedState))==null?j:e({},j,W),C.memoizedState=W,C.lanes===0&&(C.updateQueue.baseState=W)}var Wu={isMounted:function(C){return!!(C=C._reactInternals)&&Te(C)===C},enqueueSetState:function(C,j,W){C=C._reactInternals;var it=Kr(),ot=na(C),st=Zi(it,ot);st.payload=j,W!=null&&(st.callback=W),Qi(C,st),ra(C,ot,it)},enqueueReplaceState:function(C,j,W){C=C._reactInternals;var it=Kr(),ot=na(C),st=Zi(it,ot);st.tag=1,st.payload=j,W!=null&&(st.callback=W),Qi(C,st),ra(C,ot,it)},enqueueForceUpdate:function(C,j){C=C._reactInternals;var W=Kr(),it=na(C),ot=Zi(W,it);ot.tag=2,j!=null&&(ot.callback=j),Qi(C,ot),ra(C,it,W)}};function Ty(C,j,W,it,ot,st,ut){return typeof(C=C.stateNode).shouldComponentUpdate=="function"?C.shouldComponentUpdate(it,st,ut):!(j.prototype&&j.prototype.isPureReactComponent&&Kl(W,it)&&Kl(ot,st))}function jy(C,j,W){var it=!1,ot=Gi,st=j.contextType;j=new j(W,st=typeof st=="object"&&st!==null?no(st):(ot=Wr(j)?$a:xr.current,(it=(it=j.contextTypes)!=null)?Ks(C,ot):Gi)),C.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=Wu,(C.stateNode=j)._reactInternals=C,it&&((C=C.stateNode).__reactInternalMemoizedUnmaskedChildContext=ot,C.__reactInternalMemoizedMaskedChildContext=st)}function Ay(C,j,W,it){C=j.state,typeof j.componentWillReceiveProps=="function"&&j.componentWillReceiveProps(W,it),typeof j.UNSAFE_componentWillReceiveProps=="function"&&j.UNSAFE_componentWillReceiveProps(W,it),j.state!==C&&Wu.enqueueReplaceState(j,j.state,null)}function bp(C,j,W,it){var ot=C.stateNode,st=(ot.props=W,ot.state=C.memoizedState,ot.refs=Oy,yp(C),j.contextType);typeof st=="object"&&st!==null?ot.context=no(st):(st=Wr(j)?$a:xr.current,ot.context=Ks(C,st)),ec(C,W,ot,it),ot.state=C.memoizedState,typeof(st=j.getDerivedStateFromProps)=="function"&&(Ju(C,0,st,W),ot.state=C.memoizedState),typeof j.getDerivedStateFromProps=="function"||typeof ot.getSnapshotBeforeUpdate=="function"||typeof ot.UNSAFE_componentWillMount!="function"&&typeof ot.componentWillMount!="function"||(j=ot.state,typeof ot.componentWillMount=="function"&&ot.componentWillMount(),typeof ot.UNSAFE_componentWillMount=="function"&&ot.UNSAFE_componentWillMount(),j!==ot.state&&Wu.enqueueReplaceState(ot,ot.state,null),ec(C,W,ot,it),ot.state=C.memoizedState),typeof ot.componentDidMount=="function"&&(C.flags|=4)}var Vu=Array.isArray;function nc(C,j,W){if((C=W.ref)!==null&&typeof C!="function"&&typeof C!="object"){if(W._owner){if(W=W._owner){if(W.tag!==1)throw Error(i(309));var it=W.stateNode}if(!it)throw Error(i(147,C));var ot=""+C;return j!==null&&j.ref!==null&&typeof j.ref=="function"&&j.ref._stringRef===ot?j.ref:((j=function(st){var ut=it.refs;ut===Oy&&(ut=it.refs={}),st===null?delete ut[ot]:ut[ot]=st})._stringRef=ot,j)}if(typeof C!="string")throw Error(i(284));if(!W._owner)throw Error(i(290,C))}return C}function Ku(C,j){if(C.type!=="textarea")throw Error(i(31,Object.prototype.toString.call(j)==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":j))}function Ny(C){function j(Kt,re){var ge;C&&((ge=Kt.lastEffect)!==null?(ge.nextEffect=re,Kt.lastEffect=re):Kt.firstEffect=Kt.lastEffect=re,re.nextEffect=null,re.flags=8)}function W(Kt,re){if(!C)return null;for(;re!==null;)j(Kt,re),re=re.sibling;return null}function it(Kt,re){for(Kt=new Map;re!==null;)re.key!==null?Kt.set(re.key,re):Kt.set(re.index,re),re=re.sibling;return Kt}function ot(Kt,re){return(Kt=aa(Kt,re)).index=0,Kt.sibling=null,Kt}function st(Kt,re,ge){return Kt.index=ge,C?(ge=Kt.alternate)===null||(ge=ge.index)<re?(Kt.flags=2,re):ge:re}function ut(Kt){return C&&Kt.alternate===null&&(Kt.flags=2),Kt}function _t(Kt,re,ge,De){return re===null||re.tag!==6?(re=Zp(ge,Kt.mode,De)).return=Kt:(re=ot(re,ge)).return=Kt,re}function mt(Kt,re,ge,De){return re!==null&&re.elementType===ge.type?(De=ot(re,ge.props)).ref=nc(0,re,ge):(De=dd(ge.type,ge.key,ge.props,null,Kt.mode,De)).ref=nc(0,re,ge),De.return=Kt,De}function Ht(Kt,re,ge,De){return re===null||re.tag!==4||re.stateNode.containerInfo!==ge.containerInfo||re.stateNode.implementation!==ge.implementation?(re=Qp(ge,Kt.mode,De)).return=Kt:(re=ot(re,ge.children||[])).return=Kt,re}function ie(Kt,re,ge,De,Re){return re===null||re.tag!==7?(re=al(ge,Kt.mode,De,Re)).return=Kt:(re=ot(re,ge)).return=Kt,re}function ue(Kt,re,ge){if(typeof re=="string"||typeof re=="number")return(re=Zp(""+re,Kt.mode,ge)).return=Kt,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case k:return(ge=dd(re.type,re.key,re.props,null,Kt.mode,ge)).ref=nc(0,null,re),ge.return=Kt,ge;case D:return(re=Qp(re,Kt.mode,ge)).return=Kt,re}if(Vu(re)||T(re))return(re=al(re,Kt.mode,ge,null)).return=Kt,re;Ku(Kt,re)}return null}function Me(Kt,re,ge,De){var Re=re!==null?re.key:null;if(typeof ge=="string"||typeof ge=="number")return Re!==null?null:_t(Kt,re,""+ge,De);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case k:return ge.key===Re?ge.type===N?ie(Kt,re,ge.props.children,De,Re):mt(Kt,re,ge,De):null;case D:return ge.key===Re?Ht(Kt,re,ge,De):null}if(Vu(ge)||T(ge))return Re!==null?null:ie(Kt,re,ge,De,null);Ku(Kt,ge)}return null}function mn(Kt,re,ge,De,Re){if(typeof De=="string"||typeof De=="number")return _t(re,Kt=Kt.get(ge)||null,""+De,Re);if(typeof De=="object"&&De!==null){switch(De.$$typeof){case k:return Kt=Kt.get(De.key===null?ge:De.key)||null,De.type===N?ie(re,Kt,De.props.children,Re,De.key):mt(re,Kt,De,Re);case D:return Ht(re,Kt=Kt.get(De.key===null?ge:De.key)||null,De,Re)}if(Vu(De)||T(De))return ie(re,Kt=Kt.get(ge)||null,De,Re,null);Ku(re,De)}return null}return function(Kt,re,ge,De){var Re=typeof ge=="object"&&ge!==null&&ge.type===N&&ge.key===null,Ze=typeof(ge=Re?ge.props.children:ge)=="object"&&ge!==null;if(Ze)switch(ge.$$typeof){case k:t:{for(Ze=ge.key,Re=re;Re!==null;){if(Re.key===Ze){switch(Re.tag){case 7:if(ge.type!==N)break;W(Kt,Re.sibling),(re=ot(Re,ge.props.children)).return=Kt,Kt=re;break t;default:if(Re.elementType===ge.type){W(Kt,Re.sibling),(re=ot(Re,ge.props)).ref=nc(0,Re,ge),re.return=Kt,Kt=re;break t}}W(Kt,Re);break}j(Kt,Re),Re=Re.sibling}Kt=ge.type===N?((re=al(ge.props.children,Kt.mode,De,ge.key)).return=Kt,re):((De=dd(ge.type,ge.key,ge.props,null,Kt.mode,De)).ref=nc(0,re,ge),De.return=Kt,De)}return ut(Kt);case D:t:{for(Re=ge.key;re!==null;){if(re.key===Re){if(re.tag===4&&re.stateNode.containerInfo===ge.containerInfo&&re.stateNode.implementation===ge.implementation){W(Kt,re.sibling),(re=ot(re,ge.children||[])).return=Kt,Kt=re;break t}W(Kt,re);break}j(Kt,re),re=re.sibling}(re=Qp(ge,Kt.mode,De)).return=Kt,Kt=re}return ut(Kt)}if(typeof ge=="string"||typeof ge=="number")return ge=""+ge,(re=re!==null&&re.tag===6?(W(Kt,re.sibling),ot(re,ge)):(W(Kt,re),Zp(ge,Kt.mode,De))).return=Kt,ut(Kt=re);if(Vu(ge)){for(var ln=Kt,Xe=re,Qe=ge,xn=De,kn=null,jn=null,pn=Xe,yn=Xe=0,dn=null;pn!==null&&yn<Qe.length;yn++){pn.index>yn?(dn=pn,pn=null):dn=pn.sibling;var Mn=Me(ln,pn,Qe[yn],xn);if(Mn===null){pn===null&&(pn=dn);break}C&&pn&&Mn.alternate===null&&j(ln,pn),Xe=st(Mn,Xe,yn),jn===null?kn=Mn:jn.sibling=Mn,jn=Mn,pn=dn}if(yn===Qe.length)return W(ln,pn),kn;if(pn===null){for(;yn<Qe.length;yn++)(pn=ue(ln,Qe[yn],xn))!==null&&(Xe=st(pn,Xe,yn),jn===null?kn=pn:jn.sibling=pn,jn=pn);return kn}for(pn=it(ln,pn);yn<Qe.length;yn++)(dn=mn(pn,ln,yn,Qe[yn],xn))!==null&&(C&&dn.alternate!==null&&pn.delete(dn.key===null?yn:dn.key),Xe=st(dn,Xe,yn),jn===null?kn=dn:jn.sibling=dn,jn=dn);return C&&pn.forEach(function(rh){return j(ln,rh)}),kn}if(T(ge)){var Vn=Kt,ao=re,Ho=ge,nh=De,mi=T(Ho);if(typeof mi!="function")throw Error(i(150));if((Ho=mi.call(Ho))==null)throw Error(i(151));for(var yi=mi=null,dr=ao,bi=ao=0,hd=null,$n=Ho.next();dr!==null&&!$n.done;bi++,$n=Ho.next()){dr.index>bi?(hd=dr,dr=null):hd=dr.sibling;var sl=Me(Vn,dr,$n.value,nh);if(sl===null){dr===null&&(dr=hd);break}C&&dr&&sl.alternate===null&&j(Vn,dr),ao=st(sl,ao,bi),yi===null?mi=sl:yi.sibling=sl,yi=sl,dr=hd}if($n.done)return W(Vn,dr),mi;if(dr===null){for(;!$n.done;bi++,$n=Ho.next())($n=ue(Vn,$n.value,nh))!==null&&(ao=st($n,ao,bi),yi===null?mi=$n:yi.sibling=$n,yi=$n);return mi}for(dr=it(Vn,dr);!$n.done;bi++,$n=Ho.next())($n=mn(dr,Vn,bi,$n.value,nh))!==null&&(C&&$n.alternate!==null&&dr.delete($n.key===null?bi:$n.key),ao=st($n,ao,bi),yi===null?mi=$n:yi.sibling=$n,yi=$n);return C&&dr.forEach(function(rh){return j(Vn,rh)}),mi}if(Ze&&Ku(Kt,ge),ge===void 0&&!Re)switch(Kt.tag){case 1:case 22:case 0:case 11:case 15:throw Error(i(152,Y(Kt.type)||"Component"))}return W(Kt,re)}}var Gu=Ny(!0),Py=Ny(!1),rc={},Fo=Ki(rc),oc=Ki(rc),ic=Ki(rc);function Ja(C){if(C===rc)throw Error(i(174));return C}function vp(C,j){switch(Wn(ic,j),Wn(oc,C),Wn(Fo,rc),C=j.nodeType){case 9:case 11:j=(j=j.documentElement)?j.namespaceURI:Et(null,"");break;default:j=Et(j=(C=C===8?j.parentNode:j).namespaceURI||null,C=C.tagName)}Bn(Fo),Wn(Fo,j)}function Qs(){Bn(Fo),Bn(oc),Bn(ic)}function Iy(C){Ja(ic.current);var j=Ja(Fo.current),W=Et(j,C.type);j!==W&&(Wn(oc,C),Wn(Fo,W))}function _p(C){oc.current===C&&(Bn(Fo),Bn(oc))}var Kn=Ki(0);function Yu(C){for(var j=C;j!==null;){if(j.tag===13){var W=j.memoizedState;if(W!==null&&((W=W.dehydrated)===null||W.data==="$?"||W.data==="$!"))return j}else if(j.tag===19&&j.memoizedProps.revealOrder!==void 0){if(64&j.flags)return j}else if(j.child!==null){j=(j.child.return=j).child;continue}if(j===C)break;for(;j.sibling===null;){if(j.return===null||j.return===C)return null;j=j.return}j.sibling.return=j.return,j=j.sibling}return null}var pi=null,Xi=null,zo=!1;function Ry(C,j){var W=io(5,null,null,0);W.elementType="DELETED",W.type="DELETED",W.stateNode=j,W.return=C,W.flags=8,C.lastEffect!==null?(C.lastEffect.nextEffect=W,C.lastEffect=W):C.firstEffect=C.lastEffect=W}function My(C,j){switch(C.tag){case 5:var W=C.type;return(j=j.nodeType!==1||W.toLowerCase()!==j.nodeName.toLowerCase()?null:j)!==null&&(C.stateNode=j,1);case 6:return(j=C.pendingProps===""||j.nodeType!==3?null:j)!==null&&(C.stateNode=j,1);default:return}}function xp(C){if(zo){var j=Xi;if(j){var W=j;if(!My(C,j)){if(!(j=Js(W.nextSibling))||!My(C,j))return C.flags=-1025&C.flags|2,zo=!1,void(pi=C);Ry(pi,W)}pi=C,Xi=Js(j.firstChild)}else C.flags=-1025&C.flags|2,zo=!1,pi=C}}function Dy(C){for(C=C.return;C!==null&&C.tag!==5&&C.tag!==3&&C.tag!==13;)C=C.return;pi=C}function Zu(C){if(C===pi){if(!zo)return Dy(C),zo=!0,0;var j=C.type;if(C.tag!==5||j!=="head"&&j!=="body"&&!op(j,C.memoizedProps))for(j=Xi;j;)Ry(C,j),j=Js(j.nextSibling);if(Dy(C),C.tag===13){if(!(C=(C=C.memoizedState)!==null?C.dehydrated:null))throw Error(i(317));t:{for(C=C.nextSibling,j=0;C;){if(C.nodeType===8){var W=C.data;if(W==="/$"){if(j===0){Xi=Js(C.nextSibling);break t}j--}else W!=="$"&&W!=="$!"&&W!=="$?"||j++}C=C.nextSibling}Xi=null}}else Xi=pi?Js(C.stateNode.nextSibling):null;return 1}}function wp(){Xi=pi=null,zo=!1}var Xs=[];function Sp(){for(var C=0;C<Xs.length;C++)Xs[C]._workInProgressVersionPrimary=null;Xs.length=0}var ac=E.ReactCurrentDispatcher,ro=E.ReactCurrentBatchConfig,sc=0,Gn=null,Nr=null,gr=null,Qu=!1,lc=!1;function zr(){throw Error(i(321))}function Cp(C,j){if(j!==null){for(var W=0;W<j.length&&W<C.length;W++)if(!rr(C[W],j[W]))return;return 1}}function Ep(C,j,W,it,ot,st){if(sc=st,(Gn=j).memoizedState=null,j.updateQueue=null,j.lanes=0,ac.current=C===null||C.memoizedState===null?n2:r2,C=W(it,ot),lc){st=0;do if(lc=!1,!(st<25))throw Error(i(301));while(st+=1,gr=Nr=null,j.updateQueue=null,ac.current=o2,C=W(it,ot),lc)}if(ac.current=nd,j=Nr!==null&&Nr.next!==null,sc=0,gr=Nr=Gn=null,Qu=!1,j)throw Error(i(300));return C}function Wa(){var C={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gr===null?Gn.memoizedState=gr=C:gr=gr.next=C,gr}function Va(){C=Nr===null?(C=Gn.alternate)!==null?C.memoizedState:null:Nr.next;var C,j=gr===null?Gn.memoizedState:gr.next;if(j!==null)gr=j,Nr=C;else{if(C===null)throw Error(i(310));C={memoizedState:(Nr=C).memoizedState,baseState:Nr.baseState,baseQueue:Nr.baseQueue,queue:Nr.queue,next:null},gr===null?Gn.memoizedState=gr=C:gr=gr.next=C}return gr}function Uo(C,j){return typeof j=="function"?j(C):j}function cc(C){var j=Va(),W=j.queue;if(W===null)throw Error(i(311));W.lastRenderedReducer=C;var it,ot=(ut=Nr).baseQueue,st=W.pending;if(st!==null&&(ot!==null&&(it=ot.next,ot.next=st.next,st.next=it),ut.baseQueue=ot=st,W.pending=null),ot!==null){ot=ot.next;var ut=ut.baseState,_t=it=st=null,mt=ot;do var Ht,ie=mt.lane;while((sc&ie)===ie?(_t!==null&&(_t=_t.next={lane:0,action:mt.action,eagerReducer:mt.eagerReducer,eagerState:mt.eagerState,next:null}),ut=mt.eagerReducer===C?mt.eagerState:C(ut,mt.action)):(Ht={lane:ie,action:mt.action,eagerReducer:mt.eagerReducer,eagerState:mt.eagerState,next:null},_t===null?(it=_t=Ht,st=ut):_t=_t.next=Ht,Gn.lanes|=ie,pc|=ie),(mt=mt.next)!==null&&mt!==ot);_t===null?st=ut:_t.next=it,rr(ut,j.memoizedState)||(xo=!0),j.memoizedState=ut,j.baseState=st,j.baseQueue=_t,W.lastRenderedState=ut}return[j.memoizedState,W.dispatch]}function uc(C){var j=Va(),W=j.queue;if(W===null)throw Error(i(311));W.lastRenderedReducer=C;var it=W.dispatch,ot=W.pending,st=j.memoizedState;if(ot!==null){W.pending=null;for(var ut=ot=ot.next;st=C(st,ut.action),(ut=ut.next)!==ot;);rr(st,j.memoizedState)||(xo=!0),j.memoizedState=st,j.baseQueue===null&&(j.baseState=st),W.lastRenderedState=st}return[st,it]}function Ly(C,j,W){var it=(it=j._getVersion)(j._source),ot=j._workInProgressVersionPrimary;if(ot!==null?C=ot===it:(C=C.mutableReadLanes,(C=(sc&C)===C)&&(j._workInProgressVersionPrimary=it,Xs.push(j))),C)return W(j._source);throw Xs.push(j),Error(i(350))}function By(C,j,W,it){var ot=Pr;if(ot===null)throw Error(i(349));var st=j._getVersion,ut=st(j._source),_t=ac.current,mt=(ie=_t.useState(function(){return Ly(ot,j,W)}))[1],Ht=ie[0],ie=gr,ue=(Kt=C.memoizedState).refs,Me=ue.getSnapshot,mn=Kt.source,Kt=Kt.subscribe,re=Gn;return C.memoizedState={refs:ue,source:j,subscribe:it},_t.useEffect(function(){ue.getSnapshot=W,ue.setSnapshot=mt;var ge=st(j._source);if(!rr(ut,ge)){ge=W(j._source),rr(Ht,ge)||(mt(ge),ge=na(re),ot.mutableReadLanes|=ge&ot.pendingLanes),ge=ot.mutableReadLanes,ot.entangledLanes|=ge;for(var De=ot.entanglements,Re=ge;0<Re;){var Ze=31-yo(Re),ln=1<<Ze;De[Ze]|=ge,Re&=~ln}}},[W,j,it]),_t.useEffect(function(){return it(j._source,function(){var ge=ue.getSnapshot,De=ue.setSnapshot;try{De(ge(j._source));var Re=na(re);ot.mutableReadLanes|=Re&ot.pendingLanes}catch(Ze){De(function(){throw Ze})}})},[j,it]),rr(Me,W)&&rr(mn,j)&&rr(Kt,it)||((C={pending:null,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:Ht}).dispatch=mt=jp.bind(null,Gn,C),ie.queue=C,ie.baseQueue=null,Ht=Ly(ot,j,W),ie.memoizedState=ie.baseState=Ht),Ht}function Fy(C,j,W){return By(Va(),C,j,W)}function dc(C){var j=Wa();return typeof C=="function"&&(C=C()),j.memoizedState=j.baseState=C,C=(C=j.queue={pending:null,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:C}).dispatch=jp.bind(null,Gn,C),[j.memoizedState,C]}function Xu(C,j,W,it){return C={tag:C,create:j,destroy:W,deps:it,next:null},(j=Gn.updateQueue)===null?(Gn.updateQueue=j={lastEffect:null}).lastEffect=C.next=C:(W=j.lastEffect)===null?j.lastEffect=C.next=C:(it=W.next,(W.next=C).next=it,j.lastEffect=C),C}function zy(C){return Wa().memoizedState={current:C}}function td(){return Va().memoizedState}function kp(C,j,W,it){var ot=Wa();Gn.flags|=C,ot.memoizedState=Xu(1|j,W,void 0,it===void 0?null:it)}function Op(C,j,W,it){var ot=Va(),st=void(it=it===void 0?null:it);if(Nr!==null){var ut=Nr.memoizedState;if(st=ut.destroy,it!==null&&Cp(it,ut.deps))return void Xu(j,W,st,it)}Gn.flags|=C,ot.memoizedState=Xu(1|j,W,st,it)}function Uy(C,j){return kp(516,4,C,j)}function ed(C,j){return Op(516,4,C,j)}function $y(C,j){return Op(4,2,C,j)}function Hy(C,j){return typeof j=="function"?(C=C(),j(C),function(){j(null)}):j!=null?(C=C(),j.current=C,function(){j.current=null}):void 0}function qy(C,j,W){return W=W!=null?W.concat([C]):null,Op(4,2,Hy.bind(null,j,C),W)}function Tp(){}function Jy(C,j){var W=Va(),it=(j=j===void 0?null:j,W.memoizedState);return it!==null&&j!==null&&Cp(j,it[1])?it[0]:(W.memoizedState=[C,j],C)}function Wy(C,j){var W=Va(),it=(j=j===void 0?null:j,W.memoizedState);return it!==null&&j!==null&&Cp(j,it[1])?it[0]:(C=C(),W.memoizedState=[C,j],C)}function jp(C,j,W){var it=Kr(),ot=na(C),st={lane:ot,action:W,eagerReducer:null,eagerState:null,next:null},ut=j.pending;if(ut===null?st.next=st:(st.next=ut.next,ut.next=st),j.pending=st,ut=C.alternate,C===Gn||ut!==null&&ut===Gn)lc=Qu=!0;else{if(C.lanes===0&&(ut===null||ut.lanes===0)&&(ut=j.lastRenderedReducer)!==null)try{var _t=j.lastRenderedState,mt=ut(_t,W);if(st.eagerReducer=ut,st.eagerState=mt,rr(mt,_t))return}catch{}ra(C,ot,it)}}var nd={readContext:no,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useLayoutEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useMutableSource:zr,useOpaqueIdentifier:zr,unstable_isNewReconciler:!1},n2={readContext:no,useCallback:function(C,j){return Wa().memoizedState=[C,j===void 0?null:j],C},useContext:no,useEffect:Uy,useImperativeHandle:function(C,j,W){return W=W!=null?W.concat([C]):null,kp(4,2,Hy.bind(null,j,C),W)},useLayoutEffect:function(C,j){return kp(4,2,C,j)},useMemo:function(C,j){var W=Wa();return j=j===void 0?null:j,C=C(),W.memoizedState=[C,j],C},useReducer:function(C,j,W){var it=Wa();return j=W!==void 0?W(j):j,it.memoizedState=it.baseState=j,C=(C=it.queue={pending:null,dispatch:null,lastRenderedReducer:C,lastRenderedState:j}).dispatch=jp.bind(null,Gn,C),[it.memoizedState,C]},useRef:zy,useState:dc,useDebugValue:Tp,useDeferredValue:function(C){var j=dc(C),W=j[0],it=j[1];return Uy(function(){var ot=ro.transition;ro.transition=1;try{it(C)}finally{ro.transition=ot}},[C]),W},useTransition:function(){var C=dc(!1),j=C[0];return zy(C=(function(W,it){var ot=Gs();qa(ot<98?98:ot,function(){W(!0)}),qa(97<ot?97:ot,function(){var st=ro.transition;ro.transition=1;try{W(!1),it()}finally{ro.transition=st}})}).bind(null,C[1])),[C,j]},useMutableSource:function(C,j,W){var it=Wa();return it.memoizedState={refs:{getSnapshot:j,setSnapshot:null},source:C,subscribe:W},By(it,C,j,W)},useOpaqueIdentifier:function(){var C,j,W;return zo?(C=!1,W={$$typeof:U,toString:W=function(){throw C||(C=!0,j("r:"+(ap++).toString(36))),Error(i(355))},valueOf:W},j=dc(W)[1],!(2&Gn.mode)&&(Gn.flags|=516,Xu(5,function(){j("r:"+(ap++).toString(36))},void 0,null))):dc(W="r:"+(ap++).toString(36)),W},unstable_isNewReconciler:!1},r2={readContext:no,useCallback:Jy,useContext:no,useEffect:ed,useImperativeHandle:qy,useLayoutEffect:$y,useMemo:Wy,useReducer:cc,useRef:td,useState:function(){return cc(Uo)},useDebugValue:Tp,useDeferredValue:function(C){var j=cc(Uo),W=j[0],it=j[1];return ed(function(){var ot=ro.transition;ro.transition=1;try{it(C)}finally{ro.transition=ot}},[C]),W},useTransition:function(){var C=cc(Uo)[0];return[td().current,C]},useMutableSource:Fy,useOpaqueIdentifier:function(){return cc(Uo)[0]},unstable_isNewReconciler:!1},o2={readContext:no,useCallback:Jy,useContext:no,useEffect:ed,useImperativeHandle:qy,useLayoutEffect:$y,useMemo:Wy,useReducer:uc,useRef:td,useState:function(){return uc(Uo)},useDebugValue:Tp,useDeferredValue:function(C){var j=uc(Uo),W=j[0],it=j[1];return ed(function(){var ot=ro.transition;ro.transition=1;try{it(C)}finally{ro.transition=ot}},[C]),W},useTransition:function(){var C=uc(Uo)[0];return[td().current,C]},useMutableSource:Fy,useOpaqueIdentifier:function(){return uc(Uo)[0]},unstable_isNewReconciler:!1},i2=E.ReactCurrentOwner,xo=!1;function Vr(C,j,W,it){j.child=C===null?Py(j,null,W,it):Gu(j,C.child,W,it)}function Vy(C,j,W,it,ot){W=W.render;var st=j.ref;return Zs(j,ot),it=Ep(C,j,W,it,st,ot),C===null||xo?(j.flags|=1,Vr(C,j,it,ot),j.child):(j.updateQueue=C.updateQueue,j.flags&=-517,C.lanes&=~ot,hi(C,j,ot))}function Ky(C,j,W,it,ot,st){var ut;return C===null?typeof(ut=W.type)!="function"||Gp(ut)||ut.defaultProps!==void 0||W.compare!==null||W.defaultProps!==void 0?((C=dd(W.type,null,it,j,j.mode,st)).ref=j.ref,(C.return=j).child=C):(j.tag=15,j.type=ut,Gy(C,j,ut,it,ot,st)):(ut=C.child,ot&st||(ot=ut.memoizedProps,!(W=(W=W.compare)!==null?W:Kl)(ot,it)||C.ref!==j.ref)?(j.flags|=1,(C=aa(ut,it)).ref=j.ref,(C.return=j).child=C):hi(C,j,st))}function Gy(C,j,W,it,ot,st){if(C!==null&&Kl(C.memoizedProps,it)&&C.ref===j.ref){if(xo=!1,!(st&ot))return j.lanes=C.lanes,hi(C,j,st);16384&C.flags&&(xo=!0)}return Ap(C,j,W,it,st)}function Yy(C,j,W){var it=j.pendingProps,ot=it.children,st=C!==null?C.memoizedState:null;if(it.mode==="hidden"||it.mode==="unstable-defer-without-hiding")if(4&j.mode){if(!(1073741824&W))return C=st!==null?st.baseLanes|W:W,j.lanes=j.childLanes=1073741824,j.memoizedState={baseLanes:C},ud(0,C),null;j.memoizedState={baseLanes:0},ud(0,st!==null?st.baseLanes:W)}else j.memoizedState={baseLanes:0},ud(0,W);else st!==null?(it=st.baseLanes|W,j.memoizedState=null):it=W,ud(0,it);return Vr(C,j,ot,W),j.child}function Zy(C,j){var W=j.ref;(C===null&&W!==null||C!==null&&C.ref!==W)&&(j.flags|=128)}function Ap(C,j,W,it,ot){var st=Ks(j,Wr(W)?$a:xr.current);return Zs(j,ot),W=Ep(C,j,W,it,st,ot),C===null||xo?(j.flags|=1,Vr(C,j,W,ot),j.child):(j.updateQueue=C.updateQueue,j.flags&=-517,C.lanes&=~ot,hi(C,j,ot))}function Qy(C,j,W,it,ot){var st,ut,_t,mt,Ht,ie,ue,Me,mn,Kt;return Wr(W)?(st=!0,Fu(j)):st=!1,Zs(j,ot),it=j.stateNode===null?(C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),jy(j,W,it),bp(j,W,it,ot),!0):C===null?(ut=j.stateNode,_t=j.memoizedProps,ut.props=_t,Me=ut.context,mt=typeof(mt=W.contextType)=="object"&&mt!==null?no(mt):Ks(j,mt=Wr(W)?$a:xr.current),(ie=typeof(Ht=W.getDerivedStateFromProps)=="function"||typeof ut.getSnapshotBeforeUpdate=="function")||typeof ut.UNSAFE_componentWillReceiveProps!="function"&&typeof ut.componentWillReceiveProps!="function"||_t===it&&Me===mt||Ay(0,ut,it,mt),Yi=!1,ue=j.memoizedState,ut.state=ue,ec(j,it,ut,ot),Me=j.memoizedState,_t!==it||ue!==Me||Fr.current||Yi?(typeof Ht=="function"&&(Ju(j,0,Ht,it),Me=j.memoizedState),(_t=Yi||Ty(j,W,_t,it,ue,Me,mt))?(ie||typeof ut.UNSAFE_componentWillMount!="function"&&typeof ut.componentWillMount!="function"||(typeof ut.componentWillMount=="function"&&ut.componentWillMount(),typeof ut.UNSAFE_componentWillMount=="function"&&ut.UNSAFE_componentWillMount()),typeof ut.componentDidMount=="function"&&(j.flags|=4)):(typeof ut.componentDidMount=="function"&&(j.flags|=4),j.memoizedProps=it,j.memoizedState=Me),ut.props=it,ut.state=Me,ut.context=mt,_t):(typeof ut.componentDidMount=="function"&&(j.flags|=4),!1)):(ut=j.stateNode,Cy(C,j),_t=j.memoizedProps,mt=j.type===j.elementType?_t:_o(j.type,_t),ut.props=mt,ie=j.pendingProps,ue=ut.context,Me=typeof(Me=W.contextType)=="object"&&Me!==null?no(Me):Ks(j,Me=Wr(W)?$a:xr.current),(Ht=typeof(mn=W.getDerivedStateFromProps)=="function"||typeof ut.getSnapshotBeforeUpdate=="function")||typeof ut.UNSAFE_componentWillReceiveProps!="function"&&typeof ut.componentWillReceiveProps!="function"||_t===ie&&ue===Me||Ay(0,ut,it,Me),Yi=!1,ue=j.memoizedState,ut.state=ue,ec(j,it,ut,ot),Kt=j.memoizedState,_t!==ie||ue!==Kt||Fr.current||Yi?(typeof mn=="function"&&(Ju(j,0,mn,it),Kt=j.memoizedState),(mt=Yi||Ty(j,W,mt,it,ue,Kt,Me))?(Ht||typeof ut.UNSAFE_componentWillUpdate!="function"&&typeof ut.componentWillUpdate!="function"||(typeof ut.componentWillUpdate=="function"&&ut.componentWillUpdate(it,Kt,Me),typeof ut.UNSAFE_componentWillUpdate=="function"&&ut.UNSAFE_componentWillUpdate(it,Kt,Me)),typeof ut.componentDidUpdate=="function"&&(j.flags|=4),typeof ut.getSnapshotBeforeUpdate=="function"&&(j.flags|=256)):(typeof ut.componentDidUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=4),typeof ut.getSnapshotBeforeUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=256),j.memoizedProps=it,j.memoizedState=Kt),ut.props=it,ut.state=Kt,ut.context=Me,mt):(typeof ut.componentDidUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=4),typeof ut.getSnapshotBeforeUpdate!="function"||_t===C.memoizedProps&&ue===C.memoizedState||(j.flags|=256),!1)),Np(C,j,W,it,st,ot)}function Np(C,j,W,it,ot,st){Zy(C,j);var ut=!!(64&j.flags);if(!it&&!ut)return ot&&gy(j,W,!1),hi(C,j,st);it=j.stateNode,i2.current=j;var _t=ut&&typeof W.getDerivedStateFromError!="function"?null:it.render();return j.flags|=1,C!==null&&ut?(j.child=Gu(j,C.child,null,st),j.child=Gu(j,null,_t,st)):Vr(C,j,_t,st),j.memoizedState=it.state,ot&&gy(j,W,!0),j.child}function Xy(C){var j=C.stateNode;j.pendingContext?py(0,j.pendingContext,j.pendingContext!==j.context):j.context&&py(0,j.context,!1),vp(C,j.containerInfo)}var Pp={dehydrated:null,retryLane:0};function tb(C,j,W){var it,ot=j.pendingProps,st=Kn.current,ut=!1;return(it=(it=!!(64&j.flags))?it:(C===null||C.memoizedState!==null)&&!!(2&st))?(ut=!0,j.flags&=-65):C!==null&&C.memoizedState===null||ot.fallback===void 0||ot.unstable_avoidThisFallback===!0||(st|=1),Wn(Kn,1&st),C===null?(ot.fallback!==void 0&&xp(j),C=ot.children,st=ot.fallback,ut?(C=eb(j,C,st,W),j.child.memoizedState={baseLanes:W},j.memoizedState=Pp,C):typeof ot.unstable_expectedLoadTime=="number"?(C=eb(j,C,st,W),j.child.memoizedState={baseLanes:W},j.memoizedState=Pp,j.lanes=33554432,C):((W=Yp({mode:"visible",children:C},j.mode,W,null)).return=j).child=W):(C.memoizedState,ut?(ot=function(_t,mt,Ht,ie,ue){var Me=mt.mode,mn=_t.child,Kt=(_t=mn.sibling,{mode:"hidden",children:Ht});return 2&Me||mt.child===mn?Ht=aa(mn,Kt):((Ht=mt.child).childLanes=0,Ht.pendingProps=Kt,(mn=Ht.lastEffect)!==null?(mt.firstEffect=Ht.firstEffect,(mt.lastEffect=mn).nextEffect=null):mt.firstEffect=mt.lastEffect=null),_t!==null?ie=aa(_t,ie):(ie=al(ie,Me,ue,null)).flags|=2,ie.return=mt,Ht.return=mt,Ht.sibling=ie,mt.child=Ht,ie}(C,j,ot.children,ot.fallback,W),ut=j.child,st=C.child.memoizedState,ut.memoizedState=st===null?{baseLanes:W}:{baseLanes:st.baseLanes|W},ut.childLanes=C.childLanes&~W,j.memoizedState=Pp,ot):(W=function(_t,mt,Ht,ie){var ue=_t.child;return _t=ue.sibling,Ht=aa(ue,{mode:"visible",children:Ht}),!(2&mt.mode)&&(Ht.lanes=ie),Ht.return=mt,(Ht.sibling=null)!==_t&&(_t.nextEffect=null,_t.flags=8,mt.firstEffect=mt.lastEffect=_t),mt.child=Ht}(C,j,ot.children,W),j.memoizedState=null,W))}function eb(C,j,W,it){var ot=C.mode,st=C.child;return j={mode:"hidden",children:j},2&ot||st===null?st=Yp(j,ot,0,null):(st.childLanes=0,st.pendingProps=j),W=al(W,ot,it,null),st.return=C,W.return=C,st.sibling=W,C.child=st,W}function nb(C,j){C.lanes|=j;var W=C.alternate;W!==null&&(W.lanes|=j),Sy(C.return,j)}function Ip(C,j,W,it,ot,st){var ut=C.memoizedState;ut===null?C.memoizedState={isBackwards:j,rendering:null,renderingStartTime:0,last:it,tail:W,tailMode:ot,lastEffect:st}:(ut.isBackwards=j,ut.rendering=null,ut.renderingStartTime=0,ut.last=it,ut.tail=W,ut.tailMode=ot,ut.lastEffect=st)}function rb(C,j,W){var it=j.pendingProps,ot=it.revealOrder,st=it.tail;if(Vr(C,j,it.children,W),2&(it=Kn.current))it=1&it|2,j.flags|=64;else{if(C!==null&&64&C.flags)t:for(C=j.child;C!==null;){if(C.tag===13)C.memoizedState!==null&&nb(C,W);else if(C.tag===19)nb(C,W);else if(C.child!==null){C=(C.child.return=C).child;continue}if(C===j)break;for(;C.sibling===null;){if(C.return===null||C.return===j)break t;C=C.return}C.sibling.return=C.return,C=C.sibling}it&=1}if(Wn(Kn,it),2&j.mode)switch(ot){case"forwards":for(W=j.child,ot=null;W!==null;)(C=W.alternate)!==null&&Yu(C)===null&&(ot=W),W=W.sibling;(W=ot)===null?(ot=j.child,j.child=null):(ot=W.sibling,W.sibling=null),Ip(j,!1,ot,W,st,j.lastEffect);break;case"backwards":for(ot=j.child,j.child=W=null;ot!==null;){if((C=ot.alternate)!==null&&Yu(C)===null){j.child=ot;break}C=ot.sibling,ot.sibling=W,W=ot,ot=C}Ip(j,!0,W,null,st,j.lastEffect);break;case"together":Ip(j,!1,null,null,void 0,j.lastEffect);break;default:j.memoizedState=null}else j.memoizedState=null;return j.child}function hi(C,j,W){if(C!==null&&(j.dependencies=C.dependencies),pc|=j.lanes,!(W&j.childLanes))return null;if(C!==null&&j.child!==C.child)throw Error(i(153));if(j.child!==null){for(W=aa(C=j.child,C.pendingProps),(j.child=W).return=j;C.sibling!==null;)C=C.sibling,(W=W.sibling=aa(C,C.pendingProps)).return=j;W.sibling=null}return j.child}function fc(C,j){if(!zo)switch(C.tailMode){case"hidden":j=C.tail;for(var W=null;j!==null;)j.alternate!==null&&(W=j),j=j.sibling;W===null?C.tail=null:W.sibling=null;break;case"collapsed":W=C.tail;for(var it=null;W!==null;)W.alternate!==null&&(it=W),W=W.sibling;it===null?j||C.tail===null?C.tail=null:C.tail.sibling=null:it.sibling=null}}function Rp(C,j){try{for(var W="",it=j;W+=function(st){switch(st.tag){case 5:return I(st.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return B(st.type,!1);case 11:return B(st.type.render,!1);case 22:return B(st.type._render,!1);case 1:return B(st.type,!0);default:return""}}(it),it=it.return;);var ot=W}catch(st){ot=`
|
|
108
108
|
Error generating stack: `+st.message+`
|
|
109
|
-
`+st.stack}return{value:C,source:j,stack:ot}}function Dp(C,j){try{console.error(j.value)}catch(W){setTimeout(function(){throw W})}}var s2=function(C,j){for(var W=j.child;W!==null;){if(W.tag===5||W.tag===6)C.appendChild(W.stateNode);else if(W.tag!==4&&W.child!==null){W=(W.child.return=W).child;continue}if(W===j)break;for(;W.sibling===null;){if(W.return===null||W.return===j)return;W=W.return}W.sibling.return=W.return,W=W.sibling}},l2=function(C,j,W,it){var ot=C.memoizedProps;if(ot!==it){C=j.stateNode,Ja(Fo.current);var st,ut=null;switch(W){case"input":ot=et(C,ot),it=et(C,it),ut=[];break;case"option":ot=Mt(C,ot),it=Mt(C,it),ut=[];break;case"select":ot=e({},ot,{value:void 0}),it=e({},it,{value:void 0}),ut=[];break;case"textarea":ot=Pt(C,ot),it=Pt(C,it),ut=[];break;default:typeof ot.onClick!="function"&&typeof it.onClick=="function"&&(C.onclick=Du)}for(Ht in kt(W,it),W=null,ot)if(!it.hasOwnProperty(Ht)&&ot.hasOwnProperty(Ht)&&ot[Ht]!=null)if(Ht==="style"){var _t=ot[Ht];for(st in _t)_t.hasOwnProperty(st)&&((W=W||{})[st]="")}else Ht!=="dangerouslySetInnerHTML"&&Ht!=="children"&&Ht!=="suppressContentEditableWarning"&&Ht!=="suppressHydrationWarning"&&Ht!=="autoFocus"&&(o.hasOwnProperty(Ht)?ut=ut||[]:(ut=ut||[]).push(Ht,null));for(Ht in it){var mt=it[Ht];if(_t=ot!=null?ot[Ht]:void 0,it.hasOwnProperty(Ht)&&mt!==_t&&(mt!=null||_t!=null))if(Ht==="style")if(_t){for(st in _t)!_t.hasOwnProperty(st)||mt&&mt.hasOwnProperty(st)||((W=W||{})[st]="");for(st in mt)mt.hasOwnProperty(st)&&_t[st]!==mt[st]&&((W=W||{})[st]=mt[st])}else W||(ut=ut||[]).push(Ht,W),W=mt;else Ht==="dangerouslySetInnerHTML"?(mt=mt?mt.__html:void 0,_t=_t?_t.__html:void 0,mt!=null&&_t!==mt&&(ut=ut||[]).push(Ht,mt)):Ht==="children"?typeof mt!="string"&&typeof mt!="number"||(ut=ut||[]).push(Ht,""+mt):Ht!=="suppressContentEditableWarning"&&Ht!=="suppressHydrationWarning"&&(o.hasOwnProperty(Ht)?(mt!=null&&Ht==="onScroll"&&Rn("scroll",C),ut||_t===mt||(ut=[])):typeof mt=="object"&&mt!==null&&mt.$$typeof===U?mt.toString():(ut=ut||[]).push(Ht,mt))}W&&(ut=ut||[]).push("style",W);var Ht=ut;(j.updateQueue=Ht)&&(j.flags|=4)}},c2=function(C,j,W,it){W!==it&&(j.flags|=4)},u2=typeof WeakMap=="function"?WeakMap:Map;function ob(C,j,W){(W=Zi(-1,W)).tag=3,W.payload={element:null};var it=j.value;return W.callback=function(){id||(id=!0,qp=it),Dp(0,j)},W}function ib(C,j,W){(W=Zi(-1,W)).tag=3;var it,ot=C.type.getDerivedStateFromError;return typeof ot=="function"&&(it=j.value,W.payload=function(){return Dp(0,j),ot(it)}),(C=C.stateNode)!==null&&typeof C.componentDidCatch=="function"&&(W.callback=function(){typeof ot!="function"&&($o===null?$o=new Set([this]):$o.add(this),Dp(0,j));var st=j.stack;this.componentDidCatch(j.value,{componentStack:st!==null?st:""})}),W}var d2=typeof WeakSet=="function"?WeakSet:Set;function ab(C){var j=C.ref;if(j!==null)if(typeof j=="function")try{j(null)}catch(W){ia(C,W)}else j.current=null}function f2(C,j,W){switch(W.tag){case 0:case 11:case 15:case 22:if((j=(j=W.updateQueue)!==null?j.lastEffect:null)!==null){C=j=j.next;do;while(!(3&~C.tag)&&(ot=C.create,C.destroy=ot()),(C=C.next)!==j)}if((j=(j=W.updateQueue)!==null?j.lastEffect:null)!==null){C=j=j.next;do{var it=C,ot=it.next;4&(it=it.tag)&&1&it&&(wb(W,C),it=W,st=C,Jp.push(st,it),ta||(ta=!0,tc(97,function(){return oa(),null}))),C=ot}while(C!==j)}return;case 1:return C=W.stateNode,4&W.flags&&(j===null?C.componentDidMount():(ot=W.elementType===W.type?j.memoizedProps:_o(W.type,j.memoizedProps),C.componentDidUpdate(ot,j.memoizedState,C.__reactInternalSnapshotBeforeUpdate))),void((j=W.updateQueue)!==null&&ky(0,j,C));case 3:if((j=W.updateQueue)!==null){if((C=null)!==W.child)switch(W.child.tag){case 5:case 1:C=W.child.stateNode}ky(0,j,C)}return;case 5:return C=W.stateNode,void(j===null&&4&W.flags&&ly(W.type,W.memoizedProps)&&C.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(W.memoizedState===null&&(W=W.alternate)!==null&&(W=W.memoizedState)!==null&&(W=W.dehydrated)!==null&&An(W))}var st;throw Error(i(163))}function sb(C,j){for(var W=C;;){if(W.tag===5){var it,ot=W.stateNode;j?typeof(ot=ot.style).setProperty=="function"?ot.setProperty("display","none","important"):ot.display="none":(ot=W.stateNode,it=(it=W.memoizedProps.style)!=null&&it.hasOwnProperty("display")?it.display:null,ot.style.display=Xt("display",it))}else if(W.tag===6)W.stateNode.nodeValue=j?"":W.memoizedProps;else if((W.tag!==23&&W.tag!==24||W.memoizedState===null||W===C)&&W.child!==null){W=(W.child.return=W).child;continue}if(W===C)break;for(;W.sibling===null;){if(W.return===null||W.return===C)return;W=W.return}W.sibling.return=W.return,W=W.sibling}}function lb(C,j){if(Ha&&typeof Ha.onCommitFiberUnmount=="function")try{Ha.onCommitFiberUnmount(up,j)}catch{}switch(j.tag){case 0:case 11:case 14:case 15:case 22:if((C=j.updateQueue)!==null&&(C=C.lastEffect)!==null){var W=C=C.next;do{var it=(ot=W).destroy,ot=ot.tag;if(it!==void 0)if(4&ot)wb(j,W);else{ot=j;try{it()}catch(st){ia(ot,st)}}}while((W=W.next)!==C)}break;case 1:if(ab(j),typeof(C=j.stateNode).componentWillUnmount=="function")try{C.props=j.memoizedProps,C.state=j.memoizedState,C.componentWillUnmount()}catch(st){ia(j,st)}break;case 5:ab(j);break;case 4:fb(C,j)}}function cb(C){C.alternate=null,C.child=null,C.dependencies=null,C.firstEffect=null,C.lastEffect=null,C.memoizedProps=null,C.memoizedState=null,C.pendingProps=null,C.return=null,C.updateQueue=null}function ub(C){return C.tag===5||C.tag===3||C.tag===4}function db(C){t:{for(var j=C.return;j!==null;){if(ub(j))break t;j=j.return}throw Error(i(160))}var W=j;switch(j=W.stateNode,W.tag){case 5:var it=!1;break;case 3:case 4:j=j.containerInfo,it=!0;break;default:throw Error(i(161))}16&W.flags&&(dt(j,""),W.flags&=-17);t:e:for(W=C;;){for(;W.sibling===null;){if(W.return===null||ub(W.return)){W=null;break t}W=W.return}for(W.sibling.return=W.return,W=W.sibling;W.tag!==5&&W.tag!==6&&W.tag!==18;){if(2&W.flags||W.child===null||W.tag===4)continue e;W=(W.child.return=W).child}if(!(2&W.flags)){W=W.stateNode;break t}}(it?function ot(st,ut,_t){var mt=st.tag,Ht=mt===5||mt===6;if(Ht)st=Ht?st.stateNode:st.stateNode.instance,ut?(_t.nodeType===8?_t.parentNode:_t).insertBefore(st,ut):(_t.nodeType===8?(ut=_t.parentNode).insertBefore(st,_t):(ut=_t).appendChild(st),(_t=_t._reactRootContainer)==null&&ut.onclick===null&&(ut.onclick=Du));else if(mt!==4&&(st=st.child)!==null)for(ot(st,ut,_t),st=st.sibling;st!==null;)ot(st,ut,_t),st=st.sibling}:function ot(st,ut,_t){var mt=st.tag,Ht=mt===5||mt===6;if(Ht)st=Ht?st.stateNode:st.stateNode.instance,ut?_t.insertBefore(st,ut):_t.appendChild(st);else if(mt!==4&&(st=st.child)!==null)for(ot(st,ut,_t),st=st.sibling;st!==null;)ot(st,ut,_t),st=st.sibling})(C,W,j)}function fb(C,j){for(var W,it,ot=j,st=!1;;){if(!st){st=ot.return;t:for(;;){if(st===null)throw Error(i(160));switch(W=st.stateNode,st.tag){case 5:it=!1;break t;case 3:case 4:W=W.containerInfo,it=!0;break t}st=st.return}st=!0}if(ot.tag===5||ot.tag===6){t:for(var ut=C,_t=ot,mt=_t;;)if(lb(ut,mt),mt.child!==null&&mt.tag!==4)mt.child.return=mt,mt=mt.child;else{if(mt===_t)break;for(;mt.sibling===null;){if(mt.return===null||mt.return===_t)break t;mt=mt.return}mt.sibling.return=mt.return,mt=mt.sibling}it?(ut=W,_t=ot.stateNode,(ut.nodeType===8?ut.parentNode:ut).removeChild(_t)):W.removeChild(ot.stateNode)}else if(ot.tag===4){if(ot.child!==null){W=ot.stateNode.containerInfo,it=!0,ot=(ot.child.return=ot).child;continue}}else if(lb(C,ot),ot.child!==null){ot=(ot.child.return=ot).child;continue}if(ot===j)break;for(;ot.sibling===null;){if(ot.return===null||ot.return===j)return;(ot=ot.return).tag===4&&(st=!1)}ot.sibling.return=ot.return,ot=ot.sibling}}function Lp(C,j){switch(j.tag){case 0:case 11:case 14:case 15:case 22:var W=j.updateQueue;if((W=W!==null?W.lastEffect:null)!==null)for(var it=W=W.next;!(3&~it.tag)&&(C=it.destroy,(it.destroy=void 0)!==C&&C()),(it=it.next)!==W;);return;case 1:case 12:case 17:return;case 5:if((W=j.stateNode)!=null){it=j.memoizedProps;var ot=C!==null?C.memoizedProps:it,st=(C=j.type,j.updateQueue);if((j.updateQueue=null)!==st){for(W[Lu]=it,C==="input"&&it.type==="radio"&&it.name!=null&&ct(W,it),ee(C,ot),j=ee(C,it),ot=0;ot<st.length;ot+=2){var ut=st[ot],_t=st[ot+1];ut==="style"?Qt(W,_t):ut==="dangerouslySetInnerHTML"?ht(W,_t):ut==="children"?dt(W,_t):x(W,ut,_t,j)}switch(C){case"input":gt(W,it);break;case"textarea":jt(W,it);break;case"select":C=W._wrapperState.wasMultiple,W._wrapperState.wasMultiple=!!it.multiple,(st=it.value)!=null?Lt(W,!!it.multiple,st,!1):C!==!!it.multiple&&(it.defaultValue!=null?Lt(W,!!it.multiple,it.defaultValue,!0):Lt(W,!!it.multiple,it.multiple?[]:"",!1))}}}return;case 6:if(j.stateNode===null)throw Error(i(162));return void(j.stateNode.nodeValue=j.memoizedProps);case 3:return void((W=j.stateNode).hydrate&&(W.hydrate=!1,An(W.containerInfo)));case 13:return j.memoizedState!==null&&($p=wr(),sb(j.child,!0)),void pb(j);case 19:return void pb(j);case 23:case 24:return void sb(j,j.memoizedState!==null)}throw Error(i(163))}function pb(C){var j,W=C.updateQueue;W!==null&&((C.updateQueue=null)===(j=C.stateNode)&&(j=C.stateNode=new d2),W.forEach(function(it){var ot=(function(st,ut){var _t=st.stateNode;_t!==null&&_t.delete(ut),(ut=0)===ut&&(2&(ut=st.mode)?4&ut?(ut=Br(62914560&~(ea=ea===0?tl:ea)))===0&&(ut=4194304):ut=Gs()===99?1:2:ut=1),_t=Kr(),(st=cd(st,ut))!==null&&(Oa(st,ut,_t),oo(st,_t))}).bind(null,C,it);j.has(it)||(j.add(it),it.then(ot,ot))}))}var p2=Math.ceil,rd=E.ReactCurrentDispatcher,Bp=E.ReactCurrentOwner,fn=0,Pr=null,sr=null,Sr=0,Ka=0,Fp=Ki(0),mr=0,od=null,tl=0,pc=0,el=0,zp=0,Up=null,$p=0,Hp=1/0;function nl(){Hp=wr()+500}var hb,Ye=null,id=!1,qp=null,$o=null,ta=!1,hc=null,gc=90,Jp=[],Wp=[],gi=null,mc=0,Vp=null,ad=-1,ea=0,sd=0,yc=null,ld=!1;function Kr(){return 48&fn?wr():ad!==-1?ad:ad=wr()}function na(C){return 2&(C=C.mode)?4&C?(ea===0&&(ea=tl),n2.transition!==0?(sd!==0&&(sd=Up!==null?Up.pendingLanes:0),C=ea,j=4186112&~sd,(j&=-j)!=0||(j=(C=4186112&~C)&-C)==0&&(j=8192),j):(C=Gs(),eo(4&fn&&C===98?12:C=function(W){switch(W){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(C),ea))):Gs()===99?1:2:1;var j}function ra(C,j,W){if(50<mc)throw mc=0,Vp=null,Error(i(185));var it;(C=cd(C,j))!==null&&(Oa(C,j,W),C===Pr&&(el|=j,mr===4&&rl(C,Sr)),it=Gs(),j===1?8&fn&&!(48&fn)?Kp(C):(oo(C,W),fn===0&&(nl(),Bo())):(!(4&fn)||it!==98&&it!==99||(gi===null?gi=new Set([C]):gi.add(C)),oo(C,W)),Up=C)}function cd(C,j){C.lanes|=j;var W=C.alternate;for(W!==null&&(W.lanes|=j),C=(W=C).return;C!==null;)C.childLanes|=j,(W=C.alternate)!==null&&(W.childLanes|=j),C=(W=C).return;return W.tag===3?W.stateNode:null}function oo(C,j){for(var W=C.callbackNode,it=C.suspendedLanes,ot=C.pingedLanes,st=C.expirationTimes,ut=C.pendingLanes;0<ut;){var _t,mt=31-yo(ut),Ht=1<<mt,ie=st[mt];ie===-1?Ht&it&&!(Ht&ot)||(ie=j,In(Ht),_t=gn,st[mt]=10<=_t?ie+250:6<=_t?ie+5e3:-1):ie<=j&&(C.expiredLanes|=Ht),ut&=~Ht}if(it=Ao(C,C===Pr?Sr:0),j=gn,it===0)W!==null&&(W!==hp&&fp(W),C.callbackNode=null,C.callbackPriority=0);else{if(W!==null){if(C.callbackPriority===j)return;W!==hp&&fp(W)}W=j===15?(W=Kp.bind(null,C),fi===null?(fi=[W],Uu=dp(zu,wy)):fi.push(W),hp):j===14?tc(99,Kp.bind(null,C)):tc(W=function(ue){switch(ue){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(i(358,ue))}}(j),gb.bind(null,C)),C.callbackPriority=j,C.callbackNode=W}}function gb(C){if(ad=-1,(sd=ea=0)!=(48&fn))throw Error(i(327));var j=C.callbackNode;if(oa()&&C.callbackNode!==j)return null;var W=Ao(C,C===Pr?Sr:0);if(W===0)return null;var it=W,ot=fn,st=(fn|=16,vb());for(Pr===C&&Sr===it||(nl(),ol(C,it));;)try{for(;sr!==null&&!XS();)_b(sr);break}catch(_t){bb(C,_t)}if(mp(),rd.current=st,fn=ot,it=sr!==null?0:(Pr=null,Sr=0,mr),tl&el)ol(C,0);else if(it!==0){if(it===2&&(fn|=64,C.hydrate&&(C.hydrate=!1,ap(C.containerInfo)),(W=jr(C))!==0&&(it=bc(C,W))),it===1)throw j=od,ol(C,0),rl(C,W),oo(C,wr()),j;switch(C.finishedWork=C.current.alternate,C.finishedLanes=W,it){case 0:case 1:throw Error(i(345));case 2:case 5:il(C);break;case 3:if(rl(C,W),(62914560&W)===W&&10<(it=$p+500-wr())){if(Ao(C,0)!==0)break;if(((ot=C.suspendedLanes)&W)!==W){Kr(),C.pingedLanes|=C.suspendedLanes&ot;break}C.timeoutHandle=cy(il.bind(null,C),it);break}il(C);break;case 4:if(rl(C,W),(4186112&W)===W)break;for(it=C.eventTimes,ot=-1;0<W;){var ut=31-yo(W);st=1<<ut,ot<(ut=it[ut])&&(ot=ut),W&=~st}if(W=ot,10<(W=((W=wr()-W)<120?120:W<480?480:W<1080?1080:W<1920?1920:W<3e3?3e3:W<4320?4320:1960*p2(W/1960))-W)){C.timeoutHandle=cy(il.bind(null,C),W);break}il(C);break;default:throw Error(i(329))}}return oo(C,wr()),C.callbackNode===j?gb.bind(null,C):null}function rl(C,j){for(j=j&~zp&~el,C.suspendedLanes|=j,C.pingedLanes&=~j,C=C.expirationTimes;0<j;){var W=31-yo(j),it=1<<W;C[W]=-1,j&=~it}}function Kp(C){if(48&fn)throw Error(i(327));var j,W;if(oa(),C===Pr&&C.expiredLanes&Sr?(W=bc(C,j=Sr),tl&el&&(W=bc(C,j=Ao(C,j)))):W=bc(C,j=Ao(C,0)),C.tag!==0&&W===2&&(fn|=64,C.hydrate&&(C.hydrate=!1,ap(C.containerInfo)),(j=jr(C))!==0&&(W=bc(C,j))),W===1)throw W=od,ol(C,0),rl(C,j),oo(C,wr()),W;return C.finishedWork=C.current.alternate,C.finishedLanes=j,il(C),oo(C,wr()),null}function mb(C,j){var W=fn;fn|=1;try{return C(j)}finally{(fn=W)===0&&(nl(),Bo())}}function yb(C,j){var W=fn;fn=-2&fn|8;try{C(j)}finally{(fn=W)===0&&(nl(),Bo())}}function ud(C,j){Wn(Fp,Ka),Ka|=j,tl|=j}function Gp(){Ka=Fp.current,Bn(Fp)}function ol(C,j){C.finishedWork=null,C.finishedLanes=0;var W=C.timeoutHandle;if(W!==-1&&(C.timeoutHandle=-1,ZS(W)),sr!==null)for(W=sr.return;W!==null;){var it=W;switch(it.tag){case 1:(it=it.type.childContextTypes)!=null&&cp();break;case 3:Qs(),Bn(Fr),Bn(xr),Cp();break;case 5:xp(it);break;case 4:Qs();break;case 13:case 19:Bn(Kn);break;case 10:yp(it);break;case 23:case 24:Gp()}W=W.return}sr=aa((Pr=C).current,null),Sr=Ka=tl=j,od=null,zp=el=pc=mr=0}function bb(C,j){for(;;){var W=sr;try{if(mp(),ac.current=nd,Qu){for(var it=Gn.memoizedState;it!==null;){var ot=it.queue;ot!==null&&(ot.pending=null),it=it.next}Qu=!1}if(sc=0,gr=Nr=Gn=null,lc=!1,(Bp.current=null)===W||W.return===null){mr=1,od=j,sr=null;break}t:{var st=C,ut=W.return,_t=j;if(j=Sr,(Ze=W).flags|=2048,(Ze.firstEffect=Ze.lastEffect=null)!==_t&&typeof _t=="object"&&typeof _t.then=="function"){var mt,Ht,ie,ue,Me=_t,mn=(!(2&Ze.mode)&&((mt=Ze.alternate)?(Ze.updateQueue=mt.updateQueue,Ze.memoizedState=mt.memoizedState,Ze.lanes=mt.lanes):(Ze.updateQueue=null,Ze.memoizedState=null)),!!(1&Kn.current)),Kt=ut;do if(ue=(ue=Kt.tag===13)?(Ht=Kt.memoizedState)!==null?Ht.dehydrated!==null:(ie=Kt.memoizedProps).fallback!==void 0&&(ie.unstable_avoidThisFallback!==!0||!mn):ue){var re,ge,De=Kt.updateQueue;if(De===null?((re=new Set).add(Me),Kt.updateQueue=re):De.add(Me),!(2&Kt.mode)){Kt.flags|=64,Ze.flags|=16384,Ze.flags&=-2981,Ze.tag===1&&(Ze.alternate===null?Ze.tag=17:((ge=Zi(-1,1)).tag=2,Qi(Ze,ge))),Ze.lanes|=1;break t}_t=void 0;var Re,Ze=j,ln=st.pingCache;ln===null?(ln=st.pingCache=new u2,_t=new Set,ln.set(Me,_t)):(_t=ln.get(Me))===void 0&&(_t=new Set,ln.set(Me,_t)),_t.has(Ze)||(_t.add(Ze),Re=g2.bind(null,st,Me,Ze),Me.then(Re,Re)),Kt.flags|=4096,Kt.lanes=j;break t}while((Kt=Kt.return)!==null);_t=Error((Y(Ze.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
109
|
+
`+st.stack}return{value:C,source:j,stack:ot}}function Mp(C,j){try{console.error(j.value)}catch(W){setTimeout(function(){throw W})}}var a2=function(C,j){for(var W=j.child;W!==null;){if(W.tag===5||W.tag===6)C.appendChild(W.stateNode);else if(W.tag!==4&&W.child!==null){W=(W.child.return=W).child;continue}if(W===j)break;for(;W.sibling===null;){if(W.return===null||W.return===j)return;W=W.return}W.sibling.return=W.return,W=W.sibling}},s2=function(C,j,W,it){var ot=C.memoizedProps;if(ot!==it){C=j.stateNode,Ja(Fo.current);var st,ut=null;switch(W){case"input":ot=et(C,ot),it=et(C,it),ut=[];break;case"option":ot=Mt(C,ot),it=Mt(C,it),ut=[];break;case"select":ot=e({},ot,{value:void 0}),it=e({},it,{value:void 0}),ut=[];break;case"textarea":ot=Pt(C,ot),it=Pt(C,it),ut=[];break;default:typeof ot.onClick!="function"&&typeof it.onClick=="function"&&(C.onclick=Du)}for(Ht in kt(W,it),W=null,ot)if(!it.hasOwnProperty(Ht)&&ot.hasOwnProperty(Ht)&&ot[Ht]!=null)if(Ht==="style"){var _t=ot[Ht];for(st in _t)_t.hasOwnProperty(st)&&((W=W||{})[st]="")}else Ht!=="dangerouslySetInnerHTML"&&Ht!=="children"&&Ht!=="suppressContentEditableWarning"&&Ht!=="suppressHydrationWarning"&&Ht!=="autoFocus"&&(o.hasOwnProperty(Ht)?ut=ut||[]:(ut=ut||[]).push(Ht,null));for(Ht in it){var mt=it[Ht];if(_t=ot!=null?ot[Ht]:void 0,it.hasOwnProperty(Ht)&&mt!==_t&&(mt!=null||_t!=null))if(Ht==="style")if(_t){for(st in _t)!_t.hasOwnProperty(st)||mt&&mt.hasOwnProperty(st)||((W=W||{})[st]="");for(st in mt)mt.hasOwnProperty(st)&&_t[st]!==mt[st]&&((W=W||{})[st]=mt[st])}else W||(ut=ut||[]).push(Ht,W),W=mt;else Ht==="dangerouslySetInnerHTML"?(mt=mt?mt.__html:void 0,_t=_t?_t.__html:void 0,mt!=null&&_t!==mt&&(ut=ut||[]).push(Ht,mt)):Ht==="children"?typeof mt!="string"&&typeof mt!="number"||(ut=ut||[]).push(Ht,""+mt):Ht!=="suppressContentEditableWarning"&&Ht!=="suppressHydrationWarning"&&(o.hasOwnProperty(Ht)?(mt!=null&&Ht==="onScroll"&&Rn("scroll",C),ut||_t===mt||(ut=[])):typeof mt=="object"&&mt!==null&&mt.$$typeof===U?mt.toString():(ut=ut||[]).push(Ht,mt))}W&&(ut=ut||[]).push("style",W);var Ht=ut;(j.updateQueue=Ht)&&(j.flags|=4)}},l2=function(C,j,W,it){W!==it&&(j.flags|=4)},c2=typeof WeakMap=="function"?WeakMap:Map;function ob(C,j,W){(W=Zi(-1,W)).tag=3,W.payload={element:null};var it=j.value;return W.callback=function(){id||(id=!0,Hp=it),Mp(0,j)},W}function ib(C,j,W){(W=Zi(-1,W)).tag=3;var it,ot=C.type.getDerivedStateFromError;return typeof ot=="function"&&(it=j.value,W.payload=function(){return Mp(0,j),ot(it)}),(C=C.stateNode)!==null&&typeof C.componentDidCatch=="function"&&(W.callback=function(){typeof ot!="function"&&($o===null?$o=new Set([this]):$o.add(this),Mp(0,j));var st=j.stack;this.componentDidCatch(j.value,{componentStack:st!==null?st:""})}),W}var u2=typeof WeakSet=="function"?WeakSet:Set;function ab(C){var j=C.ref;if(j!==null)if(typeof j=="function")try{j(null)}catch(W){ia(C,W)}else j.current=null}function d2(C,j,W){switch(W.tag){case 0:case 11:case 15:case 22:if((j=(j=W.updateQueue)!==null?j.lastEffect:null)!==null){C=j=j.next;do;while(!(3&~C.tag)&&(ot=C.create,C.destroy=ot()),(C=C.next)!==j)}if((j=(j=W.updateQueue)!==null?j.lastEffect:null)!==null){C=j=j.next;do{var it=C,ot=it.next;4&(it=it.tag)&&1&it&&(wb(W,C),it=W,st=C,qp.push(st,it),ta||(ta=!0,tc(97,function(){return oa(),null}))),C=ot}while(C!==j)}return;case 1:return C=W.stateNode,4&W.flags&&(j===null?C.componentDidMount():(ot=W.elementType===W.type?j.memoizedProps:_o(W.type,j.memoizedProps),C.componentDidUpdate(ot,j.memoizedState,C.__reactInternalSnapshotBeforeUpdate))),void((j=W.updateQueue)!==null&&ky(0,j,C));case 3:if((j=W.updateQueue)!==null){if((C=null)!==W.child)switch(W.child.tag){case 5:case 1:C=W.child.stateNode}ky(0,j,C)}return;case 5:return C=W.stateNode,void(j===null&&4&W.flags&&ly(W.type,W.memoizedProps)&&C.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(W.memoizedState===null&&(W=W.alternate)!==null&&(W=W.memoizedState)!==null&&(W=W.dehydrated)!==null&&An(W))}var st;throw Error(i(163))}function sb(C,j){for(var W=C;;){if(W.tag===5){var it,ot=W.stateNode;j?typeof(ot=ot.style).setProperty=="function"?ot.setProperty("display","none","important"):ot.display="none":(ot=W.stateNode,it=(it=W.memoizedProps.style)!=null&&it.hasOwnProperty("display")?it.display:null,ot.style.display=Xt("display",it))}else if(W.tag===6)W.stateNode.nodeValue=j?"":W.memoizedProps;else if((W.tag!==23&&W.tag!==24||W.memoizedState===null||W===C)&&W.child!==null){W=(W.child.return=W).child;continue}if(W===C)break;for(;W.sibling===null;){if(W.return===null||W.return===C)return;W=W.return}W.sibling.return=W.return,W=W.sibling}}function lb(C,j){if(Ha&&typeof Ha.onCommitFiberUnmount=="function")try{Ha.onCommitFiberUnmount(cp,j)}catch{}switch(j.tag){case 0:case 11:case 14:case 15:case 22:if((C=j.updateQueue)!==null&&(C=C.lastEffect)!==null){var W=C=C.next;do{var it=(ot=W).destroy,ot=ot.tag;if(it!==void 0)if(4&ot)wb(j,W);else{ot=j;try{it()}catch(st){ia(ot,st)}}}while((W=W.next)!==C)}break;case 1:if(ab(j),typeof(C=j.stateNode).componentWillUnmount=="function")try{C.props=j.memoizedProps,C.state=j.memoizedState,C.componentWillUnmount()}catch(st){ia(j,st)}break;case 5:ab(j);break;case 4:fb(C,j)}}function cb(C){C.alternate=null,C.child=null,C.dependencies=null,C.firstEffect=null,C.lastEffect=null,C.memoizedProps=null,C.memoizedState=null,C.pendingProps=null,C.return=null,C.updateQueue=null}function ub(C){return C.tag===5||C.tag===3||C.tag===4}function db(C){t:{for(var j=C.return;j!==null;){if(ub(j))break t;j=j.return}throw Error(i(160))}var W=j;switch(j=W.stateNode,W.tag){case 5:var it=!1;break;case 3:case 4:j=j.containerInfo,it=!0;break;default:throw Error(i(161))}16&W.flags&&(dt(j,""),W.flags&=-17);t:e:for(W=C;;){for(;W.sibling===null;){if(W.return===null||ub(W.return)){W=null;break t}W=W.return}for(W.sibling.return=W.return,W=W.sibling;W.tag!==5&&W.tag!==6&&W.tag!==18;){if(2&W.flags||W.child===null||W.tag===4)continue e;W=(W.child.return=W).child}if(!(2&W.flags)){W=W.stateNode;break t}}(it?function ot(st,ut,_t){var mt=st.tag,Ht=mt===5||mt===6;if(Ht)st=Ht?st.stateNode:st.stateNode.instance,ut?(_t.nodeType===8?_t.parentNode:_t).insertBefore(st,ut):(_t.nodeType===8?(ut=_t.parentNode).insertBefore(st,_t):(ut=_t).appendChild(st),(_t=_t._reactRootContainer)==null&&ut.onclick===null&&(ut.onclick=Du));else if(mt!==4&&(st=st.child)!==null)for(ot(st,ut,_t),st=st.sibling;st!==null;)ot(st,ut,_t),st=st.sibling}:function ot(st,ut,_t){var mt=st.tag,Ht=mt===5||mt===6;if(Ht)st=Ht?st.stateNode:st.stateNode.instance,ut?_t.insertBefore(st,ut):_t.appendChild(st);else if(mt!==4&&(st=st.child)!==null)for(ot(st,ut,_t),st=st.sibling;st!==null;)ot(st,ut,_t),st=st.sibling})(C,W,j)}function fb(C,j){for(var W,it,ot=j,st=!1;;){if(!st){st=ot.return;t:for(;;){if(st===null)throw Error(i(160));switch(W=st.stateNode,st.tag){case 5:it=!1;break t;case 3:case 4:W=W.containerInfo,it=!0;break t}st=st.return}st=!0}if(ot.tag===5||ot.tag===6){t:for(var ut=C,_t=ot,mt=_t;;)if(lb(ut,mt),mt.child!==null&&mt.tag!==4)mt.child.return=mt,mt=mt.child;else{if(mt===_t)break;for(;mt.sibling===null;){if(mt.return===null||mt.return===_t)break t;mt=mt.return}mt.sibling.return=mt.return,mt=mt.sibling}it?(ut=W,_t=ot.stateNode,(ut.nodeType===8?ut.parentNode:ut).removeChild(_t)):W.removeChild(ot.stateNode)}else if(ot.tag===4){if(ot.child!==null){W=ot.stateNode.containerInfo,it=!0,ot=(ot.child.return=ot).child;continue}}else if(lb(C,ot),ot.child!==null){ot=(ot.child.return=ot).child;continue}if(ot===j)break;for(;ot.sibling===null;){if(ot.return===null||ot.return===j)return;(ot=ot.return).tag===4&&(st=!1)}ot.sibling.return=ot.return,ot=ot.sibling}}function Dp(C,j){switch(j.tag){case 0:case 11:case 14:case 15:case 22:var W=j.updateQueue;if((W=W!==null?W.lastEffect:null)!==null)for(var it=W=W.next;!(3&~it.tag)&&(C=it.destroy,(it.destroy=void 0)!==C&&C()),(it=it.next)!==W;);return;case 1:case 12:case 17:return;case 5:if((W=j.stateNode)!=null){it=j.memoizedProps;var ot=C!==null?C.memoizedProps:it,st=(C=j.type,j.updateQueue);if((j.updateQueue=null)!==st){for(W[Lu]=it,C==="input"&&it.type==="radio"&&it.name!=null&&ct(W,it),ee(C,ot),j=ee(C,it),ot=0;ot<st.length;ot+=2){var ut=st[ot],_t=st[ot+1];ut==="style"?Qt(W,_t):ut==="dangerouslySetInnerHTML"?ht(W,_t):ut==="children"?dt(W,_t):x(W,ut,_t,j)}switch(C){case"input":gt(W,it);break;case"textarea":jt(W,it);break;case"select":C=W._wrapperState.wasMultiple,W._wrapperState.wasMultiple=!!it.multiple,(st=it.value)!=null?Lt(W,!!it.multiple,st,!1):C!==!!it.multiple&&(it.defaultValue!=null?Lt(W,!!it.multiple,it.defaultValue,!0):Lt(W,!!it.multiple,it.multiple?[]:"",!1))}}}return;case 6:if(j.stateNode===null)throw Error(i(162));return void(j.stateNode.nodeValue=j.memoizedProps);case 3:return void((W=j.stateNode).hydrate&&(W.hydrate=!1,An(W.containerInfo)));case 13:return j.memoizedState!==null&&(Up=wr(),sb(j.child,!0)),void pb(j);case 19:return void pb(j);case 23:case 24:return void sb(j,j.memoizedState!==null)}throw Error(i(163))}function pb(C){var j,W=C.updateQueue;W!==null&&((C.updateQueue=null)===(j=C.stateNode)&&(j=C.stateNode=new u2),W.forEach(function(it){var ot=(function(st,ut){var _t=st.stateNode;_t!==null&&_t.delete(ut),(ut=0)===ut&&(2&(ut=st.mode)?4&ut?(ut=Br(62914560&~(ea=ea===0?tl:ea)))===0&&(ut=4194304):ut=Gs()===99?1:2:ut=1),_t=Kr(),(st=cd(st,ut))!==null&&(Oa(st,ut,_t),oo(st,_t))}).bind(null,C,it);j.has(it)||(j.add(it),it.then(ot,ot))}))}var f2=Math.ceil,rd=E.ReactCurrentDispatcher,Lp=E.ReactCurrentOwner,fn=0,Pr=null,sr=null,Sr=0,Ka=0,Bp=Ki(0),mr=0,od=null,tl=0,pc=0,el=0,Fp=0,zp=null,Up=0,$p=1/0;function nl(){$p=wr()+500}var hb,Ye=null,id=!1,Hp=null,$o=null,ta=!1,hc=null,gc=90,qp=[],Jp=[],gi=null,mc=0,Wp=null,ad=-1,ea=0,sd=0,yc=null,ld=!1;function Kr(){return 48&fn?wr():ad!==-1?ad:ad=wr()}function na(C){return 2&(C=C.mode)?4&C?(ea===0&&(ea=tl),e2.transition!==0?(sd!==0&&(sd=zp!==null?zp.pendingLanes:0),C=ea,j=4186112&~sd,(j&=-j)!=0||(j=(C=4186112&~C)&-C)==0&&(j=8192),j):(C=Gs(),eo(4&fn&&C===98?12:C=function(W){switch(W){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(C),ea))):Gs()===99?1:2:1;var j}function ra(C,j,W){if(50<mc)throw mc=0,Wp=null,Error(i(185));var it;(C=cd(C,j))!==null&&(Oa(C,j,W),C===Pr&&(el|=j,mr===4&&rl(C,Sr)),it=Gs(),j===1?8&fn&&!(48&fn)?Vp(C):(oo(C,W),fn===0&&(nl(),Bo())):(!(4&fn)||it!==98&&it!==99||(gi===null?gi=new Set([C]):gi.add(C)),oo(C,W)),zp=C)}function cd(C,j){C.lanes|=j;var W=C.alternate;for(W!==null&&(W.lanes|=j),C=(W=C).return;C!==null;)C.childLanes|=j,(W=C.alternate)!==null&&(W.childLanes|=j),C=(W=C).return;return W.tag===3?W.stateNode:null}function oo(C,j){for(var W=C.callbackNode,it=C.suspendedLanes,ot=C.pingedLanes,st=C.expirationTimes,ut=C.pendingLanes;0<ut;){var _t,mt=31-yo(ut),Ht=1<<mt,ie=st[mt];ie===-1?Ht&it&&!(Ht&ot)||(ie=j,In(Ht),_t=gn,st[mt]=10<=_t?ie+250:6<=_t?ie+5e3:-1):ie<=j&&(C.expiredLanes|=Ht),ut&=~Ht}if(it=Ao(C,C===Pr?Sr:0),j=gn,it===0)W!==null&&(W!==pp&&dp(W),C.callbackNode=null,C.callbackPriority=0);else{if(W!==null){if(C.callbackPriority===j)return;W!==pp&&dp(W)}W=j===15?(W=Vp.bind(null,C),fi===null?(fi=[W],Uu=up(zu,wy)):fi.push(W),pp):j===14?tc(99,Vp.bind(null,C)):tc(W=function(ue){switch(ue){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(i(358,ue))}}(j),gb.bind(null,C)),C.callbackPriority=j,C.callbackNode=W}}function gb(C){if(ad=-1,(sd=ea=0)!=(48&fn))throw Error(i(327));var j=C.callbackNode;if(oa()&&C.callbackNode!==j)return null;var W=Ao(C,C===Pr?Sr:0);if(W===0)return null;var it=W,ot=fn,st=(fn|=16,vb());for(Pr===C&&Sr===it||(nl(),ol(C,it));;)try{for(;sr!==null&&!QS();)_b(sr);break}catch(_t){bb(C,_t)}if(gp(),rd.current=st,fn=ot,it=sr!==null?0:(Pr=null,Sr=0,mr),tl&el)ol(C,0);else if(it!==0){if(it===2&&(fn|=64,C.hydrate&&(C.hydrate=!1,ip(C.containerInfo)),(W=jr(C))!==0&&(it=bc(C,W))),it===1)throw j=od,ol(C,0),rl(C,W),oo(C,wr()),j;switch(C.finishedWork=C.current.alternate,C.finishedLanes=W,it){case 0:case 1:throw Error(i(345));case 2:case 5:il(C);break;case 3:if(rl(C,W),(62914560&W)===W&&10<(it=Up+500-wr())){if(Ao(C,0)!==0)break;if(((ot=C.suspendedLanes)&W)!==W){Kr(),C.pingedLanes|=C.suspendedLanes&ot;break}C.timeoutHandle=cy(il.bind(null,C),it);break}il(C);break;case 4:if(rl(C,W),(4186112&W)===W)break;for(it=C.eventTimes,ot=-1;0<W;){var ut=31-yo(W);st=1<<ut,ot<(ut=it[ut])&&(ot=ut),W&=~st}if(W=ot,10<(W=((W=wr()-W)<120?120:W<480?480:W<1080?1080:W<1920?1920:W<3e3?3e3:W<4320?4320:1960*f2(W/1960))-W)){C.timeoutHandle=cy(il.bind(null,C),W);break}il(C);break;default:throw Error(i(329))}}return oo(C,wr()),C.callbackNode===j?gb.bind(null,C):null}function rl(C,j){for(j=j&~Fp&~el,C.suspendedLanes|=j,C.pingedLanes&=~j,C=C.expirationTimes;0<j;){var W=31-yo(j),it=1<<W;C[W]=-1,j&=~it}}function Vp(C){if(48&fn)throw Error(i(327));var j,W;if(oa(),C===Pr&&C.expiredLanes&Sr?(W=bc(C,j=Sr),tl&el&&(W=bc(C,j=Ao(C,j)))):W=bc(C,j=Ao(C,0)),C.tag!==0&&W===2&&(fn|=64,C.hydrate&&(C.hydrate=!1,ip(C.containerInfo)),(j=jr(C))!==0&&(W=bc(C,j))),W===1)throw W=od,ol(C,0),rl(C,j),oo(C,wr()),W;return C.finishedWork=C.current.alternate,C.finishedLanes=j,il(C),oo(C,wr()),null}function mb(C,j){var W=fn;fn|=1;try{return C(j)}finally{(fn=W)===0&&(nl(),Bo())}}function yb(C,j){var W=fn;fn=-2&fn|8;try{C(j)}finally{(fn=W)===0&&(nl(),Bo())}}function ud(C,j){Wn(Bp,Ka),Ka|=j,tl|=j}function Kp(){Ka=Bp.current,Bn(Bp)}function ol(C,j){C.finishedWork=null,C.finishedLanes=0;var W=C.timeoutHandle;if(W!==-1&&(C.timeoutHandle=-1,YS(W)),sr!==null)for(W=sr.return;W!==null;){var it=W;switch(it.tag){case 1:(it=it.type.childContextTypes)!=null&&lp();break;case 3:Qs(),Bn(Fr),Bn(xr),Sp();break;case 5:_p(it);break;case 4:Qs();break;case 13:case 19:Bn(Kn);break;case 10:mp(it);break;case 23:case 24:Kp()}W=W.return}sr=aa((Pr=C).current,null),Sr=Ka=tl=j,od=null,Fp=el=pc=mr=0}function bb(C,j){for(;;){var W=sr;try{if(gp(),ac.current=nd,Qu){for(var it=Gn.memoizedState;it!==null;){var ot=it.queue;ot!==null&&(ot.pending=null),it=it.next}Qu=!1}if(sc=0,gr=Nr=Gn=null,lc=!1,(Lp.current=null)===W||W.return===null){mr=1,od=j,sr=null;break}t:{var st=C,ut=W.return,_t=j;if(j=Sr,(Ze=W).flags|=2048,(Ze.firstEffect=Ze.lastEffect=null)!==_t&&typeof _t=="object"&&typeof _t.then=="function"){var mt,Ht,ie,ue,Me=_t,mn=(!(2&Ze.mode)&&((mt=Ze.alternate)?(Ze.updateQueue=mt.updateQueue,Ze.memoizedState=mt.memoizedState,Ze.lanes=mt.lanes):(Ze.updateQueue=null,Ze.memoizedState=null)),!!(1&Kn.current)),Kt=ut;do if(ue=(ue=Kt.tag===13)?(Ht=Kt.memoizedState)!==null?Ht.dehydrated!==null:(ie=Kt.memoizedProps).fallback!==void 0&&(ie.unstable_avoidThisFallback!==!0||!mn):ue){var re,ge,De=Kt.updateQueue;if(De===null?((re=new Set).add(Me),Kt.updateQueue=re):De.add(Me),!(2&Kt.mode)){Kt.flags|=64,Ze.flags|=16384,Ze.flags&=-2981,Ze.tag===1&&(Ze.alternate===null?Ze.tag=17:((ge=Zi(-1,1)).tag=2,Qi(Ze,ge))),Ze.lanes|=1;break t}_t=void 0;var Re,Ze=j,ln=st.pingCache;ln===null?(ln=st.pingCache=new c2,_t=new Set,ln.set(Me,_t)):(_t=ln.get(Me))===void 0&&(_t=new Set,ln.set(Me,_t)),_t.has(Ze)||(_t.add(Ze),Re=h2.bind(null,st,Me,Ze),Me.then(Re,Re)),Kt.flags|=4096,Kt.lanes=j;break t}while((Kt=Kt.return)!==null);_t=Error((Y(Ze.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
110
110
|
|
|
111
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}mr!==5&&(mr=2),_t=Mp(_t,Ze),Kt=ut;do switch(Kt.tag){case 3:st=_t,Kt.flags|=4096,j&=-j,Kt.lanes|=j,Ey(Kt,ob(0,st,j));break t;case 1:st=_t;var Xe=Kt.type,Qe=Kt.stateNode;if(!(64&Kt.flags||typeof Xe.getDerivedStateFromError!="function"&&(Qe===null||typeof Qe.componentDidCatch!="function"||$o!==null&&$o.has(Qe)))){Kt.flags|=4096,j&=-j,Kt.lanes|=j,Ey(Kt,ib(Kt,st,j));break t}}while((Kt=Kt.return)!==null)}xb(W)}catch(xn){j=xn,sr===W&&W!==null&&(sr=W=W.return);continue}break}}function vb(){var C=rd.current;return rd.current=nd,C===null?nd:C}function bc(C,j){var W=fn,it=(fn|=16,vb());for(Pr===C&&Sr===j||ol(C,j);;)try{for(;sr!==null;)_b(sr);break}catch(ot){bb(C,ot)}if(mp(),fn=W,rd.current=it,sr!==null)throw Error(i(261));return Pr=null,Sr=0,mr}function _b(C){var j=hb(C.alternate,C,Ka);C.memoizedProps=C.pendingProps,j===null?xb(C):sr=j,Bp.current=null}function xb(C){var j=C;do{var W=j.alternate;if(C=j.return,2048&j.flags){if((W=function(st){switch(st.tag){case 1:Wr(st.type)&&cp();var ut=st.flags;return 4096&ut?(st.flags=-4097&ut|64,st):null;case 3:if(Qs(),Bn(Fr),Bn(xr),Cp(),64&(ut=st.flags))throw Error(i(285));return st.flags=-4097&ut|64,st;case 5:return xp(st),null;case 13:return Bn(Kn),4096&(ut=st.flags)?(st.flags=-4097&ut|64,st):null;case 19:return Bn(Kn),null;case 4:return Qs(),null;case 10:return yp(st),null;case 23:case 24:return Gp(),null;default:return null}}(j))!==null)return W.flags&=2047,void(sr=W);C!==null&&(C.firstEffect=C.lastEffect=null,C.flags|=2048)}else{if((W=function(st,ut,_t){var mt=ut.pendingProps;switch(ut.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return Wr(ut.type)&&cp(),null;case 3:return Qs(),Bn(Fr),Bn(xr),Cp(),(mt=ut.stateNode).pendingContext&&(mt.context=mt.pendingContext,mt.pendingContext=null),st!==null&&st.child!==null||(Zu(ut)?ut.flags|=4:mt.hydrate||(ut.flags|=256)),null;case 5:xp(ut);var Ht=Ja(ic.current);if(_t=ut.type,st!==null&&ut.stateNode!=null)l2(st,ut,_t,mt),st.ref!==ut.ref&&(ut.flags|=128);else{if(!mt){if(ut.stateNode===null)throw Error(i(166));return null}if(st=Ja(Fo.current),Zu(ut)){mt=ut.stateNode,_t=ut.type;var ie,ue=ut.memoizedProps;switch(mt[Vi]=ut,mt[Lu]=ue,_t){case"dialog":Rn("cancel",mt),Rn("close",mt);break;case"iframe":case"object":case"embed":Rn("load",mt);break;case"video":case"audio":for(st=0;st<Yl.length;st++)Rn(Yl[st],mt);break;case"source":Rn("error",mt);break;case"img":case"image":case"link":Rn("error",mt),Rn("load",mt);break;case"details":Rn("toggle",mt);break;case"input":at(mt,ue),Rn("invalid",mt);break;case"select":mt._wrapperState={wasMultiple:!!ue.multiple},Rn("invalid",mt);break;case"textarea":yt(mt,ue),Rn("invalid",mt)}for(ie in kt(_t,ue),st=null,ue)ue.hasOwnProperty(ie)&&(Ht=ue[ie],ie==="children"?typeof Ht=="string"?mt.textContent!==Ht&&(st=["children",Ht]):typeof Ht=="number"&&mt.textContent!==""+Ht&&(st=["children",""+Ht]):o.hasOwnProperty(ie)&&Ht!=null&&ie==="onScroll"&&Rn("scroll",mt));switch(_t){case"input":Q(mt),wt(mt,ue,!0);break;case"textarea":Q(mt),At(mt);break;case"select":case"option":break;default:typeof ue.onClick=="function"&&(mt.onclick=Du)}mt=st,(ut.updateQueue=mt)!==null&&(ut.flags|=4)}else{switch(ie=Ht.nodeType===9?Ht:Ht.ownerDocument,(st=st===It?Ot(_t):st)===It?_t==="script"?((st=ie.createElement("div")).innerHTML="<script><\/script>",st=st.removeChild(st.firstChild)):typeof mt.is=="string"?st=ie.createElement(_t,{is:mt.is}):(st=ie.createElement(_t),_t==="select"&&(ie=st,mt.multiple?ie.multiple=!0:mt.size&&(ie.size=mt.size))):st=ie.createElementNS(st,_t),st[Vi]=ut,st[Lu]=mt,s2(st,ut),ut.stateNode=st,ie=ee(_t,mt),_t){case"dialog":Rn("cancel",st),Rn("close",st),Ht=mt;break;case"iframe":case"object":case"embed":Rn("load",st),Ht=mt;break;case"video":case"audio":for(Ht=0;Ht<Yl.length;Ht++)Rn(Yl[Ht],st);Ht=mt;break;case"source":Rn("error",st),Ht=mt;break;case"img":case"image":case"link":Rn("error",st),Rn("load",st),Ht=mt;break;case"details":Rn("toggle",st),Ht=mt;break;case"input":at(st,mt),Ht=et(st,mt),Rn("invalid",st);break;case"option":Ht=Mt(st,mt);break;case"select":st._wrapperState={wasMultiple:!!mt.multiple},Ht=e({},mt,{value:void 0}),Rn("invalid",st);break;case"textarea":yt(st,mt),Ht=Pt(st,mt),Rn("invalid",st);break;default:Ht=mt}kt(_t,Ht);var Me,mn=Ht;for(ue in mn)mn.hasOwnProperty(ue)&&(Me=mn[ue],ue==="style"?Qt(st,Me):ue==="dangerouslySetInnerHTML"?(Me=Me?Me.__html:void 0)!=null&&ht(st,Me):ue==="children"?typeof Me=="string"?_t==="textarea"&&Me===""||dt(st,Me):typeof Me=="number"&&dt(st,""+Me):ue!=="suppressContentEditableWarning"&&ue!=="suppressHydrationWarning"&&ue!=="autoFocus"&&(o.hasOwnProperty(ue)?Me!=null&&ue==="onScroll"&&Rn("scroll",st):Me!=null&&x(st,ue,Me,ie)));switch(_t){case"input":Q(st),wt(st,mt,!1);break;case"textarea":Q(st),At(st);break;case"option":mt.value!=null&&st.setAttribute("value",""+Z(mt.value));break;case"select":st.multiple=!!mt.multiple,(ue=mt.value)!=null?Lt(st,!!mt.multiple,ue,!1):mt.defaultValue!=null&&Lt(st,!!mt.multiple,mt.defaultValue,!0);break;default:typeof Ht.onClick=="function"&&(st.onclick=Du)}ly(_t,mt)&&(ut.flags|=4)}ut.ref!==null&&(ut.flags|=128)}return null;case 6:if(st&&ut.stateNode!=null)c2(0,ut,st.memoizedProps,mt);else{if(typeof mt!="string"&&ut.stateNode===null)throw Error(i(166));_t=Ja(ic.current),Ja(Fo.current),Zu(ut)?(mt=ut.stateNode,_t=ut.memoizedProps,mt[Vi]=ut,mt.nodeValue!==_t&&(ut.flags|=4)):((mt=(_t.nodeType===9?_t:_t.ownerDocument).createTextNode(mt))[Vi]=ut).stateNode=mt}return null;case 13:return Bn(Kn),mt=ut.memoizedState,64&ut.flags?(ut.lanes=_t,ut):(mt=mt!==null,_t=!1,st===null?ut.memoizedProps.fallback!==void 0&&Zu(ut):_t=st.memoizedState!==null,mt&&!_t&&2&ut.mode&&(st===null&&ut.memoizedProps.unstable_avoidThisFallback!==!0||1&Kn.current?mr===0&&(mr=3):(mr!==0&&mr!==3||(mr=4),Pr===null||!(134217727&pc)&&!(134217727&el)||rl(Pr,Sr))),(mt||_t)&&(ut.flags|=4),null);case 4:return Qs(),st===null&&ry(ut.stateNode.containerInfo),null;case 10:return yp(ut),null;case 19:if(Bn(Kn),(mt=ut.memoizedState)===null)return null;if(ue=!!(64&ut.flags),(ie=mt.rendering)===null)if(ue)fc(mt,!1);else{if(mr!==0||st!==null&&64&st.flags)for(st=ut.child;st!==null;){if((ie=Yu(st))!==null){for(ut.flags|=64,fc(mt,!1),(ue=ie.updateQueue)!==null&&(ut.updateQueue=ue,ut.flags|=4),mt.lastEffect===null&&(ut.firstEffect=null),ut.lastEffect=mt.lastEffect,mt=_t,_t=ut.child;_t!==null;)st=mt,(ue=_t).flags&=2,ue.nextEffect=null,ue.firstEffect=null,(ue.lastEffect=null)===(ie=ue.alternate)?(ue.childLanes=0,ue.lanes=st,ue.child=null,ue.memoizedProps=null,ue.memoizedState=null,ue.updateQueue=null,ue.dependencies=null,ue.stateNode=null):(ue.childLanes=ie.childLanes,ue.lanes=ie.lanes,ue.child=ie.child,ue.memoizedProps=ie.memoizedProps,ue.memoizedState=ie.memoizedState,ue.updateQueue=ie.updateQueue,ue.type=ie.type,st=ie.dependencies,ue.dependencies=st===null?null:{lanes:st.lanes,firstContext:st.firstContext}),_t=_t.sibling;return Wn(Kn,1&Kn.current|2),ut.child}st=st.sibling}mt.tail!==null&&wr()>Hp&&(ut.flags|=64,fc(mt,!(ue=!0)),ut.lanes=33554432)}else{if(!ue)if((st=Yu(ie))!==null){if(ut.flags|=64,ue=!0,(_t=st.updateQueue)!==null&&(ut.updateQueue=_t,ut.flags|=4),fc(mt,!0),mt.tail===null&&mt.tailMode==="hidden"&&!ie.alternate&&!zo)return(ut=ut.lastEffect=mt.lastEffect)!==null&&(ut.nextEffect=null),null}else 2*wr()-mt.renderingStartTime>Hp&&_t!==1073741824&&(ut.flags|=64,fc(mt,!(ue=!0)),ut.lanes=33554432);mt.isBackwards?(ie.sibling=ut.child,ut.child=ie):((_t=mt.last)!==null?_t.sibling=ie:ut.child=ie,mt.last=ie)}return mt.tail!==null?(_t=mt.tail,mt.rendering=_t,mt.tail=_t.sibling,mt.lastEffect=ut.lastEffect,mt.renderingStartTime=wr(),_t.sibling=null,ut=Kn.current,Wn(Kn,ue?1&ut|2:1&ut),_t):null;case 23:case 24:return Gp(),st!==null&&st.memoizedState!==null!=(ut.memoizedState!==null)&&mt.mode!=="unstable-defer-without-hiding"&&(ut.flags|=4),null}throw Error(i(156,ut.tag))}(W,j,Ka))!==null)return void(sr=W);if((W=j).tag!==24&&W.tag!==23||W.memoizedState===null||1073741824&Ka||!(4&W.mode)){for(var it=0,ot=W.child;ot!==null;)it|=ot.lanes|ot.childLanes,ot=ot.sibling;W.childLanes=it}C!==null&&!(2048&C.flags)&&(C.firstEffect===null&&(C.firstEffect=j.firstEffect),j.lastEffect!==null&&(C.lastEffect!==null&&(C.lastEffect.nextEffect=j.firstEffect),C.lastEffect=j.lastEffect),1<j.flags&&(C.lastEffect!==null?C.lastEffect.nextEffect=j:C.firstEffect=j,C.lastEffect=j))}if((j=j.sibling)!==null)return void(sr=j)}while(sr=j=C,j!==null);mr===0&&(mr=5)}function il(C){var j=Gs();return qa(99,(function(W,it){for(;oa(),hc!==null;);if(48&fn)throw Error(i(327));var ot=W.finishedWork;if(ot===null)return null;if(W.finishedWork=null,W.finishedLanes=0,ot===W.current)throw Error(i(177));W.callbackNode=null;var st=ot.lanes|ot.childLanes,ut=st,_t=W.pendingLanes&~ut;W.pendingLanes=ut,W.suspendedLanes=0,W.pingedLanes=0,W.expiredLanes&=ut,W.mutableReadLanes&=ut,W.entangledLanes&=ut,ut=W.entanglements;for(var mt,Ht=W.eventTimes,ie=W.expirationTimes;0<_t;){var ue=31-yo(_t),Me=1<<ue;ut[ue]=0,Ht[ue]=-1,ie[ue]=-1,_t&=~Me}if(gi!==null&&!(24&st)&&gi.has(W)&&gi.delete(W),W===Pr&&(sr=Pr=null,Sr=0),(st=1<ot.flags?ot.lastEffect!==null?(ot.lastEffect.nextEffect=ot,ot.firstEffect):ot:ot.firstEffect)!==null){if(ut=fn,fn|=32,Bp.current=null,rp=Jr,Xf(Ht=Y0())){if("selectionStart"in Ht)ie={start:Ht.selectionStart,end:Ht.selectionEnd};else t:if(ie=(ie=Ht.ownerDocument)&&ie.defaultView||window,(Me=ie.getSelection&&ie.getSelection())&&Me.rangeCount!==0){ie=Me.anchorNode,_t=Me.anchorOffset,ue=Me.focusNode,Me=Me.focusOffset;try{ie.nodeType,ue.nodeType}catch{ie=null;break t}var mn=0,Kt=-1,re=-1,ge=0,De=0,Re=Ht,Ze=null;e:for(;;){for(;Re!==ie||_t!==0&&Re.nodeType!==3||(Kt=mn+_t),Re!==ue||Me!==0&&Re.nodeType!==3||(re=mn+Me),Re.nodeType===3&&(mn+=Re.nodeValue.length),(mt=Re.firstChild)!==null;)Ze=Re,Re=mt;for(;;){if(Re===Ht)break e;if(Ze===ie&&++ge===_t&&(Kt=mn),Ze===ue&&++De===Me&&(re=mn),(mt=Re.nextSibling)!==null)break;Ze=(Re=Ze).parentNode}Re=mt}ie=Kt===-1||re===-1?null:{start:Kt,end:re}}else ie=null;ie=ie||{start:0,end:0}}else ie=null;yc=null,ld=Jr=!(op={focusedElem:Ht,selectionRange:ie}),Ye=st;do try{(function(){for(;Ye!==null;){var yn=Ye.alternate,dn=(ld||yc===null||(8&Ye.flags?pt(Ye,yc)&&(ld=!0):Ye.tag===13&&function(Mn,Vn){return Mn!==null&&((Mn=Mn.memoizedState)===null||Mn.dehydrated!==null)&&(Vn=Vn.memoizedState)!==null&&Vn.dehydrated===null}(yn,Ye)&&pt(Ye,yc)&&(ld=!0)),Ye.flags);256&dn&&function(Mn,Vn){switch(Vn.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:var ao,Ho;return 256&Vn.flags&&Mn!==null&&(ao=Mn.memoizedProps,Ho=Mn.memoizedState,Vn=(Mn=Vn.stateNode).getSnapshotBeforeUpdate(Vn.elementType===Vn.type?ao:_o(Vn.type,ao),Ho),Mn.__reactInternalSnapshotBeforeUpdate=Vn);case 3:return 256&Vn.flags&&ap(Vn.stateNode.containerInfo)}throw Error(i(163))}(yn,Ye),!(512&dn)||ta||(ta=!0,tc(97,function(){return oa(),null})),Ye=Ye.nextEffect}})()}catch(yn){if(Ye===null)throw Error(i(330));ia(Ye,yn),Ye=Ye.nextEffect}while(Ye!==null);yc=null,Ye=st;do try{for(Ht=W;Ye!==null;){var ln,Xe,Qe=Ye.flags;switch(16&Qe&&dt(Ye.stateNode,""),128&Qe&&(ln=Ye.alternate)!==null&&(Xe=ln.ref)!==null&&(typeof Xe=="function"?Xe(null):Xe.current=null),1038&Qe){case 2:db(Ye),Ye.flags&=-3;break;case 6:db(Ye),Ye.flags&=-3,Lp(Ye.alternate,Ye);break;case 1024:Ye.flags&=-1025;break;case 1028:Ye.flags&=-1025,Lp(Ye.alternate,Ye);break;case 4:Lp(Ye.alternate,Ye);break;case 8:fb(Ht,ie=Ye);var xn=ie.alternate;cb(ie),xn!==null&&cb(xn)}Ye=Ye.nextEffect}}catch(yn){if(Ye===null)throw Error(i(330));ia(Ye,yn),Ye=Ye.nextEffect}while(Ye!==null);if(Xe=op,ln=Y0(),Qe=Xe.focusedElem,Ht=Xe.selectionRange,ln!==Qe&&Qe&&Qe.ownerDocument&&function yn(dn,Mn){return!(!dn||!Mn)&&(dn===Mn||(!dn||dn.nodeType!==3)&&(Mn&&Mn.nodeType===3?yn(dn,Mn.parentNode):"contains"in dn?dn.contains(Mn):!!dn.compareDocumentPosition&&!!(16&dn.compareDocumentPosition(Mn))))}(Qe.ownerDocument.documentElement,Qe)){for(Ht!==null&&Xf(Qe)&&(ln=Ht.start,(Xe=Ht.end)===void 0&&(Xe=ln),"selectionStart"in Qe?(Qe.selectionStart=ln,Qe.selectionEnd=Math.min(Xe,Qe.value.length)):(Xe=(ln=Qe.ownerDocument||document)&&ln.defaultView||window).getSelection&&(Xe=Xe.getSelection(),ie=Qe.textContent.length,xn=Math.min(Ht.start,ie),Ht=Ht.end===void 0?xn:Math.min(Ht.end,ie),!Xe.extend&&Ht<xn&&(ie=Ht,Ht=xn,xn=ie),ie=G0(Qe,xn),_t=G0(Qe,Ht),ie&&_t&&(Xe.rangeCount!==1||Xe.anchorNode!==ie.node||Xe.anchorOffset!==ie.offset||Xe.focusNode!==_t.node||Xe.focusOffset!==_t.offset)&&((ln=ln.createRange()).setStart(ie.node,ie.offset),Xe.removeAllRanges(),Ht<xn?(Xe.addRange(ln),Xe.extend(_t.node,_t.offset)):(ln.setEnd(_t.node,_t.offset),Xe.addRange(ln))))),ln=[],Xe=Qe;Xe=Xe.parentNode;)Xe.nodeType===1&&ln.push({element:Xe,left:Xe.scrollLeft,top:Xe.scrollTop});for(typeof Qe.focus=="function"&&Qe.focus(),Qe=0;Qe<ln.length;Qe++)(Xe=ln[Qe]).element.scrollLeft=Xe.left,Xe.element.scrollTop=Xe.top}Jr=!!rp,op=rp=null,W.current=ot,Ye=st;do try{for(Qe=W;Ye!==null;){var kn,jn,pn=Ye.flags;36&pn&&f2(Qe,Ye.alternate,Ye),128&pn&&(ln=void 0,(kn=Ye.ref)!==null&&(jn=Ye.stateNode,Ye.tag,ln=jn,typeof kn=="function"?kn(ln):kn.current=ln)),Ye=Ye.nextEffect}}catch(yn){if(Ye===null)throw Error(i(330));ia(Ye,yn),Ye=Ye.nextEffect}while(Ye!==null);Ye=null,e2(),fn=ut}else W.current=ot;if(ta)ta=!1,hc=W,gc=it;else for(Ye=st;Ye!==null;)it=Ye.nextEffect,Ye.nextEffect=null,8&Ye.flags&&((pn=Ye).sibling=null,pn.stateNode=null),Ye=it;if((st=W.pendingLanes)===0&&($o=null),st===1?W===Vp?mc++:(mc=0,Vp=W):mc=0,ot=ot.stateNode,Ha&&typeof Ha.onCommitFiberRoot=="function")try{Ha.onCommitFiberRoot(up,ot,void 0,!(64&~ot.current.flags))}catch{}if(oo(W,wr()),id)throw id=!1,W=qp,qp=null,W;return 8&fn||Bo(),null}).bind(null,C,j)),null}function oa(){var C;return gc!==90&&(C=97<gc?97:gc,gc=90,qa(C,h2))}function wb(C,j){Wp.push(j,C),ta||(ta=!0,tc(97,function(){return oa(),null}))}function h2(){if(hc===null)return!1;var C=hc;if(hc=null,48&fn)throw Error(i(331));var j=fn,W=(fn|=32,Wp);Wp=[];for(var it=0;it<W.length;it+=2){var ot=W[it],st=W[it+1],ut=ot.destroy;if(ot.destroy=void 0,typeof ut=="function")try{ut()}catch(mt){if(st===null)throw Error(i(330));ia(st,mt)}}for(W=Jp,Jp=[],it=0;it<W.length;it+=2){ot=W[it],st=W[it+1];try{var _t=ot.create;ot.destroy=_t()}catch(mt){if(st===null)throw Error(i(330));ia(st,mt)}}for(_t=C.current.firstEffect;_t!==null;)C=_t.nextEffect,_t.nextEffect=null,8&_t.flags&&(_t.sibling=null,_t.stateNode=null),_t=C;return fn=j,Bo(),!0}function Sb(C,j,W){Qi(C,j=ob(0,j=Mp(W,j),1)),j=Kr(),(C=cd(C,1))!==null&&(Oa(C,1,j),oo(C,j))}function ia(C,j){if(C.tag===3)Sb(C,C,j);else for(var W=C.return;W!==null;){if(W.tag===3){Sb(W,C,j);break}if(W.tag===1){var it,ot=W.stateNode;if(typeof W.type.getDerivedStateFromError=="function"||typeof ot.componentDidCatch=="function"&&($o===null||!$o.has(ot))){if(Qi(W,ib(W,C=Mp(j,C),1)),it=Kr(),(W=cd(W,1))!==null)Oa(W,1,it),oo(W,it);else if(typeof ot.componentDidCatch=="function"&&($o===null||!$o.has(ot)))try{ot.componentDidCatch(j,C)}catch{}break}}W=W.return}}function g2(C,j,W){var it=C.pingCache;it!==null&&it.delete(j),j=Kr(),C.pingedLanes|=C.suspendedLanes&W,Pr===C&&(Sr&W)===W&&(mr===4||mr===3&&(62914560&Sr)===Sr&&wr()-$p<500?ol(C,0):zp|=W),oo(C,j)}function m2(C,j,W,it){this.tag=C,this.key=W,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=j,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=it,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function io(C,j,W,it){return new m2(C,j,W,it)}function Yp(C){return(C=C.prototype)&&C.isReactComponent}function aa(C,j){var W=C.alternate;return W===null?((W=io(C.tag,j,C.key,C.mode)).elementType=C.elementType,W.type=C.type,W.stateNode=C.stateNode,(W.alternate=C).alternate=W):(W.pendingProps=j,W.type=C.type,W.flags=0,W.nextEffect=null,W.firstEffect=null,W.lastEffect=null),W.childLanes=C.childLanes,W.lanes=C.lanes,W.child=C.child,W.memoizedProps=C.memoizedProps,W.memoizedState=C.memoizedState,W.updateQueue=C.updateQueue,j=C.dependencies,W.dependencies=j===null?null:{lanes:j.lanes,firstContext:j.firstContext},W.sibling=C.sibling,W.index=C.index,W.ref=C.ref,W}function dd(C,j,W,it,ot,st){var ut=2;if(typeof(it=C)=="function")Yp(C)&&(ut=1);else if(typeof C=="string")ut=5;else t:switch(C){case N:return al(W.children,ot,st,j);case V:ut=8,ot|=16;break;case O:ut=8,ot|=1;break;case R:return(C=io(12,W,j,8|ot)).elementType=R,C.type=R,C.lanes=st,C;case $:return(C=io(13,W,j,ot)).type=$,C.elementType=$,C.lanes=st,C;case M:return(C=io(19,W,j,ot)).elementType=M,C.lanes=st,C;case G:return Zp(W,ot,st,j);case F:return(C=io(24,W,j,ot)).elementType=F,C.lanes=st,C;default:if(typeof C=="object"&&C!==null)switch(C.$$typeof){case A:ut=10;break t;case z:ut=9;break t;case H:ut=11;break t;case J:ut=14;break t;case K:ut=16,it=null;break t;case P:ut=22;break t}throw Error(i(130,C==null?C:typeof C,""))}return(j=io(ut,W,j,ot)).elementType=C,j.type=it,j.lanes=st,j}function al(C,j,W,it){return(C=io(7,C,it,j)).lanes=W,C}function Zp(C,j,W,it){return(C=io(23,C,it,j)).elementType=G,C.lanes=W,C}function Qp(C,j,W){return(C=io(6,C,null,j)).lanes=W,C}function Xp(C,j,W){return(j=io(4,C.children!==null?C.children:[],C.key,j)).lanes=W,j.stateNode={containerInfo:C.containerInfo,pendingChildren:null,implementation:C.implementation},j}function y2(C,j,W){this.tag=j,this.containerInfo=C,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=W,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=_r(0),this.expirationTimes=_r(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_r(0),this.mutableSourceEagerHydrationData=null}function fd(C,j,W,it){var ot=j.current,st=Kr(),ut=na(ot);t:if(W){e:{if(Te(W=W._reactInternals)!==W||W.tag!==1)throw Error(i(170));var _t=W;do switch(_t.tag){case 3:_t=_t.stateNode.context;break e;case 1:if(Wr(_t.type)){_t=_t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}while((_t=_t.return)!==null);throw Error(i(171))}if(W.tag===1){var mt=W.type;if(Wr(mt)){W=hy(W,mt,_t);break t}}W=_t}else W=Gi;j.context===null?j.context=W:j.pendingContext=W,(j=Zi(st,ut)).payload={element:C},(it=it===void 0?null:it)!==null&&(j.callback=it),Qi(ot,j),ra(ot,ut,st)}function th(C){return(C=C.current).child?(C.child.tag,C.child.stateNode):null}function Cb(C,j){var W;(C=C.memoizedState)!==null&&C.dehydrated!==null&&(W=C.retryLane,C.retryLane=W!==0&&W<j?W:j)}function eh(C,j){Cb(C,j),(C=C.alternate)&&Cb(C,j)}function nh(C,j,W){var it=W!=null&&W.hydrationOptions!=null&&W.hydrationOptions.mutableSources||null;if(W=new y2(C,j,W!=null&&W.hydrate===!0),j=io(3,null,null,j===2?7:j===1?3:0),(W.current=j).stateNode=W,bp(j),C[Ws]=W.current,ry(C.nodeType===8?C.parentNode:C),it)for(C=0;C<it.length;C++){var ot=(ot=(j=it[C])._getVersion)(j._source);W.mutableSourceEagerHydrationData==null?W.mutableSourceEagerHydrationData=[j,ot]:W.mutableSourceEagerHydrationData.push(j,ot)}this._internalRoot=W}function vc(C){return C&&(C.nodeType===1||C.nodeType===9||C.nodeType===11||C.nodeType===8&&C.nodeValue===" react-mount-point-unstable ")}function pd(C,j,W,it,ot){var st,ut,_t,mt=W._reactRootContainer;return mt?(_t=mt._internalRoot,typeof ot=="function"&&(st=ot,ot=function(){var Ht=th(_t);st.call(Ht)}),fd(j,_t,C,ot)):(_t=(mt=W._reactRootContainer=function(Ht,ie){if(!(ie=ie||!(!(ie=Ht?Ht.nodeType===9?Ht.documentElement:Ht.firstChild:null)||ie.nodeType!==1||!ie.hasAttribute("data-reactroot"))))for(var ue;ue=Ht.lastChild;)Ht.removeChild(ue);return new nh(Ht,0,ie?{hydrate:!0}:void 0)}(W,it))._internalRoot,typeof ot=="function"&&(ut=ot,ot=function(){var Ht=th(_t);ut.call(Ht)}),yb(function(){fd(j,_t,C,ot)})),th(_t)}function Eb(C,j){if(vc(j))return function(W,it,ot,st){return{$$typeof:D,key:(st=3<arguments.length&&st!==void 0?st:null)==null?null:""+st,children:W,containerInfo:it,implementation:ot}}(C,j,null,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null);throw Error(i(200))}hb=function(C,j,W){var it=j.lanes;if(C!==null)if(C.memoizedProps!==j.pendingProps||Fr.current)xo=!0;else{if(!(W&it)){switch(xo=!1,j.tag){case 3:Xy(j),Sp();break;case 5:Iy(j);break;case 1:Wr(j.type)&&Fu(j);break;case 4:_p(j,j.stateNode.containerInfo);break;case 10:it=j.memoizedProps.value;var ot=j.type._context;Wn($u,ot._currentValue),ot._currentValue=it;break;case 13:if(j.memoizedState!==null)return W&j.child.childLanes?tb(C,j,W):(Wn(Kn,1&Kn.current),(j=hi(C,j,W))!==null?j.sibling:null);Wn(Kn,1&Kn.current);break;case 19:if(it=!!(W&j.childLanes),64&C.flags){if(it)return rb(C,j,W);j.flags|=64}if((ot=j.memoizedState)!==null&&(ot.rendering=null,ot.tail=null,ot.lastEffect=null),Wn(Kn,Kn.current),it)break;return null;case 23:case 24:return j.lanes=0,Yy(C,j,W)}return hi(C,j,W)}xo=!!(16384&C.flags)}else xo=!1;switch(j.lanes=0,j.tag){case 2:return it=j.type,C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),C=j.pendingProps,ot=Ks(j,xr.current),Zs(j,W),ot=kp(null,j,it,C,ot,W),j.flags|=1,typeof ot=="object"&&ot!==null&&typeof ot.render=="function"&&ot.$$typeof===void 0?(j.tag=1,j.memoizedState=null,j.updateQueue=null,Wr(it)?(st=!0,Fu(j)):st=!1,j.memoizedState=ot.state!==null&&ot.state!==void 0?ot.state:null,bp(j),typeof(mt=it.getDerivedStateFromProps)=="function"&&Ju(j,0,mt,C),ot.updater=Wu,vp((j.stateNode=ot)._reactInternals=j,it,C,W),Pp(null,j,it,!0,st,W)):(j.tag=0,Vr(null,j,ot,W),j.child);case 16:ot=j.elementType;t:{switch(C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),C=j.pendingProps,ot=(st=ot._init)(ot._payload),j.type=ot,st=j.tag=function(ie){if(typeof ie=="function")return Yp(ie)?1:0;if(ie!=null){if((ie=ie.$$typeof)===H)return 11;if(ie===J)return 14}return 2}(ot),C=_o(ot,C),st){case 0:j=Np(null,j,ot,C,W);break t;case 1:j=Qy(null,j,ot,C,W);break t;case 11:j=Vy(null,j,ot,C,W);break t;case 14:j=Ky(null,j,ot,_o(ot.type,C),it,W);break t}throw Error(i(306,ot,""))}return j;case 0:return it=j.type,ot=j.pendingProps,Np(C,j,it,ot=j.elementType===it?ot:_o(it,ot),W);case 1:return it=j.type,ot=j.pendingProps,Qy(C,j,it,ot=j.elementType===it?ot:_o(it,ot),W);case 3:if(Xy(j),it=j.updateQueue,C===null||it===null)throw Error(i(282));if(it=j.pendingProps,ot=(ot=j.memoizedState)!==null?ot.element:null,Cy(C,j),ec(j,it,null,W),(it=j.memoizedState.element)===ot)Sp(),j=hi(C,j,W);else{if((st=(ot=j.stateNode).hydrate)&&(Xi=Js(j.stateNode.containerInfo.firstChild),pi=j,st=zo=!0),st){if((C=ot.mutableSourceEagerHydrationData)!=null)for(ot=0;ot<C.length;ot+=2)(st=C[ot])._workInProgressVersionPrimary=C[ot+1],Xs.push(st);for(W=Py(j,null,it,W),j.child=W;W;)W.flags=-3&W.flags|1024,W=W.sibling}else Vr(C,j,it,W),Sp();j=j.child}return j;case 5:return Iy(j),C===null&&wp(j),it=j.type,ot=j.pendingProps,st=C!==null?C.memoizedProps:null,mt=ot.children,ip(it,ot)?mt=null:st!==null&&ip(it,st)&&(j.flags|=16),Zy(C,j),Vr(C,j,mt,W),j.child;case 6:return C===null&&wp(j),null;case 13:return tb(C,j,W);case 4:return _p(j,j.stateNode.containerInfo),it=j.pendingProps,C===null?j.child=Gu(j,null,it,W):Vr(C,j,it,W),j.child;case 11:return it=j.type,ot=j.pendingProps,Vy(C,j,it,ot=j.elementType===it?ot:_o(it,ot),W);case 7:return Vr(C,j,j.pendingProps,W),j.child;case 8:case 12:return Vr(C,j,j.pendingProps.children,W),j.child;case 10:t:{it=j.type._context,ot=j.pendingProps,mt=j.memoizedProps;var st=ot.value,ut=j.type._context;if(Wn($u,ut._currentValue),ut._currentValue=st,mt!==null)if(ut=mt.value,(st=rr(ut,st)?0:0|(typeof it._calculateChangedBits=="function"?it._calculateChangedBits(ut,st):1073741823))==0){if(mt.children===ot.children&&!Fr.current){j=hi(C,j,W);break t}}else for((ut=j.child)!==null&&(ut.return=j);ut!==null;){var _t=ut.dependencies;if(_t!==null)for(var mt=ut.child,Ht=_t.firstContext;Ht!==null;){if(Ht.context===it&&Ht.observedBits&st){ut.tag===1&&((Ht=Zi(-1,W&-W)).tag=2,Qi(ut,Ht)),ut.lanes|=W,(Ht=ut.alternate)!==null&&(Ht.lanes|=W),Sy(ut.return,W),_t.lanes|=W;break}Ht=Ht.next}else mt=ut.tag===10&&ut.type===j.type?null:ut.child;if(mt!==null)mt.return=ut;else for(mt=ut;mt!==null;){if(mt===j){mt=null;break}if((ut=mt.sibling)!==null){ut.return=mt.return,mt=ut;break}mt=mt.return}ut=mt}Vr(C,j,ot.children,W),j=j.child}return j;case 9:return ot=j.type,it=(st=j.pendingProps).children,Zs(j,W),it=it(ot=no(ot,st.unstable_observedBits)),j.flags|=1,Vr(C,j,it,W),j.child;case 14:return st=_o(ot=j.type,j.pendingProps),Ky(C,j,ot,st=_o(ot.type,st),it,W);case 15:return Gy(C,j,j.type,j.pendingProps,it,W);case 17:return it=j.type,ot=j.pendingProps,ot=j.elementType===it?ot:_o(it,ot),C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),j.tag=1,Wr(it)?(C=!0,Fu(j)):C=!1,Zs(j,W),jy(j,it,ot),vp(j,it,ot,W),Pp(null,j,it,!0,C,W);case 19:return rb(C,j,W);case 23:case 24:return Yy(C,j,W)}throw Error(i(156,j.tag))},nh.prototype.render=function(C){fd(C,this._internalRoot,null,null)},nh.prototype.unmount=function(){var C=this._internalRoot,j=C.containerInfo;fd(null,C,null,function(){j[Ws]=null})},Dt=function(C){C.tag===13&&(ra(C,4,Kr()),eh(C,4))},$t=function(C){C.tag===13&&(ra(C,67108864,Kr()),eh(C,67108864))},qt=function(C){var j,W;C.tag===13&&(j=Kr(),ra(C,W=na(C),j),eh(C,W))},Le=function(C,j,W){switch(j){case"input":if(gt(C,W),j=W.name,W.type==="radio"&&j!=null){for(W=C;W.parentNode;)W=W.parentNode;for(W=W.querySelectorAll("input[name="+JSON.stringify(""+j)+'][type="radio"]'),j=0;j<W.length;j++){var it=W[j];if(it!==C&&it.form===C.form){var ot=Bu(it);if(!ot)throw Error(i(90));tt(it),gt(it,ot)}}}break;case"textarea":jt(C,W);break;case"select":(j=W.value)!=null&&Lt(C,!!W.multiple,j,!1)}},hn=mb,Tt=function(C,j,W,it,ot){var st=fn;fn|=4;try{return qa(98,C.bind(null,j,W,it,ot))}finally{(fn=st)===0&&(nl(),Bo())}};var b2=function(C,j){var W=fn;fn|=2;try{return C(j)}finally{(fn=W)===0&&(nl(),Bo())}};if(ur={Events:[Ql,Vs,Bu,Ie,He,oa,{current:!(ae=function(){var C;!(49&fn)&&(gi!==null&&(C=gi,gi=null,C.forEach(function(j){j.expiredLanes|=24&j.pendingLanes,oo(j,wr())})),Bo(),oa())})}]},wn={bundleType:(t={findFiberByHostInstance:Ua,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"}).bundleType,version:t.version,rendererPackageName:t.rendererPackageName,rendererConfig:t.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(C){return(C=be(C))===null?null:C.stateNode},findFiberByHostInstance:t.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&!(zn=__REACT_DEVTOOLS_GLOBAL_HOOK__).isDisabled&&zn.supportsFiber)try{up=zn.inject(wn),Ha=zn}catch{}r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ur,r.createPortal=Eb,r.findDOMNode=function(C){if(C==null)return null;if(C.nodeType===1)return C;var j=C._reactInternals;if(j!==void 0)return(C=be(j))===null?null:C.stateNode;throw typeof C.render=="function"?Error(i(188)):Error(i(268,Object.keys(C)))},r.flushSync=function(C,j){var W=fn;if(48&W)return C(j);fn|=1;try{if(C)return qa(99,C.bind(null,j))}finally{fn=W,Bo()}},r.hydrate=function(C,j,W){if(vc(j))return pd(null,C,j,!0,W);throw Error(i(200))},r.render=function(C,j,W){if(vc(j))return pd(null,C,j,!1,W);throw Error(i(200))},r.unmountComponentAtNode=function(C){if(vc(C))return!!C._reactRootContainer&&(yb(function(){pd(null,null,C,!1,function(){C._reactRootContainer=null,C[Ws]=null})}),!0);throw Error(i(40))},r.unstable_batchedUpdates=mb,r.unstable_createPortal=function(C,j){return Eb(C,j,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},r.unstable_renderSubtreeIntoContainer=function(C,j,W,it){if(!vc(W))throw Error(i(200));if(C==null||C._reactInternals===void 0)throw Error(i(38));return pd(C,j,W,!1,it)},r.version="17.0.2"},{"object-assign":385,react:408,scheduler:414}],401:[function(t,f,r){(function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE=="function")try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}})(),f.exports=t("./cjs/react-dom.production.min.js")},{"./cjs/react-dom.development.js":399,"./cjs/react-dom.production.min.js":400}],402:[function(t,f,r){(function(n){(function(){function e(K){if(typeof K=="object"&&K!==null){var P=K.$$typeof;switch(P){case s:var U=K.type;switch(U){case l:case a:case o:case p:case m:return U;default:var V=U&&U.$$typeof;switch(V){case u:case h:case _:case b:case c:return V;default:return P}}case i:return P}}}var s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S,E,k,D,N,O,R,A,z,H,$,M,J;n.env.NODE_ENV!=="production"&&(s=60103,i=60106,l=60107,o=60108,a=60114,c=60109,u=60110,h=60112,p=60113,m=60120,b=60115,_=60116,v=60121,w=60122,x=60117,S=60129,E=60131,typeof Symbol=="function"&&Symbol.for&&(s=(k=Symbol.for)("react.element"),i=k("react.portal"),l=k("react.fragment"),o=k("react.strict_mode"),a=k("react.profiler"),c=k("react.provider"),u=k("react.context"),h=k("react.forward_ref"),p=k("react.suspense"),m=k("react.suspense_list"),b=k("react.memo"),_=k("react.lazy"),v=k("react.block"),w=k("react.server.block"),x=k("react.fundamental"),k("react.scope"),k("react.opaque.id"),S=k("react.debug_trace_mode"),k("react.offscreen"),E=k("react.legacy_hidden")),k=u,D=c,N=s,O=h,R=l,A=_,z=b,H=i,$=a,M=o,J=p,r.ContextConsumer=k,r.ContextProvider=D,r.Element=N,r.ForwardRef=O,r.Fragment=R,r.Lazy=A,r.Memo=z,r.Portal=H,r.Profiler=$,r.StrictMode=M,r.Suspense=J,r.isAsyncMode=function(K){return!1},r.isConcurrentMode=function(K){return!1},r.isContextConsumer=function(K){return e(K)===u},r.isContextProvider=function(K){return e(K)===c},r.isElement=function(K){return typeof K=="object"&&K!==null&&K.$$typeof===s},r.isForwardRef=function(K){return e(K)===h},r.isFragment=function(K){return e(K)===l},r.isLazy=function(K){return e(K)===_},r.isMemo=function(K){return e(K)===b},r.isPortal=function(K){return e(K)===i},r.isProfiler=function(K){return e(K)===a},r.isStrictMode=function(K){return e(K)===o},r.isSuspense=function(K){return e(K)===p},r.isValidElementType=function(K){return typeof K=="string"||typeof K=="function"||K===l||K===a||K===S||K===o||K===p||K===m||K===E||typeof K=="object"&&K!==null&&(K.$$typeof===_||K.$$typeof===b||K.$$typeof===c||K.$$typeof===u||K.$$typeof===h||K.$$typeof===x||K.$$typeof===v||K[0]===w)},r.typeOf=e)}).call(this)}).call(this,t("_process"))},{_process:386}],403:[function(t,f,r){var n=60103,e=60106,s=60107,i=60108,l=60114,o=60109,a=60110,c=60112,u=60113,h=60120,p=60115,m=60116,b=60121,_=60122,v=60117,w=60129,x=60131;function S(M){if(typeof M=="object"&&M!==null){var J=M.$$typeof;switch(J){case n:switch(M=M.type){case s:case l:case i:case u:case h:return M;default:switch(M=M&&M.$$typeof){case a:case c:case m:case p:case o:return M;default:return J}}case e:return J}}}typeof Symbol=="function"&&Symbol.for&&(n=(E=Symbol.for)("react.element"),e=E("react.portal"),s=E("react.fragment"),i=E("react.strict_mode"),l=E("react.profiler"),o=E("react.provider"),a=E("react.context"),c=E("react.forward_ref"),u=E("react.suspense"),h=E("react.suspense_list"),p=E("react.memo"),m=E("react.lazy"),b=E("react.block"),_=E("react.server.block"),v=E("react.fundamental"),w=E("react.debug_trace_mode"),x=E("react.legacy_hidden"));var E=o,k=n,D=c,N=s,O=m,R=p,A=e,z=l,H=i,$=u;r.ContextConsumer=a,r.ContextProvider=E,r.Element=k,r.ForwardRef=D,r.Fragment=N,r.Lazy=O,r.Memo=R,r.Portal=A,r.Profiler=z,r.StrictMode=H,r.Suspense=$,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(M){return S(M)===a},r.isContextProvider=function(M){return S(M)===o},r.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===n},r.isForwardRef=function(M){return S(M)===c},r.isFragment=function(M){return S(M)===s},r.isLazy=function(M){return S(M)===m},r.isMemo=function(M){return S(M)===p},r.isPortal=function(M){return S(M)===e},r.isProfiler=function(M){return S(M)===l},r.isStrictMode=function(M){return S(M)===i},r.isSuspense=function(M){return S(M)===u},r.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===s||M===l||M===w||M===i||M===u||M===h||M===x||typeof M=="object"&&M!==null&&(M.$$typeof===m||M.$$typeof===p||M.$$typeof===o||M.$$typeof===a||M.$$typeof===c||M.$$typeof===v||M.$$typeof===b||M[0]===_)},r.typeOf=S},{}],404:[function(t,f,r){arguments[4][381][0].apply(r,arguments)},{"./cjs/react-is.development.js":402,"./cjs/react-is.production.min.js":403,_process:386,dup:381}],405:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0});var n=Object.assign||function(l){for(var o=1;o<arguments.length;o++){var a,c=arguments[o];for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(l[a]=c[a])}return l},e=s(t("react"));function s(l){return l&&l.__esModule?l:{default:l}}t=s(t("localized-strings"));var i=/(\{[\d|\w]+\})/;t.default.prototype.formatString=function(l){for(var o=arguments.length,a=Array(1<o?o-1:0),c=1;c<o;c++)a[c-1]=arguments[c];var u=!1;return l=(l||"").split(i).filter(function(h){return!!h}).map(function(h,p){if(h.match(i)){var m=h.slice(1,-1),b=a[m];if(b==null){if((m=a[0][m])===void 0)return b;b=m}return e.default.isValidElement(b)?(u=!0,e.default.Children.toArray(b).map(function(_){return n({},_,{key:p.toString()})})):b}return h}),u?l:l.join("")},r.default=t.default},{"localized-strings":383,react:408}],406:[function(t,f,r){},{"object-assign":385}],407:[function(t,f,r){var n=t("object-assign"),e=60103,s=60106,i=(r.Fragment=60107,r.StrictMode=60108,r.Profiler=60114,60109),l=60110,o=60112,a=(r.Suspense=60113,60115),c=60116,u=(typeof Symbol=="function"&&Symbol.for&&(e=(t=Symbol.for)("react.element"),s=t("react.portal"),r.Fragment=t("react.fragment"),r.StrictMode=t("react.strict_mode"),r.Profiler=t("react.profiler"),i=t("react.provider"),l=t("react.context"),o=t("react.forward_ref"),r.Suspense=t("react.suspense"),a=t("react.memo"),c=t("react.lazy")),typeof Symbol=="function"&&Symbol.iterator);function h($){for(var M="https://reactjs.org/docs/error-decoder.html?invariant="+$,J=1;J<arguments.length;J++)M+="&args[]="+encodeURIComponent(arguments[J]);return"Minified React error #"+$+"; visit "+M+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function b($,M,J){this.props=$,this.context=M,this.refs=m,this.updater=J||p}function _(){}function v($,M,J){this.props=$,this.context=M,this.refs=m,this.updater=J||p}b.prototype.isReactComponent={},b.prototype.setState=function($,M){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error(h(85));this.updater.enqueueSetState(this,$,M,"setState")},b.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")},_.prototype=b.prototype;var w=((t=v.prototype=new _).constructor=v,n(t,b.prototype),t.isPureReactComponent=!0,{current:null}),x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function E($,M,J){var K,P={},U=null,V=null;if(M!=null)for(K in M.ref!==void 0&&(V=M.ref),M.key!==void 0&&(U=""+M.key),M)x.call(M,K)&&!S.hasOwnProperty(K)&&(P[K]=M[K]);var G=arguments.length-2;if(G===1)P.children=J;else if(1<G){for(var F=Array(G),q=0;q<G;q++)F[q]=arguments[q+2];P.children=F}if($&&$.defaultProps)for(K in G=$.defaultProps)P[K]===void 0&&(P[K]=G[K]);return{$$typeof:e,type:$,key:U,ref:V,props:P,_owner:w.current}}function k($){return typeof $=="object"&&$!==null&&$.$$typeof===e}var D=/\/+/g;function N($,M){return typeof $=="object"&&$!==null&&$.key!=null?($=""+$.key,J={"=":"=0",":":"=2"},"$"+$.replace(/[=:]/g,function(K){return J[K]})):M.toString(36);var J}function O($,M,J,K,P){var U,V,G=!1;if(($=(q=typeof $)!="undefined"&&q!=="boolean"?$:null)===null)G=!0;else switch(q){case"string":case"number":G=!0;break;case"object":switch($.$$typeof){case e:case s:G=!0}}if(G)return P=P(G=$),$=K===""?"."+N(G,0):K,Array.isArray(P)?(J="",O(P,M,J=$!=null?$.replace(D,"$&/")+"/":J,"",function(I){return I})):P!=null&&(k(P)&&(V=J+(!(U=P).key||G&&G.key===P.key?"":(""+P.key).replace(D,"$&/")+"/")+$,P={$$typeof:e,type:U.type,key:V,ref:U.ref,props:U.props,_owner:U._owner}),M.push(P)),1;if(G=0,K=K===""?".":K+":",Array.isArray($))for(var F=0;F<$.length;F++){var q,T=K+N(q=$[F],F);G+=O(q,M,J,T,P)}else if(typeof(T=(V=$)!==null&&typeof V=="object"&&typeof(V=u&&V[u]||V["@@iterator"])=="function"?V:null)=="function")for($=T.call($),F=0;!(q=$.next()).done;)G+=O(q=q.value,M,J,T=K+N(q,F++),P);else if(q==="object")throw M=""+$,Error(h(31,M==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":M));return G}function R($,M,J){if($==null)return $;var K=[],P=0;return O($,K,"","",function(U){return M.call(J,U,P++)}),K}function A($){var M;if($._status===-1&&(M=(M=$._result)(),$._status=0,($._result=M).then(function(J){$._status===0&&(J=J.default,$._status=1,$._result=J)},function(J){$._status===0&&($._status=2,$._result=J)})),$._status===1)return $._result;throw $._result}var z={current:null};function H(){var $=z.current;if($===null)throw Error(h(321));return $}t={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:n},r.Children={map:R,forEach:function($,M,J){R($,function(){M.apply(this,arguments)},J)},count:function($){var M=0;return R($,function(){M++}),M},toArray:function($){return R($,function(M){return M})||[]},only:function($){if(k($))return $;throw Error(h(143))}},r.Component=b,r.PureComponent=v,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t,r.cloneElement=function($,M,J){if($==null)throw Error(h(267,$));var K=n({},$.props),P=$.key,U=$.ref,V=$._owner;if(M!=null)for(G in M.ref!==void 0&&(U=M.ref,V=w.current),M.key!==void 0&&(P=""+M.key),$.type&&$.type.defaultProps&&(F=$.type.defaultProps),M)x.call(M,G)&&!S.hasOwnProperty(G)&&(K[G]=(M[G]===void 0&&F!==void 0?F:M)[G]);var G=arguments.length-2;if(G===1)K.children=J;else if(1<G){for(var F=Array(G),q=0;q<G;q++)F[q]=arguments[q+2];K.children=F}return{$$typeof:e,type:$.type,key:P,ref:U,props:K,_owner:V}},r.createContext=function($,M){return($={$$typeof:l,_calculateChangedBits:M=M===void 0?null:M,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:$},$.Consumer=$},r.createElement=E,r.createFactory=function($){var M=E.bind(null,$);return M.type=$,M},r.createRef=function(){return{current:null}},r.forwardRef=function($){return{$$typeof:o,render:$}},r.isValidElement=k,r.lazy=function($){return{$$typeof:c,_payload:{_status:-1,_result:$},_init:A}},r.memo=function($,M){return{$$typeof:a,type:$,compare:M===void 0?null:M}},r.useCallback=function($,M){return H().useCallback($,M)},r.useContext=function($,M){return H().useContext($,M)},r.useDebugValue=function(){},r.useEffect=function($,M){return H().useEffect($,M)},r.useImperativeHandle=function($,M,J){return H().useImperativeHandle($,M,J)},r.useLayoutEffect=function($,M){return H().useLayoutEffect($,M)},r.useMemo=function($,M){return H().useMemo($,M)},r.useReducer=function($,M,J){return H().useReducer($,M,J)},r.useRef=function($){return H().useRef($)},r.useState=function($){return H().useState($)},r.version="17.0.2"},{"object-assign":385}],408:[function(t,f,r){f.exports=t("./cjs/react.production.min.js")},{"./cjs/react.development.js":406,"./cjs/react.production.min.js":407}],409:[function(t,f,r){f=function(n){var e,s=Object.prototype,i=s.hasOwnProperty,l=(E=typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator",o=E.asyncIterator||"@@asyncIterator",a=E.toStringTag||"@@toStringTag";function c(M,J,K){return Object.defineProperty(M,J,{value:K,enumerable:!0,configurable:!0,writable:!0}),M[J]}try{c({},"")}catch{c=function(J,K,P){return J[K]=P}}function u(M,J,K,P){var U,V,G,F;return J=J&&J.prototype instanceof w?J:w,J=Object.create(J.prototype),P=new z(P||[]),J._invoke=(U=M,V=K,G=P,F=p,function(q,T){if(F===b)throw new Error("Generator is already running");if(F===_){if(q==="throw")throw T;return $()}for(G.method=q,G.arg=T;;){var I=G.delegate;if(I&&(I=function L(B,Y){var Z=B.iterator[Y.method];if(Z===e){if(Y.delegate=null,Y.method==="throw"){if(B.iterator.return&&(Y.method="return",Y.arg=e,L(B,Y),Y.method==="throw"))return v;Y.method="throw",Y.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}return(Z=h(Z,B.iterator,Y.arg)).type==="throw"?(Y.method="throw",Y.arg=Z.arg,Y.delegate=null,v):(Z=Z.arg)?Z.done?(Y[B.resultName]=Z.value,Y.next=B.nextLoc,Y.method!=="return"&&(Y.method="next",Y.arg=e),Y.delegate=null,v):Z:(Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,v)}(I,G),I)){if(I===v)continue;return I}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(F===p)throw F=_,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);if(F=b,(I=h(U,V,G)).type==="normal"){if(F=G.done?_:m,I.arg!==v)return{value:I.arg,done:G.done}}else I.type==="throw"&&(F=_,G.method="throw",G.arg=I.arg)}}),J}function h(M,J,K){try{return{type:"normal",arg:M.call(J,K)}}catch(P){return{type:"throw",arg:P}}}n.wrap=u;var p="suspendedStart",m="suspendedYield",b="executing",_="completed",v={};function w(){}function x(){}function S(){}var E,k,D=(c(E={},l,function(){return this}),(k=(k=Object.getPrototypeOf)&&k(k(H([]))))&&k!==s&&i.call(k,l)&&(E=k),S.prototype=w.prototype=Object.create(E));function N(M){["next","throw","return"].forEach(function(J){c(M,J,function(K){return this._invoke(J,K)})})}function O(M,J){var K;this._invoke=function(P,U){function V(){return new J(function(G,F){(function q(T,I,L,B){var Y;if((T=h(M[T],M,I)).type!=="throw")return(I=(Y=T.arg).value)&&typeof I=="object"&&i.call(I,"__await")?J.resolve(I.__await).then(function(Z){q("next",Z,L,B)},function(Z){q("throw",Z,L,B)}):J.resolve(I).then(function(Z){Y.value=Z,L(Y)},function(Z){return q("throw",Z,L,B)});B(T.arg)})(P,U,G,F)})}return K=K?K.then(V,V):V()}}function R(M){var J={tryLoc:M[0]};1 in M&&(J.catchLoc=M[1]),2 in M&&(J.finallyLoc=M[2],J.afterLoc=M[3]),this.tryEntries.push(J)}function A(M){var J=M.completion||{};J.type="normal",delete J.arg,M.completion=J}function z(M){this.tryEntries=[{tryLoc:"root"}],M.forEach(R,this),this.reset(!0)}function H(M){if(M){var J,K=M[l];if(K)return K.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length))return J=-1,(K=function P(){for(;++J<M.length;)if(i.call(M,J))return P.value=M[J],P.done=!1,P;return P.value=e,P.done=!0,P}).next=K}return{next:$}}function $(){return{value:e,done:!0}}return c(D,"constructor",x.prototype=S),c(S,"constructor",x),x.displayName=c(S,a,"GeneratorFunction"),n.isGeneratorFunction=function(M){return!!(M=typeof M=="function"&&M.constructor)&&(M===x||(M.displayName||M.name)==="GeneratorFunction")},n.mark=function(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,S):(M.__proto__=S,c(M,a,"GeneratorFunction")),M.prototype=Object.create(D),M},n.awrap=function(M){return{__await:M}},N(O.prototype),c(O.prototype,o,function(){return this}),n.AsyncIterator=O,n.async=function(M,J,K,P,U){U===void 0&&(U=Promise);var V=new O(u(M,J,K,P),U);return n.isGeneratorFunction(J)?V:V.next().then(function(G){return G.done?G.value:V.next()})},N(D),c(D,a,"Generator"),c(D,l,function(){return this}),c(D,"toString",function(){return"[object Generator]"}),n.keys=function(M){var J,K=[];for(J in M)K.push(J);return K.reverse(),function P(){for(;K.length;){var U=K.pop();if(U in M)return P.value=U,P.done=!1,P}return P.done=!0,P}},n.values=H,z.prototype={constructor:z,reset:function(M){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!M)for(var J in this)J.charAt(0)==="t"&&i.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=e)},stop:function(){this.done=!0;var M=this.tryEntries[0].completion;if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var J=this;function K(q,T){return V.type="throw",V.arg=M,J.next=q,T&&(J.method="next",J.arg=e),!!T}for(var P=this.tryEntries.length-1;0<=P;--P){var U=this.tryEntries[P],V=U.completion;if(U.tryLoc==="root")return K("end");if(U.tryLoc<=this.prev){var G=i.call(U,"catchLoc"),F=i.call(U,"finallyLoc");if(G&&F){if(this.prev<U.catchLoc)return K(U.catchLoc,!0);if(this.prev<U.finallyLoc)return K(U.finallyLoc)}else if(G){if(this.prev<U.catchLoc)return K(U.catchLoc,!0)}else{if(!F)throw new Error("try statement without catch or finally");if(this.prev<U.finallyLoc)return K(U.finallyLoc)}}}},abrupt:function(M,J){for(var K=this.tryEntries.length-1;0<=K;--K){var P=this.tryEntries[K];if(P.tryLoc<=this.prev&&i.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var U=P;break}}var V=(U=U&&(M==="break"||M==="continue")&&U.tryLoc<=J&&J<=U.finallyLoc?null:U)?U.completion:{};return V.type=M,V.arg=J,U?(this.method="next",this.next=U.finallyLoc,v):this.complete(V)},complete:function(M,J){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&J&&(this.next=J),v},finish:function(M){for(var J=this.tryEntries.length-1;0<=J;--J){var K=this.tryEntries[J];if(K.finallyLoc===M)return this.complete(K.completion,K.afterLoc),A(K),v}},catch:function(M){for(var J=this.tryEntries.length-1;0<=J;--J){var K,P,U=this.tryEntries[J];if(U.tryLoc===M)return(K=U.completion).type==="throw"&&(P=K.arg,A(U)),P}throw new Error("illegal catch attempt")},delegateYield:function(M,J,K){return this.delegate={iterator:H(M),resultName:J,nextLoc:K},this.method==="next"&&(this.arg=e),v}},n}(typeof f=="object"?f.exports:{});try{regeneratorRuntime=f}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=f:Function("r","regeneratorRuntime = r")(f)}},{}],410:[function(t,f,r){},{}],411:[function(t,f,r){var n=0;r.__interactionsRef=null,r.__subscriberRef=null,r.unstable_clear=function(e){return e()},r.unstable_getCurrent=function(){return null},r.unstable_getThreadID=function(){return++n},r.unstable_subscribe=function(){},r.unstable_trace=function(e,s,i){return i()},r.unstable_unsubscribe=function(){},r.unstable_wrap=function(e){return e}},{}],412:[function(t,f,r){},{}],413:[function(t,f,r){var n,e,s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S;function E(G,F){var q=G.length;for(G.push(F);;){var T=q-1>>>1,I=G[T];if(!(I!==void 0&&0<N(I,F)))break;G[T]=F,G[q]=I,q=T}}function k(G){return(G=G[0])===void 0?null:G}function D(G){var F=G[0];if(F!==void 0){var q=G.pop();if(q!==F){G[0]=q;for(var T=0,I=G.length;T<I;){var L=2*(T+1)-1,B=G[L],Y=1+L,Z=G[Y];if(B!==void 0&&N(B,q)<0)T=Z!==void 0&&N(Z,B)<0?(G[T]=Z,G[Y]=q,Y):(G[T]=B,G[L]=q,L);else{if(!(Z!==void 0&&N(Z,q)<0))break;G[T]=Z,G[Y]=q,T=Y}}}}}function N(G,F){var q=G.sortIndex-F.sortIndex;return q!=0?q:G.id-F.id}typeof performance=="object"&&typeof performance.now=="function"?(e=performance,r.unstable_now=function(){return e.now()}):(s=Date,i=s.now(),r.unstable_now=function(){return s.now()-i}),typeof window>"u"||typeof MessageChannel!="function"?(o=l=null,a=function(){if(l!==null)try{var G=r.unstable_now();l(!0,G),l=null}catch(F){throw setTimeout(a,0),F}},c=function(G){l!==null?setTimeout(c,0,G):(l=G,setTimeout(a,0))},u=function(G,F){o=setTimeout(G,F)},h=function(){clearTimeout(o)},r.unstable_shouldYield=function(){return!1},n=r.unstable_forceFrameRate=function(){}):(p=window.setTimeout,m=window.clearTimeout,typeof console<"u"&&(V=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof V!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),b=!1,_=null,v=-1,w=5,x=0,r.unstable_shouldYield=function(){return r.unstable_now()>=x},n=function(){},r.unstable_forceFrameRate=function(G){G<0||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<G?Math.floor(1e3/G):5},V=new MessageChannel,S=V.port2,V.port1.onmessage=function(){if(_!==null){var G=r.unstable_now();x=G+w;try{_(!0,G)?S.postMessage(null):(b=!1,_=null)}catch(F){throw S.postMessage(null),F}}else b=!1},c=function(G){_=G,b||(b=!0,S.postMessage(null))},u=function(G,F){v=p(function(){G(r.unstable_now())},F)},h=function(){m(v),v=-1});var O=[],R=[],A=1,z=null,H=3,$=!1,M=!1,J=!1;function K(G){for(var F=k(R);F!==null;){if(F.callback===null)D(R);else{if(!(F.startTime<=G))break;D(R),F.sortIndex=F.expirationTime,E(O,F)}F=k(R)}}function P(G){var F;J=!1,K(G),M||(k(O)!==null?(M=!0,c(U)):(F=k(R))!==null&&u(P,F.startTime-G))}function U(G,F){M=!1,J&&(J=!1,h()),$=!0;var q=H;try{for(K(F),z=k(O);z!==null&&(!(z.expirationTime>F)||G&&!r.unstable_shouldYield());){var T,I=z.callback;typeof I=="function"?(z.callback=null,H=z.priorityLevel,T=I(z.expirationTime<=F),F=r.unstable_now(),typeof T=="function"?z.callback=T:z===k(O)&&D(O),K(F)):D(O),z=k(O)}var L;return z!==null||((L=k(R))!==null&&u(P,L.startTime-F),!1)}finally{z=null,H=q,$=!1}}var V=n;r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(G){G.callback=null},r.unstable_continueExecution=function(){M||$||(M=!0,c(U))},r.unstable_getCurrentPriorityLevel=function(){return H},r.unstable_getFirstCallbackNode=function(){return k(O)},r.unstable_next=function(G){switch(H){case 1:case 2:case 3:var F=3;break;default:F=H}var q=H;H=F;try{return G()}finally{H=q}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=V,r.unstable_runWithPriority=function(G,F){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var q=H;H=G;try{return F()}finally{H=q}},r.unstable_scheduleCallback=function(G,F,q){var T=r.unstable_now();switch(q=typeof q=="object"&&q!==null&&typeof(q=q.delay)=="number"&&0<q?T+q:T,G){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return G={id:A++,callback:F,priorityLevel:G,startTime:q,expirationTime:I=q+I,sortIndex:-1},T<q?(G.sortIndex=q,E(R,G),k(O)===null&&G===k(R)&&(J?h():J=!0,u(P,q-T))):(G.sortIndex=I,E(O,G),M||$||(M=!0,c(U))),G},r.unstable_wrapCallback=function(G){var F=H;return function(){var q=H;H=F;try{return G.apply(this,arguments)}finally{H=q}}}},{}],414:[function(t,f,r){f.exports=t("./cjs/scheduler.production.min.js")},{"./cjs/scheduler.development.js":412,"./cjs/scheduler.production.min.js":413}],415:[function(t,f,r){f.exports=t("./cjs/scheduler-tracing.production.min.js")},{"./cjs/scheduler-tracing.development.js":410,"./cjs/scheduler-tracing.production.min.js":411}],416:[function(t,f,r){f.exports=function(n,e,s,i){if((h=s?s.call(i,n,e):void 0)!==void 0)return!!h;if(n===e)return!0;if(typeof n!="object"||!n||typeof e!="object"||!e)return!1;var l=Object.keys(n),o=Object.keys(e);if(l.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),c=0;c<l.length;c++){var u=l[c];if(!a(u))return!1;var h,p=n[u],m=e[u];if((h=s?s.call(i,p,m,u):void 0)===!1||h===void 0&&p!==m)return!1}return!0}},{}],417:[function(t,f,r){(function(n){(function(){function e(pt){return pt&&typeof pt=="object"&&"default"in pt?pt.default:pt}Object.defineProperty(r,"__esModule",{value:!0});var s=t("react-is"),i=t("react"),l=e(i),o=e(t("shallowequal")),a=e(t("@emotion/stylis")),c=e(t("@emotion/unitless")),u=e(t("@emotion/is-prop-valid")),h=e(t("hoist-non-react-statics"));function p(){return(p=Object.assign||function(pt){for(var Dt=1;Dt<arguments.length;Dt++){var $t,qt=arguments[Dt];for($t in qt)Object.prototype.hasOwnProperty.call(qt,$t)&&(pt[$t]=qt[$t])}return pt}).apply(this,arguments)}var m=function(pt,Dt){for(var $t=[pt[0]],qt=0,Wt=Dt.length;qt<Wt;qt+=1)$t.push(Dt[qt],pt[qt+1]);return $t},b=function(pt){return pt!==null&&typeof pt=="object"&&(pt.toString?pt.toString():Object.prototype.toString.call(pt))==="[object Object]"&&!s.typeOf(pt)},_=Object.freeze([]),v=Object.freeze({});function w(pt){return typeof pt=="function"}function x(pt){return n.env.NODE_ENV!=="production"&&typeof pt=="string"&&pt||pt.displayName||pt.name||"Component"}function S(pt){return pt&&typeof pt.styledComponentId=="string"}var E=n!==void 0&&(n.env.REACT_APP_SC_ATTR||n.env.SC_ATTR)||"data-styled",k=typeof window<"u"&&"HTMLElement"in window,D=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:n!==void 0&&n.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&n.env.REACT_APP_SC_DISABLE_SPEEDY!==""?n.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&n.env.REACT_APP_SC_DISABLE_SPEEDY:n!==void 0&&n.env.SC_DISABLE_SPEEDY!==void 0&&n.env.SC_DISABLE_SPEEDY!==""?n.env.SC_DISABLE_SPEEDY!=="false"&&n.env.SC_DISABLE_SPEEDY:n.env.NODE_ENV!=="production"),N={},O=n.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
111
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}mr!==5&&(mr=2),_t=Rp(_t,Ze),Kt=ut;do switch(Kt.tag){case 3:st=_t,Kt.flags|=4096,j&=-j,Kt.lanes|=j,Ey(Kt,ob(0,st,j));break t;case 1:st=_t;var Xe=Kt.type,Qe=Kt.stateNode;if(!(64&Kt.flags||typeof Xe.getDerivedStateFromError!="function"&&(Qe===null||typeof Qe.componentDidCatch!="function"||$o!==null&&$o.has(Qe)))){Kt.flags|=4096,j&=-j,Kt.lanes|=j,Ey(Kt,ib(Kt,st,j));break t}}while((Kt=Kt.return)!==null)}xb(W)}catch(xn){j=xn,sr===W&&W!==null&&(sr=W=W.return);continue}break}}function vb(){var C=rd.current;return rd.current=nd,C===null?nd:C}function bc(C,j){var W=fn,it=(fn|=16,vb());for(Pr===C&&Sr===j||ol(C,j);;)try{for(;sr!==null;)_b(sr);break}catch(ot){bb(C,ot)}if(gp(),fn=W,rd.current=it,sr!==null)throw Error(i(261));return Pr=null,Sr=0,mr}function _b(C){var j=hb(C.alternate,C,Ka);C.memoizedProps=C.pendingProps,j===null?xb(C):sr=j,Lp.current=null}function xb(C){var j=C;do{var W=j.alternate;if(C=j.return,2048&j.flags){if((W=function(st){switch(st.tag){case 1:Wr(st.type)&&lp();var ut=st.flags;return 4096&ut?(st.flags=-4097&ut|64,st):null;case 3:if(Qs(),Bn(Fr),Bn(xr),Sp(),64&(ut=st.flags))throw Error(i(285));return st.flags=-4097&ut|64,st;case 5:return _p(st),null;case 13:return Bn(Kn),4096&(ut=st.flags)?(st.flags=-4097&ut|64,st):null;case 19:return Bn(Kn),null;case 4:return Qs(),null;case 10:return mp(st),null;case 23:case 24:return Kp(),null;default:return null}}(j))!==null)return W.flags&=2047,void(sr=W);C!==null&&(C.firstEffect=C.lastEffect=null,C.flags|=2048)}else{if((W=function(st,ut,_t){var mt=ut.pendingProps;switch(ut.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return Wr(ut.type)&&lp(),null;case 3:return Qs(),Bn(Fr),Bn(xr),Sp(),(mt=ut.stateNode).pendingContext&&(mt.context=mt.pendingContext,mt.pendingContext=null),st!==null&&st.child!==null||(Zu(ut)?ut.flags|=4:mt.hydrate||(ut.flags|=256)),null;case 5:_p(ut);var Ht=Ja(ic.current);if(_t=ut.type,st!==null&&ut.stateNode!=null)s2(st,ut,_t,mt),st.ref!==ut.ref&&(ut.flags|=128);else{if(!mt){if(ut.stateNode===null)throw Error(i(166));return null}if(st=Ja(Fo.current),Zu(ut)){mt=ut.stateNode,_t=ut.type;var ie,ue=ut.memoizedProps;switch(mt[Vi]=ut,mt[Lu]=ue,_t){case"dialog":Rn("cancel",mt),Rn("close",mt);break;case"iframe":case"object":case"embed":Rn("load",mt);break;case"video":case"audio":for(st=0;st<Yl.length;st++)Rn(Yl[st],mt);break;case"source":Rn("error",mt);break;case"img":case"image":case"link":Rn("error",mt),Rn("load",mt);break;case"details":Rn("toggle",mt);break;case"input":at(mt,ue),Rn("invalid",mt);break;case"select":mt._wrapperState={wasMultiple:!!ue.multiple},Rn("invalid",mt);break;case"textarea":yt(mt,ue),Rn("invalid",mt)}for(ie in kt(_t,ue),st=null,ue)ue.hasOwnProperty(ie)&&(Ht=ue[ie],ie==="children"?typeof Ht=="string"?mt.textContent!==Ht&&(st=["children",Ht]):typeof Ht=="number"&&mt.textContent!==""+Ht&&(st=["children",""+Ht]):o.hasOwnProperty(ie)&&Ht!=null&&ie==="onScroll"&&Rn("scroll",mt));switch(_t){case"input":Q(mt),wt(mt,ue,!0);break;case"textarea":Q(mt),At(mt);break;case"select":case"option":break;default:typeof ue.onClick=="function"&&(mt.onclick=Du)}mt=st,(ut.updateQueue=mt)!==null&&(ut.flags|=4)}else{switch(ie=Ht.nodeType===9?Ht:Ht.ownerDocument,(st=st===It?Ot(_t):st)===It?_t==="script"?((st=ie.createElement("div")).innerHTML="<script><\/script>",st=st.removeChild(st.firstChild)):typeof mt.is=="string"?st=ie.createElement(_t,{is:mt.is}):(st=ie.createElement(_t),_t==="select"&&(ie=st,mt.multiple?ie.multiple=!0:mt.size&&(ie.size=mt.size))):st=ie.createElementNS(st,_t),st[Vi]=ut,st[Lu]=mt,a2(st,ut),ut.stateNode=st,ie=ee(_t,mt),_t){case"dialog":Rn("cancel",st),Rn("close",st),Ht=mt;break;case"iframe":case"object":case"embed":Rn("load",st),Ht=mt;break;case"video":case"audio":for(Ht=0;Ht<Yl.length;Ht++)Rn(Yl[Ht],st);Ht=mt;break;case"source":Rn("error",st),Ht=mt;break;case"img":case"image":case"link":Rn("error",st),Rn("load",st),Ht=mt;break;case"details":Rn("toggle",st),Ht=mt;break;case"input":at(st,mt),Ht=et(st,mt),Rn("invalid",st);break;case"option":Ht=Mt(st,mt);break;case"select":st._wrapperState={wasMultiple:!!mt.multiple},Ht=e({},mt,{value:void 0}),Rn("invalid",st);break;case"textarea":yt(st,mt),Ht=Pt(st,mt),Rn("invalid",st);break;default:Ht=mt}kt(_t,Ht);var Me,mn=Ht;for(ue in mn)mn.hasOwnProperty(ue)&&(Me=mn[ue],ue==="style"?Qt(st,Me):ue==="dangerouslySetInnerHTML"?(Me=Me?Me.__html:void 0)!=null&&ht(st,Me):ue==="children"?typeof Me=="string"?_t==="textarea"&&Me===""||dt(st,Me):typeof Me=="number"&&dt(st,""+Me):ue!=="suppressContentEditableWarning"&&ue!=="suppressHydrationWarning"&&ue!=="autoFocus"&&(o.hasOwnProperty(ue)?Me!=null&&ue==="onScroll"&&Rn("scroll",st):Me!=null&&x(st,ue,Me,ie)));switch(_t){case"input":Q(st),wt(st,mt,!1);break;case"textarea":Q(st),At(st);break;case"option":mt.value!=null&&st.setAttribute("value",""+Z(mt.value));break;case"select":st.multiple=!!mt.multiple,(ue=mt.value)!=null?Lt(st,!!mt.multiple,ue,!1):mt.defaultValue!=null&&Lt(st,!!mt.multiple,mt.defaultValue,!0);break;default:typeof Ht.onClick=="function"&&(st.onclick=Du)}ly(_t,mt)&&(ut.flags|=4)}ut.ref!==null&&(ut.flags|=128)}return null;case 6:if(st&&ut.stateNode!=null)l2(0,ut,st.memoizedProps,mt);else{if(typeof mt!="string"&&ut.stateNode===null)throw Error(i(166));_t=Ja(ic.current),Ja(Fo.current),Zu(ut)?(mt=ut.stateNode,_t=ut.memoizedProps,mt[Vi]=ut,mt.nodeValue!==_t&&(ut.flags|=4)):((mt=(_t.nodeType===9?_t:_t.ownerDocument).createTextNode(mt))[Vi]=ut).stateNode=mt}return null;case 13:return Bn(Kn),mt=ut.memoizedState,64&ut.flags?(ut.lanes=_t,ut):(mt=mt!==null,_t=!1,st===null?ut.memoizedProps.fallback!==void 0&&Zu(ut):_t=st.memoizedState!==null,mt&&!_t&&2&ut.mode&&(st===null&&ut.memoizedProps.unstable_avoidThisFallback!==!0||1&Kn.current?mr===0&&(mr=3):(mr!==0&&mr!==3||(mr=4),Pr===null||!(134217727&pc)&&!(134217727&el)||rl(Pr,Sr))),(mt||_t)&&(ut.flags|=4),null);case 4:return Qs(),st===null&&ry(ut.stateNode.containerInfo),null;case 10:return mp(ut),null;case 19:if(Bn(Kn),(mt=ut.memoizedState)===null)return null;if(ue=!!(64&ut.flags),(ie=mt.rendering)===null)if(ue)fc(mt,!1);else{if(mr!==0||st!==null&&64&st.flags)for(st=ut.child;st!==null;){if((ie=Yu(st))!==null){for(ut.flags|=64,fc(mt,!1),(ue=ie.updateQueue)!==null&&(ut.updateQueue=ue,ut.flags|=4),mt.lastEffect===null&&(ut.firstEffect=null),ut.lastEffect=mt.lastEffect,mt=_t,_t=ut.child;_t!==null;)st=mt,(ue=_t).flags&=2,ue.nextEffect=null,ue.firstEffect=null,(ue.lastEffect=null)===(ie=ue.alternate)?(ue.childLanes=0,ue.lanes=st,ue.child=null,ue.memoizedProps=null,ue.memoizedState=null,ue.updateQueue=null,ue.dependencies=null,ue.stateNode=null):(ue.childLanes=ie.childLanes,ue.lanes=ie.lanes,ue.child=ie.child,ue.memoizedProps=ie.memoizedProps,ue.memoizedState=ie.memoizedState,ue.updateQueue=ie.updateQueue,ue.type=ie.type,st=ie.dependencies,ue.dependencies=st===null?null:{lanes:st.lanes,firstContext:st.firstContext}),_t=_t.sibling;return Wn(Kn,1&Kn.current|2),ut.child}st=st.sibling}mt.tail!==null&&wr()>$p&&(ut.flags|=64,fc(mt,!(ue=!0)),ut.lanes=33554432)}else{if(!ue)if((st=Yu(ie))!==null){if(ut.flags|=64,ue=!0,(_t=st.updateQueue)!==null&&(ut.updateQueue=_t,ut.flags|=4),fc(mt,!0),mt.tail===null&&mt.tailMode==="hidden"&&!ie.alternate&&!zo)return(ut=ut.lastEffect=mt.lastEffect)!==null&&(ut.nextEffect=null),null}else 2*wr()-mt.renderingStartTime>$p&&_t!==1073741824&&(ut.flags|=64,fc(mt,!(ue=!0)),ut.lanes=33554432);mt.isBackwards?(ie.sibling=ut.child,ut.child=ie):((_t=mt.last)!==null?_t.sibling=ie:ut.child=ie,mt.last=ie)}return mt.tail!==null?(_t=mt.tail,mt.rendering=_t,mt.tail=_t.sibling,mt.lastEffect=ut.lastEffect,mt.renderingStartTime=wr(),_t.sibling=null,ut=Kn.current,Wn(Kn,ue?1&ut|2:1&ut),_t):null;case 23:case 24:return Kp(),st!==null&&st.memoizedState!==null!=(ut.memoizedState!==null)&&mt.mode!=="unstable-defer-without-hiding"&&(ut.flags|=4),null}throw Error(i(156,ut.tag))}(W,j,Ka))!==null)return void(sr=W);if((W=j).tag!==24&&W.tag!==23||W.memoizedState===null||1073741824&Ka||!(4&W.mode)){for(var it=0,ot=W.child;ot!==null;)it|=ot.lanes|ot.childLanes,ot=ot.sibling;W.childLanes=it}C!==null&&!(2048&C.flags)&&(C.firstEffect===null&&(C.firstEffect=j.firstEffect),j.lastEffect!==null&&(C.lastEffect!==null&&(C.lastEffect.nextEffect=j.firstEffect),C.lastEffect=j.lastEffect),1<j.flags&&(C.lastEffect!==null?C.lastEffect.nextEffect=j:C.firstEffect=j,C.lastEffect=j))}if((j=j.sibling)!==null)return void(sr=j)}while(sr=j=C,j!==null);mr===0&&(mr=5)}function il(C){var j=Gs();return qa(99,(function(W,it){for(;oa(),hc!==null;);if(48&fn)throw Error(i(327));var ot=W.finishedWork;if(ot===null)return null;if(W.finishedWork=null,W.finishedLanes=0,ot===W.current)throw Error(i(177));W.callbackNode=null;var st=ot.lanes|ot.childLanes,ut=st,_t=W.pendingLanes&~ut;W.pendingLanes=ut,W.suspendedLanes=0,W.pingedLanes=0,W.expiredLanes&=ut,W.mutableReadLanes&=ut,W.entangledLanes&=ut,ut=W.entanglements;for(var mt,Ht=W.eventTimes,ie=W.expirationTimes;0<_t;){var ue=31-yo(_t),Me=1<<ue;ut[ue]=0,Ht[ue]=-1,ie[ue]=-1,_t&=~Me}if(gi!==null&&!(24&st)&&gi.has(W)&&gi.delete(W),W===Pr&&(sr=Pr=null,Sr=0),(st=1<ot.flags?ot.lastEffect!==null?(ot.lastEffect.nextEffect=ot,ot.firstEffect):ot:ot.firstEffect)!==null){if(ut=fn,fn|=32,Lp.current=null,np=Jr,Qf(Ht=Y0())){if("selectionStart"in Ht)ie={start:Ht.selectionStart,end:Ht.selectionEnd};else t:if(ie=(ie=Ht.ownerDocument)&&ie.defaultView||window,(Me=ie.getSelection&&ie.getSelection())&&Me.rangeCount!==0){ie=Me.anchorNode,_t=Me.anchorOffset,ue=Me.focusNode,Me=Me.focusOffset;try{ie.nodeType,ue.nodeType}catch{ie=null;break t}var mn=0,Kt=-1,re=-1,ge=0,De=0,Re=Ht,Ze=null;e:for(;;){for(;Re!==ie||_t!==0&&Re.nodeType!==3||(Kt=mn+_t),Re!==ue||Me!==0&&Re.nodeType!==3||(re=mn+Me),Re.nodeType===3&&(mn+=Re.nodeValue.length),(mt=Re.firstChild)!==null;)Ze=Re,Re=mt;for(;;){if(Re===Ht)break e;if(Ze===ie&&++ge===_t&&(Kt=mn),Ze===ue&&++De===Me&&(re=mn),(mt=Re.nextSibling)!==null)break;Ze=(Re=Ze).parentNode}Re=mt}ie=Kt===-1||re===-1?null:{start:Kt,end:re}}else ie=null;ie=ie||{start:0,end:0}}else ie=null;yc=null,ld=Jr=!(rp={focusedElem:Ht,selectionRange:ie}),Ye=st;do try{(function(){for(;Ye!==null;){var yn=Ye.alternate,dn=(ld||yc===null||(8&Ye.flags?pt(Ye,yc)&&(ld=!0):Ye.tag===13&&function(Mn,Vn){return Mn!==null&&((Mn=Mn.memoizedState)===null||Mn.dehydrated!==null)&&(Vn=Vn.memoizedState)!==null&&Vn.dehydrated===null}(yn,Ye)&&pt(Ye,yc)&&(ld=!0)),Ye.flags);256&dn&&function(Mn,Vn){switch(Vn.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:var ao,Ho;return 256&Vn.flags&&Mn!==null&&(ao=Mn.memoizedProps,Ho=Mn.memoizedState,Vn=(Mn=Vn.stateNode).getSnapshotBeforeUpdate(Vn.elementType===Vn.type?ao:_o(Vn.type,ao),Ho),Mn.__reactInternalSnapshotBeforeUpdate=Vn);case 3:return 256&Vn.flags&&ip(Vn.stateNode.containerInfo)}throw Error(i(163))}(yn,Ye),!(512&dn)||ta||(ta=!0,tc(97,function(){return oa(),null})),Ye=Ye.nextEffect}})()}catch(yn){if(Ye===null)throw Error(i(330));ia(Ye,yn),Ye=Ye.nextEffect}while(Ye!==null);yc=null,Ye=st;do try{for(Ht=W;Ye!==null;){var ln,Xe,Qe=Ye.flags;switch(16&Qe&&dt(Ye.stateNode,""),128&Qe&&(ln=Ye.alternate)!==null&&(Xe=ln.ref)!==null&&(typeof Xe=="function"?Xe(null):Xe.current=null),1038&Qe){case 2:db(Ye),Ye.flags&=-3;break;case 6:db(Ye),Ye.flags&=-3,Dp(Ye.alternate,Ye);break;case 1024:Ye.flags&=-1025;break;case 1028:Ye.flags&=-1025,Dp(Ye.alternate,Ye);break;case 4:Dp(Ye.alternate,Ye);break;case 8:fb(Ht,ie=Ye);var xn=ie.alternate;cb(ie),xn!==null&&cb(xn)}Ye=Ye.nextEffect}}catch(yn){if(Ye===null)throw Error(i(330));ia(Ye,yn),Ye=Ye.nextEffect}while(Ye!==null);if(Xe=rp,ln=Y0(),Qe=Xe.focusedElem,Ht=Xe.selectionRange,ln!==Qe&&Qe&&Qe.ownerDocument&&function yn(dn,Mn){return!(!dn||!Mn)&&(dn===Mn||(!dn||dn.nodeType!==3)&&(Mn&&Mn.nodeType===3?yn(dn,Mn.parentNode):"contains"in dn?dn.contains(Mn):!!dn.compareDocumentPosition&&!!(16&dn.compareDocumentPosition(Mn))))}(Qe.ownerDocument.documentElement,Qe)){for(Ht!==null&&Qf(Qe)&&(ln=Ht.start,(Xe=Ht.end)===void 0&&(Xe=ln),"selectionStart"in Qe?(Qe.selectionStart=ln,Qe.selectionEnd=Math.min(Xe,Qe.value.length)):(Xe=(ln=Qe.ownerDocument||document)&&ln.defaultView||window).getSelection&&(Xe=Xe.getSelection(),ie=Qe.textContent.length,xn=Math.min(Ht.start,ie),Ht=Ht.end===void 0?xn:Math.min(Ht.end,ie),!Xe.extend&&Ht<xn&&(ie=Ht,Ht=xn,xn=ie),ie=G0(Qe,xn),_t=G0(Qe,Ht),ie&&_t&&(Xe.rangeCount!==1||Xe.anchorNode!==ie.node||Xe.anchorOffset!==ie.offset||Xe.focusNode!==_t.node||Xe.focusOffset!==_t.offset)&&((ln=ln.createRange()).setStart(ie.node,ie.offset),Xe.removeAllRanges(),Ht<xn?(Xe.addRange(ln),Xe.extend(_t.node,_t.offset)):(ln.setEnd(_t.node,_t.offset),Xe.addRange(ln))))),ln=[],Xe=Qe;Xe=Xe.parentNode;)Xe.nodeType===1&&ln.push({element:Xe,left:Xe.scrollLeft,top:Xe.scrollTop});for(typeof Qe.focus=="function"&&Qe.focus(),Qe=0;Qe<ln.length;Qe++)(Xe=ln[Qe]).element.scrollLeft=Xe.left,Xe.element.scrollTop=Xe.top}Jr=!!np,rp=np=null,W.current=ot,Ye=st;do try{for(Qe=W;Ye!==null;){var kn,jn,pn=Ye.flags;36&pn&&d2(Qe,Ye.alternate,Ye),128&pn&&(ln=void 0,(kn=Ye.ref)!==null&&(jn=Ye.stateNode,Ye.tag,ln=jn,typeof kn=="function"?kn(ln):kn.current=ln)),Ye=Ye.nextEffect}}catch(yn){if(Ye===null)throw Error(i(330));ia(Ye,yn),Ye=Ye.nextEffect}while(Ye!==null);Ye=null,t2(),fn=ut}else W.current=ot;if(ta)ta=!1,hc=W,gc=it;else for(Ye=st;Ye!==null;)it=Ye.nextEffect,Ye.nextEffect=null,8&Ye.flags&&((pn=Ye).sibling=null,pn.stateNode=null),Ye=it;if((st=W.pendingLanes)===0&&($o=null),st===1?W===Wp?mc++:(mc=0,Wp=W):mc=0,ot=ot.stateNode,Ha&&typeof Ha.onCommitFiberRoot=="function")try{Ha.onCommitFiberRoot(cp,ot,void 0,!(64&~ot.current.flags))}catch{}if(oo(W,wr()),id)throw id=!1,W=Hp,Hp=null,W;return 8&fn||Bo(),null}).bind(null,C,j)),null}function oa(){var C;return gc!==90&&(C=97<gc?97:gc,gc=90,qa(C,p2))}function wb(C,j){Jp.push(j,C),ta||(ta=!0,tc(97,function(){return oa(),null}))}function p2(){if(hc===null)return!1;var C=hc;if(hc=null,48&fn)throw Error(i(331));var j=fn,W=(fn|=32,Jp);Jp=[];for(var it=0;it<W.length;it+=2){var ot=W[it],st=W[it+1],ut=ot.destroy;if(ot.destroy=void 0,typeof ut=="function")try{ut()}catch(mt){if(st===null)throw Error(i(330));ia(st,mt)}}for(W=qp,qp=[],it=0;it<W.length;it+=2){ot=W[it],st=W[it+1];try{var _t=ot.create;ot.destroy=_t()}catch(mt){if(st===null)throw Error(i(330));ia(st,mt)}}for(_t=C.current.firstEffect;_t!==null;)C=_t.nextEffect,_t.nextEffect=null,8&_t.flags&&(_t.sibling=null,_t.stateNode=null),_t=C;return fn=j,Bo(),!0}function Sb(C,j,W){Qi(C,j=ob(0,j=Rp(W,j),1)),j=Kr(),(C=cd(C,1))!==null&&(Oa(C,1,j),oo(C,j))}function ia(C,j){if(C.tag===3)Sb(C,C,j);else for(var W=C.return;W!==null;){if(W.tag===3){Sb(W,C,j);break}if(W.tag===1){var it,ot=W.stateNode;if(typeof W.type.getDerivedStateFromError=="function"||typeof ot.componentDidCatch=="function"&&($o===null||!$o.has(ot))){if(Qi(W,ib(W,C=Rp(j,C),1)),it=Kr(),(W=cd(W,1))!==null)Oa(W,1,it),oo(W,it);else if(typeof ot.componentDidCatch=="function"&&($o===null||!$o.has(ot)))try{ot.componentDidCatch(j,C)}catch{}break}}W=W.return}}function h2(C,j,W){var it=C.pingCache;it!==null&&it.delete(j),j=Kr(),C.pingedLanes|=C.suspendedLanes&W,Pr===C&&(Sr&W)===W&&(mr===4||mr===3&&(62914560&Sr)===Sr&&wr()-Up<500?ol(C,0):Fp|=W),oo(C,j)}function g2(C,j,W,it){this.tag=C,this.key=W,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=j,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=it,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function io(C,j,W,it){return new g2(C,j,W,it)}function Gp(C){return(C=C.prototype)&&C.isReactComponent}function aa(C,j){var W=C.alternate;return W===null?((W=io(C.tag,j,C.key,C.mode)).elementType=C.elementType,W.type=C.type,W.stateNode=C.stateNode,(W.alternate=C).alternate=W):(W.pendingProps=j,W.type=C.type,W.flags=0,W.nextEffect=null,W.firstEffect=null,W.lastEffect=null),W.childLanes=C.childLanes,W.lanes=C.lanes,W.child=C.child,W.memoizedProps=C.memoizedProps,W.memoizedState=C.memoizedState,W.updateQueue=C.updateQueue,j=C.dependencies,W.dependencies=j===null?null:{lanes:j.lanes,firstContext:j.firstContext},W.sibling=C.sibling,W.index=C.index,W.ref=C.ref,W}function dd(C,j,W,it,ot,st){var ut=2;if(typeof(it=C)=="function")Gp(C)&&(ut=1);else if(typeof C=="string")ut=5;else t:switch(C){case N:return al(W.children,ot,st,j);case V:ut=8,ot|=16;break;case O:ut=8,ot|=1;break;case R:return(C=io(12,W,j,8|ot)).elementType=R,C.type=R,C.lanes=st,C;case $:return(C=io(13,W,j,ot)).type=$,C.elementType=$,C.lanes=st,C;case M:return(C=io(19,W,j,ot)).elementType=M,C.lanes=st,C;case G:return Yp(W,ot,st,j);case F:return(C=io(24,W,j,ot)).elementType=F,C.lanes=st,C;default:if(typeof C=="object"&&C!==null)switch(C.$$typeof){case A:ut=10;break t;case z:ut=9;break t;case H:ut=11;break t;case J:ut=14;break t;case K:ut=16,it=null;break t;case P:ut=22;break t}throw Error(i(130,C==null?C:typeof C,""))}return(j=io(ut,W,j,ot)).elementType=C,j.type=it,j.lanes=st,j}function al(C,j,W,it){return(C=io(7,C,it,j)).lanes=W,C}function Yp(C,j,W,it){return(C=io(23,C,it,j)).elementType=G,C.lanes=W,C}function Zp(C,j,W){return(C=io(6,C,null,j)).lanes=W,C}function Qp(C,j,W){return(j=io(4,C.children!==null?C.children:[],C.key,j)).lanes=W,j.stateNode={containerInfo:C.containerInfo,pendingChildren:null,implementation:C.implementation},j}function m2(C,j,W){this.tag=j,this.containerInfo=C,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=W,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=_r(0),this.expirationTimes=_r(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_r(0),this.mutableSourceEagerHydrationData=null}function fd(C,j,W,it){var ot=j.current,st=Kr(),ut=na(ot);t:if(W){e:{if(Te(W=W._reactInternals)!==W||W.tag!==1)throw Error(i(170));var _t=W;do switch(_t.tag){case 3:_t=_t.stateNode.context;break e;case 1:if(Wr(_t.type)){_t=_t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}while((_t=_t.return)!==null);throw Error(i(171))}if(W.tag===1){var mt=W.type;if(Wr(mt)){W=hy(W,mt,_t);break t}}W=_t}else W=Gi;j.context===null?j.context=W:j.pendingContext=W,(j=Zi(st,ut)).payload={element:C},(it=it===void 0?null:it)!==null&&(j.callback=it),Qi(ot,j),ra(ot,ut,st)}function Xp(C){return(C=C.current).child?(C.child.tag,C.child.stateNode):null}function Cb(C,j){var W;(C=C.memoizedState)!==null&&C.dehydrated!==null&&(W=C.retryLane,C.retryLane=W!==0&&W<j?W:j)}function th(C,j){Cb(C,j),(C=C.alternate)&&Cb(C,j)}function eh(C,j,W){var it=W!=null&&W.hydrationOptions!=null&&W.hydrationOptions.mutableSources||null;if(W=new m2(C,j,W!=null&&W.hydrate===!0),j=io(3,null,null,j===2?7:j===1?3:0),(W.current=j).stateNode=W,yp(j),C[Ws]=W.current,ry(C.nodeType===8?C.parentNode:C),it)for(C=0;C<it.length;C++){var ot=(ot=(j=it[C])._getVersion)(j._source);W.mutableSourceEagerHydrationData==null?W.mutableSourceEagerHydrationData=[j,ot]:W.mutableSourceEagerHydrationData.push(j,ot)}this._internalRoot=W}function vc(C){return C&&(C.nodeType===1||C.nodeType===9||C.nodeType===11||C.nodeType===8&&C.nodeValue===" react-mount-point-unstable ")}function pd(C,j,W,it,ot){var st,ut,_t,mt=W._reactRootContainer;return mt?(_t=mt._internalRoot,typeof ot=="function"&&(st=ot,ot=function(){var Ht=Xp(_t);st.call(Ht)}),fd(j,_t,C,ot)):(_t=(mt=W._reactRootContainer=function(Ht,ie){if(!(ie=ie||!(!(ie=Ht?Ht.nodeType===9?Ht.documentElement:Ht.firstChild:null)||ie.nodeType!==1||!ie.hasAttribute("data-reactroot"))))for(var ue;ue=Ht.lastChild;)Ht.removeChild(ue);return new eh(Ht,0,ie?{hydrate:!0}:void 0)}(W,it))._internalRoot,typeof ot=="function"&&(ut=ot,ot=function(){var Ht=Xp(_t);ut.call(Ht)}),yb(function(){fd(j,_t,C,ot)})),Xp(_t)}function Eb(C,j){if(vc(j))return function(W,it,ot,st){return{$$typeof:D,key:(st=3<arguments.length&&st!==void 0?st:null)==null?null:""+st,children:W,containerInfo:it,implementation:ot}}(C,j,null,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null);throw Error(i(200))}hb=function(C,j,W){var it=j.lanes;if(C!==null)if(C.memoizedProps!==j.pendingProps||Fr.current)xo=!0;else{if(!(W&it)){switch(xo=!1,j.tag){case 3:Xy(j),wp();break;case 5:Iy(j);break;case 1:Wr(j.type)&&Fu(j);break;case 4:vp(j,j.stateNode.containerInfo);break;case 10:it=j.memoizedProps.value;var ot=j.type._context;Wn($u,ot._currentValue),ot._currentValue=it;break;case 13:if(j.memoizedState!==null)return W&j.child.childLanes?tb(C,j,W):(Wn(Kn,1&Kn.current),(j=hi(C,j,W))!==null?j.sibling:null);Wn(Kn,1&Kn.current);break;case 19:if(it=!!(W&j.childLanes),64&C.flags){if(it)return rb(C,j,W);j.flags|=64}if((ot=j.memoizedState)!==null&&(ot.rendering=null,ot.tail=null,ot.lastEffect=null),Wn(Kn,Kn.current),it)break;return null;case 23:case 24:return j.lanes=0,Yy(C,j,W)}return hi(C,j,W)}xo=!!(16384&C.flags)}else xo=!1;switch(j.lanes=0,j.tag){case 2:return it=j.type,C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),C=j.pendingProps,ot=Ks(j,xr.current),Zs(j,W),ot=Ep(null,j,it,C,ot,W),j.flags|=1,typeof ot=="object"&&ot!==null&&typeof ot.render=="function"&&ot.$$typeof===void 0?(j.tag=1,j.memoizedState=null,j.updateQueue=null,Wr(it)?(st=!0,Fu(j)):st=!1,j.memoizedState=ot.state!==null&&ot.state!==void 0?ot.state:null,yp(j),typeof(mt=it.getDerivedStateFromProps)=="function"&&Ju(j,0,mt,C),ot.updater=Wu,bp((j.stateNode=ot)._reactInternals=j,it,C,W),Np(null,j,it,!0,st,W)):(j.tag=0,Vr(null,j,ot,W),j.child);case 16:ot=j.elementType;t:{switch(C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),C=j.pendingProps,ot=(st=ot._init)(ot._payload),j.type=ot,st=j.tag=function(ie){if(typeof ie=="function")return Gp(ie)?1:0;if(ie!=null){if((ie=ie.$$typeof)===H)return 11;if(ie===J)return 14}return 2}(ot),C=_o(ot,C),st){case 0:j=Ap(null,j,ot,C,W);break t;case 1:j=Qy(null,j,ot,C,W);break t;case 11:j=Vy(null,j,ot,C,W);break t;case 14:j=Ky(null,j,ot,_o(ot.type,C),it,W);break t}throw Error(i(306,ot,""))}return j;case 0:return it=j.type,ot=j.pendingProps,Ap(C,j,it,ot=j.elementType===it?ot:_o(it,ot),W);case 1:return it=j.type,ot=j.pendingProps,Qy(C,j,it,ot=j.elementType===it?ot:_o(it,ot),W);case 3:if(Xy(j),it=j.updateQueue,C===null||it===null)throw Error(i(282));if(it=j.pendingProps,ot=(ot=j.memoizedState)!==null?ot.element:null,Cy(C,j),ec(j,it,null,W),(it=j.memoizedState.element)===ot)wp(),j=hi(C,j,W);else{if((st=(ot=j.stateNode).hydrate)&&(Xi=Js(j.stateNode.containerInfo.firstChild),pi=j,st=zo=!0),st){if((C=ot.mutableSourceEagerHydrationData)!=null)for(ot=0;ot<C.length;ot+=2)(st=C[ot])._workInProgressVersionPrimary=C[ot+1],Xs.push(st);for(W=Py(j,null,it,W),j.child=W;W;)W.flags=-3&W.flags|1024,W=W.sibling}else Vr(C,j,it,W),wp();j=j.child}return j;case 5:return Iy(j),C===null&&xp(j),it=j.type,ot=j.pendingProps,st=C!==null?C.memoizedProps:null,mt=ot.children,op(it,ot)?mt=null:st!==null&&op(it,st)&&(j.flags|=16),Zy(C,j),Vr(C,j,mt,W),j.child;case 6:return C===null&&xp(j),null;case 13:return tb(C,j,W);case 4:return vp(j,j.stateNode.containerInfo),it=j.pendingProps,C===null?j.child=Gu(j,null,it,W):Vr(C,j,it,W),j.child;case 11:return it=j.type,ot=j.pendingProps,Vy(C,j,it,ot=j.elementType===it?ot:_o(it,ot),W);case 7:return Vr(C,j,j.pendingProps,W),j.child;case 8:case 12:return Vr(C,j,j.pendingProps.children,W),j.child;case 10:t:{it=j.type._context,ot=j.pendingProps,mt=j.memoizedProps;var st=ot.value,ut=j.type._context;if(Wn($u,ut._currentValue),ut._currentValue=st,mt!==null)if(ut=mt.value,(st=rr(ut,st)?0:0|(typeof it._calculateChangedBits=="function"?it._calculateChangedBits(ut,st):1073741823))==0){if(mt.children===ot.children&&!Fr.current){j=hi(C,j,W);break t}}else for((ut=j.child)!==null&&(ut.return=j);ut!==null;){var _t=ut.dependencies;if(_t!==null)for(var mt=ut.child,Ht=_t.firstContext;Ht!==null;){if(Ht.context===it&&Ht.observedBits&st){ut.tag===1&&((Ht=Zi(-1,W&-W)).tag=2,Qi(ut,Ht)),ut.lanes|=W,(Ht=ut.alternate)!==null&&(Ht.lanes|=W),Sy(ut.return,W),_t.lanes|=W;break}Ht=Ht.next}else mt=ut.tag===10&&ut.type===j.type?null:ut.child;if(mt!==null)mt.return=ut;else for(mt=ut;mt!==null;){if(mt===j){mt=null;break}if((ut=mt.sibling)!==null){ut.return=mt.return,mt=ut;break}mt=mt.return}ut=mt}Vr(C,j,ot.children,W),j=j.child}return j;case 9:return ot=j.type,it=(st=j.pendingProps).children,Zs(j,W),it=it(ot=no(ot,st.unstable_observedBits)),j.flags|=1,Vr(C,j,it,W),j.child;case 14:return st=_o(ot=j.type,j.pendingProps),Ky(C,j,ot,st=_o(ot.type,st),it,W);case 15:return Gy(C,j,j.type,j.pendingProps,it,W);case 17:return it=j.type,ot=j.pendingProps,ot=j.elementType===it?ot:_o(it,ot),C!==null&&(C.alternate=null,j.alternate=null,j.flags|=2),j.tag=1,Wr(it)?(C=!0,Fu(j)):C=!1,Zs(j,W),jy(j,it,ot),bp(j,it,ot,W),Np(null,j,it,!0,C,W);case 19:return rb(C,j,W);case 23:case 24:return Yy(C,j,W)}throw Error(i(156,j.tag))},eh.prototype.render=function(C){fd(C,this._internalRoot,null,null)},eh.prototype.unmount=function(){var C=this._internalRoot,j=C.containerInfo;fd(null,C,null,function(){j[Ws]=null})},Dt=function(C){C.tag===13&&(ra(C,4,Kr()),th(C,4))},$t=function(C){C.tag===13&&(ra(C,67108864,Kr()),th(C,67108864))},qt=function(C){var j,W;C.tag===13&&(j=Kr(),ra(C,W=na(C),j),th(C,W))},Le=function(C,j,W){switch(j){case"input":if(gt(C,W),j=W.name,W.type==="radio"&&j!=null){for(W=C;W.parentNode;)W=W.parentNode;for(W=W.querySelectorAll("input[name="+JSON.stringify(""+j)+'][type="radio"]'),j=0;j<W.length;j++){var it=W[j];if(it!==C&&it.form===C.form){var ot=Bu(it);if(!ot)throw Error(i(90));tt(it),gt(it,ot)}}}break;case"textarea":jt(C,W);break;case"select":(j=W.value)!=null&&Lt(C,!!W.multiple,j,!1)}},hn=mb,Tt=function(C,j,W,it,ot){var st=fn;fn|=4;try{return qa(98,C.bind(null,j,W,it,ot))}finally{(fn=st)===0&&(nl(),Bo())}};var y2=function(C,j){var W=fn;fn|=2;try{return C(j)}finally{(fn=W)===0&&(nl(),Bo())}};if(ur={Events:[Ql,Vs,Bu,Ie,He,oa,{current:!(ae=function(){var C;!(49&fn)&&(gi!==null&&(C=gi,gi=null,C.forEach(function(j){j.expiredLanes|=24&j.pendingLanes,oo(j,wr())})),Bo(),oa())})}]},wn={bundleType:(t={findFiberByHostInstance:Ua,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"}).bundleType,version:t.version,rendererPackageName:t.rendererPackageName,rendererConfig:t.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(C){return(C=be(C))===null?null:C.stateNode},findFiberByHostInstance:t.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&!(zn=__REACT_DEVTOOLS_GLOBAL_HOOK__).isDisabled&&zn.supportsFiber)try{cp=zn.inject(wn),Ha=zn}catch{}r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ur,r.createPortal=Eb,r.findDOMNode=function(C){if(C==null)return null;if(C.nodeType===1)return C;var j=C._reactInternals;if(j!==void 0)return(C=be(j))===null?null:C.stateNode;throw typeof C.render=="function"?Error(i(188)):Error(i(268,Object.keys(C)))},r.flushSync=function(C,j){var W=fn;if(48&W)return C(j);fn|=1;try{if(C)return qa(99,C.bind(null,j))}finally{fn=W,Bo()}},r.hydrate=function(C,j,W){if(vc(j))return pd(null,C,j,!0,W);throw Error(i(200))},r.render=function(C,j,W){if(vc(j))return pd(null,C,j,!1,W);throw Error(i(200))},r.unmountComponentAtNode=function(C){if(vc(C))return!!C._reactRootContainer&&(yb(function(){pd(null,null,C,!1,function(){C._reactRootContainer=null,C[Ws]=null})}),!0);throw Error(i(40))},r.unstable_batchedUpdates=mb,r.unstable_createPortal=function(C,j){return Eb(C,j,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},r.unstable_renderSubtreeIntoContainer=function(C,j,W,it){if(!vc(W))throw Error(i(200));if(C==null||C._reactInternals===void 0)throw Error(i(38));return pd(C,j,W,!1,it)},r.version="17.0.2"},{"object-assign":385,react:408,scheduler:414}],401:[function(t,f,r){(function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE=="function")try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}})(),f.exports=t("./cjs/react-dom.production.min.js")},{"./cjs/react-dom.development.js":399,"./cjs/react-dom.production.min.js":400}],402:[function(t,f,r){(function(n){(function(){function e(K){if(typeof K=="object"&&K!==null){var P=K.$$typeof;switch(P){case s:var U=K.type;switch(U){case l:case a:case o:case p:case m:return U;default:var V=U&&U.$$typeof;switch(V){case u:case h:case _:case b:case c:return V;default:return P}}case i:return P}}}var s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S,E,k,D,N,O,R,A,z,H,$,M,J;n.env.NODE_ENV!=="production"&&(s=60103,i=60106,l=60107,o=60108,a=60114,c=60109,u=60110,h=60112,p=60113,m=60120,b=60115,_=60116,v=60121,w=60122,x=60117,S=60129,E=60131,typeof Symbol=="function"&&Symbol.for&&(s=(k=Symbol.for)("react.element"),i=k("react.portal"),l=k("react.fragment"),o=k("react.strict_mode"),a=k("react.profiler"),c=k("react.provider"),u=k("react.context"),h=k("react.forward_ref"),p=k("react.suspense"),m=k("react.suspense_list"),b=k("react.memo"),_=k("react.lazy"),v=k("react.block"),w=k("react.server.block"),x=k("react.fundamental"),k("react.scope"),k("react.opaque.id"),S=k("react.debug_trace_mode"),k("react.offscreen"),E=k("react.legacy_hidden")),k=u,D=c,N=s,O=h,R=l,A=_,z=b,H=i,$=a,M=o,J=p,r.ContextConsumer=k,r.ContextProvider=D,r.Element=N,r.ForwardRef=O,r.Fragment=R,r.Lazy=A,r.Memo=z,r.Portal=H,r.Profiler=$,r.StrictMode=M,r.Suspense=J,r.isAsyncMode=function(K){return!1},r.isConcurrentMode=function(K){return!1},r.isContextConsumer=function(K){return e(K)===u},r.isContextProvider=function(K){return e(K)===c},r.isElement=function(K){return typeof K=="object"&&K!==null&&K.$$typeof===s},r.isForwardRef=function(K){return e(K)===h},r.isFragment=function(K){return e(K)===l},r.isLazy=function(K){return e(K)===_},r.isMemo=function(K){return e(K)===b},r.isPortal=function(K){return e(K)===i},r.isProfiler=function(K){return e(K)===a},r.isStrictMode=function(K){return e(K)===o},r.isSuspense=function(K){return e(K)===p},r.isValidElementType=function(K){return typeof K=="string"||typeof K=="function"||K===l||K===a||K===S||K===o||K===p||K===m||K===E||typeof K=="object"&&K!==null&&(K.$$typeof===_||K.$$typeof===b||K.$$typeof===c||K.$$typeof===u||K.$$typeof===h||K.$$typeof===x||K.$$typeof===v||K[0]===w)},r.typeOf=e)}).call(this)}).call(this,t("_process"))},{_process:386}],403:[function(t,f,r){var n=60103,e=60106,s=60107,i=60108,l=60114,o=60109,a=60110,c=60112,u=60113,h=60120,p=60115,m=60116,b=60121,_=60122,v=60117,w=60129,x=60131;function S(M){if(typeof M=="object"&&M!==null){var J=M.$$typeof;switch(J){case n:switch(M=M.type){case s:case l:case i:case u:case h:return M;default:switch(M=M&&M.$$typeof){case a:case c:case m:case p:case o:return M;default:return J}}case e:return J}}}typeof Symbol=="function"&&Symbol.for&&(n=(E=Symbol.for)("react.element"),e=E("react.portal"),s=E("react.fragment"),i=E("react.strict_mode"),l=E("react.profiler"),o=E("react.provider"),a=E("react.context"),c=E("react.forward_ref"),u=E("react.suspense"),h=E("react.suspense_list"),p=E("react.memo"),m=E("react.lazy"),b=E("react.block"),_=E("react.server.block"),v=E("react.fundamental"),w=E("react.debug_trace_mode"),x=E("react.legacy_hidden"));var E=o,k=n,D=c,N=s,O=m,R=p,A=e,z=l,H=i,$=u;r.ContextConsumer=a,r.ContextProvider=E,r.Element=k,r.ForwardRef=D,r.Fragment=N,r.Lazy=O,r.Memo=R,r.Portal=A,r.Profiler=z,r.StrictMode=H,r.Suspense=$,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(M){return S(M)===a},r.isContextProvider=function(M){return S(M)===o},r.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===n},r.isForwardRef=function(M){return S(M)===c},r.isFragment=function(M){return S(M)===s},r.isLazy=function(M){return S(M)===m},r.isMemo=function(M){return S(M)===p},r.isPortal=function(M){return S(M)===e},r.isProfiler=function(M){return S(M)===l},r.isStrictMode=function(M){return S(M)===i},r.isSuspense=function(M){return S(M)===u},r.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===s||M===l||M===w||M===i||M===u||M===h||M===x||typeof M=="object"&&M!==null&&(M.$$typeof===m||M.$$typeof===p||M.$$typeof===o||M.$$typeof===a||M.$$typeof===c||M.$$typeof===v||M.$$typeof===b||M[0]===_)},r.typeOf=S},{}],404:[function(t,f,r){arguments[4][381][0].apply(r,arguments)},{"./cjs/react-is.development.js":402,"./cjs/react-is.production.min.js":403,_process:386,dup:381}],405:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0});var n=Object.assign||function(l){for(var o=1;o<arguments.length;o++){var a,c=arguments[o];for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(l[a]=c[a])}return l},e=s(t("react"));function s(l){return l&&l.__esModule?l:{default:l}}t=s(t("localized-strings"));var i=/(\{[\d|\w]+\})/;t.default.prototype.formatString=function(l){for(var o=arguments.length,a=Array(1<o?o-1:0),c=1;c<o;c++)a[c-1]=arguments[c];var u=!1;return l=(l||"").split(i).filter(function(h){return!!h}).map(function(h,p){if(h.match(i)){var m=h.slice(1,-1),b=a[m];if(b==null){if((m=a[0][m])===void 0)return b;b=m}return e.default.isValidElement(b)?(u=!0,e.default.Children.toArray(b).map(function(_){return n({},_,{key:p.toString()})})):b}return h}),u?l:l.join("")},r.default=t.default},{"localized-strings":383,react:408}],406:[function(t,f,r){},{"object-assign":385}],407:[function(t,f,r){var n=t("object-assign"),e=60103,s=60106,i=(r.Fragment=60107,r.StrictMode=60108,r.Profiler=60114,60109),l=60110,o=60112,a=(r.Suspense=60113,60115),c=60116,u=(typeof Symbol=="function"&&Symbol.for&&(e=(t=Symbol.for)("react.element"),s=t("react.portal"),r.Fragment=t("react.fragment"),r.StrictMode=t("react.strict_mode"),r.Profiler=t("react.profiler"),i=t("react.provider"),l=t("react.context"),o=t("react.forward_ref"),r.Suspense=t("react.suspense"),a=t("react.memo"),c=t("react.lazy")),typeof Symbol=="function"&&Symbol.iterator);function h($){for(var M="https://reactjs.org/docs/error-decoder.html?invariant="+$,J=1;J<arguments.length;J++)M+="&args[]="+encodeURIComponent(arguments[J]);return"Minified React error #"+$+"; visit "+M+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function b($,M,J){this.props=$,this.context=M,this.refs=m,this.updater=J||p}function _(){}function v($,M,J){this.props=$,this.context=M,this.refs=m,this.updater=J||p}b.prototype.isReactComponent={},b.prototype.setState=function($,M){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error(h(85));this.updater.enqueueSetState(this,$,M,"setState")},b.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")},_.prototype=b.prototype;var w=((t=v.prototype=new _).constructor=v,n(t,b.prototype),t.isPureReactComponent=!0,{current:null}),x=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function E($,M,J){var K,P={},U=null,V=null;if(M!=null)for(K in M.ref!==void 0&&(V=M.ref),M.key!==void 0&&(U=""+M.key),M)x.call(M,K)&&!S.hasOwnProperty(K)&&(P[K]=M[K]);var G=arguments.length-2;if(G===1)P.children=J;else if(1<G){for(var F=Array(G),q=0;q<G;q++)F[q]=arguments[q+2];P.children=F}if($&&$.defaultProps)for(K in G=$.defaultProps)P[K]===void 0&&(P[K]=G[K]);return{$$typeof:e,type:$,key:U,ref:V,props:P,_owner:w.current}}function k($){return typeof $=="object"&&$!==null&&$.$$typeof===e}var D=/\/+/g;function N($,M){return typeof $=="object"&&$!==null&&$.key!=null?($=""+$.key,J={"=":"=0",":":"=2"},"$"+$.replace(/[=:]/g,function(K){return J[K]})):M.toString(36);var J}function O($,M,J,K,P){var U,V,G=!1;if(($=(q=typeof $)!="undefined"&&q!=="boolean"?$:null)===null)G=!0;else switch(q){case"string":case"number":G=!0;break;case"object":switch($.$$typeof){case e:case s:G=!0}}if(G)return P=P(G=$),$=K===""?"."+N(G,0):K,Array.isArray(P)?(J="",O(P,M,J=$!=null?$.replace(D,"$&/")+"/":J,"",function(I){return I})):P!=null&&(k(P)&&(V=J+(!(U=P).key||G&&G.key===P.key?"":(""+P.key).replace(D,"$&/")+"/")+$,P={$$typeof:e,type:U.type,key:V,ref:U.ref,props:U.props,_owner:U._owner}),M.push(P)),1;if(G=0,K=K===""?".":K+":",Array.isArray($))for(var F=0;F<$.length;F++){var q,T=K+N(q=$[F],F);G+=O(q,M,J,T,P)}else if(typeof(T=(V=$)!==null&&typeof V=="object"&&typeof(V=u&&V[u]||V["@@iterator"])=="function"?V:null)=="function")for($=T.call($),F=0;!(q=$.next()).done;)G+=O(q=q.value,M,J,T=K+N(q,F++),P);else if(q==="object")throw M=""+$,Error(h(31,M==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":M));return G}function R($,M,J){if($==null)return $;var K=[],P=0;return O($,K,"","",function(U){return M.call(J,U,P++)}),K}function A($){var M;if($._status===-1&&(M=(M=$._result)(),$._status=0,($._result=M).then(function(J){$._status===0&&(J=J.default,$._status=1,$._result=J)},function(J){$._status===0&&($._status=2,$._result=J)})),$._status===1)return $._result;throw $._result}var z={current:null};function H(){var $=z.current;if($===null)throw Error(h(321));return $}t={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:n},r.Children={map:R,forEach:function($,M,J){R($,function(){M.apply(this,arguments)},J)},count:function($){var M=0;return R($,function(){M++}),M},toArray:function($){return R($,function(M){return M})||[]},only:function($){if(k($))return $;throw Error(h(143))}},r.Component=b,r.PureComponent=v,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t,r.cloneElement=function($,M,J){if($==null)throw Error(h(267,$));var K=n({},$.props),P=$.key,U=$.ref,V=$._owner;if(M!=null)for(G in M.ref!==void 0&&(U=M.ref,V=w.current),M.key!==void 0&&(P=""+M.key),$.type&&$.type.defaultProps&&(F=$.type.defaultProps),M)x.call(M,G)&&!S.hasOwnProperty(G)&&(K[G]=(M[G]===void 0&&F!==void 0?F:M)[G]);var G=arguments.length-2;if(G===1)K.children=J;else if(1<G){for(var F=Array(G),q=0;q<G;q++)F[q]=arguments[q+2];K.children=F}return{$$typeof:e,type:$.type,key:P,ref:U,props:K,_owner:V}},r.createContext=function($,M){return($={$$typeof:l,_calculateChangedBits:M=M===void 0?null:M,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:$},$.Consumer=$},r.createElement=E,r.createFactory=function($){var M=E.bind(null,$);return M.type=$,M},r.createRef=function(){return{current:null}},r.forwardRef=function($){return{$$typeof:o,render:$}},r.isValidElement=k,r.lazy=function($){return{$$typeof:c,_payload:{_status:-1,_result:$},_init:A}},r.memo=function($,M){return{$$typeof:a,type:$,compare:M===void 0?null:M}},r.useCallback=function($,M){return H().useCallback($,M)},r.useContext=function($,M){return H().useContext($,M)},r.useDebugValue=function(){},r.useEffect=function($,M){return H().useEffect($,M)},r.useImperativeHandle=function($,M,J){return H().useImperativeHandle($,M,J)},r.useLayoutEffect=function($,M){return H().useLayoutEffect($,M)},r.useMemo=function($,M){return H().useMemo($,M)},r.useReducer=function($,M,J){return H().useReducer($,M,J)},r.useRef=function($){return H().useRef($)},r.useState=function($){return H().useState($)},r.version="17.0.2"},{"object-assign":385}],408:[function(t,f,r){f.exports=t("./cjs/react.production.min.js")},{"./cjs/react.development.js":406,"./cjs/react.production.min.js":407}],409:[function(t,f,r){f=function(n){var e,s=Object.prototype,i=s.hasOwnProperty,l=(E=typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator",o=E.asyncIterator||"@@asyncIterator",a=E.toStringTag||"@@toStringTag";function c(M,J,K){return Object.defineProperty(M,J,{value:K,enumerable:!0,configurable:!0,writable:!0}),M[J]}try{c({},"")}catch{c=function(J,K,P){return J[K]=P}}function u(M,J,K,P){var U,V,G,F;return J=J&&J.prototype instanceof w?J:w,J=Object.create(J.prototype),P=new z(P||[]),J._invoke=(U=M,V=K,G=P,F=p,function(q,T){if(F===b)throw new Error("Generator is already running");if(F===_){if(q==="throw")throw T;return $()}for(G.method=q,G.arg=T;;){var I=G.delegate;if(I&&(I=function L(B,Y){var Z=B.iterator[Y.method];if(Z===e){if(Y.delegate=null,Y.method==="throw"){if(B.iterator.return&&(Y.method="return",Y.arg=e,L(B,Y),Y.method==="throw"))return v;Y.method="throw",Y.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}return(Z=h(Z,B.iterator,Y.arg)).type==="throw"?(Y.method="throw",Y.arg=Z.arg,Y.delegate=null,v):(Z=Z.arg)?Z.done?(Y[B.resultName]=Z.value,Y.next=B.nextLoc,Y.method!=="return"&&(Y.method="next",Y.arg=e),Y.delegate=null,v):Z:(Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,v)}(I,G),I)){if(I===v)continue;return I}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(F===p)throw F=_,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);if(F=b,(I=h(U,V,G)).type==="normal"){if(F=G.done?_:m,I.arg!==v)return{value:I.arg,done:G.done}}else I.type==="throw"&&(F=_,G.method="throw",G.arg=I.arg)}}),J}function h(M,J,K){try{return{type:"normal",arg:M.call(J,K)}}catch(P){return{type:"throw",arg:P}}}n.wrap=u;var p="suspendedStart",m="suspendedYield",b="executing",_="completed",v={};function w(){}function x(){}function S(){}var E,k,D=(c(E={},l,function(){return this}),(k=(k=Object.getPrototypeOf)&&k(k(H([]))))&&k!==s&&i.call(k,l)&&(E=k),S.prototype=w.prototype=Object.create(E));function N(M){["next","throw","return"].forEach(function(J){c(M,J,function(K){return this._invoke(J,K)})})}function O(M,J){var K;this._invoke=function(P,U){function V(){return new J(function(G,F){(function q(T,I,L,B){var Y;if((T=h(M[T],M,I)).type!=="throw")return(I=(Y=T.arg).value)&&typeof I=="object"&&i.call(I,"__await")?J.resolve(I.__await).then(function(Z){q("next",Z,L,B)},function(Z){q("throw",Z,L,B)}):J.resolve(I).then(function(Z){Y.value=Z,L(Y)},function(Z){return q("throw",Z,L,B)});B(T.arg)})(P,U,G,F)})}return K=K?K.then(V,V):V()}}function R(M){var J={tryLoc:M[0]};1 in M&&(J.catchLoc=M[1]),2 in M&&(J.finallyLoc=M[2],J.afterLoc=M[3]),this.tryEntries.push(J)}function A(M){var J=M.completion||{};J.type="normal",delete J.arg,M.completion=J}function z(M){this.tryEntries=[{tryLoc:"root"}],M.forEach(R,this),this.reset(!0)}function H(M){if(M){var J,K=M[l];if(K)return K.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length))return J=-1,(K=function P(){for(;++J<M.length;)if(i.call(M,J))return P.value=M[J],P.done=!1,P;return P.value=e,P.done=!0,P}).next=K}return{next:$}}function $(){return{value:e,done:!0}}return c(D,"constructor",x.prototype=S),c(S,"constructor",x),x.displayName=c(S,a,"GeneratorFunction"),n.isGeneratorFunction=function(M){return!!(M=typeof M=="function"&&M.constructor)&&(M===x||(M.displayName||M.name)==="GeneratorFunction")},n.mark=function(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,S):(M.__proto__=S,c(M,a,"GeneratorFunction")),M.prototype=Object.create(D),M},n.awrap=function(M){return{__await:M}},N(O.prototype),c(O.prototype,o,function(){return this}),n.AsyncIterator=O,n.async=function(M,J,K,P,U){U===void 0&&(U=Promise);var V=new O(u(M,J,K,P),U);return n.isGeneratorFunction(J)?V:V.next().then(function(G){return G.done?G.value:V.next()})},N(D),c(D,a,"Generator"),c(D,l,function(){return this}),c(D,"toString",function(){return"[object Generator]"}),n.keys=function(M){var J,K=[];for(J in M)K.push(J);return K.reverse(),function P(){for(;K.length;){var U=K.pop();if(U in M)return P.value=U,P.done=!1,P}return P.done=!0,P}},n.values=H,z.prototype={constructor:z,reset:function(M){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!M)for(var J in this)J.charAt(0)==="t"&&i.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=e)},stop:function(){this.done=!0;var M=this.tryEntries[0].completion;if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var J=this;function K(q,T){return V.type="throw",V.arg=M,J.next=q,T&&(J.method="next",J.arg=e),!!T}for(var P=this.tryEntries.length-1;0<=P;--P){var U=this.tryEntries[P],V=U.completion;if(U.tryLoc==="root")return K("end");if(U.tryLoc<=this.prev){var G=i.call(U,"catchLoc"),F=i.call(U,"finallyLoc");if(G&&F){if(this.prev<U.catchLoc)return K(U.catchLoc,!0);if(this.prev<U.finallyLoc)return K(U.finallyLoc)}else if(G){if(this.prev<U.catchLoc)return K(U.catchLoc,!0)}else{if(!F)throw new Error("try statement without catch or finally");if(this.prev<U.finallyLoc)return K(U.finallyLoc)}}}},abrupt:function(M,J){for(var K=this.tryEntries.length-1;0<=K;--K){var P=this.tryEntries[K];if(P.tryLoc<=this.prev&&i.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var U=P;break}}var V=(U=U&&(M==="break"||M==="continue")&&U.tryLoc<=J&&J<=U.finallyLoc?null:U)?U.completion:{};return V.type=M,V.arg=J,U?(this.method="next",this.next=U.finallyLoc,v):this.complete(V)},complete:function(M,J){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&J&&(this.next=J),v},finish:function(M){for(var J=this.tryEntries.length-1;0<=J;--J){var K=this.tryEntries[J];if(K.finallyLoc===M)return this.complete(K.completion,K.afterLoc),A(K),v}},catch:function(M){for(var J=this.tryEntries.length-1;0<=J;--J){var K,P,U=this.tryEntries[J];if(U.tryLoc===M)return(K=U.completion).type==="throw"&&(P=K.arg,A(U)),P}throw new Error("illegal catch attempt")},delegateYield:function(M,J,K){return this.delegate={iterator:H(M),resultName:J,nextLoc:K},this.method==="next"&&(this.arg=e),v}},n}(typeof f=="object"?f.exports:{});try{regeneratorRuntime=f}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=f:Function("r","regeneratorRuntime = r")(f)}},{}],410:[function(t,f,r){},{}],411:[function(t,f,r){var n=0;r.__interactionsRef=null,r.__subscriberRef=null,r.unstable_clear=function(e){return e()},r.unstable_getCurrent=function(){return null},r.unstable_getThreadID=function(){return++n},r.unstable_subscribe=function(){},r.unstable_trace=function(e,s,i){return i()},r.unstable_unsubscribe=function(){},r.unstable_wrap=function(e){return e}},{}],412:[function(t,f,r){},{}],413:[function(t,f,r){var n,e,s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S;function E(G,F){var q=G.length;for(G.push(F);;){var T=q-1>>>1,I=G[T];if(!(I!==void 0&&0<N(I,F)))break;G[T]=F,G[q]=I,q=T}}function k(G){return(G=G[0])===void 0?null:G}function D(G){var F=G[0];if(F!==void 0){var q=G.pop();if(q!==F){G[0]=q;for(var T=0,I=G.length;T<I;){var L=2*(T+1)-1,B=G[L],Y=1+L,Z=G[Y];if(B!==void 0&&N(B,q)<0)T=Z!==void 0&&N(Z,B)<0?(G[T]=Z,G[Y]=q,Y):(G[T]=B,G[L]=q,L);else{if(!(Z!==void 0&&N(Z,q)<0))break;G[T]=Z,G[Y]=q,T=Y}}}}}function N(G,F){var q=G.sortIndex-F.sortIndex;return q!=0?q:G.id-F.id}typeof performance=="object"&&typeof performance.now=="function"?(e=performance,r.unstable_now=function(){return e.now()}):(s=Date,i=s.now(),r.unstable_now=function(){return s.now()-i}),typeof window>"u"||typeof MessageChannel!="function"?(o=l=null,a=function(){if(l!==null)try{var G=r.unstable_now();l(!0,G),l=null}catch(F){throw setTimeout(a,0),F}},c=function(G){l!==null?setTimeout(c,0,G):(l=G,setTimeout(a,0))},u=function(G,F){o=setTimeout(G,F)},h=function(){clearTimeout(o)},r.unstable_shouldYield=function(){return!1},n=r.unstable_forceFrameRate=function(){}):(p=window.setTimeout,m=window.clearTimeout,typeof console<"u"&&(V=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof V!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),b=!1,_=null,v=-1,w=5,x=0,r.unstable_shouldYield=function(){return r.unstable_now()>=x},n=function(){},r.unstable_forceFrameRate=function(G){G<0||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<G?Math.floor(1e3/G):5},V=new MessageChannel,S=V.port2,V.port1.onmessage=function(){if(_!==null){var G=r.unstable_now();x=G+w;try{_(!0,G)?S.postMessage(null):(b=!1,_=null)}catch(F){throw S.postMessage(null),F}}else b=!1},c=function(G){_=G,b||(b=!0,S.postMessage(null))},u=function(G,F){v=p(function(){G(r.unstable_now())},F)},h=function(){m(v),v=-1});var O=[],R=[],A=1,z=null,H=3,$=!1,M=!1,J=!1;function K(G){for(var F=k(R);F!==null;){if(F.callback===null)D(R);else{if(!(F.startTime<=G))break;D(R),F.sortIndex=F.expirationTime,E(O,F)}F=k(R)}}function P(G){var F;J=!1,K(G),M||(k(O)!==null?(M=!0,c(U)):(F=k(R))!==null&&u(P,F.startTime-G))}function U(G,F){M=!1,J&&(J=!1,h()),$=!0;var q=H;try{for(K(F),z=k(O);z!==null&&(!(z.expirationTime>F)||G&&!r.unstable_shouldYield());){var T,I=z.callback;typeof I=="function"?(z.callback=null,H=z.priorityLevel,T=I(z.expirationTime<=F),F=r.unstable_now(),typeof T=="function"?z.callback=T:z===k(O)&&D(O),K(F)):D(O),z=k(O)}var L;return z!==null||((L=k(R))!==null&&u(P,L.startTime-F),!1)}finally{z=null,H=q,$=!1}}var V=n;r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(G){G.callback=null},r.unstable_continueExecution=function(){M||$||(M=!0,c(U))},r.unstable_getCurrentPriorityLevel=function(){return H},r.unstable_getFirstCallbackNode=function(){return k(O)},r.unstable_next=function(G){switch(H){case 1:case 2:case 3:var F=3;break;default:F=H}var q=H;H=F;try{return G()}finally{H=q}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=V,r.unstable_runWithPriority=function(G,F){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var q=H;H=G;try{return F()}finally{H=q}},r.unstable_scheduleCallback=function(G,F,q){var T=r.unstable_now();switch(q=typeof q=="object"&&q!==null&&typeof(q=q.delay)=="number"&&0<q?T+q:T,G){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return G={id:A++,callback:F,priorityLevel:G,startTime:q,expirationTime:I=q+I,sortIndex:-1},T<q?(G.sortIndex=q,E(R,G),k(O)===null&&G===k(R)&&(J?h():J=!0,u(P,q-T))):(G.sortIndex=I,E(O,G),M||$||(M=!0,c(U))),G},r.unstable_wrapCallback=function(G){var F=H;return function(){var q=H;H=F;try{return G.apply(this,arguments)}finally{H=q}}}},{}],414:[function(t,f,r){f.exports=t("./cjs/scheduler.production.min.js")},{"./cjs/scheduler.development.js":412,"./cjs/scheduler.production.min.js":413}],415:[function(t,f,r){f.exports=t("./cjs/scheduler-tracing.production.min.js")},{"./cjs/scheduler-tracing.development.js":410,"./cjs/scheduler-tracing.production.min.js":411}],416:[function(t,f,r){f.exports=function(n,e,s,i){if((h=s?s.call(i,n,e):void 0)!==void 0)return!!h;if(n===e)return!0;if(typeof n!="object"||!n||typeof e!="object"||!e)return!1;var l=Object.keys(n),o=Object.keys(e);if(l.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),c=0;c<l.length;c++){var u=l[c];if(!a(u))return!1;var h,p=n[u],m=e[u];if((h=s?s.call(i,p,m,u):void 0)===!1||h===void 0&&p!==m)return!1}return!0}},{}],417:[function(t,f,r){(function(n){(function(){function e(pt){return pt&&typeof pt=="object"&&"default"in pt?pt.default:pt}Object.defineProperty(r,"__esModule",{value:!0});var s=t("react-is"),i=t("react"),l=e(i),o=e(t("shallowequal")),a=e(t("@emotion/stylis")),c=e(t("@emotion/unitless")),u=e(t("@emotion/is-prop-valid")),h=e(t("hoist-non-react-statics"));function p(){return(p=Object.assign||function(pt){for(var Dt=1;Dt<arguments.length;Dt++){var $t,qt=arguments[Dt];for($t in qt)Object.prototype.hasOwnProperty.call(qt,$t)&&(pt[$t]=qt[$t])}return pt}).apply(this,arguments)}var m=function(pt,Dt){for(var $t=[pt[0]],qt=0,Wt=Dt.length;qt<Wt;qt+=1)$t.push(Dt[qt],pt[qt+1]);return $t},b=function(pt){return pt!==null&&typeof pt=="object"&&(pt.toString?pt.toString():Object.prototype.toString.call(pt))==="[object Object]"&&!s.typeOf(pt)},_=Object.freeze([]),v=Object.freeze({});function w(pt){return typeof pt=="function"}function x(pt){return n.env.NODE_ENV!=="production"&&typeof pt=="string"&&pt||pt.displayName||pt.name||"Component"}function S(pt){return pt&&typeof pt.styledComponentId=="string"}var E=n!==void 0&&(n.env.REACT_APP_SC_ATTR||n.env.SC_ATTR)||"data-styled",k=typeof window<"u"&&"HTMLElement"in window,D=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:n!==void 0&&n.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&n.env.REACT_APP_SC_DISABLE_SPEEDY!==""?n.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&n.env.REACT_APP_SC_DISABLE_SPEEDY:n!==void 0&&n.env.SC_DISABLE_SPEEDY!==void 0&&n.env.SC_DISABLE_SPEEDY!==""?n.env.SC_DISABLE_SPEEDY!=="false"&&n.env.SC_DISABLE_SPEEDY:n.env.NODE_ENV!=="production"),N={},O=n.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
112
112
|
|
|
113
113
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
114
114
|
|
|
@@ -152,7 +152,7 @@ Has styled-components' style tag been unmounted or altered by another script?
|
|
|
152
152
|
`}:{};function R(){for(var pt=arguments.length<=0?void 0:arguments[0],Dt=[],$t=1,qt=arguments.length;$t<qt;$t+=1)Dt.push($t<0||arguments.length<=$t?void 0:arguments[$t]);return Dt.forEach(function(Wt){pt=pt.replace(/%[a-z]/,Wt)}),pt}function A(pt){for(var Dt=arguments.length,$t=new Array(1<Dt?Dt-1:0),qt=1;qt<Dt;qt++)$t[qt-1]=arguments[qt];throw n.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+pt+" for more information."+(0<$t.length?" Args: "+$t.join(", "):"")):new Error(R.apply(void 0,[O[pt]].concat($t)).trim())}function z(pt){if(J.has(pt))return J.get(pt);for(;K.has(P);)P++;var Dt=P++;return n.env.NODE_ENV!=="production"&&((0|Dt)<0||1<<30<Dt)&&A(16,""+Dt),J.set(pt,Dt),K.set(Dt,pt),Dt}function H(pt){var Dt=document.head,$t=pt||Dt,qt=(pt=document.createElement("style"),Dt=(Dt=function(){for(var Wt=$t.childNodes,oe=Wt.length;0<=oe;oe--){var X=Wt[oe];if(X&&X.nodeType===1&&X.hasAttribute(E))return X}}())!==void 0?Dt.nextSibling:null,pt.setAttribute(E,"active"),pt.setAttribute("data-styled-version","5.3.5"),q());return qt&&pt.setAttribute("nonce",qt),$t.insertBefore(pt,Dt),pt}function $(pt){return String.fromCharCode(pt+(25<pt?39:97))}(ft=at.prototype).indexOfGroup=function(pt){for(var Dt=0,$t=0;$t<pt;$t++)Dt+=this.groupSizes[$t];return Dt},ft.insertRules=function(pt,Dt){if(pt>=this.groupSizes.length){for(var $t=this.groupSizes,qt=$t.length,Wt=qt;Wt<=pt;)(Wt<<=1)<0&&A(16,""+pt);this.groupSizes=new Uint32Array(Wt),this.groupSizes.set($t),this.length=Wt;for(var oe=qt;oe<Wt;oe++)this.groupSizes[oe]=0}for(var X=this.indexOfGroup(pt+1),lt=0,vt=Dt.length;lt<vt;lt++)this.tag.insertRule(X,Dt[lt])&&(this.groupSizes[pt]++,X++)},ft.clearGroup=function(pt){if(pt<this.length){var Dt=this.groupSizes[pt],$t=this.indexOfGroup(pt),qt=$t+Dt;this.groupSizes[pt]=0;for(var Wt=$t;Wt<qt;Wt++)this.tag.deleteRule($t)}},ft.getGroup=function(pt){var Dt="";if(pt>=this.length||this.groupSizes[pt]===0)return Dt;for(var $t=this.groupSizes[pt],qt=(pt=this.indexOfGroup(pt))+$t,Wt=pt;Wt<qt;Wt++)Dt+=this.tag.getRule(Wt)+`/*!sc*/
|
|
153
153
|
`;return Dt};var M=at,J=new Map,K=new Map,P=1,U=function(pt,Dt){P<=Dt&&(P=Dt+1),J.set(pt,Dt),K.set(Dt,pt)},V="style["+E+'][data-styled-version="5.3.5"]',G=new RegExp("^"+E+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F=function(pt,Dt,$t){for(var qt,Wt=$t.split(","),oe=0,X=Wt.length;oe<X;oe++)(qt=Wt[oe])&&pt.registerName(Dt,qt)},q=function(){return typeof window<"u"&&window.__webpack_nonce__!==void 0?window.__webpack_nonce__:null},T=((ft=et.prototype).insertRule=function(pt,Dt){try{return this.sheet.insertRule(Dt,pt),this.length++,!0}catch{return!1}},ft.deleteRule=function(pt){this.sheet.deleteRule(pt),this.length--},ft.getRule=function(pt){return(pt=this.sheet.cssRules[pt])!==void 0&&typeof pt.cssText=="string"?pt.cssText:""},et),I=((ft=nt.prototype).insertRule=function(pt,Dt){return pt<=this.length&&0<=pt&&(Dt=document.createTextNode(Dt),pt=this.nodes[pt],this.element.insertBefore(Dt,pt||null),this.length++,!0)},ft.deleteRule=function(pt){this.element.removeChild(this.nodes[pt]),this.length--},ft.getRule=function(pt){return pt<this.length?this.nodes[pt].textContent:""},nt),L=((ft=tt.prototype).insertRule=function(pt,Dt){return pt<=this.length&&(this.rules.splice(pt,0,Dt),this.length++,!0)},ft.deleteRule=function(pt){this.rules.splice(pt,1),this.length--},ft.getRule=function(pt){return pt<this.length?this.rules[pt]:""},tt),B=k,Y={isServer:!k,useCSSOMInjection:!D},Z=(Q.registerId=z,(ft=Q.prototype).reconstructWithOptions=function(pt,Dt){return Dt===void 0&&(Dt=!0),new Q(p({},this.options,{},pt),this.gs,Dt&&this.names||void 0)},ft.allocateGSInstance=function(pt){return this.gs[pt]=(this.gs[pt]||0)+1},ft.getTag=function(){return this.tag||(this.tag=(pt=($t=this.options).isServer,Dt=$t.useCSSOMInjection,$t=$t.target,pt=new(pt?L:Dt?T:I)($t),new M(pt)));var pt,Dt,$t},ft.hasNameForId=function(pt,Dt){return this.names.has(pt)&&this.names.get(pt).has(Dt)},ft.registerName=function(pt,Dt){var $t;z(pt),this.names.has(pt)?this.names.get(pt).add(Dt):(($t=new Set).add(Dt),this.names.set(pt,$t))},ft.insertRules=function(pt,Dt,$t){this.registerName(pt,Dt),this.getTag().insertRules(z(pt),$t)},ft.clearNames=function(pt){this.names.has(pt)&&this.names.get(pt).clear()},ft.clearRules=function(pt){this.getTag().clearGroup(z(pt)),this.clearNames(pt)},ft.clearTag=function(){this.tag=void 0},ft.toString=function(){for(var pt=this.getTag(),Dt=pt.length,$t="",qt=0;qt<Dt;qt++){lt=qt;var Wt,oe,X,lt=K.get(lt);lt!==void 0&&(Wt=this.names.get(lt),oe=pt.getGroup(qt),Wt&&oe&&Wt.size&&(lt=E+".g"+qt+'[id="'+lt+'"]',X="",Wt!==void 0&&Wt.forEach(function(vt){0<vt.length&&(X+=vt+",")}),$t+=oe+lt+'{content:"'+X+`"}/*!sc*/
|
|
154
154
|
`))}return $t},Q),rt=/(a)(d)/gi;function Q(pt,Dt,$t){if(pt===void 0&&(pt=v),Dt===void 0&&(Dt={}),this.options=p({},Y,{},pt),this.gs=Dt,this.names=new Map($t),this.server=!!pt.isServer,!this.server&&k&&B){B=!1;for(var qt=document.querySelectorAll(V),Wt=0,oe=qt.length;Wt<oe;Wt++){var X=qt[Wt];if(X&&X.getAttribute(E)!=="active"){vt=void 0,Vt=void 0,te=void 0,Ue=void 0,Yt=void 0,me=void 0,Ee=void 0;for(var lt=this,vt=(X.textContent||"").split(`/*!sc*/
|
|
155
|
-
`),Vt=[],te=0,Zt=vt.length;te<Zt;te++){var Yt,me,Ee,Ue=vt[te].trim();Ue&&((Yt=Ue.match(G))?(me=0|parseInt(Yt[1],10),Ee=Yt[2],me!=0&&(U(Ee,me),F(lt,Ee,Yt[3]),lt.getTag().insertRules(me,Vt)),Vt.length=0):Vt.push(Ue))}X.parentNode&&X.parentNode.removeChild(X)}}}}function tt(pt){this.rules=[],this.length=0}function nt(pt){pt=this.element=H(pt),this.nodes=pt.childNodes,this.length=0}function et(pt){(pt=this.element=H(pt)).appendChild(document.createTextNode("")),this.sheet=function(Dt){if(Dt.sheet)return Dt.sheet;for(var $t=document.styleSheets,qt=0,Wt=$t.length;qt<Wt;qt++){var oe=$t[qt];if(oe.ownerNode===Dt)return oe}A(17)}(pt),this.length=0}function at(pt){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=pt}function ct(pt){for(var Dt="",$t=Math.abs(pt);52<$t;$t=$t/52|0)Dt=$($t%52)+Dt;return($($t%52)+Dt).replace(rt,"$1-$2")}function gt(pt,Dt){for(var $t=Dt.length;$t;)pt=33*pt^Dt.charCodeAt(--$t);return pt}function wt(pt){return gt(5381,pt)}function St(pt){for(var Dt=0;Dt<pt.length;Dt+=1){var $t=pt[Dt];if(w($t)&&!S($t))return!1}return!0}var Mt=wt("5.3.5"),Lt=(jt.prototype.generateAndInjectStyles=function(pt,Dt,$t){var qt=this.componentId,Wt=[];if(this.baseStyle&&Wt.push(this.baseStyle.generateAndInjectStyles(pt,Dt,$t)),this.isStatic&&!$t.hash)this.staticRulesId&&Dt.hasNameForId(qt,this.staticRulesId)?Wt.push(this.staticRulesId):(oe=Le(this.rules,pt,Dt,$t).join(""),X=ct(gt(this.baseHash,oe)>>>0),Dt.hasNameForId(qt,X)||(oe=$t(oe,"."+X,void 0,qt),Dt.insertRules(qt,X,oe)),Wt.push(X),this.staticRulesId=X);else{for(var oe,X,lt=this.rules.length,vt=gt(this.baseHash,$t.hash),Vt="",te=0;te<lt;te++){var Zt=this.rules[te];typeof Zt=="string"?(Vt+=Zt,n.env.NODE_ENV!=="production"&&(vt=gt(vt,Zt+te))):Zt&&(Zt=Le(Zt,pt,Dt,$t),vt=gt(vt,(Zt=Array.isArray(Zt)?Zt.join(""):Zt)+te),Vt+=Zt)}Vt&&(oe=ct(vt>>>0),Dt.hasNameForId(qt,oe)||(X=$t(Vt,"."+oe,void 0,qt),Dt.insertRules(qt,oe,X)),Wt.push(oe))}return Wt.join(" ")},jt),Pt=/^\s*\/\/.*$/gm,yt=[":","[",".","#"];function jt(pt,Dt,$t){this.rules=pt,this.staticRulesId="",this.isStatic=n.env.NODE_ENV==="production"&&($t===void 0||$t.isStatic)&&St(pt),this.componentId=Dt,this.baseHash=gt(Mt,Dt),this.baseStyle=$t,Z.registerId(Dt)}function At(pt){function Dt(Yt,me,Ee){return me===0&&yt.indexOf(Ee[qt.length])!==-1||Ee.match(oe)?Yt:"."+$t}var $t,qt,Wt,oe,X,lt=(lt=(pt=pt===void 0?v:pt).options)===void 0?v:lt,vt=(pt=(pt=pt.plugins)===void 0?_:pt,new a(lt)),Vt=[];function te(Yt){if(Yt)try{X(Yt+"}")}catch{}}function Zt(Yt,me,Ee,Ue){return Ue===void 0&&(Ue="&"),Yt=Yt.replace(Pt,""),Yt=me&&Ee?Ee+" "+me+" { "+Yt+" }":Yt,$t=Ue,qt=me,Wt=new RegExp("\\"+qt+"\\b","g"),oe=new RegExp("(\\"+qt+"\\b){2,}"),vt(Ee||!me?"":me,Yt)}return X=function(Yt){Vt.push(Yt)},vt.use([].concat(pt,[function(Yt,me,Ee){Yt===2&&Ee.length&&0<Ee[0].lastIndexOf(qt)&&(Ee[0]=Ee[0].replace(Wt,Dt))},function(Yt,me,Ee,Ue,Ae,We,nn,cn,An,un){switch(Yt){case 1:if(An===0&&me.charCodeAt(0)===64)return X(me+";"),"";break;case 2:if(cn===0)return me+"/*|*/";break;case 3:switch(cn){case 102:case 112:return X(Ee[0]+me),"";default:return me+(un===0?"/*|*/":"")}case-2:me.split("/*|*/}").forEach(te)}},function(Yt){if(Yt===-2)return Yt=Vt,Vt=[],Yt}])),Zt.hash=pt.length?pt.reduce(function(Yt,me){return me.name||A(15),gt(Yt,me.name)},5381).toString():"",Zt}var It=l.createContext(),Ot=(D=It.Consumer,l.createContext()),Et=(Ot.Consumer,new Z),Ct=At();function Nt(){return i.useContext(It)||Et}function ht(){return i.useContext(Ot)||Ct}function dt(pt){var Dt=(Wt=i.useState(pt.stylisPlugins))[0],$t=Wt[1],qt=Nt(),Wt=i.useMemo(function(){var X=qt;return pt.sheet?X=pt.sheet:pt.target&&(X=X.reconstructWithOptions({target:pt.target},!1)),pt.disableCSSOMInjection?X.reconstructWithOptions({useCSSOMInjection:!1}):X},[pt.disableCSSOMInjection,pt.sheet,pt.target]),oe=i.useMemo(function(){return At({options:{prefix:!pt.disableVendorPrefixes},plugins:Dt})},[pt.disableVendorPrefixes,Dt]);return i.useEffect(function(){o(Dt,pt.stylisPlugins)||$t(pt.stylisPlugins)},[pt.stylisPlugins]),l.createElement(It.Provider,{value:Wt},l.createElement(Ot.Provider,{value:oe},n.env.NODE_ENV!=="production"?l.Children.only(pt.children):pt.children))}kt.prototype.getName=function(pt){return pt===void 0&&(pt=Ct),this.name+pt.hash};var Ft=kt,Jt=/([A-Z])/,Xt=/([A-Z])/g,Qt=/^ms-/,ve=function(pt){return"-"+pt.toLowerCase()};function kt(pt,Dt){var $t=this;this.inject=function(qt,Wt){Wt===void 0&&(Wt=Ct);var oe=$t.name+Wt.hash;qt.hasNameForId($t.id,oe)||qt.insertRules($t.id,oe,Wt($t.rules,oe,"@keyframes"))},this.toString=function(){return A(12,String($t.name))},this.name=pt,this.id="sc-keyframes-"+pt,this.rules=Dt}function ee(pt){return Jt.test(pt)?pt.replace(Xt,ve).replace(Qt,"-ms-"):pt}var pe=function(pt){return pt==null||pt===!1||pt===""};function Le(pt,Dt,$t,qt){if(Array.isArray(pt)){for(var Wt,oe=[],X=0,lt=pt.length;X<lt;X+=1)(Wt=Le(pt[X],Dt,$t,qt))!==""&&(Array.isArray(Wt)?oe.push.apply(oe,Wt):oe.push(Wt));return oe}if(pe(pt))return"";if(S(pt))return"."+pt.styledComponentId;if(w(pt)){if(typeof pt!="function"||pt.prototype&&pt.prototype.isReactComponent||!Dt)return pt;var vt=pt(Dt);return n.env.NODE_ENV!=="production"&&s.isElement(vt)&&x(pt),Le(vt,Dt,$t,qt)}return pt instanceof Ft?$t?(pt.inject($t,qt),pt.getName(qt)):pt:b(pt)?function Vt(te,Zt){var Yt,me,Ee,Ue=[];for(Ee in te)te.hasOwnProperty(Ee)&&!pe(te[Ee])&&(Array.isArray(te[Ee])&&te[Ee].isCss||w(te[Ee])?Ue.push(ee(Ee)+":",te[Ee],";"):b(te[Ee])?Ue.push.apply(Ue,Vt(te[Ee],Ee)):Ue.push(ee(Ee)+": "+(Yt=Ee,((me=te[Ee])==null||typeof me=="boolean"||me===""?"":typeof me!="number"||me===0||Yt in c?String(me).trim():me+"px")+";")));return Zt?[Zt+" {"].concat(Ue,["}"]):Ue}(pt):pt.toString()}var
|
|
155
|
+
`),Vt=[],te=0,Zt=vt.length;te<Zt;te++){var Yt,me,Ee,Ue=vt[te].trim();Ue&&((Yt=Ue.match(G))?(me=0|parseInt(Yt[1],10),Ee=Yt[2],me!=0&&(U(Ee,me),F(lt,Ee,Yt[3]),lt.getTag().insertRules(me,Vt)),Vt.length=0):Vt.push(Ue))}X.parentNode&&X.parentNode.removeChild(X)}}}}function tt(pt){this.rules=[],this.length=0}function nt(pt){pt=this.element=H(pt),this.nodes=pt.childNodes,this.length=0}function et(pt){(pt=this.element=H(pt)).appendChild(document.createTextNode("")),this.sheet=function(Dt){if(Dt.sheet)return Dt.sheet;for(var $t=document.styleSheets,qt=0,Wt=$t.length;qt<Wt;qt++){var oe=$t[qt];if(oe.ownerNode===Dt)return oe}A(17)}(pt),this.length=0}function at(pt){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=pt}function ct(pt){for(var Dt="",$t=Math.abs(pt);52<$t;$t=$t/52|0)Dt=$($t%52)+Dt;return($($t%52)+Dt).replace(rt,"$1-$2")}function gt(pt,Dt){for(var $t=Dt.length;$t;)pt=33*pt^Dt.charCodeAt(--$t);return pt}function wt(pt){return gt(5381,pt)}function St(pt){for(var Dt=0;Dt<pt.length;Dt+=1){var $t=pt[Dt];if(w($t)&&!S($t))return!1}return!0}var Mt=wt("5.3.5"),Lt=(jt.prototype.generateAndInjectStyles=function(pt,Dt,$t){var qt=this.componentId,Wt=[];if(this.baseStyle&&Wt.push(this.baseStyle.generateAndInjectStyles(pt,Dt,$t)),this.isStatic&&!$t.hash)this.staticRulesId&&Dt.hasNameForId(qt,this.staticRulesId)?Wt.push(this.staticRulesId):(oe=Le(this.rules,pt,Dt,$t).join(""),X=ct(gt(this.baseHash,oe)>>>0),Dt.hasNameForId(qt,X)||(oe=$t(oe,"."+X,void 0,qt),Dt.insertRules(qt,X,oe)),Wt.push(X),this.staticRulesId=X);else{for(var oe,X,lt=this.rules.length,vt=gt(this.baseHash,$t.hash),Vt="",te=0;te<lt;te++){var Zt=this.rules[te];typeof Zt=="string"?(Vt+=Zt,n.env.NODE_ENV!=="production"&&(vt=gt(vt,Zt+te))):Zt&&(Zt=Le(Zt,pt,Dt,$t),vt=gt(vt,(Zt=Array.isArray(Zt)?Zt.join(""):Zt)+te),Vt+=Zt)}Vt&&(oe=ct(vt>>>0),Dt.hasNameForId(qt,oe)||(X=$t(Vt,"."+oe,void 0,qt),Dt.insertRules(qt,oe,X)),Wt.push(oe))}return Wt.join(" ")},jt),Pt=/^\s*\/\/.*$/gm,yt=[":","[",".","#"];function jt(pt,Dt,$t){this.rules=pt,this.staticRulesId="",this.isStatic=n.env.NODE_ENV==="production"&&($t===void 0||$t.isStatic)&&St(pt),this.componentId=Dt,this.baseHash=gt(Mt,Dt),this.baseStyle=$t,Z.registerId(Dt)}function At(pt){function Dt(Yt,me,Ee){return me===0&&yt.indexOf(Ee[qt.length])!==-1||Ee.match(oe)?Yt:"."+$t}var $t,qt,Wt,oe,X,lt=(lt=(pt=pt===void 0?v:pt).options)===void 0?v:lt,vt=(pt=(pt=pt.plugins)===void 0?_:pt,new a(lt)),Vt=[];function te(Yt){if(Yt)try{X(Yt+"}")}catch{}}function Zt(Yt,me,Ee,Ue){return Ue===void 0&&(Ue="&"),Yt=Yt.replace(Pt,""),Yt=me&&Ee?Ee+" "+me+" { "+Yt+" }":Yt,$t=Ue,qt=me,Wt=new RegExp("\\"+qt+"\\b","g"),oe=new RegExp("(\\"+qt+"\\b){2,}"),vt(Ee||!me?"":me,Yt)}return X=function(Yt){Vt.push(Yt)},vt.use([].concat(pt,[function(Yt,me,Ee){Yt===2&&Ee.length&&0<Ee[0].lastIndexOf(qt)&&(Ee[0]=Ee[0].replace(Wt,Dt))},function(Yt,me,Ee,Ue,Ae,We,nn,cn,An,un){switch(Yt){case 1:if(An===0&&me.charCodeAt(0)===64)return X(me+";"),"";break;case 2:if(cn===0)return me+"/*|*/";break;case 3:switch(cn){case 102:case 112:return X(Ee[0]+me),"";default:return me+(un===0?"/*|*/":"")}case-2:me.split("/*|*/}").forEach(te)}},function(Yt){if(Yt===-2)return Yt=Vt,Vt=[],Yt}])),Zt.hash=pt.length?pt.reduce(function(Yt,me){return me.name||A(15),gt(Yt,me.name)},5381).toString():"",Zt}var It=l.createContext(),Ot=(D=It.Consumer,l.createContext()),Et=(Ot.Consumer,new Z),Ct=At();function Nt(){return i.useContext(It)||Et}function ht(){return i.useContext(Ot)||Ct}function dt(pt){var Dt=(Wt=i.useState(pt.stylisPlugins))[0],$t=Wt[1],qt=Nt(),Wt=i.useMemo(function(){var X=qt;return pt.sheet?X=pt.sheet:pt.target&&(X=X.reconstructWithOptions({target:pt.target},!1)),pt.disableCSSOMInjection?X.reconstructWithOptions({useCSSOMInjection:!1}):X},[pt.disableCSSOMInjection,pt.sheet,pt.target]),oe=i.useMemo(function(){return At({options:{prefix:!pt.disableVendorPrefixes},plugins:Dt})},[pt.disableVendorPrefixes,Dt]);return i.useEffect(function(){o(Dt,pt.stylisPlugins)||$t(pt.stylisPlugins)},[pt.stylisPlugins]),l.createElement(It.Provider,{value:Wt},l.createElement(Ot.Provider,{value:oe},n.env.NODE_ENV!=="production"?l.Children.only(pt.children):pt.children))}kt.prototype.getName=function(pt){return pt===void 0&&(pt=Ct),this.name+pt.hash};var Ft=kt,Jt=/([A-Z])/,Xt=/([A-Z])/g,Qt=/^ms-/,ve=function(pt){return"-"+pt.toLowerCase()};function kt(pt,Dt){var $t=this;this.inject=function(qt,Wt){Wt===void 0&&(Wt=Ct);var oe=$t.name+Wt.hash;qt.hasNameForId($t.id,oe)||qt.insertRules($t.id,oe,Wt($t.rules,oe,"@keyframes"))},this.toString=function(){return A(12,String($t.name))},this.name=pt,this.id="sc-keyframes-"+pt,this.rules=Dt}function ee(pt){return Jt.test(pt)?pt.replace(Xt,ve).replace(Qt,"-ms-"):pt}var pe=function(pt){return pt==null||pt===!1||pt===""};function Le(pt,Dt,$t,qt){if(Array.isArray(pt)){for(var Wt,oe=[],X=0,lt=pt.length;X<lt;X+=1)(Wt=Le(pt[X],Dt,$t,qt))!==""&&(Array.isArray(Wt)?oe.push.apply(oe,Wt):oe.push(Wt));return oe}if(pe(pt))return"";if(S(pt))return"."+pt.styledComponentId;if(w(pt)){if(typeof pt!="function"||pt.prototype&&pt.prototype.isReactComponent||!Dt)return pt;var vt=pt(Dt);return n.env.NODE_ENV!=="production"&&s.isElement(vt)&&x(pt),Le(vt,Dt,$t,qt)}return pt instanceof Ft?$t?(pt.inject($t,qt),pt.getName(qt)):pt:b(pt)?function Vt(te,Zt){var Yt,me,Ee,Ue=[];for(Ee in te)te.hasOwnProperty(Ee)&&!pe(te[Ee])&&(Array.isArray(te[Ee])&&te[Ee].isCss||w(te[Ee])?Ue.push(ee(Ee)+":",te[Ee],";"):b(te[Ee])?Ue.push.apply(Ue,Vt(te[Ee],Ee)):Ue.push(ee(Ee)+": "+(Yt=Ee,((me=te[Ee])==null||typeof me=="boolean"||me===""?"":typeof me!="number"||me===0||Yt in c?String(me).trim():me+"px")+";")));return Zt?[Zt+" {"].concat(Ue,["}"]):Ue}(pt):pt.toString()}var Fe=function(pt){return Array.isArray(pt)&&(pt.isCss=!0),pt};function qe(pt){for(var Dt=arguments.length,$t=new Array(1<Dt?Dt-1:0),qt=1;qt<Dt;qt++)$t[qt-1]=arguments[qt];return w(pt)||b(pt)?Fe(Le(m(_,[pt].concat($t)))):$t.length===0&&pt.length===1&&typeof pt[0]=="string"?pt:Fe(Le(m(pt,$t)))}var ze=/invalid hook call/i,Ie=new Set,He=function(pt,Dt){if(n.env.NODE_ENV!=="production"){var $t="The component "+pt+(Dt?' with the id of "'+Dt+'"':"")+` has been created dynamically.
|
|
156
156
|
You may see this warning because you've called styled inside another component.
|
|
157
157
|
To resolve this only create new StyledComponents outside of any render method and function component.`,qt=console.error;try{var Wt=!0;console.error=function(oe){if(ze.test(oe))Wt=!1,Ie.delete($t);else{for(var X=arguments.length,lt=new Array(1<X?X-1:0),vt=1;vt<X;vt++)lt[vt-1]=arguments[vt];qt.apply(void 0,[oe].concat(lt))}},i.useRef(),Wt&&!Ie.has($t)&&Ie.add($t)}catch(oe){ze.test(oe.message)&&Ie.delete($t)}finally{console.error=qt}}},hn=function(pt,Dt,$t){return $t===void 0&&($t=v),pt.theme!==$t.theme&&pt.theme||Dt||$t.theme},Tt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ae=/(^-|-$)/g;function de(pt){return pt.replace(Tt,"-").replace(ae,"")}var we=function(pt){return ct(wt(pt)>>>0)};function Oe(pt){return typeof pt=="string"&&(n.env.NODE_ENV==="production"||pt.charAt(0)===pt.charAt(0).toLowerCase())}var Rt=function(pt){return typeof pt=="function"||typeof pt=="object"&&pt!==null&&!Array.isArray(pt)},Ut=function(pt){return pt!=="__proto__"&&pt!=="constructor"&&pt!=="prototype"};function se(pt){for(var Dt=arguments.length,$t=new Array(1<Dt?Dt-1:0),qt=1;qt<Dt;qt++)$t[qt-1]=arguments[qt];for(var Wt,oe,X,lt=0,vt=$t;lt<vt.length;lt++){var Vt=vt[lt];if(Rt(Vt))for(var te in Vt)Ut(te)&&(Wt=pt,oe=Vt[te],X=Wt[te],Rt(oe)&&Rt(X)?se(X,oe):Wt[te]=oe)}return pt}var bt=l.createContext(),ft=bt.Consumer,xt={};function Bt(pt,Dt,$t){var qt=S(pt),Wt=!Oe(pt),oe=(oe=Dt.attrs)===void 0?_:oe,X=(X=Dt.componentId)===void 0?function(Ae,We){return Ae=typeof Ae!="string"?"sc":de(Ae),xt[Ae]=(xt[Ae]||0)+1,Ae=Ae+"-"+we("5.3.5"+Ae+xt[Ae]),We?We+"-"+Ae:Ae}(Dt.displayName,Dt.parentComponentId):X,lt=(vt=Dt.displayName)===void 0?Oe(lt=pt)?"styled."+lt:"Styled("+x(lt)+")":vt,vt=Dt.displayName&&Dt.componentId?de(Dt.displayName)+"-"+Dt.componentId:Dt.componentId||X,Vt=qt&&pt.attrs?Array.prototype.concat(pt.attrs,oe).filter(Boolean):oe;function te(Ae,We){var nn,cn,An,un,bn=Zt,Nn=Ue,Ln=bn.attrs,er=bn.componentStyle,nr=bn.defaultProps,ka=bn.foldedComponentIds,Ui=bn.shouldForwardProp,to=bn.styledComponentId,Lr=bn.target,Hr=(n.env.NODE_ENV!=="production"&&i.useDebugValue(to),nr=hn(Ae,i.useContext(bt),nr)||v,cn=p({},Ae,{theme:nr=nr===void 0?v:nr}),An={},Ln.forEach(function(Ao){var jr,eo,Br,_r=Ao;for(jr in _r=w(_r)?_r(cn):_r)cn[jr]=An[jr]=jr==="className"?(eo=An[jr],Br=_r[jr],eo&&Br?eo+" "+Br:eo||Br):_r[jr]}),Ln=(nr=[cn,An])[1],nr=nr[0],bn=n.env.NODE_ENV!=="production"?bn.warnTooManyClasses:void 0,Hr=Nt(),nn=ht(),er=Nn?er.generateAndInjectStyles(v,Hr,nn):er.generateAndInjectStyles(nr,Hr,nn),n.env.NODE_ENV!=="production"&&i.useDebugValue(er),n.env.NODE_ENV!=="production"&&!Nn&&bn&&bn(er),nr=er,We),wn=Ln.$as||Ae.$as||Ln.as||Ae.as||Lr,$i=Oe(wn),gn=Ln!==Ae?p({},Ae,{},Ln):Ae,In={};for(un in gn)un[0]!=="$"&&un!=="as"&&(un==="forwardedAs"?In.as=gn[un]:(Ui?Ui(un,u,wn):!$i||u(un))&&(In[un]=gn[un]));return Ae.style&&Ln.style!==Ae.style&&(In.style=p({},Ae.style,{},Ln.style)),In.className=Array.prototype.concat(ka,to,nr!==to?nr:null,Ae.className,Ln.className).filter(Boolean).join(" "),In.ref=Hr,i.createElement(wn,In)}X=Dt.shouldForwardProp,qt&&pt.shouldForwardProp&&(X=Dt.shouldForwardProp?function(Ae,We,nn){return pt.shouldForwardProp(Ae,We,nn)&&Dt.shouldForwardProp(Ae,We,nn)}:pt.shouldForwardProp);var Zt,Yt,me,Ee=new Lt($t,vt,qt?pt.componentStyle:void 0),Ue=Ee.isStatic&&oe.length===0;return te.displayName=lt,(Zt=l.forwardRef(te)).attrs=Vt,Zt.componentStyle=Ee,Zt.displayName=lt,Zt.shouldForwardProp=X,Zt.foldedComponentIds=qt?Array.prototype.concat(pt.foldedComponentIds,pt.styledComponentId):_,Zt.styledComponentId=vt,Zt.target=qt?pt.target:pt,Zt.withComponent=function(Ae){var We=Dt.componentId,nn=function(cn,An){if(cn==null)return{};for(var un,bn={},Nn=Object.keys(cn),Ln=0;Ln<Nn.length;Ln++)un=Nn[Ln],0<=An.indexOf(un)||(bn[un]=cn[un]);return bn}(Dt,["componentId"]);return We=We&&We+"-"+(Oe(Ae)?Ae:de(x(Ae))),Bt(Ae,p({},nn,{attrs:Vt,componentId:We}),$t)},Object.defineProperty(Zt,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(Ae){this._foldedDefaultProps=qt?se({},pt.defaultProps,Ae):Ae}}),n.env.NODE_ENV!=="production"&&(He(lt,vt),Zt.warnTooManyClasses=(me=!(Yt={}),function(Ae){!me&&(Yt[Ae]=!0,200<=Object.keys(Yt).length)&&(me=!0,Yt={})})),Zt.toString=function(){return"."+Zt.styledComponentId},Wt&&h(Zt,pt,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),Zt}function ce(pt){return function Dt($t,qt,Wt){if(Wt===void 0&&(Wt=v),!s.isValidElementType(qt))return A(1,String(qt));function oe(){return $t(qt,Wt,qe.apply(void 0,arguments))}return oe.withConfig=function(X){return Dt($t,qt,p({},Wt,{},X))},oe.attrs=function(X){return Dt($t,qt,p({},Wt,{attrs:Array.prototype.concat(Wt.attrs,X).filter(Boolean)}))},oe}(Bt,pt)}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(pt){ce[pt]=ce(pt)}),(Te=be.prototype).createStyles=function(pt,Dt,$t,qt){Dt=qt(Le(this.rules,Dt,$t,qt).join(""),""),qt=this.componentId+pt,$t.insertRules(qt,qt,Dt)},Te.removeStyles=function(pt,Dt){Dt.clearRules(this.componentId+pt)},Te.renderStyles=function(pt,Dt,$t,qt){2<pt&&Z.registerId(this.componentId+pt),this.removeStyles(pt,$t),this.createStyles(pt,Dt,$t,qt)};var Ce=be,Te=((Te=Ge.prototype).collectStyles=function(pt){return this.sealed?A(2):l.createElement(dt,{sheet:this.instance},pt)},Te.interleaveWithNodeStream=function(pt){return A(3)},Ge),Ne={StyleSheet:Z,masterSheet:Et};function Ge(){var pt=this;this._emitSheetCSS=function(){var Dt=pt.instance.toString();if(!Dt)return"";var $t=q();return"<style "+[$t&&'nonce="'+$t+'"',E+'="true"','data-styled-version="5.3.5"'].filter(Boolean).join(" ")+">"+Dt+"</style>"},this.getStyleTags=function(){return pt.sealed?A(2):pt._emitSheetCSS()},this.getStyleElement=function(){if(pt.sealed)return A(2);(Dt={})[E]="",Dt["data-styled-version"]="5.3.5",Dt.dangerouslySetInnerHTML={__html:pt.instance.toString()};var Dt,$t=q();return $t&&(Dt.nonce=$t),[l.createElement("style",p({},Dt,{key:"sc-0-0"}))]},this.seal=function(){pt.sealed=!0},this.instance=new Z({isServer:!0}),this.sealed=!1}function be(pt,Dt){this.rules=pt,this.componentId=Dt,this.isStatic=St(pt),Z.registerId(this.componentId+1)}n.env.NODE_ENV,n.env.NODE_ENV!=="production"&&n.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]+=1),r.ServerStyleSheet=Te,r.StyleSheetConsumer=D,r.StyleSheetContext=It,r.StyleSheetManager=dt,r.ThemeConsumer=ft,r.ThemeContext=bt,r.ThemeProvider=function(pt){var Dt=i.useContext(bt),$t=i.useMemo(function(){return qt=pt.theme,Wt=Dt,qt?w(qt)?(oe=qt(Wt),n.env.NODE_ENV==="production"||oe!==null&&!Array.isArray(oe)&&typeof oe=="object"?oe:A(7)):Array.isArray(qt)||typeof qt!="object"?A(8):Wt?p({},Wt,{},qt):qt:A(14);var qt,Wt,oe},[pt.theme,Dt]);return pt.children?l.createElement(bt.Provider,{value:$t},pt.children):null},r.__PRIVATE__=Ne,r.createGlobalStyle=function(pt){for(var Dt=arguments.length,$t=new Array(1<Dt?Dt-1:0),qt=1;qt<Dt;qt++)$t[qt-1]=arguments[qt];var Wt=qe.apply(void 0,[pt].concat($t)),oe="sc-global-"+we(JSON.stringify(Wt)),X=new Ce(Wt,oe);function lt(Vt){var te=Nt(),Zt=ht(),Yt=i.useContext(bt),me=i.useRef(te.allocateGSInstance(oe)).current;return n.env.NODE_ENV!=="production"&&l.Children.count(Vt.children),n.env.NODE_ENV!=="production"&&Wt.some(function(Ee){return typeof Ee=="string"&&Ee.indexOf("@import")!==-1}),te.server&&vt(me,Vt,te,Yt,Zt),i.useLayoutEffect(function(){if(!te.server)return vt(me,Vt,te,Yt,Zt),function(){return X.removeStyles(me,te)}},[me,Vt,te,Yt,Zt]),null}function vt(Vt,te,Zt,Yt,me){X.isStatic?X.renderStyles(Vt,N,Zt,me):(te=p({},te,{theme:hn(te,Yt,lt.defaultProps)}),X.renderStyles(Vt,te,Zt,me))}return n.env.NODE_ENV!=="production"&&He(oe),l.memo(lt)},r.css=qe,r.default=ce,r.isStyledComponent=S,r.keyframes=function(pt){n.env.NODE_ENV;for(var Dt=arguments.length,$t=new Array(1<Dt?Dt-1:0),qt=1;qt<Dt;qt++)$t[qt-1]=arguments[qt];pt=qe.apply(void 0,[pt].concat($t)).join("");var Wt=we(pt);return new Ft(Wt,pt)},r.useTheme=function(){return i.useContext(bt)},r.version="5.3.5",r.withTheme=function(pt){var Dt=l.forwardRef(function($t,qt){var Wt=i.useContext(bt),oe=pt.defaultProps;return Wt=hn($t,Wt,oe),n.env.NODE_ENV!=="production"&&Wt===void 0&&x(pt),l.createElement(pt,p({},$t,{theme:Wt,ref:qt}))});return h(Dt,pt),Dt.displayName="WithTheme("+x(pt)+")",Dt}}).call(this)}).call(this,t("_process"))},{"@emotion/is-prop-valid":273,"@emotion/stylis":275,"@emotion/unitless":276,_process:386,"hoist-non-react-statics":378,react:408,"react-is":404,shallowequal:416}],418:[function(t,f,r){(function(n){(function(){var e,s,i,l,o,a,c,u,h,p,m,b,_,v,w,x,S,E,k,D,N,O,R;(function(A){var z=typeof n=="object"?n:typeof self=="object"?self:typeof this=="object"?this:{};function H($,M){return $!==z&&(typeof Object.create=="function"?Object.defineProperty($,"__esModule",{value:!0}):$.__esModule=!0),function(J,K){return $[J]=M?M(J,K):K}}typeof f=="object"&&typeof f.exports=="object"?A(H(z,H(f.exports))):A(H(z))})(function(A){var z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,$){H.__proto__=$}||function(H,$){for(var M in $)$.hasOwnProperty(M)&&(H[M]=$[M])};e=function(H,$){function M(){this.constructor=H}z(H,$),H.prototype=$===null?Object.create($):(M.prototype=$.prototype,new M)},s=Object.assign||function(H){for(var $,M=1,J=arguments.length;M<J;M++)for(var K in $=arguments[M])Object.prototype.hasOwnProperty.call($,K)&&(H[K]=$[K]);return H},i=function(H,$){var M={};for(K in H)Object.prototype.hasOwnProperty.call(H,K)&&$.indexOf(K)<0&&(M[K]=H[K]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,K=Object.getOwnPropertySymbols(H);J<K.length;J++)$.indexOf(K[J])<0&&Object.prototype.propertyIsEnumerable.call(H,K[J])&&(M[K[J]]=H[K[J]]);return M},l=function(H,$,M,J){var K,P=arguments.length,U=P<3?$:J===null?J=Object.getOwnPropertyDescriptor($,M):J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(H,$,M,J);else for(var V=H.length-1;0<=V;V--)(K=H[V])&&(U=(P<3?K(U):3<P?K($,M,U):K($,M))||U);return 3<P&&U&&Object.defineProperty($,M,U),U},o=function(H,$){return function(M,J){$(M,J,H)}},a=function(H,$){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(H,$)},c=function(H,$,M,J){return new(M=M||Promise)(function(K,P){function U(F){try{G(J.next(F))}catch(q){P(q)}}function V(F){try{G(J.throw(F))}catch(q){P(q)}}function G(F){var q;F.done?K(F.value):((q=F.value)instanceof M?q:new M(function(T){T(q)})).then(U,V)}G((J=J.apply(H,$||[])).next())})},u=function(H,$){var M,J,K,P={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]},U={next:V(0),throw:V(1),return:V(2)};return typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function V(G){return function(F){var q=[G,F];if(M)throw new TypeError("Generator is already executing.");for(;P;)try{if(M=1,J&&(K=2&q[0]?J.return:q[0]?J.throw||((K=J.return)&&K.call(J),0):J.next)&&!(K=K.call(J,q[1])).done)return K;switch(J=0,(q=K?[2&q[0],K.value]:q)[0]){case 0:case 1:K=q;break;case 4:return P.label++,{value:q[1],done:!1};case 5:P.label++,J=q[1],q=[0];continue;case 7:q=P.ops.pop(),P.trys.pop();continue;default:if(!(K=0<(K=P.trys).length&&K[K.length-1])&&(q[0]===6||q[0]===2)){P=0;continue}if(q[0]===3&&(!K||q[1]>K[0]&&q[1]<K[3])){P.label=q[1];break}if(q[0]===6&&P.label<K[1]){P.label=K[1],K=q;break}if(K&&P.label<K[2]){P.label=K[2],P.ops.push(q);break}K[2]&&P.ops.pop(),P.trys.pop();continue}q=$.call(H,P)}catch(T){q=[6,T],J=0}finally{M=K=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}}},R=function(H,$,M,J){H[J=J===void 0?M:J]=$[M]},h=function(H,$){for(var M in H)M==="default"||$.hasOwnProperty(M)||($[M]=H[M])},p=function(H){var $=typeof Symbol=="function"&&Symbol.iterator,M=$&&H[$],J=0;if(M)return M.call(H);if(H&&typeof H.length=="number")return{next:function(){return{value:(H=H&&J>=H.length?void 0:H)&&H[J++],done:!H}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(H,$){var M=typeof Symbol=="function"&&H[Symbol.iterator];if(!M)return H;var J,K,P=M.call(H),U=[];try{for(;($===void 0||0<$--)&&!(J=P.next()).done;)U.push(J.value)}catch(V){K={error:V}}finally{try{J&&!J.done&&(M=P.return)&&M.call(P)}finally{if(K)throw K.error}}return U},b=function(){for(var H=[],$=0;$<arguments.length;$++)H=H.concat(m(arguments[$]));return H},_=function(){for(var H=0,$=0,M=arguments.length;$<M;$++)H+=arguments[$].length;var J=Array(H),K=0;for($=0;$<M;$++)for(var P=arguments[$],U=0,V=P.length;U<V;U++,K++)J[K]=P[U];return J},v=function(H){return this instanceof v?(this.v=H,this):new v(H)},w=function(H,$,M){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var J=M.apply(H,$||[]),K=[],P={};return U("next"),U("throw"),U("return"),P[Symbol.asyncIterator]=function(){return this},P;function U(T){J[T]&&(P[T]=function(I){return new Promise(function(L,B){1<K.push([T,I,L,B])||V(T,I)})})}function V(T,I){try{(L=J[T](I)).value instanceof v?Promise.resolve(L.value.v).then(G,F):q(K[0][2],L)}catch(B){q(K[0][3],B)}var L}function G(T){V("next",T)}function F(T){V("throw",T)}function q(T,I){T(I),K.shift(),K.length&&V(K[0][0],K[0][1])}},x=function(H){var $,M={};return J("next"),J("throw",function(K){throw K}),J("return"),M[Symbol.iterator]=function(){return this},M;function J(K,P){M[K]=H[K]?function(U){return($=!$)?{value:v(H[K](U)),done:K==="return"}:P?P(U):U}:P}},S=function(H){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $,M=H[Symbol.asyncIterator];return M?M.call(H):(H=p(H),$={},J("next"),J("throw"),J("return"),$[Symbol.asyncIterator]=function(){return this},$);function J(K){$[K]=H[K]&&function(P){return new Promise(function(U,V){var G,F;P=H[K](P),G=U,U=V,F=P.done,V=P.value,Promise.resolve(V).then(function(q){G({value:q,done:F})},U)})}}},E=function(H,$){return Object.defineProperty?Object.defineProperty(H,"raw",{value:$}):H.raw=$,H},k=function(H){if(H&&H.__esModule)return H;var $={};if(H!=null)for(var M in H)Object.hasOwnProperty.call(H,M)&&($[M]=H[M]);return $.default=H,$},D=function(H){return H&&H.__esModule?H:{default:H}},N=function(H,$){if($.has(H))return $.get(H);throw new TypeError("attempted to get private field on non-instance")},O=function(H,$,M){if($.has(H))return $.set(H,M),M;throw new TypeError("attempted to set private field on non-instance")},A("__extends",e),A("__assign",s),A("__rest",i),A("__decorate",l),A("__param",o),A("__metadata",a),A("__awaiter",c),A("__generator",u),A("__exportStar",h),A("__createBinding",R),A("__values",p),A("__read",m),A("__spread",b),A("__spreadArrays",_),A("__await",v),A("__asyncGenerator",w),A("__asyncDelegator",x),A("__asyncValues",S),A("__makeTemplateObject",E),A("__importStar",k),A("__importDefault",D),A("__classPrivateFieldGet",N),A("__classPrivateFieldSet",O)})}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],419:[function(t,f,r){var n=t("punycode"),e=t("./util");function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=w,r.resolve=function(x,S){return w(x,!1,!0).resolve(S)},r.resolveObject=function(x,S){return x?w(x,!1,!0).resolveObject(S):S},r.format=function(x){return e.isString(x)&&(x=w(x)),x instanceof s?x.format():s.prototype.format.call(x)},r.Url=s;var i=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=(r=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
158
158
|
`," "]),["'"].concat(r)),c=["%","/","?",";","#"].concat(a),u=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function w(x,S,E){if(x&&e.isObject(x)&&x instanceof s)return x;var k=new s;return k.parse(x,S,E),k}s.prototype.parse=function(x,S,E){if(!e.isString(x))throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var k=(k=x.indexOf("?"))!==-1&&k<x.indexOf("#")?"?":"#",D=x.split(k);D[0]=D[0].replace(/\\/g,"/");var N,O=(O=x=D.join(k)).trim();if(!E&&x.split("#").length===1&&(D=o.exec(O)))return this.path=O,this.href=O,this.pathname=D[1],D[2]?(this.search=D[2],this.query=S?v.parse(this.search.substr(1)):this.search.substr(1)):S&&(this.search="",this.query={}),this;if((k=i.exec(O))&&(N=(k=k[0]).toLowerCase(),this.protocol=N,O=O.substr(k.length)),!(E||k||O.match(/^\/\/[^@\/]+@[^@\/]+/))||!(q=O.substr(0,2)==="//")||k&&b[k]||(O=O.substr(2),this.slashes=!0),!b[k]&&(q||k&&!_[k])){for(var R=-1,A=0;A<u.length;A++)(z=O.indexOf(u[A]))!==-1&&(R===-1||z<R)&&(R=z);var z;for((x=R===-1?O.lastIndexOf("@"):O.lastIndexOf("@",R))!==-1&&(D=O.slice(0,x),O=O.slice(x+1),this.auth=decodeURIComponent(D)),R=-1,A=0;A<c.length;A++)(z=O.indexOf(c[A]))!==-1&&(R===-1||z<R)&&(R=z);if(R===-1&&(R=O.length),this.host=O.slice(0,R),O=O.slice(R),this.parseHost(),this.hostname=this.hostname||"",!(E=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]"))for(var H=this.hostname.split(/\./),$=(A=0,H.length);A<$;A++){var M=H[A];if(M&&!M.match(h)){for(var J="",K=0,P=M.length;K<P;K++)127<M.charCodeAt(K)?J+="x":J+=M[K];if(!J.match(h)){var U=H.slice(0,A),V=H.slice(A+1),G=M.match(p);G&&(U.push(G[1]),V.unshift(G[2])),V.length&&(O="/"+V.join(".")+O),this.hostname=U.join(".");break}}}255<this.hostname.length?this.hostname="":this.hostname=this.hostname.toLowerCase(),E||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),O[0]!=="/"&&(O="/"+O))}if(!m[N])for(A=0,$=a.length;A<$;A++){var T,I=a[A];O.indexOf(I)!==-1&&((T=encodeURIComponent(I))===I&&(T=escape(I)),O=O.split(I).join(T))}return(k=O.indexOf("#"))!==-1&&(this.hash=O.substr(k),O=O.slice(0,k)),(x=O.indexOf("?"))!==-1?(this.search=O.substr(x),this.query=O.substr(x+1),S&&(this.query=v.parse(this.query)),O=O.slice(0,x)):S&&(this.search="",this.query={}),O&&(this.pathname=O),_[N]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(F=this.pathname||"",D=this.search||"",this.path=F+D),this.href=this.format(),this},s.prototype.format=function(){var x=((N=this.auth||"")&&(N=(N=encodeURIComponent(N)).replace(/%3A/i,":"),N+="@"),this.protocol||""),S=this.pathname||"",E=this.hash||"",k=!1,D="",N=(this.host?k=N+this.host:this.hostname&&(k=N+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(k+=":"+this.port)),this.query&&e.isObject(this.query)&&Object.keys(this.query).length&&(D=v.stringify(this.query)),this.search||D&&"?"+D||"");return x&&x.substr(-1)!==":"&&(x+=":"),this.slashes||(!x||_[x])&&k!==!1?(k="//"+(k||""),S&&S.charAt(0)!=="/"&&(S="/"+S)):k=k||"",E&&E.charAt(0)!=="#"&&(E="#"+E),N&&N.charAt(0)!=="?"&&(N="?"+N),x+k+(S=S.replace(/[?#]/g,function(O){return encodeURIComponent(O)}))+(N=N.replace("#","%23"))+E},s.prototype.resolve=function(x){return this.resolveObject(w(x,!1,!0)).format()},s.prototype.resolveObject=function(x){e.isString(x)&&((J=new s).parse(x,!1,!0),x=J);for(var S=new s,E=Object.keys(this),k=0;k<E.length;k++){var D=E[k];S[D]=this[D]}if(S.hash=x.hash,x.href==="")return S.href=S.format(),S;if(x.slashes&&!x.protocol){for(var N=Object.keys(x),O=0;O<N.length;O++){var R=N[O];R!=="protocol"&&(S[R]=x[R])}return _[S.protocol]&&S.hostname&&!S.pathname&&(S.path=S.pathname="/"),S.href=S.format(),S}if(x.protocol&&x.protocol!==S.protocol){if(!_[x.protocol]){for(var A=Object.keys(x),z=0;z<A.length;z++){var H=A[z];S[H]=x[H]}return S.href=S.format(),S}if(S.protocol=x.protocol,x.host||b[x.protocol])S.pathname=x.pathname;else{for(var $=(x.pathname||"").split("/");$.length&&!(x.host=$.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),$[0]!==""&&$.unshift(""),$.length<2&&$.unshift(""),S.pathname=$.join("/")}return S.search=x.search,S.query=x.query,S.host=x.host||"",S.auth=x.auth,S.hostname=x.hostname||x.host,S.port=x.port,(S.pathname||S.search)&&(J=S.pathname||"",G=S.search||"",S.path=J+G),S.slashes=S.slashes||x.slashes,S.href=S.format(),S}var M,J=S.pathname&&S.pathname.charAt(0)==="/",K=J=(G=x.host||x.pathname&&x.pathname.charAt(0)==="/")||J||S.host&&x.pathname,P=S.pathname&&S.pathname.split("/")||[],U=($=x.pathname&&x.pathname.split("/")||[],S.protocol&&!_[S.protocol]);if(U&&(S.hostname="",S.port=null,S.host&&(P[0]===""?P[0]=S.host:P.unshift(S.host)),S.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&($[0]===""?$[0]=x.host:$.unshift(x.host)),x.host=null),J=J&&($[0]===""||P[0]==="")),G)S.host=(x.host||x.host===""?x:S).host,S.hostname=(x.hostname||x.hostname===""?x:S).hostname,S.search=x.search,S.query=x.query,P=$;else if($.length)(P=P||[]).pop(),P=P.concat($),S.search=x.search,S.query=x.query;else if(!e.isNullOrUndefined(x.search))return U&&(S.hostname=S.host=P.shift(),(M=!!(S.host&&0<S.host.indexOf("@"))&&S.host.split("@"))&&(S.auth=M.shift(),S.host=S.hostname=M.shift())),S.search=x.search,S.query=x.query,e.isNull(S.pathname)&&e.isNull(S.search)||(S.path=(S.pathname||"")+(S.search||"")),S.href=S.format(),S;if(!P.length)return S.pathname=null,S.search?S.path="/"+S.search:S.path=null,S.href=S.format(),S;for(var V=P.slice(-1)[0],G=(S.host||x.host||1<P.length)&&(V==="."||V==="..")||V==="",F=0,q=P.length;0<=q;q--)(V=P[q])==="."?P.splice(q,1):V===".."?(P.splice(q,1),F++):F&&(P.splice(q,1),F--);if(!J&&!K)for(;F--;)P.unshift("..");return!J||P[0]===""||P[0]&&P[0].charAt(0)==="/"||P.unshift(""),G&&P.join("/").substr(-1)!=="/"&&P.push(""),K=P[0]===""||P[0]&&P[0].charAt(0)==="/",U&&(S.hostname=S.host=!K&&P.length?P.shift():"",(M=!!(S.host&&0<S.host.indexOf("@"))&&S.host.split("@"))&&(S.auth=M.shift(),S.host=S.hostname=M.shift())),(J=J||S.host&&P.length)&&!K&&P.unshift(""),P.length?S.pathname=P.join("/"):(S.pathname=null,S.path=null),e.isNull(S.pathname)&&e.isNull(S.search)||(S.path=(S.pathname||"")+(S.search||"")),S.auth=x.auth||S.auth,S.slashes=S.slashes||x.slashes,S.href=S.format(),S},s.prototype.parseHost=function(){var x=this.host,S=l.exec(x);S&&((S=S[0])!==":"&&(this.port=S.substr(1)),x=x.substr(0,x.length-S.length)),x&&(this.hostname=x)}},{"./util":420,punycode:371,querystring:398}],420:[function(t,f,r){f.exports={isString:function(n){return typeof n=="string"},isObject:function(n){return typeof n=="object"&&n!==null},isNull:function(n){return n===null},isNullOrUndefined:function(n){return n==null}}},{}],421:[function(t,f,r){typeof Object.create=="function"?f.exports=function(n,e){n.super_=e,n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:f.exports=function(n,e){function s(){}n.super_=e,s.prototype=e.prototype,n.prototype=new s,n.prototype.constructor=n}},{}],422:[function(t,f,r){f.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}},{}],423:[function(t,f,r){(function(n,e){(function(){var s,i=/%[sdj%]/g,l=(r.format=function(H){if(!w(H)){for(var $=[],M=0;M<arguments.length;M++)$.push(o(arguments[M]));return $.join(" ")}M=1;for(var J=arguments,K=J.length,P=String(H).replace(i,function(V){if(V==="%%")return"%";if(K<=M)return V;switch(V){case"%s":return String(J[M++]);case"%d":return Number(J[M++]);case"%j":try{return JSON.stringify(J[M++])}catch{return"[Circular]"}default:return V}}),U=J[M];M<K;U=J[++M])_(U)||!E(U)?P+=" "+U:P+=" "+o(U);return P},r.deprecate=function(H,$){if(x(e.process))return function(){return r.deprecate(H,$).apply(this,arguments)};if(n.noDeprecation===!0)return H;var M=!1;return function(){if(!M){if(n.throwDeprecation)throw new Error($);n.traceDeprecation?console.trace($):console.error($),M=!0}return H.apply(this,arguments)}},{});function o(H,$){var M={seen:[],stylize:c};return 3<=arguments.length&&(M.depth=arguments[2]),4<=arguments.length&&(M.colors=arguments[3]),b($)?M.showHidden=$:$&&r._extend(M,$),x(M.showHidden)&&(M.showHidden=!1),x(M.depth)&&(M.depth=2),x(M.colors)&&(M.colors=!1),x(M.customInspect)&&(M.customInspect=!0),M.colors&&(M.stylize=a),u(M,H,M.depth)}function a(H,$){return($=o.styles[$])?"\x1B["+o.colors[$][0]+"m"+H+"\x1B["+o.colors[$][1]+"m":H}function c(H,$){return H}function u(H,$,M){if(H.customInspect&&$&&N($.inspect)&&$.inspect!==r.inspect&&(!$.constructor||$.constructor.prototype!==$))return w(J=$.inspect(M,H))?J:u(H,J,M);var J=function(q,T){return x(T)?q.stylize("undefined","undefined"):w(T)?(I="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",q.stylize(I,"string")):v(T)?q.stylize(""+T,"number"):b(T)?q.stylize(""+T,"boolean"):_(T)?q.stylize("null","null"):void 0;var I}(H,$);if(J)return J;J=Object.keys($);var K,P=(K={},J.forEach(function(q,T){K[q]=!0}),K);if(H.showHidden&&(J=Object.getOwnPropertyNames($)),D($)&&(0<=J.indexOf("message")||0<=J.indexOf("description")))return h($);if(J.length===0){if(N($))return V=$.name?": "+$.name:"",H.stylize("[Function"+V+"]","special");if(S($))return H.stylize(RegExp.prototype.toString.call($),"regexp");if(k($))return H.stylize(Date.prototype.toString.call($),"date");if(D($))return h($)}var U,V="",G=!1,F=["{","}"];return m($)&&(G=!0,F=["[","]"]),N($)&&(V=" [Function"+($.name?": "+$.name:"")+"]"),S($)&&(V=" "+RegExp.prototype.toString.call($)),k($)&&(V=" "+Date.prototype.toUTCString.call($)),D($)&&(V=" "+h($)),J.length!==0||G&&$.length!=0?M<0?S($)?H.stylize(RegExp.prototype.toString.call($),"regexp"):H.stylize("[Object]","special"):(H.seen.push($),U=G?function(q,T,I,L,B){for(var Y=[],Z=0,rt=T.length;Z<rt;++Z)z(T,String(Z))?Y.push(p(q,T,I,L,String(Z),!0)):Y.push("");return B.forEach(function(Q){Q.match(/^\d+$/)||Y.push(p(q,T,I,L,Q,!0))}),Y}(H,$,M,P,J):J.map(function(q){return p(H,$,M,P,q,G)}),H.seen.pop(),60<U.reduce(function(q,T){return T.indexOf(`
|
|
@@ -193,9 +193,9 @@ nextUpBlkKeys = `).concat(l(Mt)),a(gt),new Error("getNextUpBlkKeys (for lex): ab
|
|
|
193
193
|
`),jt(Qt.state,"loh",Qt.changes)}catch(ee){throw console.error("myJsonSyn: ",ee),new Error("myJsonSync: exception -- ",ee.message)}},this.loh=Pt,this.roh=function(dt){var Ft=x.now(),Jt=((0,u.logClone)(dt),(0,u.clone)(dt));Q.push((0,u.clone)(dt)),console.log("ROH before apply latency: "+(x.now()-Ft)+" ms"),(0,u.logClone)(at),ct=(0,u.clone)(at),ht(dt.op),o.default.type.apply(at,dt.op),(0,u.logClone)(at),console.log("ROH after apply latency: "+(x.now()-Ft)+" ms"),(B||Y)&&(yt(at,Jt),tt.transformAndPreserveLocalAppSel(Jt,rt),tt.transformAndPreserveRemoteAppSel(Jt,rt,"roh")),n.nextTick(function(){return G({action:H.SYNC_REMOTE})}),console.log("ROH (end) after invoking syncState latency: "+(x.now()-Ft)+` ms
|
|
194
194
|
|
|
195
195
|
`)},this.cbuff=function(){Q=[]},this.differ=wt,this.gxs=function(){return ct},this.gj=I,this.sj=L,this.d=function(){return Nt(function(){if(F==null)return null;var dt=F();if(dt==null)throw new Error("getState failed: init state is undefined");return(0,u.logClone)(dt),dt}())},this.e=function(dt){gt.push((0,u.clone)(dt)),n.nextTick(function(){return G({action:H.SET_VAL})})},this.gconfig=function(){return T},this.initState=function(dt){(0,u.logClone)(dt),at=(0,u.clone)(dt),Y?et=Ct(at):nt=Ct(at),(B||Y)&&(dt=tt.exSel2InSel(rt.editorInstance.getSelection()),tt.setCurLocalSel(dt),(0,u.logClone)(dt)),Z=!0,n.nextTick(function(){return G({action:H.INIT})})},this.getLength=function(){return at?JSON.stringify(at).length:0},this.dmid=0,this.y="json",this.c=function(){},this.gss=q,null);function Et(dt,Ft){var Jt,Xt=x.now();return Jt=B?O(dt,Ft):Y?z(dt,Ft,wt,Lt):dt,Ft=x.now(),console.log("JsonOp2ObfOp latency: "+(Ft-Xt)+" ms"),Jt}function Ct(dt){var Ft=x.now(),Jt=dt=(0,u.clone)(dt);return Jt=B?D(dt):Y?R(dt):dt,dt=x.now(),console.log("Internal2External latency: "+(dt-Ft)+" ms"),Jt}function Nt(dt){var Ft=x.now(),Jt=dt=(0,u.clone)(dt);return Jt=B?N(dt):Y?A(dt):dt,dt=x.now(),console.log("External2Internal latency: "+(dt-Ft)+" ms"),Jt}function ht(dt){var Ft=x.now();B?((0,c.ins)(dt),k(dt)):Y&&E(dt),(0,c.ins)(dt),dt=x.now(),console.log("ObfOp2DeltaOp latency: "+(dt-Ft)+" ms")}this.getJSonSelection=function(){if(tt)return tt},this.gsel=function(){return Ot},this.toExS=Ct,this.toInO=Et,this.toInS=Nt,this.toQjsO=ht,this.urds=function(dt){(0,u.logClone)(dt),tt.getCurLocalSel();var Ft=rt.editorInstance.getSelection();(0,u.logClone)(Ft),Ft=tt.exSel2InSel(Ft),tt.setCurLocalSel(Ft),Ft=I(),tt.convertRCS2RemoteExSel(dt,(0,u.clone)(Ft),rt),n.nextTick(function(){return G({action:H.SYNC_RCS})})},this.tfslop=tt.transformCodoxSelection}function P(){for(var U=arguments.length,V=new Array(U),G=0;G<U;G++)V[G]=arguments[G];this.super(),this.init=function(){this.D.json=(0,s.default)(K,V)},this.uninit=function(){delete this.D.json}}(0,l.extendClass)(P,i.default),r.default=P}).call(this)}).call(this,t("_process"))},{"../../../../codox-json-diff/":47,"../../../../codox-json-ot/lib":59,"../../../../codox-shared/src/com/lib.js":217,"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../../../codox-shared/src/dtf/dtf.js":220,"../../constants":509,"../../predsm/off":540,"../domains":523,"./../../util/lib":551,"./ext/draftAdaptor.js":512,"./ext/jsonSelection.js":513,"./ext/lexAdaptor.js":514,"@babel/runtime/helpers/construct":558,"@babel/runtime/helpers/interopRequireDefault":563,_process:386}],518:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("../domains"))),s=n(t("../rt")),i=(n(t("../../util/idGen")),t("../../constants/apps")),l=(t("../../util/normalizer"),n=t("../../util/lib"),t("../../../../codox-shared/src/com/log")),o=t("../../../../codox-shared/src/com/util");function a(p,m){var b,_=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!_){if(Array.isArray(p)||(_=function(S,E){if(S){if(typeof S=="string")return c(S,E);var k=Object.prototype.toString.call(S).slice(8,-1);return(k=k==="Object"&&S.constructor?S.constructor.name:k)==="Map"||k==="Set"?Array.from(S):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?c(S,E):void 0}}(p))||m&&p&&typeof p.length=="number")return _&&(p=_),b=0,{s:m=function(){},n:function(){return b>=p.length?{done:!0}:{done:!1,value:p[b++]}},e:function(S){throw S},f:m};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
196
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var v,w=!0,x=!1;return{s:function(){_=_.call(p)},n:function(){var S=_.next();return w=S.done,S},e:function(S){x=!0,v=S},f:function(){try{w||_.return==null||_.return()}finally{if(x)throw v}}}}function c(p,m){(m==null||m>p.length)&&(m=p.length);for(var b=0,_=new Array(m);b<m;b++)_[b]=p[b];return _}function u(p,m){var b=i.apps.kora,_=(this.super(p.el,0,b),this.elem);function v(){var x=p.api.getContent();return function S(E){var k,D=a(E);try{for(D.s();!(k=D.n()).done;){var N=k.value;N.type==="block"&&(N.nested?S(N.nested):N.nested=[])}}catch(O){D.e(O)}finally{D.f()}}(x),JSON.parse(JSON.stringify(x))}function w(x,S){if(!x.length)return S;var E=x[0];if(S[E])return w(x.slice(1),S[E]);throw new Error("Path element ".concat(E," does not exist in content"))}this.appType=b,this.adjustAwareness=function(x){var S=_.closest(".fr-wrapper"),E={scrollTop:S&&S.scrollTop||0,scrollLeft:S&&S.scrollLeft||0};return x.map(function(k){var D,N,O,R=k.selection,A=k.siteId,z=k.cursor;return k=k.update,{siteId:A,cursor:(O=(A=E).scrollTop,A=A.scrollLeft,{top:z.top+O,bottom:z.bottom+O,left:z.left+A,right:z.right+A,lineHeight:z.lineHeight,height:z.height,width:z.width}),selection:(D=E.scrollTop,N=E.scrollLeft,R.map(function(H){return{top:H.top+D,bottom:H.bottom+D,left:H.left+N,right:H.right+N,height:H.height,width:H.width}})),update:k}})},this.n=function(){var x=Array.from(_.getElementsByTagName("img")).some(function(k){k.getAttribute("src"),k=k.getAttribute("data-fr-old-src")}),S=_.getElementsByClassName("fr-selected-cell"),E=0<_.parentNode.getElementsByClassName("fr-image-resizer fr-active").length;return(0,l.stringify)(x),(0,l.stringify)(S),x||E||!!S.length},this.e=function(x,S,E){if(!_)throw new Error("Element undefined");(0,l.stringify)(x),E?E&&E.forEach(function(k){var D=k;k.context&&(D=k.op),k=D,(0,o.logClone)(k),(0,o.logClone)(v()),(0,l.stringify)(k),k.forEach(function(N){var O,R=N.t,A=N.v,z=N.ld,H=N.li,$=N.oi,M=(N.od,N.lm,N.p),J=(N.cop,v());if($&&M.length&&M[M.length-1]==="nested"&&(O=function K(P,U){var V=P[0];if(U[V])return P.length==2?U[V]:K(P.slice(1),U[V]);throw new Error("Path element ".concat(V," does not exist in content"))}(M,J),p.api.insertNestBlock(O.id,$),O.id),R==="rt"&&(M.pop(),$=w(M,J),p.api.replaceBlockContent($.id,A),$.id),H&&(H.id,H.content,(O=M.pop())>=(R=w(M,J)).length?(A=R[R.length-1],p.api.createBlockAfter(A.id,H),A.id):($=R[O],p.api.createBlockBefore($.id,H),$.id)),z){if(!(A=z.id))throw new Error("ld op has no id field");p.api.removeBlock(A)}N.lm&&(R=Array.isArray(N.lm)?N.lm:[N.lm],O=M.pop(),H=R.pop(),$=w(M,J),z=w(R,J),A=$[O],!z.length&&0<R.length?(R.pop(),z=w(R,J),p.api.removeBlock(A.id),p.api.insertNestBlock(z.id,A,0)):H>=z.length?(N=z[H-1],p.api.moveBlockAfter(N.id,A)):(M=z[H],p.api.moveBlockBefore(M.id,A)))})}):p.api.setContent(x)},this.r=function(x){if(!_)throw new Error("Element undefined");(0,l.stringify)(x);var S=[];return x.forEach(function(E){var k=E.id,D=(E=E.content,p.api.getBlockContent(k));D&&(S.push(D),p.api.replaceBlockContent(k,E))}),(0,l.stringify)(S),S},this.d=v,this.hf=function(){for(var x=document.activeElement,S=p.el,E=x.parentNode;E;){if(E===S)return!0;E=E.parentNode}return!1},this.m=function(){var x;(x=_.getElementsByClassName("fr-video fr-active"))&&((0,l.stringify)(x),[].forEach.call(x,function(S){S.classList.remove("fr-active")}))},this.disable=function(){},this.enable=function(){}}function h(p,m){this.super(),this.init=function(){this.D.kora=new u(p),this.D},this.uninit=function(){delete this.D.kora}}(0,n.extendClass)(u,s.default),(0,n.extendClass)(h,e.default),r.default=h},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants/apps":510,"../../util/idGen":550,"../../util/lib":551,"../../util/normalizer":552,"../domains":523,"../rt":525,"@babel/runtime/helpers/interopRequireDefault":563}],519:[function(t,f,r){var n=t("quill-delta"),e=(t=t("./../../util/lib")).isArray,s=t.jsonEscape;function i(l){var o=l;try{if(!(o=typeof l=="string"?JSON.parse(s(l)):o)||!o.ops||!e(o.ops))throw new Error}catch{throw new Error(JSON.stringify(l))}return o}f.exports={contentToDelta:function(l){return l=i(l),new n(l)},parseAndValidate:i}},{"./../../util/lib":551,"quill-delta":722}],520:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/slicedToArray"))),s=t("../../constants/apps"),i=n(t("../domains")),l=n(t("../rt")),o=t("./../../logger"),a=t("./../../util/lib"),c=t("./../../env"),u=t("./qjs-util"),h=t("./../../../../cu-delta-filter/index.js"),p=t("../../../../codox-shared/src/com/log"),m=t("../../../../codox-shared/src/com/util"),b=(n=t("../../constants")).ONLINE,_=(n.OFFLINE,"silent");function v(x,S,E){var k=function(){try{var L,B=x.scrollingContainer||x.root;return(L=B.className&&-1<B.className.indexOf("ql-editor")?B:B.getElementsByClassName("ql-editor")[0])?L.contentEditable?L:void console.error("[qjs][getEditorDOM] Editor dom is not contenteditable"):void console.error("[qjs][getEditorDOM] Editor dom not found")}catch(Y){console.error(Y),o.logger.reportError(Y)}}();this.super(k,0,"quilljs"),this.appType=s.apps.quill;var D,N,O=null,R=0,A=this,z=null;function H(){x&&(R=x.getLength())}function $(L,B){B=1<arguments.length&&B!==void 0?B:_;try{x&&L&&(L.index+L.length<x.getLength()||function(Y){if(x&&Y){var Z=Y.index,rt=Y.length,Q=x.getLength();if(Q<Z)return Y.index=Q-1,Y.length=0;Q<Z+rt&&(Y.index=Z,Y.length=Q-1)}}(L),x.setSelection(L,B))}catch(Y){o.logger.reportError(Y)}}function M(){try{return x&&x.getSelection()}catch(L){o.logger.reportError(L)}}function J(L,B){c.isProd,c.isProd}function K(L){H();for(var B=arguments.length,Y=new Array(1<B?B-1:0),Z=1;Z<B;Z++)Y[Z-1]=arguments[Z];return L==="text-change"?(Y[0],Y[1],Y[2],c.isProd||x.getLength(),D.apply(void 0,Y)):L==="selection-change"?N.apply(void 0,Y):void 0}function P(L){var B=1<arguments.length&&arguments[1]!==void 0&&arguments[1];try{c.isProd;var Y=M(),Z=(x.updateContents(L,"codox"),H(),x.getContents());S.i({source:"r",delta:L,content:Z}),B&&$(Y)}catch(rt){o.logger.reportError(rt)}}function U(){try{if(x)return x.getContents();throw new Error("editor is null")}catch(L){throw o.logger.reportError(L),L}}function V(){try{return E}catch(L){o.logger.reportError(L)}}function G(L){try{var B=x.getBounds(L);return{left:B.left+k.scrollLeft,right:B.right+k.scrollLeft,bottom:B.bottom+k.scrollTop,top:B.top+k.scrollTop,height:B.height}}catch(Y){return o.logger.reportError(Y),null}}H(),this.hook=function(L){try{if(l.default.prototype.hook.call(this,L),x){x&&(D=function(Z,rt,Q){if(Z.ops,Q!="codox"&&Q!="undo"&&!(0,h.filterDelta)(Z)){if(A.isWriter()||A.isCommenter()&&Z.ops&&Z.ops.every(function(nt){return Object.keys(nt).every(function(et){return["retain","attributes"].includes(et)})&&(!nt.attributes||nt.attributes&&Object.keys(nt.attributes).every(function(et){return et==="comment"||et==="comment_draft"}))}))return Y({delta:Z,oldDelta:rt},"e");Q=x.getContents();var tt=0;Z=Z.ops[0].retain,Q=Q.diff(rt,tt=Z||tt),x.updateContents(Q,"undo"),setTimeout(function(){x.setSelection(null,"undo")},0)}},B=Y=L,N=function(Z,rt,Q){if(Q!==_&&Q!=="api")return B({delta:Z,oldDelta:rt},"c")},x.on("editor-change",K));try{x&&(x.setContents=J)}catch(Z){o.logger.reportError(Z)}}}catch(Z){o.logger.reportError(Z)}var B,Y},this.unhook=function(){try{l.default.prototype.unhook.call(this),x&&(x&&x.emitter&&x.emitter.removeListener("editor-change",K),x.hasOwnProperty("setContents")&&delete x.setContents)}catch(L){o.logger.reportError(L)}},this.getLAid=function(){var L=x.getContents();return{len:x.getLength(),textLen:(L&&L.ops?L.ops.filter(function(B){return typeof B.insert=="string"}).map(function(B){return B.insert}).join(""):"").length,laid:R}};var F=null,q=null,T=!(this.setWave=function(L){F=(O=L).hacm,q=O.app}),I=!1;this.loh=function(L,B){var Y,Z,rt,Q=L.delta,tt=L.oldDelta;return(0,m.logClone)(Q),(0,m.logClone)(tt),B==="e"?(q.a.i({source:"l",delta:Q}),I?void 0:(O.gs()!=b||O.sus()||O.slotimer("lohqjs"),L=Q,Y=tt,Z=U(),rt=0,L.ops[0].retain&&(rt=L.ops[0].retain),Z=Z.diff(Y,rt),O.pt.gct().seq,Y={op:O.dtf.d2c(L.ops),inverse:O.dtf.d2c(Z.ops)},O.dop2sm(Y,"lohqjs",O),void(T=!1))):B==="c"?O.gs()!==b||O.sus()?void 0:(T=!0,void setTimeout(function(){var nt,et;nt=Q,et=tt,T&&!I&&nt!==null&&(et={start:nt.index,end:nt.index+nt.length},F(et),T=!1)},0)):B=="u"?void O.pu.pu():void"QuillDomain codox_QJS_LOH: capturing an unexpected evt: delta = ".concat(Q,", ").concat(tt,", ").concat(B)},this.roh=function(L){(0,p.stringify)(new Date),(0,m.logClone)(L),P({ops:O.dtf.c2d(L.op)}),L.context&&O.rcs.urcs(L),(0,m.logClone)(L)},this.c=function(){try{I=!0;var L=M(),B=L?{start:L.index,end:L.index+L.length}:{start:-1,end:-1};return I=!1,B}catch(Y){o.logger.reportError(Y)}},this.getLength=function(){try{return x&&x.getLength()}catch(L){o.logger.reportError(L)}},this.disable=function(){x&&Object.getPrototypeOf(x).enable.bind(x)(!1)},this.enable=function(){x&&Object.getPrototypeOf(x).enable.bind(x)(!0)},this.setContents=function(L){var B=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];try{var Y,Z,rt=null;return x&&(Y=V(),(Z=(0,h.compareDelta)(Y.constructor,Y,L).change)&&Z.ops&&Z.ops.length&&(rt=M(),Object.getPrototypeOf(x).setContents.bind(x),x.updateContents(Z,"codox"),B&&$(rt),S.i(L),H())),rt}catch(Q){o.logger.reportError(Q)}},this.updateContents=P,this.getContents=U,this.initContents=V,this.setText=function(L){try{x&&x.setText(L,"codox")}catch(B){o.logger.reportError(B)}},this.tpop2delta=function(L){try{if(!Array.isArray(L))throw new Error("op is not array",L);var B={ops:[]};return L.forEach(function(Y){typeof Y=="number"&&B.ops.push({retain:Y}),Y.d&&typeof Y.d=="number"&&B.ops.push({delete:Y.d}),typeof Y=="string"&&B.ops.push({insert:Y})}),B}catch(Y){o.logger.reportError(Y)}},this.Q=function(){var L=0<arguments.length&&arguments[0]!==void 0?arguments[0]:z;if(!L)return null;z=L;var B=Object.keys(L).map(function(Y){var Z=(Q=L[Y]).start,rt=Q.end,Q=Q.update;return Z===-1?{cursor:null,selection:[],siteId:Y,update:!0}:Z===rt?{cursor:G(Z),selection:[],siteId:Y,update:Q}:{cursor:G(Z),selection:function(tt,nt){try{var et=tt,at=nt-tt+1,ct=x.getLeaf(tt),gt=(0,e.default)(ct,2),wt=gt[0],St=gt[1],Mt=x.getLeaf(nt),Lt=(0,e.default)(Mt,2),Pt=Lt[0],yt=Lt[1];if(wt==null||Pt==null)return[];var jt=document.createRange(),At=wt.position(St,!0),It=(0,e.default)(At,2),Ot=It[0],Et=It[1],Ct=(jt.setStart(Ot,Et),Pt.position(yt,!0)),Nt=(0,e.default)(Ct,2),ht=Nt[0],dt=Nt[1],Ft=[],Jt=(Ft=Ot===ht?(jt.setEnd(ht,dt),Array.from(jt.getClientRects())):(jt.setEndAfter(Ot.childNodes[Et]||Ot),Ft=Array.from(jt.getClientRects()),jt.setStartBefore(ht.childNodes[dt]||ht),jt.setEnd(ht,dt),Ft.concat(Array.from(jt.getClientRects()))),x.scroll.descendants(function(Be){return Be!==wt&&Be!==Pt&&Be.statics.blotName==="text"&&(jt.selectNode(Be.domNode),Ft=Ft.concat(Array.from(jt.getClientRects())),!0)},et,at),k.getBoundingClientRect()),Xt=(Le=k,{paddingLeft:parseFloat((0,a.getStyle)(Le,"padding-left"))||0,marginLeft:parseFloat((0,a.getStyle)(Le,"margin-left"))||0,borderLeft:parseFloat((0,a.getStyle)(Le,"border-left"))||0,boxSizing:(0,a.getStyle)(Le,"box-sizing")}),Qt=Xt.boxSizing,ve=Xt.paddingLeft,kt=Xt.marginLeft,ee=Xt.borderLeft,pe=k;return Ft.map(function(Be){return Be={left:Be.left-Jt.left+pe.scrollLeft,right:Be.right-Jt.left+pe.scrollLeft,top:Be.top-Jt.top+pe.scrollTop,bottom:Be.bottom-Jt.top+pe.scrollTop,width:Be.width,height:Be.height},Qt==="border-box"&&(Be.left+=kt,Be.right+=kt),Qt==="content-box"&&(Be.left+=kt+ve+ee,Be.right+=kt+ve+ee),Be}).filter(function(Be){return 1<Be.height&&1<Be.width})}catch(Be){return o.logger.reportError(Be),[]}var Le}(Z,rt),siteId:Y,update:Q}});return B},this.n=function(){var L=k.getElementsByClassName("slash-command");return!(!L||!L.length)},this.m=function(){var L=new KeyboardEvent("keydown",{key:"Escape"});k.dispatchEvent(L)},this.forceSync=function(L){var B=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"api";if(B===_)throw new Error('[codox] forceSync "silent" changes are not synced');try{var Y=M(),Z=Object.getPrototypeOf(x);(Z&&Z.setContents.bind(x))(L,B),$(Y)}catch(rt){o.logger.reportError(rt)}},this.toDelta=function(L){return(0,u.contentToDelta)(L)},this.x=k}function w(x,S,E){this.super(),this.init=function(){this.D.quilljs=new v(x,S,E)},this.uninit=function(){delete this.D.quilljs}}(0,a.extendClass)(v,l.default),(0,a.extendClass)(w,i.default),r.default=w},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants":509,"../../constants/apps":510,"../domains":523,"../rt":525,"./../../../../cu-delta-filter/index.js":225,"./../../env":527,"./../../logger":530,"./../../util/lib":551,"./qjs-util":519,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572}],521:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("../domains"))),s=t("../../util/lib"),i=n(t("../pt"));function l(o,a,c){this.super(),this.init=function(){this.D.text=new i.default(o,a,c),this.D},this.uninit=function(){delete this.D.text}}(0,s.extendClass)(l,e.default),r.default=l},{"../../util/lib":551,"../domains":523,"../pt":524,"@babel/runtime/helpers/interopRequireDefault":563}],522:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,t("../../constants/apps")),s=n(t("../domains")),i=t("../../util/normalizer"),l=t("../../util/lib"),o=(t("./../../logger"),n=n(t("../rt")),window.tinymce);function a(u,h){this.super(u.getBody(),0);var p=u.getBody(),m=e.apps.tiny;if(this.appType=m,!u)throw new Error("Internal error: Tiny editor not found");m=Object.assign({},u.settings,{forced_root_block:!1,indent:!1,element_format:"html",remove_trailing_brs:!1});var b=Object.assign({},u.schema);o&&o.html&&new o.html.Serializer(m,b),this.getMouseHookElem=function(){if((u&&u.settings).inline)return null;var _=u.getDoc();return _&&_.getElementsByTagName("html")[0]},this.getCaretPos=function(_){var v,w=(_=u.dom.getRect(_)).x,x=_.y,S=_.w;return _=_.h,u.settings.inline?{left:w-(v=u.getBody().parentNode.getBoundingClientRect()).left,top:x-v.top,bottom:x+_,right:w+S,width:S,height:_}:{left:w,top:x,bottom:x+_,right:w+S,width:S,height:_}},this.adjustAwareness=function(_){var v,w,x=u.getBody().parentNode;return w=u.settings.inline?{scrollTop:-1*(v=x.getBoundingClientRect()).top,scrollLeft:-1*v.left}:{scrollTop:x.scrollTop,scrollLeft:x.scrollLeft},_.map(function(S){var E,k,D=S.selection,N=S.siteId,O=S.cursor;return S=S.update,{siteId:N,cursor:O,selection:(E=(N=w).scrollTop,k=N.scrollLeft,D.map(function(R){return{top:R.top+E,bottom:R.bottom+E,left:R.left+k,right:R.right+k,height:R.height,width:R.width}})),update:S}})},this.d=function(){try{if(!u||!u.getContent)throw new Error("Editor instance null");var _=u.getContent({format:"raw"});return(0,i.normalizeClasses)(_,i.classes.tinymce)}catch(v){console.error(v)}},this.e=function(_,v){if(!p)throw new Error("Element undefined");var w=document.createElement("div");for(w.innerHTML=_;p.firstChild;)p.removeChild(p.firstChild);Array.from(w.childNodes).forEach(function(x){p.appendChild(x)}),v&&h.i({source:"r"})},this.cc=function(_){if(p)return(_=p.getElementsByClassName("rangySelectionBoundary")[_])?_.outerHTML&&_.outerHTML.replace(/[\u200B-\u200D\uFEFF]/g,""):null;throw new Error("Can't get selection marker on element")},this.m=function(){var _;["data-mce-bogus='all'","data-mce-bogus='1'"].forEach(function(v){var w=p.querySelectorAll("[".concat(v,"]"));w&&[].forEach.call(w,function(x){x.parentNode.removeChild(x)}),p.querySelectorAll("[".concat(v,"]"))}),(_=p.querySelectorAll("[data-mce-selected='1']"))&&[].forEach.call(_,function(v){v.removeAttribute("data-mce-selected"),v.classname+=" faux-selection"})},this.n=function(){var _=p.ownerDocument||window.document,v=_.getElementsByClassName("mce-resizehandle");return!(!v||!v.length)||!(!(v=_.getElementsByClassName("mce-visual-caret"))||!v.length)},this.disable=function(){}}function c(u,h){this.super(),this.init=function(){this.D.tiny=new a(u,h),this.D},this.uninit=function(){this.D.tiny=null},this.hf=function(){return!u.settings.inline||document.activeElement===u.getBody()}}(0,l.extendClass)(a,n.default),(0,l.extendClass)(c,s.default),r.default=c},{"../../constants/apps":510,"../../util/lib":551,"../../util/normalizer":552,"../domains":523,"../rt":525,"./../../logger":530,"@babel/runtime/helpers/interopRequireDefault":563}],523:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=t("../../../codox-shared/src/com/log"),e=t("../../../codox-shared/src/com/util");r.default=function(){function s(l){for(var o in i)if(i.hasOwnProperty(o)&&(o=i[o]).dmid===l)return o;return null}var i={};this.D=i,this.a=function(){for(var l in i)if(i.hasOwnProperty(l)){if((l=i[l]).y==="quilljs"||l.y==="slate"||l.y=="codemirror")return void(l.k=null);if(l.y==="json")return o=l.d(),void l.sj(o);l.y;var o=l.d();l.sj(o)}},this.b=function(){var l,o=[];for(l in i)i.hasOwnProperty(l)&&o.push(i[l]);return o},this.c=function(){for(var l in i)if(i.hasOwnProperty(l)&&(l=i[l]).dmid===0)return l;return null},this.d=s,this.e=function(){var l,o=[];for(l in i)if(i.hasOwnProperty(l)){var a=i[l];if(a.y==="quilljs"||a.y==="slate"||a.y=="codemirror"){var c=a.k?JSON.stringify(a.k):JSON.stringify(a.getContents()),u=a.getLAid&&JSON.stringify(a.getLAid());(0,n.stringify)(u),c={dmid:a.dmid,spst:c,laid:u},o.push(c)}else if(a.y==="froalaNew"||a.y=="kora"||a.y=="json")u=JSON.stringify(a.gj()),(0,n.ins)(u),c={dmid:a.dmid,spst:u},o.push(c);else{if(!a.x)throw console.error("getSVals: undefined dom.x "),Error("undefined dom.x in getSVals");a={dmid:a.dmid,spst:a.gj()},o.push(a)}}return(0,e.logClone)(o),o},this.h=function(l){(0,e.logClone)(l);for(var o=0;o<l.length;o++){var a,c,u=s(l[o].dmid);if(u.y==="quilljs"||u.y==="slate"||u.y=="codemirror")return l[o].spst,a=JSON.parse(l[o].spst),void u.setContents(a);if(u.y==="json")return a=JSON.parse(l[o].spst),void u.initState(a,!0);u.y=="froalaNew"?(c=l[o].spst,(0,n.ins)(c),u.sj(c)):(c=l[o].spst.op[0],(0,n.ins)(c),u.sj(c)),u.e(u.gj())}},this.h2=function(l){(0,e.logClone)(l);var o=s(0);return o.y==="quilljs"||o.y==="slate"||o.y=="codemirror"?void o.setContents(l):o.y==="json"?void o.initState(l,!0):(o.sj(l),void o.e(l))},this.k=function(l){for(var o in i)!i.hasOwnProperty(o)||(o=i[o]).dmid===l&&(o.dmid,o.l())},this.u=function(l){for(var o in i)!i.hasOwnProperty(o)||(o=i[o]).dmid===l&&o.m()},this.T={rt:"rt",pt:"pt"}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219}],524:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/slicedToArray"))),s=(t("../constants/apps"),n(t("./shadowelem"))),i=t("../util/lib"),l=(n(t("lodash/partition")),t("./../logger"),n(t("rangy/lib/rangy-selectionsaverestore")));r.default=function(o,a,c){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:"pt",h=(l.default.initialized||l.default.init(),this),p=(this.dmid=0,this.spst="",this.CKPSVal="",this.elem=o,new s.default);p.init(o),p.setText(o.value),this.h=function(){return this.dmid===0},this.a=function(m){return p&&p.setText(m)},this.b=function(m,b){if(b=b||m,o&&typeof o.setSelectionRange=="function")return o.setSelectionRange(m,b);throw new Error("Can't set selection range on element")},this.c=function(){if(o&&o.selectionStart!==void 0&&o.selectionEnd!==void 0)return{start:o.selectionStart,end:o.selectionEnd};throw new Error("Can't get selection range on element")},this.d=function(){return o.value},this.e=function(m,b){p&&p.setText(m),o.value=m,b&&a.i({source:"r"})},this.l=function(){o.blur(),o.focus()},this.f=function(m){p&&p.updateStyle();for(var b,_,v,w,x,S=[],E=0,k=Object.entries(m);E<k.length;E++){var D=(N=(0,e.default)(k[E],2))[0],N=((N=N[1]).sid=D,p&&p.embedCaret(N)),O=(N=(0,e.default)(N,2))[0],R=(N=N[1],A=(A=void 0,i.getStyle)(R=O,"font-size"),A=Math.floor(parseInt(A.replace("px",""),10)),{left:(R=R.getBoundingClientRect()).left,right:R.right,top:R.top,bottom:R.bottom,height:R.height,width:R.width,lineHeight:A}),A=[];N&&(A=function(z,H){var $=l.default.createRange();$.setStartBefore(z),$.setEndAfter(H),$.normalizeBoundaries();for(var M=document.createNodeIterator($.commonAncestorContainer,NodeFilter.SHOW_ALL,{acceptNode:function(K){return NodeFilter.FILTER_ACCEPT}}),J=[];M.nextNode()&&(J.length===0&&M.referenceNode!==z||(J.push(M.referenceNode),M.referenceNode!==H)););return J.reduce(function(K,P){return P.nodeType!=3?K:($.selectNode(P),K.concat(Array.from($.nativeRange.getClientRects())))},[]).filter(function(K){return 1<K.height&&1<K.width})}(O,N)),S.push({cursor:R,siteId:D,selection:A})}return m=S,_=(b=o).getBoundingClientRect(),v=p.getDim(),w={scrollTop:b.scrollTop||0,scrollLeft:b.scrollLeft||0,left:_.left||0,top:_.top||0},x={left:v.left,top:v.top},m.map(function(z){var H,$,M,J,K=z.selection,P=z.siteId,U=z.cursor;return z=z.update,{siteId:P,cursor:(J=(P=x).left,P=P.top,{top:U.top+w.top-P,bottom:U.bottom+w.top-P,left:U.left+w.left-J,right:U.right+w.left-J,lineHeight:U.lineHeight,height:U.height,width:U.width}),selection:(H=w,$=x.left,M=x.top,K.map(function(V){return{top:V.top+H.top-M,bottom:V.bottom+H.top-M,left:V.left+H.left-$,right:V.right+H.left-$,height:V.height,width:V.width}})),update:z}})},this.j=this.spst,this.sj=function(m){h.spst=m},this.gj=function(){return h.spst},this.k=this.CKPSVal,this.y=u,this.x=this.elem,this.setPermission=function(m){},this.hf=function(){var m;return!(!document||!h.elem)&&(h.elem,m=document.activeElement,h.elem===m)}}},{"../constants/apps":510,"../util/lib":551,"./../logger":530,"./shadowelem":526,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572,"lodash/partition":700,"rangy/lib/rangy-selectionsaverestore":726}],525:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/slicedToArray"))),s=t("../constants/apps"),i=t("../util/lib"),l=n(t("lodash/partition")),o=t("./../logger"),a=t("../env"),c=(t("../../../codox-shared/src/com/log"),t("../../../codox-shared/src/com/util")),u=Date,h=["read","write","commentOnly"];function p(m,b){var _,v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"rt",w=null,x=(a.isClickup||(w=t("rangy/lib/rangy-selectionsaverestore")).initialized||w.init(),this);function S(N,O){if(w){var R=w.createRange();R.setStartBefore(N),R.setEndAfter(O),R.normalizeBoundaries();for(var A=document.createNodeIterator(R.commonAncestorContainer,NodeFilter.SHOW_ALL,{acceptNode:function(H){return NodeFilter.FILTER_ACCEPT}}),z=[];A.nextNode()&&(z.length===0&&A.referenceNode!==N||(z.push(A.referenceNode),A.referenceNode!==O)););return z.reduce(function(H,$){return $.nodeType!=3?H:(R.selectNode($),H.concat(Array.from(R.nativeRange.getClientRects())))},[]).filter(function(H){return 1<H.height&&1<H.width})}}this.elem=m,this.dmid=b||0,this.spst="",this.CKPSVal="",this.type=v,this.permission="write",this.isWriter=function(){return this.permission&&this.permission==="write"},this.isReader=function(){return this.permission&&this.permission==="read"},this.isCommenter=function(){return this.permission&&this.permission==="commentOnly"},this.getMouseHookElem=function(){return this.elem},this.hookMouse=function(N){var O,R,A,z=this.getMouseHookElem();z&&(O=N,A=0,_=function(H){var $,M,J;R&&($=H.clientX,M=H.clientY,(M={x:$-(J=($=R).getBoundingClientRect()).left+$.scrollLeft,y:M-J.top+$.scrollTop}).l=H.type==="click",M.t=Math.round(u.now()),A%E!=0&&!M.l||O([M],"pt"),A++)},(R=z).addEventListener("mousemove",_),z.addEventListener("click",_))},this.unHookMouse=function(){var N=this.getMouseHookElem();N&&(N.removeEventListener("mousemove",_),N.removeEventListener("click",_),_=null)};var E=5,k=null;function D(N,O,R){try{for(var A=R=R==null||R<0?0:R;A<N.length;A++){var z=N[A],H=z.id,$=z.content,M=$&&$.indexOf(O);if(0<=M)return(0,c.clone)(N[A]),{id:H,index:A,p:M}}}catch(J){console.error(J)}return null}this.setWave=function(N){k=N},this.c=function(){var N,O=k.gfln(),R=k.ssl,A=k.rsl,z=k.mdom,H=(R=R(z),z.d()),$=-1,M=-1,J=-1,K=-1,P=null,U=null;return R&&R.rangeInfos[0]&&((P=z.cc(0))&&(O?(N=D(H,P,0))!==null&&(M=N.index,$=N.p):$=H.indexOf(P)),(U=z.cc(1))&&(O?(N=D(H,U,M))!==null&&(K=N.index,J=N.p):J=H.indexOf(U))),A(z,R),O?(P&&!U&&(K=M,J=$),P&&U&&M==K&&(J-=P.length),0<=$&&0<=J?{startid:M,start:$,endid:K,end:J}:{startid:-1,start:-1,endid:-1,end:-1}):($<0&&($=0),U?J-=P.length:J=$,{start:$,end:J})},this.gp=D,this.b=function(N,O){if(O=O||N,m&&typeof m.setSelectionRange=="function")return m.setSelectionRange(N,O);throw new Error("Can't set selection range on element")},this.cc=function(N){if(m)return(N=m.getElementsByClassName("rangySelectionBoundary")[N])?N=N.outerHTML:null;throw new Error("Can't get selection marker on element")},this.d=function(){if(m)return m.innerHTML;throw new Error("Element undefined")},this.e=function(N,O){if(!m)throw new Error("Element undefined");m.innerHTML=N},this.f=function(N,O){var R="[id^=".concat(N,"]");if(!(R=Array.prototype.slice.call(m.querySelectorAll(R)||[])).length)return[];R=R.map(function(H){var $=function(M,J){if(J=new RegExp("^".concat(J,"_([^_]+)(_end$)?")),J=(M=M.match(J))&&M[1])return{siteId:J,isEnd:!(!M||!M[2])};throw new Error("Can't get site id from caret id")}(H.id,N);return{marker:H,siteId:$.siteId,isEnd:$.isEnd}}),R=(0,l.default)(R,{isEnd:!1});var A=(R=(0,e.default)(R,2))[0],z=(R=R[1],(0,i.keyBy)(R,"siteId"));return R=A.reduce(function(H,$){var M,J=$.siteId,K=(M=$=$.marker,K=s.apps.froala,x.appType===K&&(M.style.display="inline-block"),K=typeof x.getCaretPos=="function"?x.getCaretPos(M):M.getBoundingClientRect(),M=(0,i.getStyle)(M,"font-size"),M=Math.floor(parseInt(M.replace("px",""),10)),{left:K.left,right:K.right,top:K.top,bottom:K.bottom,height:K.height,width:K.width,lineHeight:M});return z[J]?H[J]={cursor:K,selection:S($,z[J].marker),siteId:J,update:!0}:H[J]={cursor:K,selection:[],siteId:J,update:!0},H},{}),A=Object.values(R),x.adjustAwareness(A)},this.h=function(){return b===0},this.i=function(){var N=null;if(N=m.ownerDocument)return N.createElement("div")},this.sj=function(N){x.spst=N},this.gj=function(){return x.spst},this.k=this.CKPSVal,this.l=function(){m.blur(),m.focus()},this.m=function(){},this.n=function(){return!1},this.x=this.elem,this.y=v,this.H=!0,this.hf=function(){var N;return!(!document||!x.elem)&&(x.elem,N=document.activeElement,x.elem===N)},this.getRemoteSelection=S,this.adjustAwareness=function(N){return N.map(function(O){var R=O.selection,A=O.siteId,z=O.cursor;return O=O.update,{siteId:A,cursor:z,selection:R.map(function(H){return{top:H.top,bottom:H.bottom,left:H.left,right:H.right,height:H.height,width:H.width}}),update:O}})}}p.prototype.hook=function(m,b,_){try{this.elem&&_&&this.hookMouse(m)}catch(v){o.logger.reportError(v)}},p.prototype.unhook=function(){try{this.elem&&this.unHookMouse()}catch(m){o.logger.reportError(m)}},p.prototype.setPermission=function(m){try{h.includes(m)&&(this.permission=m)}catch(b){o.logger.reportError(b)}},p.prototype.forceSync=function(m){try{m&&this.e(m)}catch(b){o.logger.reportError(b)}},r.default=p},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../constants/apps":510,"../env":527,"../util/lib":551,"./../logger":530,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572,"lodash/partition":700,"rangy/lib/rangy-selectionsaverestore":726}],526:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=["direction","boxSizing","width","overflow","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","scrollWidth","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize","marginLeft","marginRight","marginTop","marginBottom","margin"];r.default=function(){this.init=function(e){var s=this,i=(this.element=e,this.div=document.createElement("div"),this.div.class="textarea-mirror",document.body.appendChild(this.div),this.div.style);this.computed=window.getComputedStyle?getComputedStyle(e):e.currentStyle,i.whiteSpace="pre-wrap",e.nodeName!=="INPUT"&&(i.wordWrap="break-word"),i.position="absolute",i.visibility="hidden",n.forEach(function(l){i[l]=s.computed[l]}),i.height="0px",i.overflow="hidden"},this.setWidth=function(){var e=parseFloat(this.computed.paddingLeft.replace("px","")),s=parseFloat(this.computed.paddingLeft.replace("px",""));e=this.element.scrollWidth-e-s+"px",this.div.style.width=e},this.destroy=function(){this.div&&document.body.removeChild(this.div)},this.setText=function(e){this.text=e},this.getContainer=function(){return this.div},this.updateStyle=function(){var e=this,s=this.div.style;this.computed=window.getComputedStyle?getComputedStyle(this.element):this.element.currentStyle,n.forEach(function(i){s[i]=e.computed[i]}),this.div.scrollTop=this.element.scrollTop},this.embedCaret=function(e){this.div.innerHTML="";var s=e.start,i=e.end,l=(e=e.sid,document.createTextNode(this.text.substring(0,s))),o=document.createTextNode(this.text.substring(i)),a=document.createElement("span"),c=(a.setAttribute("data-pt-caret-start",e),a.style.display="inline",null),u=null;return s!==i&&(u=document.createTextNode(this.text.substring(s,i)),(c=document.createElement("span")).setAttribute("data-pt-caret-end",e),c.style.display="inline"),this.div.appendChild(l),this.div.appendChild(a),u&&(this.div.appendChild(u),this.div.appendChild(c)),this.div.appendChild(o),this.updateStyle(),[a,c]},this.getDim=function(){if(this.div)return this.div.getBoundingClientRect()},this.updateCarets=function(e){this.div.innerHTML="",this.updateStyle();var s=Object.keys(e),i=(e=Object.values(e),this.div.textContent=this.text.substring(0,e[0].start),document.createElement("span"));i.setAttribute("data-pt-caret",s[0]),i.textContent=this.text.substring(e[0].start,this.text.length),this.div.appendChild(i)}}},{}],527:[function(t,f,r){f.exports={isProd:!1,isDev:!1,isClickup:!1,environment:null,setEnv:function(n){}}},{}],528:[function(t,f,r){var n=(a=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/createClass")),e=a(t("@babel/runtime/helpers/classCallCheck")),s=a(t("@babel/runtime/helpers/assertThisInitialized")),i=a(t("@babel/runtime/helpers/inherits")),l=a(t("@babel/runtime/helpers/possibleConstructorReturn")),o=a(t("@babel/runtime/helpers/getPrototypeOf")),a=a(t("@babel/runtime/helpers/wrapNativeSuper"));function c(S){var E=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var k,D=(0,o.default)(S);return k=E?(k=(0,o.default)(this).constructor,Reflect.construct(D,arguments,k)):D.apply(this,arguments),(0,l.default)(this,k)}}t=(0,a.default)(Error),(0,i.default)(x,t),m=c(x),a=(0,n.default)(x),(0,i.default)(w,a),p=c(w),t=(0,n.default)(w);var u,h,p,m,b=((0,i.default)(v,t),h=c(v),(0,n.default)(v));function _(S,E,k){return(0,e.default)(this,_),(S=u.call(this,S||"CBError")).ASErrInfo=E,S.failedCmd=k,S}function v(S,E,k,D){return(0,e.default)(this,v),(S=h.call(this,S||"VersionError")).clientVer=E,S.serverVer=k,S.compatible=D,S}function w(S){return(0,e.default)(this,w),(S=p.call(this,S||"TerminalError")).reconnect=!1,S}function x(S,E){return(0,e.default)(this,x),(S=m.call(this,S)).name=S.constructor.name,Error.captureStackTrace((0,s.default)(S),S.constructor),S}(0,i.default)(_,t),u=c(_),i=(0,n.default)(_),f.exports={CoreError:a,TerminalError:t,VersionError:b,CBError:i}},{"@babel/runtime/helpers/assertThisInitialized":556,"@babel/runtime/helpers/classCallCheck":557,"@babel/runtime/helpers/createClass":559,"@babel/runtime/helpers/getPrototypeOf":561,"@babel/runtime/helpers/inherits":562,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/possibleConstructorReturn":570,"@babel/runtime/helpers/wrapNativeSuper":576}],529:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"AppAPI",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"Bootstrap",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(r,"Errors",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"WavePreDsm",{enumerable:!0,get:function(){return i.default}}),r.default=void 0,n(t("./api/bootstrap"))),s=n(t("./api/appApi")),i=n(t("./predsm/codox")),l=n(t("./errors"));n=n(t("../package.json")),t={Bootstrap:e.default,AppAPI:s.default,WavePreDsm:i.default,Errors:l.default},r.default=t,console.log("\x1B[43m wave-core: ".concat(n.default.version," \x1B[0m"))},{"../package.json":732,"./api/appApi":505,"./api/bootstrap":506,"./errors":528,"./predsm/codox":532,"@babel/runtime/helpers/interopRequireDefault":563}],530:[function(t,f,r){t("./env").isProd,t=new function(){this.init=function(n){this.sentry=n},this.reportError=function(n){},this.reportInfo=function(n){},this.addBreadcrumb=function(n){},this.addTag=function(n,e){}},f.exports={logger:t,SENTRY_LEVEL_H:1,SENTRY_LEVEL_M:2,SENTRY_LEVEL_L:3,I_STOP_MSG_1:3001,I_STOP_MSG_2:3002,I_STOP_MSG_3:3003,I_STOP_MSG_4:3004,SENTRY_REPORT_LIMIT:2,SENTRY_RTT_REPORT_LIMIT:2}},{"./env":527}],531:[function(t,f,r){var n={read:"r",write:"w",commentOnly:"w",no_access:"r"};f.exports={accessToRole:function(e){var s;if((s=e)&&s.trim().toLowerCase(),n[e])return n[e];throw new Error("access type: ".concat(e," undefined"))},roles:{Read:"r",Write:"w"}}},{}],532:[function(t,f,r){var n,e=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/typeof")),s=Date,i=(n=t("./ver")).smVer,l=n.clientVer,o=(n=t("../env")).isProd,a=(n.isDev,n.isClickup),c=(n=t("../../../codox-shared/src/com/log")).ins,u=((n.stringify,n=t("../../../codox-shared/src/com/util")).clone,n.logClone),h=(n=t("../util/lib")).getTabId,p=n.clearTimer,m=(n=t("../logger.js")).logger,b=n.SENTRY_LEVEL_H,_=(n=t("../../../codox-shared/src/com/constants")).JOINING,v=n.ONLINE,w=n.STOPPED,x=n.OFFLINE,S=(n=t("../../../codox-shared/src/com/constants")).STARTED_LOG,E=(n.JOINED_LOG,n.STOPPED_LOG,n.INVALID_LOG,n=t("../constants")).SMSUB,k=n.SMMSG,D=t("./rcs.js"),N=t("./dsm.js"),O=t("../../../codox-shared/src/gt/pt.js"),R=t("../../../codox-shared/src/gt/pu.js"),A=(n=t("./off.js")).gos,z=n.srjn,H=n.offLOH,$=(n.offLOHJson,n.isrjn,n=t("./opm")).dltmg,M=n.difmg,J=(n=t("./msg")).msg2sm,K=n.log2sm,P=(n=t("./sync")).hso,U=n.sof,V=(n=t("./difap.js")).flop,G=n.plop,F=n.glop,q=n.rss,T=n.loh,I=n.roh,L=n.udoc,B=t("./dltap.js"),Y=t("./ext/ime.js"),Z=t("./ext/uim.js"),rt=t("./ext/pvp.js"),Q=t("./soh.js"),tt=t("../../../codox-shared/src/com/lib"),nt=t("../../../codox-shared/src/dtf/dtf.js"),et=tt.isop,at=tt.ipop,ct=tt.idlt,gt=tt.idif,wt=tt.dct,St=tt.gran,Mt=tt.csmais,Lt=tt.dcdcm,Pt=t("../../../codox-shared/src/gt/xf"),yt=(n=t("../../../codox-rt-type/src/")).sdf,jt=n.rtf,At=t("../../../codox-json-ot/lib/"),It=(t("./sapa.js"),t("./spot.js"),n=t("./access")).accessToRole,Ot=n.roles;t("../errors").VersionError,f.exports=function(Et,Ct,Nt){var ht=s.now(),dt=(this.START_TIME=ht,this.endpoint=Et.endpoint,this.tm=Nt,yt.gop),Ft=jt.iwop,Jt=jt.cko,Xt=nt.d2c,Qt=i,ve=(this.setSMV=function(zt){Qt=zt},l),kt=(this.cver=ve,null),ee=(this.setSID=function(zt){kt=zt},1),pe=14,Le=16,Be=20,qe=21,ze=501,Ie=o,He=Et.codoxLogger,hn=Et.startCb,Tt=Et.sockOpenTimer,ae=Et.editorInstance,de=m.reportError.bind(m),we=m.addBreadcrumb.bind(m),Oe=m.addTag.bind(m),Rt=(this.breadCrumb=we,console.log("codoxwave constructor (begin) codox4.0xxx--x-2024-6 new1draft-lex start ",Et),this.editorInstance=ae,we("[codoxi]* ccw: t = 0; CV="+ve+"; seid = "+Et.sid,b),Oe("clientVersion",ve),Et.ver),Ut=this,se=(this.app=Et).appType,bt=Et.sid,ft=Et.domains,xt=Et.cid,Bt=(ft.b(),ft.c()),ce=(Bt.sw&&Bt.sw(this),Et.sysInfo),Ce=Et.anyClient,Te=Et.founder,Ne=Ot.Write,Ge=(Et.role&&(Ne=Et.role),hn),be={sid:kt,jointime:new Date,userinfo:Object.assign({},Et.user),role:Ne,founder:Te},pt=(this.minfo=be,null),Dt=null,$t=null,qt=(a||(this.rangy||(this.rangy=t("rangy/lib/rangy-selectionsaverestore")),this.rangy.initialized||this.rangy.init()),this.rangy=t("rangy/lib/rangy-selectionsaverestore"),this.rangy.init(),0),Wt=null,oe=null,X=null,lt=[],vt=null,Vt=s.now(),te=0,Zt=_,Yt=rt.pmod(),me=!1,Ee=null,Ue=!1,Ae=(this.setSMC=function(zt){Ue=zt},null),We=null,nn=null,cn=null,An=null,un=null,bn=null,Nn=null,Ln=null,er=null,nr=!0,ka=!0,Ui=!0,to=!0,Lr=!0,Hr=!0,wn=!0,$i=!0,gn=null,In=null,Ao=null,jr=null,eo=null,Br=null,_r=null,Oa=null,yo=null,qr=null,vn=null,Nu=null,Hl=null,Jr=null,Pu=null,ql=null,Ta=null;function No(zt){return zt&&zt!=="pt"&&vn.mbs.length,Zt!==x&&vn&&vn.mbs&&vn.mbs.length===1}function Po(zt,ne){if(Ct)try{if(Ct.readyState!==1)throw new Error("WebSocket is in OPEN state.");Ct.close(),Ct=null}catch{we("socket error readyState = ".concat(Ct.readyState," err=").concat(ne)),zt.error=ne,o||console.error("[codox] exception in closing socket")}}function Io(zt,ne){if(Zt!=x){if(ke=new Date,sn=null,Wi&&(sn=vn.mbs.length),tn=null,tn={state:Zt,connected:Ue,subr:di,subs:Wi,JnC:tn=qr?1:tn,joined:me,members:sn,reason:null,error:null,wid:Et.waveId,app:se,ts:ke},sn={},tn.reason=zt||500,zt==800)return tn.reason=800,sn.reason=800,Po(tn,13),void ai(xt,zt);if(Zt===w)tn.error=1;else{if(!zt)return Po(tn,3),void(Nt||ai(xt,500));if(!Ue)return tn.error=6,zt!==ze&&de(new Error("init socket connection failure"),{tags:sn,extra:tn}),Ba(zt),void(Nt||ai(xt,zt));Ct&&Do("stopflush");var fe,ke=null;Ct&&zt!=ee&&zt!=200&&(fe=function(en,Ve){return(en=en!=null&&(0,e.default)(en)==="object"?en:{}).code=Ve.reason,en.st=Ve.state,en.cn=Ve.connected,en.subr=Ve.subr,en.subs=Ve.subs,en.jnd=Ve.joined,Wi&&(en.dos=Us(),en.mbn=vn.mbs.length),(Ve=JSON.stringify(en)).length,Ve}(ne,tn),ke=Ct.close(4111,fe)),(zt==200||zt==ee&&ne!==4e3||zt!==ee&&zt==200&&ke<0)&&(tn.error=12,we("stop reason = ".concat(zt,"; sid = ").concat(kt)),de(new Error("reason ".concat(zt)),{tags:sn,extra:tn,details:ne})),Nt||ai(xt,zt)}}else zt.message;var sn,tn}function ai(zt,ne){var fe;Zt!=w&&(Zt=w,0<lt.length&&(u(lt),lt=[]),Ct&&(Ct.onclose=null,Ct.onmessage=null,Ct.onerror=null,Ct.onopen=null),p(vt),p(oe),p(X),p(Tt),za.clean(),fe=(s.now()-ht)/1e3,me?(we("[codoxi]* cdxclose: t = "+fe+"; r="+ne+"; hbc = "+Ji+"; sid = "+In&&kt,b),Et.a.a(zt,ne)):((0,e.default)(ne)!=="object"?we("[codoxi]* cdxcb(n): t = "+fe+"; r="+ne,b):ne.message,Ge(null,ne)),Et.domains=null,be=Bt=ft=In=Ge=Ut=null,qr&&qr.clean(),qr=null)}function Ls(){return Ne===Ot.Read}function Bs(zt,ne,fe){var ke,sn;ci||(zn?fe=="e"&&(fe=zt,zt=ne,ke=Bt.getContents(),sn=0,fe=fe.ops[0].retain,ke=ke.diff(zt,sn=fe||sn),Bt.updateContents(ke),Bt.disable()):ne=="e"&&ft.b().forEach(function(tn){var en=tn.gj(),Ve=tn.d(),Un=en;(Ar?JSON.stringify(Un)!=JSON.stringify(Ve):Un!=Ve)&&tn.e(en,!1)}))}function ja(zt){return Zt==x||No(zt)||ui()||!Yt}this.LOHF=function(){Do("stopflush")},Ut.DMODE=ja,Ut.pflusher=function(zt){return zt=="LoT"||zt=="HBP"||zt=="lohjs"||zt=="opm"||zt=="smrjn"||zt=="smncm"||zt=="off"},Ut.blimit=function(zt,ne,fe){return No()?fe<=JSON.stringify(zt).length:ne<=(fe=zt.length)},Ut.susloh=function(zt,ne){return!0};var Aa={success:!(Ut.dcploh=function(zt,ne){if(!Array.isArray(zt))throw new Error("ESTOP: DCPLOHcontrol requires an array of lohops");if(u(zt),Zt==x){if(Ro)return u(zt),!1;for(var fe=0;fe<zt.length;fe++)H(zt[fe],Ut);return!1}if(Ut.bium()){for(var ke=Pt.ccp,sn=0;sn<zt.length;sn++)vn.DCPLopsN++,vn.DCPLopsN,zt[sn],vn.DCPLops=ke(vn.DCPLops,zt[sn].op,Ut,"LOHdmod");return ne=="stopflush"}return!0}),state:null},hr=null,Na=!1;function Pa(zt){Na=!1,zt.success&&c(zt),hr!==null&&hr(zt)}var si=[],li={},Fs=!1,zn=!1,ci=!1,Ia=!1,Ar=!1,Ra=!1,Ro=!1,bo=ae!==void 0&&ae.type==="draft",Mo=ae!==void 0&&ae.type==="lexical",Ma=!1,vo=!1;function Do(zt){var ne;zt!=="a2ia"&&(qi=!0),p(vt),ct(Ut)?(0,B.flop)(zt,Ut):Ro?V(zt,Ut):(ne=F(Ut),G(ne,zt,Ut)),Wt=null}function Hi(zt,ne){La(zt,ne)}var qi=!0;function Da(){return!(!qi||Zt!==v||!Yt||ui())}function zs(){return!(!Fs||Zt!==v||!Yt||ui())}function ui(){return Y.bime()||Z.buim()}function Us(){return Bt?ct(Ut)?Bt.getLength():Ar||bo||Mo?JSON.stringify(Bt.gj()).length:Bt.gj().length:null}function Iu(zt,ne){if((!Ro||bo||Mo)&&ne!==void 0){var fe=(s.now()-ht)/1e3;if(zt!==ne){if(Ro||ct(Ut))throw console.error(new Error("[codox_checkCAID] (QJS/SJS/JSON): inconsistent AID states. Local = "+zt+"; Remote = "+ne)),we("[codoxe]-- caid: t = "+fe+"; l="+zt+"; r="+ne+"; sid = "+kt,b),new Error("ESTOP: caid error");var ke;if((ke=Ar||bo||Mo?JSON.stringify(Bt.gj()).length:Bt.gj().length)!==ne)throw console.error(new Error("codox_checkCAID: irrecoverable CAID-error: local-externalinfo = "+zt+" local-internalinfo = "+ke+"; remote-externalinfo = "+ne)),we("[codoxi]-- caid: t = "+fe+"; li="+ke+"le="+zt+" r="+ne+"; sid = "+kt,b),new Error("ESTOP: caid error");we("[codoxi]- caid: t = "+fe+"; li="+ke+"le="+zt+" r="+ne+"; sid = "+kt,b)}}}function La(zt,ne){J(zt,ne,Ut)}function ur(zt,ne,fe){K(zt,ne,fe,He,Ut)}function Ba(zt){Nt||(zt!==pe&&zt!=Le||Et.a.b(xt,vn.mbs),(zt=zt===ee?Zt===_?Be:qe:zt)!==ze&&Et.a.e(xt,zt))}var Ji=0,Fa=null;function Jl(zt,ne){if(!Array.isArray(zt)||!Array.isArray(ne))throw new Error("equalArrays: invalid inputs: ",zt,ne);if(zt.length===ne.length){for(var fe=0;fe<zt.length;fe++)if(zt[fe]!==ne[fe])return;return 1}}function Wl(zt){var ne,fe,ke,sn=zt.context.sid,tn=Jr.grcs(),en=tn[sn];if(tn===void 0)throw new Error("codox_executeSelectionOp: codoxRCS is undefined");if(u(zt),u(tn),ne=tn[sn],fe=zt.op,ne!=null&&fe!=null&&(Mo?ne.start==fe.start&&ne.end==fe.end&&Jl(ne.startBlkPos,fe.startBlkPos)&&Jl(ne.endBlkPos,fe.endBlkPos):bo&&ne.start==fe.start&&ne.end==fe.end&&ne.startBlkPos==fe.startBlkPos&&ne.endBlkPos==fe.endBlkPos))return u(zt),void u(tn);tn[sn]=zt.op,u(zt),u(tn),Da()||zs()?Ar?Ta("exe-slop",{rcsobj:en},sn):ql("exe-slop",sn):(ke={rcsobj:en},p(Fa),Fa=setTimeout(function(){(function Ve(Un,ar){Fa=Da()||zs()?(Ar?Ta("missed-cr",Un,ar):ql("missed-cr",ar),null):(p(Fa),setTimeout(function(){Ve(Un,ar)},1e3))})(ke,sn)},1e3))}var Lo,di=!1,Wi=!1;function $s(zt){var ne=zt,fe=(Vt=s.now(),zt.caid=kt,zt.cak=$t,zt.d=bt,"");if(!Ct)throw new Error("ESTOP:socket nonexistence");Ct.canSendJSON||((fe=JSON.stringify(zt)).length,fe.length);try{Ct.send(fe)}catch(ke){throw u(ne),Ie||console.error(ke),new Error("ESTOP:so-send error")}Ct.bufferedAmount,Ct.bufferedAmount}this.gamm=function(){return Dt},this.gmmsize=function(){return cn},this.gdmsize=function(){return An},this.gsts=function(){return Ee},this.gssd=function(){return Wi},this.TZ=Io,this.LOH=function(){try{return(function(){for(var zt=arguments.length,ne=new Array(zt),fe=0;fe<zt;fe++)ne[fe]=arguments[fe];var ke,sn,tn=ne[0],en=ne[1],Ve=ne[2];if(ke=tn,en==="e"&&No()&&(gt(Ut)?(sn=(Ve=ft.d(Ve)).d(),Ve.gj()!==sn&&Et.a.i({source:"l"})):ke.delta?Et.a.i({source:"l",delta:ke.delta}):Et.a.i({source:"l",delta:ke})),(function(){return!Ls()||(we("[codoxi]- rv1; sid = "+kt,b),Bs.apply(void 0,arguments),!1)}).apply(void 0,ne)&&Zt!==_&&Zt!==w)return en==="pt"?ja("pt")?void 0:function(Un,ar){u(ar={t:1<arguments.length&&ar!==void 0?ar:"pt",op:Un}),jr(ar),Hi(ar,null)}(tn,en):ct(Ut)?B.loh.apply(B,ne.concat([Ut])):void T.apply(void 0,ne.concat([Ut]))}).apply(void 0,arguments)}catch(zt){if(Ie||console.error("codoxLOH: err = ",zt),0<=zt.message.search(/^ESTOP/))return void Io(901,{loherr:zt.message})}},this.ROH=function(zt){var ne,fe,ke;zt.cmg&&Lt(zt,Dt,Ut),(ne=zt).context&&ne.context.sid===kt&&ne.cmd&&ne.cmd.t===5&&(fe=s.now(),(te=fe-ne.context.st)<0&&(ke=(s.now()-ht)/1e3,o||console.error("[codoxi]-- rtt-roh: t = "+ke+"; hbC = "+Ji+"; rtt= "+te+"; priT="+ne.context.st+"; curT="+fe+"; sid="+kt),0<za.rttReportLimit&&(we("[codoxi]-- rtt-roh: t = "+ke+"; hbC = "+Ji+"; rtt= "+te+"; priT="+ne.context.st+"; curT="+fe+"; sid="+kt),de(new Error("reason RTT")),za.rttReportLimit--))),Zt===_&&!zt.cmd||zt.context&&zt.context.sid===kt&&at(zt)||(lt.push(zt),lt.length,lt.length===1&&function sn(tn){var en,Ve;lt.length!=0&&(Ve=s.now()-Wt,Yt&&!ui()&&Zt===v&&Ve<250&&tn<2e3?(p(oe),oe=setTimeout(function(){sn(tn+250),oe=null},250)):(lt.length,Ve=lt.shift(),nr&&(Lr=!Lr),Lr||Zt===_||!Ve.context||Ve.context.sid===kt||Ut.bium()||Do("ROH"),Ve.so?P(Ve,Ut):U(Ve)||(Ve.hasOwnProperty("to")&&In&&(In.rto=Ve.to,Ve.context&&(Ve.context.to=Ve.to),Ve.to,In.rto),Ve.cmd?Nu(Ve):(en={},!ci||Ve.t&&Ve.t==="sl"?en.op=Ve.op:(en.op=Ve.op[0].po,en.ao=Ve.op[0].ao),en.context=Ve.context,Ve.t&&(en.t=Ve.t),Lr||(at(Ve=en)?Et.a.j(xt,{coords:Ve.op,sid:Ve.context.sid}):(Ve=Ao(Ve))!=null&&Ve.op.length!==0&&(et(Ve)?Wl(Ve):!zs()&&!Da()||Lr?(Ve.context.CAID=!1,en=Pt.ccp,vn.DCPRops=en(vn.DCPRops,Ve.op,Ut,"ROHdmod"),vn.DCPRopsN++,vn.DCPRopsN,u(vn.DCPRops)):(ct(Ut)?B.roh(Ve,Ut):I(Ve,Ut),!Ut.bium()&&Ve.context.CAID&&(u(Ve),Iu(Us(),Ve.context.caidinfo)))))),s.now()),0<lt.length&&sn(1500)))}(0),s.now())},this.gls=function(){if(Zt!==v)return Zt(),Aa;var zt=null;return Ar||Ra||vo||Ia?zt=Bt.d():(zn||Ma||ci)&&(zt=Bt.getContents()),{success:!0,state:zt=JSON.stringify(zt)}},this.gss=function(zt){return hr=zt,Zt!==v?(Zt(),Pa(Aa)):Na?Pa(Aa):(Do("syn"),$s({a:k,smacmd:{t:"ggs"}}),Na=!0,setTimeout(function(){Pa(Aa)},1e4)),"made a SMA4GS request"},this.smagsr=Pa,this.lcmm=function(){return pt},this.dec=wt,this.lhto=function(){return null},this.ssm=La,this.dssm=Hi,this.wxsp=function(){return!(!Fs||!Yt||ui())},this.wxpm=function(){return!(!qi||!Yt||ui())},this.gpm=function(){return Yt},this.gs=function(){return Zt},this.ss=function(zt){(Zt=zt)==x&&(Wt=null)},this.bium=ui,this.gime=Y.bime,this.gam=function(){return qi},this.gsap=function(){return Fs},this.gmi=function(){return[Nn,Ln,'"></span>']},this.gcp=function(zt){return(zt=li[zt])?(zt.pos,zt.pos):0},this.scp=function(zt,ne){var fe=li[zt];fe||(li[zt]=fe={}),fe.pos=ne},this.ssl=function(zt){var ne=null;if(!qi)return null;if(zt&&zt.x)try{ne=Ut.rangy.saveSelection(zt.x)}catch(fe){o||console.error(fe)}return ne},this.rsl=function(zt,ne){ne&&Ut.rangy.restoreSelection(ne,!0),(ne=Array.from(document.getElementsByClassName("rangySelectionBoundary"))).forEach(function(fe){return fe.remove()})},this.sj=function(zt){me=zt},this.ece=function(){Et.a.g(xt);var zt=(s.now()-ht)/1e3;we("[codoxi]* eco: t = "+zt+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b)},this.dce=function(){p(vt),B.rss("nce"),q("nce"),rt.rss("nce"),Wi&&Et.a.f(xt);var zt=(s.now()-ht)/1e3;we("[codoxi]* dco: t = "+zt+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b)},this.pm=Da,this.spm=zs,this.gcaid=Us,this.ccaid=Iu,this.raid=function(zt){var ne=[];if(zt.dmid!==0||Lr||zt.y==="pt")return ne;var fe,ke=zt.d();return ke!==((fe=document.createElement("div")).innerHTML=zt.gj(),fe=fe.innerHTML)&&(zt.gj().length,fe.length,ke.length,ne=dt(fe,ke),zt.sj(ke)),ne},this.grtt=function(){return te},this.srtt=function(zt){te=zt},this.glst=function(){return Vt},this.nu=Ba,this.nsi=function(zt,ne){if(!Nt){Et.a.b(xt,vn.mbs);for(var fe=[],ke=0;ke<ne.length;ke++)ne[ke].sid!==kt&&fe.push(ne[ke]);0<fe.length&&Et.a.e(xt,zt,fe)}},this.nsm=ur,this.ihb=function(){return++Ji},this.ghb=function(){return Ji},this.JS=function(){return Bt.js.apply(Bt,arguments)},this.ws=function(){return Zt===v},this.dop2sm=B.plop,this.udoc=L,this.gop2sm=G,this.hacm=function(zt){var ne;zt?Zt!==v||No()||(Do("cmv"),In.dmid=Bt.dmid,jr(ne={t:"sl",op:zt}),Hi(ne,null)):c(zt)},this.slotimer=function(zt){var ne=Wt;Wt=s.now(),ne===null&&(p(vt),vt=setTimeout(function(){(function fe(ke){var sn=s.now()-Wt,tn=250,en=2e3;return No()&&ct(Ut)&&(tn=2e3,en=1e4),qt+=tn,sn<tn&&qt<en?(p(vt),vt=setTimeout(function(){fe()},tn),0):(Do("LoT"),qt=0,void(vt=Wt=null))})()},250),qt=0)},this.sr=function(zt){var ne=It(zt);Ne=ne,zn&&(Ls()?Bt.disable():Bt.enable()),Bt.setPermission&&Bt.setPermission(zt)},this.udc=Bt.updateContents,this.rsce=function(zt){B.rss(zt),q(zt),Hl(zt),rt.rss(zt),qi=!0;var ne,fe=Jr.grcs();for(ne in fe){var ke=fe[ne];ke.start&&(ke.start=-1),ke.end&&(ke.end=-1)}clearTimeout(vt),qt=0,$t=vt=null,lt=[],Br("all"),qr.rsto()},this.sosd=$s,this.gso=function(){return Ct},this.sso=function(zt){Ct=zt},this.gaid=function(){return se},this.gsid=function(){return bt},this.sst=function(zt){Tt=zt},this.gatype=function(){return{codoxQJS:zn,codoxSJS:ci,codoxTinymce:vo,codoxFroala:Ra,codoxFroalaNew:Ar,codoxCodeMirror:Ma,codoxText:Ia,codoxJSON:Ro,codoxDraft:bo,codoxLex:Mo}},this.gdft=function(){return bo},this.glx=function(){return Mo},this.gqj=function(){return zn},this.gcm=function(){return Ma},this.gsj=function(){return ci},this.gjs=function(){return Ro},this.gtx=function(){return Ia},this.gtn=function(){return vo},this.gfl=function(){return Ra},this.gfln=function(){return Ar},this.mdom=Bt,this.cdm=ft,this.cid=xt,this.lohl=Do,this.ntu=Ba,this.xi=function(zt){var ne=ft.d(zt.context.dmid);if(ne){var fe=ne.gj();if(Ft(zt)==="d"){var ke=yo(zt),sn=(0,e.default)(zt.op[0])===Ae[2]?zt.op[0]:0;if((ke=fe.indexOf(ke,sn))!==sn)return!1}return!!function(tn,en){Jt(en);for(var Ve="",Un=tn.gj(),ar=0,Vl=0;Vl<en.length;Vl++){var Ru,rr=en[Vl];switch((0,e.default)(rr)){case Ae[0]:Ve+=rr;break;case Ae[1]:if((ar+=rr.d)>Un.length)return Un.length,0;break;case Ae[2]:if(ar+rr>Un.length)throw Un.length,Ru="perr=1001; epos ="+(ar+rr)+"; doclen = "+Un.length,new Error("ESTOP:"+Ru);Ve+=Un.slice(ar,ar+rr),ar+=rr}}return Ve+=Un.slice(ar),tn.sj(Ve),1}(ne,zt.op)&&(ft.d(zt.context.dmid).y!=="rt"||function(tn){return vo?1:((en=document.createElement("div")).innerHTML=tn,(en=en.innerHTML)===tn||(tn.length,en.length,0));var en}(ne.gj())?(L(ne,zt,Ut),!0):(ne.sj(fe),!1))}return u(zt.context.dmid),!1},this.sm2sm=La,this.sloet=function(zt){Wt=zt},this.sus=No,this.ird=Ls,this.sjsroh=function(zt){var ne=function(fe){null(fe);var ke=function(en){for(var Ve=[],Un=0;Un<en.length;Un++)en[Un].data.ne?en[Un]:Ve.push(en[Un]);return Ve}(fe.ao);if(0<ke.length)for(var sn=0;sn<ke.length;sn++){var tn=ke[sn];tn.key&&(tn.type=null.lt(tn.key),delete tn.key)}return ke}(zt);0<ne.length&&Bt.updateContents(ne),Pu(zt)},this.sjsloh=function(zt,ne,fe){var ke;ne==="e"?(Et.a.i({source:"l"}),si.push(zt),zt.data.n<zt.data.tn||(ke={op:[],ao:si,inverse:[]},si=[],null(ke)&&B.plop(ke,"loh",Ut))):ne==="c"?zt.type==="set_selection"&&(zt={start:(ke=Bt.c()).anchor.offset,end:ke.focus.offset,path:ke.anchor.path,startpath:ke.anchor.path,endpath:ke.focus.path},ke=zt,Zt===v&&ke.start!==null&&ke.end!==null&&ke.path!==null&&(Do("SJScmv"),In.dmid=Bt.dmid,jr(ke={t:"sl",op:ke}),Hi(ke,Us()))):ne=="u"&&Oa()},this.subm=function(){var zt,ne=Et.waveId,fe=Et.user,ke=Et.subId,sn=Et.mid,tn=(Et.sub,Et.token,Et.url),en=Et.docId,Ve=Et.prevAid;if(5e7<=((ne={a:E,c:se,cx:ae?ae.type:null,v:ve,u:{memberinfo:be,waveid:ne,username:fe&&fe.name,sysinfo:ce,f:Te,any:Ce,subid:ke,mid:sn,paid:Ve||"First",v:{token:Et.token},u:tn,d:en,tabId:h(),jsConf:Et.jsonConfig,isBFM:!1}}).u.jsConf,Zt==x&&(fe=A(),ne.rjn={offCaid:fe.offCaid,offTo:fe.offTo,sts:fe.sessiontimestamp},ne.rjn),ne.gcs=(ke=null,se=="quilljs"?(zt=Bt.getContents(),c(zt),ke=Xt(zt.ops,["delete","insert","retain","attributes"]),c(ke)):se=="codemirror"?(zt=Bt.getContents(),c(zt),c(ke=[{cr:zt}])):se=="json"&&(bo||Mo)?(ke=Bt.d(),c(ke)):(ft.a(),ke=ft.e()),ke),Mt(ne),sn=ne.gcs.length))return console.error("codox_sendSubscribe2SM: oversize init GCS = "+sn),we("[codoxe]-- osgcs: r=10; len="+sn+"; sid = "+kt),void Io(10);ne.cmm=St(36),pt=ne.cmm,u(ne),$s(ne)},this.subr=function(zt){di=!0;var ne=wt(zt.data,pt);if(!zt.data||!ne)return we("[codoxe] subf(sm): r=13; sid = "+kt,b),void Io(13);if(ne.y)if(ne.ok===void 0||ne.amm===void 0||ne.cak===void 0||ne.f===void 0||ne.r===void 0)Io(13,{subf:"o"});else{nr=ne.ok,to=nr,Dt=ne.amm,$t=ne.cak,Te=ne.f,ne.r!==Ne&&ne.r,ne.v&&(Qt=ne.v),Wi=!0;var fe=(s.now()-ht)/1e3;if(we("[codoxi]* subs: t = "+fe+"; f = "+Te+"; SMV="+Qt+"; sid = "+kt,b),Oe("smVersion",Qt),Ee=(fe=zt).sts,Zt!=x){$i=wn=Hr=Lr=to=Ui=ka=nr;var ke=null;if((fe=ke=fe.ivs?wt(fe.ivs,pt):ke).cat){switch(We=fe.cat,se){case We[0]:ci=!0;break;case We[1]:zn=!0;break;case We[2]:vo=!0;break;case We[13]:Ar=!0;break;case We[8]:Ra=!0;break;case We[9]:zn=!0;break;case We[11]:Ia=!0;break;case We[10]:Ro=!0;break;case We[12]:Ma=!0;break;default:de(new Error("setCodoxAppType: unknown apptype = "+se)),o||console.error("setCodoxAppType: unknown apptype = "+se)}Fs=Ra||Ar||Ia||vo}if(fe.sot&&(Ae=fe.sot,Ut.jstp=Ae),fe.tmk&&(fe.tmk,un=fe.tmk.o,bn=fe.tmk.c,er=fe.tmk.tn,Nn=fe.tmk.m,Ln='<span id="'+Nn+"_"),fe.lmt&&(fe.lmt,fe.lmt.mos,cn=fe.lmt.mms,An=fe.lmt.dms,Ut.lmt=fe.lmt),fe.dt&&(nn=fe.dt,Ut.dlttp=nn),Hr||(ke=kt,gn=new O(Ut,!1,Hr),(In=gn.gct()).sid=ke,Ao=gn.pr,gn.pl,jr=gn.sc,eo=gn.aptm,Br=gn.rstm,gn.satm,Ut.pt=gn,_r=new R(Ut,gn,Hr,Ae),Oa=_r.pu,_r.prd,yo=_r.gfdt,Ut.pu=_r),!to&&!wn)if($i||!zn&&!Ma)if(Ar||Ro){fe={obf:wn,types:Ae},At.type.init(fe),ke={obf:to,ob:un,cb:bn,tiny:vo,tinysc:er};var sn=Bt.differ;if(!sn)throw new Error("JSON diff not initialized");sn.init(fe,ke),Ut.jdf=sn,Ut.jot=At,Ut.rtf=jt,Ut.sdf=yt}else fe={obf:to,ob:un,cb:bn,tiny:vo,tinysc:er},ke={obf:wn,types:Ae},yt.sdfi(fe),jt.rtfi(ke),Ut.rtf=jt,Ut.sdf=yt;else sn={types:Ae,dt:nn,obf:!1},nt.di(sn),Ut.dtf=nt;Lr||(Jr=new D({cw:Ut,app:Et,cmd:Bt,type:Ae,obfroh:Lr,obfcr:Ui}),Pu=Jr.urcs,Jr.qurcs,ql=Jr.uc,Ta=Jr.nuc,Ut.rcs=Jr),fe=se=="quilljs"||se=="quilljs_clickup"?Bt.getContents():Bt.d(),qr=new N({cw:Ut,cb:Ge,app:Et,cd:ft,cmd:Bt,mi:be,lidoc:fe,log:He,tm:Nt,obf:ka,bv:Rt}),Hl=qr.rs,vn=qr.se,Ut.se=vn,Nu=qr.pc,Ut.dsm=qr,bo||Mo||ft.a(),li[0]=vo?{pos:48}:{pos:-1};for(var tn=1;tn<5;tn++)li[tn]={pos:-1};if(Te){Zt=v,me=!0,vn.mbs.push(be),eo(vn.mbs),Ba(pe);try{ur(S)}catch(en){console.error(en)}!Nt&&Ge&&Ge(kt),ke=(s.now()-ht)/1e3,we("[codoxi]* jnd1: t = "+ke+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b)}}else if(In.sid,In.sid=kt,u(In),p(Tt),Te){Zt=v,me=!0,c(vn.mbs),vn.mbs=[],vn.mbs.push(be),c(vn.mbs),fe=Ut.pt.stm,ke=Ut.pt.gtm,c(ke()),fe([]),eo(vn.mbs),c(ke()),Ba(pe);try{ur(S)}catch(en){console.error(en)}fe=(s.now()-ht)/1e3,we("[codoxi]* jnd1: t = "+fe+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b),z(!1,"off-Founder"),qr.sto(null)}}else Lo=ne.sem,Io(13,{subf:"ppe",rs:ne.rs===Lo[0]||ne.rs===Lo[1]||ne.rs===Lo[2]?24:ne.rs===Lo[3]?25:ne.rs===Lo[4]?600:ne.rs===Lo[5]?700:13})},this.ime=Y.ime,this.imet=Y.imet,this.bime=Y.bime,this.uim=Z.uim,this.uimt=Z.uimt,this.buim=Z.buim,this.dcpm=function(zt){u(vn.DCPRops),u(vn.DCPLops),(ct(zt)?$:M)(vn.DCPLops,vn.DCPRops,zt),Hl("dcpm")},Y.init(Ut),Z.init(Ut);var za=new Q(Ut,Ct);this.semsg=za.semsg,this.lib=tt,this.xf=Pt,this.exsl=Wl}},{"../../../codox-json-ot/lib/":59,"../../../codox-rt-type/src/":143,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/dtf/dtf.js":220,"../../../codox-shared/src/gt/pt.js":222,"../../../codox-shared/src/gt/pu.js":223,"../../../codox-shared/src/gt/xf":224,"../constants":509,"../env":527,"../errors":528,"../logger.js":530,"../util/lib":551,"./access":531,"./difap.js":533,"./dltap.js":534,"./dsm.js":535,"./ext/ime.js":536,"./ext/pvp.js":537,"./ext/uim.js":538,"./msg":539,"./off.js":540,"./opm":541,"./rcs.js":542,"./sapa.js":545,"./soh.js":546,"./spot.js":547,"./sync":548,"./ver":549,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/typeof":574,"rangy/lib/rangy-selectionsaverestore":726}],533:[function(t,f,r){var n,e=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/typeof")),s=(n=t("../../../codox-shared/src/com/constants")).OFFLINE,i=n.ONLINE,l=t("../../../codox-shared/src/com/log").ins,o=(n=t("../../../codox-shared/src/com/util")).clone,a=n.logClone,c=t("../../../codox-shared/src/gt/cpj.js").cpdl,u=Date,h=(t("./off.js"),t("../../../codox-shared/src/gt/xf")),p=!1,m=0,b=u.now(),_=[];function v(A,z,H,$){var M=$.sdf,J=$.jdf,K=$.gfln();return $=$.gs(),K?(K=J.jdf(A,z))&&K.length==0?[]:[{op:K}]:(H&&((J=0)!==J&&$===i||(J=z.length>A.length?A.length-1:z.length-1)),M.gop(A,z))}var w=0;function x(A,z){a(_);var H=z.pt.sc,$=z.pt.pl,M=z.rcs.urcs,J=z.gcaid,K=z.dssm;if((0,z.dcploh)(_,A)){if((0,z.susloh)(_,A)){for(var P=0;P<_.length;P++){var U=_[P];a(U.op),H(U),$({op:U.op,context:U.context}),M(U),K(U,J())}w=0,_=[]}}else _=[]}function S(A,z){var H;return a(A),(H=z.cdm.d(A.context.dmid))&&H.sj(E(H.gj(),A.op,z)),a(A),H}function E(A,z,H){return H.gfln()?H.jot.type.apply(A,z):H.rtf.cap(A,z)}function k(A,z,H){var $=H.rcs,M=H.pt.gct(),J=h.tls,K=H.gfln(),P=H.gfl(),U=H.gtn();if($=$.grcs(),M.dmid,a($),a(z),P||U)(function(Lt,Pt,yt){var jt,At=yt.ssl,It=yt.rsl,Ot=yt.rtf.cap;if((Nt=yt.pt.gct()).dmid!==Lt.dmid)return Nt.dmid,Lt.dmid,Lt.e(Lt.gj(),!1);var Et,Ct,Nt=Lt.d(),ht=(At=At(Lt),Lt.d()),dt=[];if(At&&At.rangeInfos[0]&&(Ct=Et=null,At.rangeInfos[0].collapsed?O(0,ht,Et=Lt.cc(0),dt):(Et=Lt.cc(0),Ct=Lt.cc(1),O(0,ht,Et,dt)&&O(0,ht,Ct,dt)||(dt=[]))),dt.length){var Ft=D((0,yt.sdf.sop2cop)(dt),yt)[0];if(Array.isArray(Pt))for(var Jt=0;Jt<Pt.length;Jt++)N(Ft,Pt[Jt],yt);else N(Ft,Pt,yt);jt=Ot(Lt.gj(),Ft.op),Lt.e(jt,!0),It(Lt,At)}else jt=Lt.gj(),Lt.e(jt,!0)})(A,z,H);else if(K){M=A;var V=z,G=(U=(P=H).ssl,K=P.rsl,P.jot),F=(a(V),M.gj(),M.d(),U=U(M),M.d()),q=[];U&&U.rangeInfos[0]&&(Z=rt=null,U.rangeInfos[0].collapsed?R(F,rt=M.cc(0),q,P):(rt=M.cc(0),Z=M.cc(1),R(F,rt,q,P)&&R(F,Z,q,P)||(q=[]))),a(q);var T=[];if(Array.isArray(V))for(var I=0;I<V.length;I++)T.push(V[I].op);else T.push(V.op);var L=[];if(q.length){var B,Y,Z,rt=q[0];L.push(rt),q.length==2&&(F=q[1],Z=rt.p[0],q=F.p[0],B=rt.cop,Y=F.cop,Z==q?(Z=typeof B[Z=0]=="number"?Y[0]-B[0]-B[1].length:Y[0]-B[0].length,q=Y[1],rt.cop.push(Z),rt.cop.push(q)):L.push(F)),a(L),a(V);for(var Q=[],tt=0;tt<L.length;tt++){var nt=[L[tt]];if(Array.isArray(V))for(var et=0;et<V.length;et++)nt=G.type.transform(nt,V[et].op,0),a(nt);else nt=G.type.transform(nt,V.op,0),a(nt);nt.length!==0&&(Q.push(nt[0]),a(Q))}var at=o(M.gj());if(L.length==Q.length)for(var ct=0;ct<Q.length;ct++)G.type.apply(at,[Q[ct]]),T.push([Q[ct]]),a(T);else a(L),a(Q);P.rangy.removeMarkers(U),M.d(),M.e(at,!0,T),L.length==Q.length?K(M,U):a(Q),M.gj(),M.d()}else U&&P.rangy.removeMarkers(U),M.e(M.gj(),!0,T)}else{var gt=A.c();if(A.e(A.gj(),!0),Array.isArray(z))for(var wt=0;wt<z.length;wt++)J(gt,z[wt].op);else J(gt,z.op);A.b(gt.start,gt.end)}var St=H.rcs.urcs;if(Array.isArray(z))for(var Mt=0;Mt<z.length;Mt++)St(z[Mt]);else z.context&&St(z);a($),H.mdom.d()}function D(A,z){for(var H=z.pt.sc,$=[],M=0;M<A.length;M++){var J={op:A[M].op,context:{}};H(J),$.push(J)}return $}function N(A,z,H){A.op.length!==0&&(a(A),a(z),A.op=H.rtf.ct(A.op,z.op,"B"),a(A))}function O(A,z,H,$){if(H!==null)return(z=z.indexOf(H))!==-1?($.push(z===0?{op:[H]}:{op:[z,H]}),1):void 0}function R(A,z,H,$){if(z!==null){var M=-1,J=0;if(H[0]&&H[0].p&&(J=H[0].p[0]),$=(0,$.mdom.gp)(A,z,J))return M=$.index,J=(A=$.p)===0?{p:[M,"content"],cop:[z],t:"rt"}:{p:[M,"content"],cop:[A,z],t:"rt"},H.push(J),1}}f.exports={rss:function(){p=!1,m=0,b=u.now(),_=[]},loh:function(A,z,H,$){switch(z){case"e":$.slotimer("lohdifap");break;case"c":if($.gs()==s||$.sus()||($.pt.gct().dmid=H)!==0)return;p=!0,setTimeout(function(){var M;p&&(M=$.mdom.c(),$.hacm(M),$.scp($.pt.gct().dmid,M.start),p=!1)},0);break;case"u":$.lohl("u"),$.pu.pu();break;case"r":$.pu.prd()()}},glop:function(A){var z=A.mdom,H=z.gj(),$=z.d();return H=function(M,J,K,P){var U=P.ird,V=P.app,G=P.lmt.mos,F=P.lmt.mms,q=P.breadCrumb,T=P.sid,I=P.nu;if(M&&0<M.length){if(V.a.i({source:"l"}),U())return K.e(K.gj(),!1),[];if(V=function(L,B){var Y=B.gfln(),Z=B.jstp,rt=0;if(Y)rt=JSON.stringify(L).length;else for(var Q=0;Q<L.length;Q++)for(var tt=L[Q],nt=0;nt<tt.op.length;nt++){var et=tt.op[nt];switch((0,e.default)(et)){case Z[2]:case Z[1]:break;case Z[0]:rt+=et.length;break;default:throw new Error("ESTOP:perr=1000;len="+L.length+";opt="+(0,e.default)(et))}}return rt}(M,P),G<V){if((P=(U=u.now())-b)<2e3?m++:m=1,b=U,q("[codoxi]- os = "+V+"; osoti = "+P+"; sid = "+T),3<m||2*F<V)return K.e(K.gj(),!1),I(11),[]}else m=0;K.sj(J)}return M}(v(H,$,z,A),$,z,A),l(H),H},plop:function(A,z,H){var $=H.gfln(),M=H.gjs(),J=H.rtf,K=H.gdft(),P=H.glx();if(!Array.isArray(A))throw new Error("ESTOP: DiffOpPropagate invalid ops");if(A.length!=0||_.length!=0){a(A);for(var U=0;U<A.length;U++){var V=A[U],G=_[_.length-1];!$&&!M&&G&&J.tcps(G,V)?a(_):K||P?(c(_,V,H),w++):(a(_),_.push(V))}var F=H.pflusher,q=H.blimit;F(z)||(K||P)&&1<=w||!K&&!P&&q(_,1,500)?(l(_),x(z,H)):(H.sloet(null),(0,H.slotimer)("difp"))}else a(A)},flop:x,sdif:v,ao2s:E,cp2pp:D,roh:function(A,z){a(A);var H,$=z.raid,M=z.pt.pl,J=z.dssm;z.gjs()?z.mdom.roh(A):((H=S(A,z))&&k(H,A,z),H.y=="rt"&&0<(A=$(H)).length&&(($=D(A,z)[0]).context.cpsop=!0,$.context.CAID=!1,$.context.undoable=!1,M($),$.bc=!0,a($),J($)))},udoc:k,usnap:S}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/gt/cpj.js":221,"../../../codox-shared/src/gt/xf":224,"./off.js":540,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/typeof":574}],534:[function(t,f,r){var n=t("../../../codox-shared/src/com/log"),e=(n.ins,n.stringify),s=t("../../../codox-shared/src/com/util").logClone,i={},l=null;function o(c,u){u.sus;var h=u.gsj();s(i),JSON.stringify(i)!=="{}"&&(0,u.susloh)(i,c)&&(c={},h?c={op:[{po:i.op,ao:i.ao}],inverse:i.inverse}:(c={op:i.op,inverse:i.inverse},s(c)),i={},a(c,l,u))}function a(c,u,h){var p=h.pt.sc,m=h.pt.pl;h=h.dssm,s(c),c&&!c.context&&p(c),m(c),c.inverse&&delete c.inverse,h(c,u)}f.exports={rss:function(){i={},l=null},loh:function(){for(var c=arguments.length,u=new Array(c),h=0;h<c;h++)u[h]=arguments[h];u[0],u[1];var p=u[2],m=p.gqj(),b=p.gcm(),_=p.gsj(),v=p.sjsloh;m||b?(m=p.mdom).loh.apply(m,u):_&&v.apply(void 0,u)},flop:o,plop:function(c,u,h){var p=h.sus,m=h.rcs.qurcs,b=h.gcaid,_=h.dtf.cp,v=h.dtf.tf,w=h.sjsep,x=h.sapa,S=h.slotimer,E=h.gqj(),k=h.gcm(),D=h.gsj();if((0,h.dcploh)([c],u)){if(s(c),p()||!E&&!k||m(c,"local"),u=="opm"||c.context)return s(c),o(u,h),void a(c,b(),h);p=c.op,m=c.inverse;var N,O,R=[],A=(D&&(R=c.ao),JSON.stringify(i)==="{}"?(i.op=p,i.inverse=m,i.ao=R,l=b(),s(i)):(s(i),D&&(w(p[0].dm,i.op[0].dm)&&c.ao[0].data.tn===1&&i.ao[0].data.tn===1&&c.ao[0].key&&(x.k2t(c.ao[0].key,0)||x.k2t(c.ao[0].key,1))&&x.k2k(i.ao[0].key,c.ao[0].key)?(w=i.op[0].do,N=p[0].do,i.op[0].do=_(w,N),x.k2t(c.ao[0].key,1)&&(z=i.ao[0].text,A=R[0].text,O=!1,(w[0].tg&&N[0].tg&&w[0].tg===N[0].tg||!w[0].tg&&!N[0].tg)&&(O=!0),i.ao[0].text=O?z+A:A+z,s(i))):(o(u,h),i.op=p,i.inverse=m,i.ao=R),l=b()),(E||k)&&(i.op=_(i.op,p),l=b(),k||(N=m,(w=i.inverse).length!==0&&N.length!==0&&w[0].tg&&N[0].tg&&w[0].tg>N[0].tg?(i.inverse=_(m,i.inverse),i.inverse):(O=v(i.inverse,m,!0),i.inverse=_(i.inverse,O))),e(i))),h.pflusher),z=h.blimit;A(u)||z(i,2,500)||D&&(1<c.ao[0].data.tn||!c.ao[0].key||c.ao[0].key&&!x.k2t(c.ao[0].key,0)&&!x.k2t(c.ao[0].key,1))?(s(i),o("do",h)):(h.sloet(null),S("dltp"))}},roh:function(c,u){var h=u.sjsroh,p=u.mdom,m=u.gsj(),b=u.gqj();u=u.gcm(),s(c),b||u?(s(c),p.roh(c)):m&&(s(c),h(c))}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219}],535:[function(t,f,r){var n=(A=t("../logger.js")).logger,e=A.SENTRY_LEVEL_H,s=t("../domains/api/qjs-util").contentToDelta,i=Date,l=t("../errors").CBError,o=(A=t("../../../codox-shared/src/com/log")).ins,a=((A.stringify,A=t("../../../codox-shared/src/com/util")).clone,A.logClone),c=(A=t("../../../codox-shared/src/com/constants")).CMD_QUIT,u=A.CMD_SMM,h=A.CMD_HB,p=A.CMD_SMAGS,m=A.CMD_HBP,b=A.CMD_SMAIS,_=A.CMD_SMNCM,v=A.CMD_RC,w=A.CMD_SMDLT,x=A.CMD_SMRJN,S=(A=t("../../../codox-shared/src/com/constants")).JOINED_LOG,E=A.ONLINE,k=A.OFFLINE,D=t("./rjm").rjm,N=(A=t("./off")).gos,O=A.srjn,R=(A=t("./opm")).dltmg,A=A.difmg,z=R,H=A,$=t("../../../codox-shared/src/com/lib"),M=t("../../../codox-shared/src/dtf/dtf.js"),J=t("../../../codox-rt-type/src/").sdf;f.exports=function(K){var P=K.cw,U=K.app,V=K.cb,G=K.cd,F=K.cmd,q=K.mi,T=K.lidoc,I=(K.log,K.tm),L=K.obf,B=(K.bv,P),Y=V,Z=F,rt=G,Q=q,tt=U,nt=I,et=L,at=T,ct=B.pt.gct(),gt=n.addBreadcrumb.bind(n),wt=(n.reportError.bind(n),K=(i.now()-B.START_TIME)/1e3,gt("[codoxi]* dsm: t = "+K+"; sid = "+ct.sid,e),B.TZ),St=B.gs,Mt=B.ss,Lt=B.ece,Pt=B.dce,yt=B.lohl,jt=B.gcaid,At=B.ccaid,It=B.grtt,Ot=B.nsm,Et=B.nu,Ct=B.nsi,Nt=(B.ssm,B.dssm),ht=(B.pt.rstm,B.pt.gcotm),dt=B.pt.aptm,Ft=B.pt.rptm,Jt=B.pt.gstm,Xt=B.pt.gtm,Qt=B.pt.stm,ve=B.pt.uct,kt=B.rcs.urcs,ee=B.rcs.uc,pe=B.rcs.nuc,Le=B.rcs.grcs,Be=B.rcs.srcs,qe=B.rcs.arcs,ze=B.rcs.rrcs,Ie=(this.clean=function(){Q=Z=rt=ct=Y=B=null},{mbs:[],DCPLopsN:0,DCPRopsN:0,DCPLops:[],DCPRops:[],sts:null,ISTo:null}),He=null;function hn(Rt){for(var Ut=Xt(),se=(a(Ut),Jt(ct.sid)),bt=[],ft=0;ft<Rt.length;ft++){var xt=Rt[ft];xt=Jt(xt.sid),bt.push(xt)}a(bt);for(var Bt=0;Bt<se.tp.length;Bt++){var ce=se.tp[Bt];if(ce.context.sid==ct.sid&&ce.context.to==null)for(var Ce=0;Ce<bt.length;Ce++)bt[Ce].tp.push(ce),a(bt[Ce])}a(Ut)}var Tt=null;function ae(Rt,Ut){var se=null;return B.gfln()||B.gjs()?(a(Rt),a(Ut),B.gdft()&&(Rt=Z.toExS(Rt),Ut=Z.toExS(Ut)),se=B.jdf.jdf(Rt,Ut)):0<(se=J.gop(Rt,Ut)).length&&(se=se[0].op),se}var de=null;function we(Rt,Ut){if(!Array.isArray(Ut))throw Error("ESTOP:SidisMember array required");for(var se=0;se<Ut.length;se++)if(Rt==Ut[se].sid)return 1}function Oe(Rt){if(!Array.isArray(Rt))throw Error("ESTOP:addSessionMember array required");a(Rt),a(Ie.mbs);for(var Ut=[],se=0;se<Rt.length;se++){var bt=Rt[se];!function(xt,Bt){if(!Array.isArray(Bt))throw Error("ESTOP:isMember array required");for(var ce=0;ce<Bt.length;ce++)if(xt.sid==Bt[ce].sid)return 1}(bt,Ie.mbs)&&Ut.push(bt)}for(var ft=0;ft<Ut.length;ft++)Ie.mbs.push(Ut[ft])}this.gto=function(){return Ie.ISTo,Ie.ISTo},this.sto=function(Rt){Ie.ISTo=Rt},this.se=Ie,this.pc=function(Rt){var Ut,se,bt,ft,xt,Bt,ce,Ce,Te,Ne,Ge,be,pt,Dt,$t=$.dcsmais;if(Rt.cmd.t==b&&Rt.cmd.gcs?((Ut=Rt.cmd.gcs).length,Ut=$t(Ut),Rt.cmd.gcs=Ut):Rt.cmd.t==w&&Rt.cmd.dlt?((Ut=Rt.cmd.dlt).length,Ut=$t(Ut),Rt.cmd.dlt=Ut):Rt.cmd.t==p&&Rt.cmd.smags?((Ut=Rt.cmd.smags).length,Ut=$t(Ut),Rt.cmd.smags=Ut):Rt.cmd.t=="quit"?Rt.cmd.t=c:Rt.cmd.t=="SMM"?Rt.cmd.t=u:Rt.cmd.t=="HBP"?Rt.cmd.t=m:Rt.cmd.t=="RC"&&(Rt.cmd.t=v),!et){var qt=Rt;switch(qt.cmd.t){case c:a(Ne=qt),be=St(),pt=(i.now()-B.START_TIME)/1e3,B.pt.gtms(),Ft(Ne.context.sid),Dt=function(Wt,oe){if(!Array.isArray(Wt))throw Error("ESTOP:removeQuitMember array required");for(var X=null,lt=Wt.length;lt;){var vt=Wt.shift();lt--,vt.sid!==oe?Wt.push(vt):X=vt}return X}(Ie.mbs,Ne.context.sid),B.pt.gtms(),Dt&&!nt&&(ze([Ne.context.sid]),B.gfln()?(Ge=Le(),pe("quit",Ge)):ee("quit",Ne.context.sid),Ct(19,[Dt]),Ie.mbs.length,Ne.context.sid,gt("[codoxi] qt: t = "+pt+"; s="+be+"; ss= "+Ie.mbs.length+"; lvrsid = "+Ne.context.sid+"; sid = "+ct.sid,e)),be==E&&Ie.mbs.length===1&&(a(Ie.mbs),Be({}),Pt());break;case u:(function(Wt){var oe=i.now()-B.START_TIME,X=St();if(Wt&&Wt.cmd){var lt=(vt=Wt.cmd).fg,vt=vt.note;if(lt)return a(vt),tt&&(tt.a,tt.a.serverCommand(vt));if(vt==="PPE Overdue")return a(Wt),ct.sid,gt("[codoxi] ppeod: r=22; t = "+oe+"; s="+X+"; sid = "+ct.sid,e),Et(22);if(vt==="PPE Shutdown")return a(Wt),ct.sid,gt("[codoxe]-- ppesd: r=23; t = "+oe+"; s="+X+"; sid = "+ct.sid,e),wt(23);if(vt==="CB Error")throw a(Wt),Wt.cbMsg.asMsg.statusCode,Wt.cbMsg.asMsg.body,ct.sid,gt("[codoxe]-- cberror: code ="+Wt.cbMsg.asMsg.statusCode+"; t = "+oe+"; s="+X+"; sid = "+ct.sid),new l("code ="+Wt.cbMsg.asMsg.statusCode+"; reason = "+Wt.cbMsg.asMsg.body,Wt.cbMsg.asMsg,Wt.cbMsg.failedCmd)}else console.error(new Error("codox_handleSMMmsg msg.cmd does not exit. skipping..."))})(qt);break;case h:(function(Wt){if(St()===E){var oe=Jt(Wt.context.sid);if(oe&&ct.sid!==Wt.context.sid&&!et&&(ht(oe.tp,Wt.context.rto),B.wxsp(),Z))if(oe.tp.length===0&&Wt.context.CAID){a(Wt);var X=jt();if(Wt.context.rto==null||de==null||Wt.context.rto<de)return Wt.context.caidinfo,Wt.context.rto;At(X,Wt.context.caidinfo),X=B.gdft();var lt=B.glx();(X||lt)&&Wt.context.ks!==void 0&&Wt.context.js!==void 0&&Wt.context.startBlkPos!==void 0&&Wt.context.endBlkPos!==void 0?((X={t:"sl"}).op={start:Wt.context.ks,end:Wt.context.js,startBlkPos:Wt.context.startBlkPos,endBlkPos:Wt.context.endBlkPos},X.context=Wt.context,(0,B.exsl)(X)):kt(Wt)}else Wt.context.sid,oe.tp.length}})(qt);break;case m:qt.cmd.hbc,B.gs()!==E&&!et||(Ge=i.now(),B.ghb(),B.bium()||yt("HBP"),(Dt={op:[],bc:!0,cmd:{t:h},context:{sid:ct.sid,rto:ct.rto,CAID:!0,pub:B.gpm()}}).context.st=Ge,Dt.context.st,Dt.rtt=It(),B.buim()&&(Dt.context.CAID=!1,Dt.context.CAID),pt=jt(),Nt(Dt,pt),B.ihb(),i.now());break;case p:o(Ne=qt),St()===E&&(B.gqj()?(Ne.cmd.smags.ds={ops:M.c2d(Ne.cmd.smags.ds)},Ne.cmd.smags.ds=s(Ne.cmd.smags.ds)):B.gcm()&&(Ne.cmd.smags.ds=Ne.cmd.smags.ds[0].cr),Ne.cmd.smags.success=!0,B.smagsr(Ne.cmd.smags));break;case b:He=qt;break;case _:be=qt,Te=St(),He?(ct.sid,a(be),bt=He,ct.sid,a(bt),qe(bt.cmd.gcs.mbs),a(bt.cmd.gcs.tm),Qt(bt.cmd.gcs.tm),dt([Q]),a(Xt()),a(bt.cmd.gcs.ct),a(ct),ve(bt.cmd.gcs.ct),a(ct),Ie.sts=bt.cmd.gcs.sts,Ie.sts,Ie.ISTo=bt.cmd.gcs.to,Ie.ISTo,ft=St(),xt=$.idlt,Bt=bt.cmd.gcs.clog,ce=null,xt(B)?(ce={ops:M.c2d(Bt)},ce=s(ce),ft!==k&&function(Wt){var oe=Z.getContents();if((B.gcm()&&(oe={ops:[{insert:oe}]},at=s(at={ops:[{insert:at}]}),oe=s(oe)),oe=at.diff(oe)).ops.length==0)return rt.h2(Wt);Wt=at.diff(Wt),a(Wt),oe=M.d2c(oe.ops),Wt=M.d2c(Wt.ops),z(oe,Wt,B)}(ce)):(ce=Bt,B.gfln()||B.gjs()||(ce=Bt[0]),ft!==k&&(xt=ce,Bt=Z.d(),B.glx(),a(at),a(Bt),0<(Ce=ae(at,Bt)).length&&Z.sj(Bt),Ce.length==0?rt.h2(xt):(Bt=ae(at,xt),B.gdft()&&(Ce=(xt=Z.toInO)(Ce),Bt=xt(Bt)),H(Ce,Bt,B)))),ft==k&&rt.h2(ce),Ie.mbs=[],Oe([Q]),a(bt.cmd.gcs.mbs),Oe(bt.cmd.gcs.mbs),Mt(E),B.sj(!0),Et(16),xt=1,bt.ncmn&&(xt=bt.ncmn),Ot(S,xt),Ce=Ie.mbs.length+xt,ft!==k&&(Bt=St(),ce=(i.now()-B.START_TIME)/1e3,!nt&&Y&&(gt("[codoxi]* cdxcb(y): t = "+ce+"; s="+Bt+"; ss="+Ce+"; sid = "+ct.sid),Y(ct.sid))),ct.sid,He=null):(ct.sid,a(be)),et||(qe(be.cmd.newcms),a(Le()),Oe(be.cmd.newcms),a(Ie.mbs),dt(be.cmd.newcms),we(ct.sid,be.cmd.newcms)||hn(be.cmd.newcms),de=be.to,Lt(),Ct(18,Ie.mbs),B.gfln()?(bt=Le(),pe("smncm-f2",bt)):B.gjs()||ee("smncm"),yt("smncm")),Te==k&&O(!1,"off-NCM");break;case w:Tt=qt;break;case x:xt=qt,Tt?(ct.sid,a(xt),se=Tt,ct.sid,a(se),qe(se.cmd.dlt.mbs),a(se.cmd.dlt.tm),Qt(se.cmd.dlt.tm),dt([Q]),a(Xt()),a(se.cmd.dlt.ct),a(ct),ve(se.cmd.dlt.ct),a(ct),B.gjs()&&B.mdom.goffop(),Mt(E),ft=se.cmd.dlt.offstate,ce=N(),D(ft,ce,B),Ie.ISTo=ft.offTo,Ie.ISTo,Ie.mbs=[],Oe([Q]),a(se.cmd.dlt.mbs),Oe(se.cmd.dlt.mbs),B.sj(!0),Et(16),Ot(S,1),ce=Ie.mbs.length+1,ft=St(),se=(i.now()-B.START_TIME)/1e3,nt||gt("[codoxi]* cdxoffrjn(y): t = "+se+"; s="+ft+"; ss="+ce+"; sid = "+ct.sid),ct.sid,Tt=null):(ct.sid,a(xt)),et||(qe(xt.cmd.offcm),a(Le()),Oe(xt.cmd.offcm),Ie.mbs,dt(xt.cmd.offcm),we(ct.sid,xt.cmd.offcm)||hn(xt.cmd.offcm),Lt(),Ct(18,Ie.mbs),B.gfln()?(se=Le(),pe("smrjn-f2",se)):ee("smrjn"),yt("smrjn"),O(!1,"off-RJN"));break;case v:Bt=qt,B.gr(),Bt.cmd.r,B.sr(Bt.cmd.r);break;default:qt.cmd.t}}},this.rs=function(Rt){Rt||(Ie.mbs=[]),Ie.DCPRops=[],Ie.DCPLops=[],Ie.DCPRopsN=0,Ie.DCPLopsN=0},this.rsto=function(){de=null}}},{"../../../codox-rt-type/src/":143,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/dtf/dtf.js":220,"../domains/api/qjs-util":519,"../errors":528,"../logger.js":530,"./off":540,"./opm":541,"./rjm":543}],536:[function(t,f,r){var n=(t=t("../../constants")).OFFLINE,e=t.ONLINE,s=null,i=!1,l=null,o=!1,a=null,c=null,u=null,h=null,p=null;function m(){!i||p()||(l!==null&&(clearTimeout(l),l=null),clearTimeout(l),l=setTimeout(b,1e4))}function b(){l=null,i&&(i=!1,a.k(0),_())}function _(){clearTimeout(l),l=null,i=!1;var w=s.gs(),x=h();w!==e||x||(o=!0,setTimeout(v,0))}function v(){var w=s.gs(),x=h(),S=s.lohl;o&&(S("imeflush"),o=!1,w!==e||x||(0,s.dcpm)(s))}f.exports={init:function(w){a=(s=w).cdm,c=w.app,u=w.cid,h=w.buim,p=w.ird},ime:function(w){var x,S=s.gs();if(S!==n&&i!==w)return p()?void a.k(0):void(i=w?(S=s.lohl,w=h(),x=s.gs(),m(),c.a.f(u),x!==e||w||(S("imestart"),(0,s.dsm.rs)("imestart")),!0):(_(),!1))},imet:m,rss:function(w){i&&a.k(0),clearTimeout(l),w!=="off"&&(s=null),l=null,o=i=!1},bime:function(){return i||o},fime:v}},{"../../constants":509}],537:[function(t,f,r){var n=t("../../constants"),e=(n.OFFLINE,n.ONLINE),s=(t("../../../../codox-shared/src/com/log").ins,t("../../../../codox-shared/src/com/util").clone,!0),i=null,l=null,o=null;f.exports={init:function(a){l=(i=a).cdm,o=a.nu,a.sus},pu2pr:function(){var a=i.pt.se,c=i.lohl,u=i.gs();i.gfln(),i.gfl(),s=s&&(u!==e||(o(6),1<a.mbs.length?c("v2h"):l.a(),l.f2(),a.CKPRops=[]),!1)},pr2pu:function(){var a=i.dcpm,c=i.dsm.rs,u=i.gs();s=s||(u!==e||(o(7),a(i),l.g(),c()),!0)},rss:function(a){a!=="off"&&(i=null),s=!0},pmod:function(){return s}}},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants":509}],538:[function(t,f,r){var n=t("../../constants"),e=n.OFFLINE,s=n.ONLINE,i=(t("../../../../codox-shared/src/com/log").ins,t("../../../../codox-shared/src/com/util").clone,500),l=null,o=!1,a=null,c=!1,u=null,h=null,p=null,m=null,b=null,_=null;function v(E){clearTimeout(a),a=setTimeout(w,i)}function w(){a=null,o&&(l.doc,u.u(0),p.h(!1),x())}function x(){clearTimeout(a),a=null,o=!1;var E=l.gs(),k=b();E!==s||k||(c=!0,l.gqj()?S():setTimeout(S,0))}function S(){var E=l.gs(),k=b(),D=l.lohl;c&&(D("uimflush"),c=!1,E!==s||k||(0,l.dcpm)(l))}f.exports={init:function(E){u=(l=E).cdm,h=E.app,p=E.app.doc,m=E.cid,b=E.bime,_=E.ird},uim:function(E){if(l.gs()!==e&&o!==E)return _()?void u.u(0):void(o=E?(E=l.lohl,k=l.gs(),D=b(),k!==s||D||(v(),h.a.f(m),E("uimstart"),(0,l.dsm.rs)("uimstart")),!0):(x(),!1));var k,D},uimt:v,rss:function(E){o&&u.u(0),E!=="off"&&(l=null),a=null,c=o=!1},buim:function(){return o||c},fuim:S}},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants":509}],539:[function(t,f,r){var n,e=Date,s=((n=t("../../../codox-shared/src/com/util")).clone,n.logClone),i=(t("../../../codox-shared/src/com/log").stringify,t("../constants").SMMSG),l=(n=t("../../../codox-shared/src/com/constants")).STARTED_LOG,o=n.JOINED_LOG,a=n.STOPPED_LOG,c=n.INVALID_LOG,u=(n=t("../../../codox-shared/src/com/lib")).isop,h=n.ipop,p=n.idlt,m=n.ect,b=n.csop,_=n.gqim,v=n.cqim;f.exports={msg2sm:function(w,x,S){var E=S.tm,k=S.ird,D=S;if(k()&&!w.bc)throw s(w),s(w),new Error("ESTOP:perr=1002;RoleVio");w.op&&0<w.op.length&&w.context.seq,s(w),k=w;var N=S,O=N.gjs(),R=N.gdft(),A=N.glx(),z=N.gfln(),H=N.gsj(),$=N.gqj(),M=N.gcm(),J=N.pt.gct(),K=N.tm,P=N.sus,U=N.mdom,V=N.cdm,G=N.ird,F=N.scp;if(K||O&&!R&&!A||h(k)||P()||(u(k)?(k.context.ks=k.op.start,k.context.js=k.op.end,(R||A)&&(k.context.startBlkPos=k.op.startBlkPos,k.context.endBlkPos=k.op.endBlkPos,s(k)),z&&(k.context.startid=k.op.startid,k.context.endid=k.op.endid,s(k))):U&&k.context&&(k.context.dmid||(k.context.dmid=0),K=V.d(k.context.dmid),O={},G()?(O.start=0,O.end=0):O=R||A?(0,N.mdom.gsel)():K.c(),H?(k.context.ks=O.start,k.context.js=O.end,k.context.pt===null?k.context.pt=[0,0]:k.context.pt=O.path,k.context.pt1===null?k.context.pt1=[0,0]:k.context.pt1=O.startpath,k.context.pt2===null?k.context.pt2=[0,0]:k.context.pt2=O.endpath):$||M?(k.context.ks=O.start,k.context.js=O.end):z?(k.context.ks=O.start,k.context.js=O.end,k.context.startid=O.startid,k.context.endid=O.endid):R||A?O==null||(k.context.ks=O.start,k.context.js=O.end,k.context.startBlkPos=O.startBlkPos,k.context.endBlkPos=O.endBlkPos,s(k)):(F(J.dmid,O.start),k.context.ks=O.start,k.context.js=O.end))),w.a=i,w.to=null,w.len=null,w.is=!1,w.im=!1,P=w,!(V=(U=S).gqj())||h(P)||u(P)||0<(V=_(P)).length&&(P.im=!0,P.imo=V,v(P,U)),!E&&w.op&&(b(w,D),s(w)),G=w,N=x,H=(K=S).pm,$=K.spm,M=K.gcaid,z=K.mdom,R=K.tm,K=(A=K).gamm(),F={},G.op&&(F.op=G.op,delete G.op),(H()||$())&&z&&G.context&&!h(G)&&(p(A)&&N?G.context.caidinfo=N:G.context.caidinfo=M(),G.dos=G.context.caidinfo,G.context.caidinfo),G.context&&(F.context=G.context,delete G.context),G.cmd&&(F.cmd=G.cmd,delete G.cmd),G.cmg=F,s(G),R?(G.cmg=F,G.len=JSON.stringify(G.cmg).length):(G.cmg=m(F,K),G.len=G.cmg.length,G.im&&(G.len=G.len+G.imo.length,G.len)),J=w,O=(k=S).gdmsize(),k=k.gmmsize(),J.is&&J.len>O||!J.is&&J.len>k)throw J.len,O="err=10; len="+J.len,new Error("ESTOP:"+O);(0,S.sosd)(w)},log2sm:function(w,x,S,E,k){var D=k.dsm.se,N=k.gcaid,O=k.gssd(),R=e.now(),A={log:{}},z=(A.log.Type=w,N());switch(w){case l:A.log.TotalTime4Start=R-E.SMDIvtSt,A.log.T4SMD=E.SMDIvtEd-E.SMDIvtSt,A.log.T4CLTAftSMD=E.SMConSt-E.SMDIvtEd,A.log.T4SMCon=E.SMConEd-E.SMConSt,A.log.T4SMSub=E.SMSubEd-E.SMSubSt,A.log.T4CLTAftSM=R-E.SMSubEd,A.log.DocSizeatStart=z,A.log;break;case o:A.log.TotoalTime4Join=R-E.SMDJnSt,A.log.T4SMD=E.SMDJnEd-E.SMDJnSt,A.log.T4CLTAftSMD=E.SMConSt-E.SMDJnEd,A.log.T4SMCon=E.SMConEd-E.SMConSt,A.log.T4SMSub=E.SMSubEd-E.SMSubSt,A.log.T4CLTAftSMSub=E.SMJnSt-E.SMSubEd,A.log.T4CKPJn=E.SMJnEd-E.SMJnSt,A.log.CoNewCmNum=x,A.log.SesMemNumatJoin=D.mbs.length,A.log.DocSizeatJoin=N(),A.log;break;case a:A.q=!0,A.log.Reason4StopbyClient=x,A.log.Reason4StopMatrix=S,A.log.T4CLTLive=E.SMDIvtSt?R-E.SMDIvtSt:R-E.SMDJnSt,O&&(A.log.DocSizeatStop=z,A.log.SesMemNumatStop=D.mbs.length),A.log,s(A);break;case c:A.log.InvalidMb=x,A.log.ExistingMbs=S}w=A;var H=k.gamm(),$=k.gmmsize();if(w.a=i,w.len=null,H!=="invalid"?(w.log=m(w.log,H),w.len=w.log.length):w.len=JSON.stringify(w.log).length,w.len>$)throw w.len,H="err=10; loglen="+w.len,new Error("ESTOP:"+H);(0,k.sosd)(w)}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../constants":509}],540:[function(t,f,r){var n,e=t("../logger.js").logger,s=(n=t("../../../codox-shared/src/com/constants")).SMINIT,i=(n.ONLINE,n.OFFLINE),l=(n.codoxHighestto,t("../../../codox-shared/src/com/log").ins),o=((n=t("../../../codox-shared/src/com/util")).clone,n.logClone,t("../../../codox-qdelta-type/src/draftDelta.js").dop2qop),a=(t=(n=t("../../../codox-shared/src/gt/xf")).ccp,n.ctf,t),c=null,u={offCaid:null,offTo:null,offOpLog:[],coffDelta:[],coffMeta:null,coffCount:0,gooffCount:0,gooffReasons:[],sessiontimestamp:null,sts:null},h=!1;function p(b,_){h=b}var m=0;f.exports={srjn:p,rjn:function(b){b.gs()!==i||h||(h=!0,clearTimeout(null),m=0,function _(v){m++;var w=null;try{c=new WebSocket(null),v.sso(c),w=setTimeout(function(){if(p(!1),3<=m)throw new Error("rejoinConnect: failed reconnections (interval 5s) after 3 tries!!");_(v)},5e3)}catch(x){throw e.reportError(x),p(!1),new Error("rejoinConnect:reconnect failed")}v.sst(w),c&&(c.onclose=u.onclose,c.onmessage=u.onmessage,c.onerror=u.onerror,c.onopen=u.onopen),v.semsg(s)}(b))},gof:function(b,_,v){(0,b.TZ)("OfflineDisabled")},offLOH:function(b,_){u.coffCount++,u.coffDelta=a(u.coffDelta,b.op,_,"off")},offLOHJson:function(b,_){_=_.gdft(),l(b),u.coffCount++,u.coffDelta=b.op,u.coffMeta=b.meta,_&&(u.coffDelta=o(b.op),l(u.coffDelta))},gos:function(){return u},isrjn:function(){return h}}},{"../../../codox-qdelta-type/src/draftDelta.js":139,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/gt/xf":224,"../logger.js":530}],541:[function(t,f,r){t("../../../codox-shared/src/com/log").ins;var n=t("../../../codox-shared/src/com/util"),e=(n.clone,n.logClone),s=t("../../../codox-shared/src/com/lib"),i=t("./off").gos;t("../../../codox-shared/src/com/constants").OFFLINE,f.exports={dltmg:function(l,o,a){if(l==null||o==null||o==null||!a)throw new Error("[DeltaOpMerge] one input is null or undefined");if(!(0,s.idlt)(a))throw new Error("[DeltaOpMerge] non-delta app invalid invocation ");var c=a.dtf.tf(o,l,!0);0<(l={op:a.dtf.tf(l,o,!1)}).op.length&&a.mdom.roh(l),0<c.length&&(e(o={op:c,inverse:[]}),a.dop2sm(o,"opm",a))},difmg:function(l,o,a){if(l==null||o==null||o==null||!a)throw new Error("[DiffOpMerge] one input is null or undefined");if(!(0,s.idif)(a))throw new Error("[DiffOpMerge] non-Diff app invalid invocation ");var c,u,h,p,m,b=l,_=o;0<l.length&&0<o.length&&(p=[],h=[],m=(u=a).gfln(),c=u.gjs(),h=m||c?(e(l),e(o),p=u.jot.type.transform(l,o,0),u.jot.type.transform(o,l,1)):(e(p),e(h),p=u.rtf.ct(l,o,"B"),u.rtf.ct(o,l,"A")),e(p),e(h),b=(m={lop:p,rop:h}).lop,_=m.rop),0<_.length&&(a.gjs()?(e(c={op:_}),a.mdom.roh(c)):(u=a.mdom.gj(),e(u),o=u,l=_,h=(p=a).gfln()?p.jot.type.apply(o,l):p.rtf.cap(o,l),a.mdom.sj(h),e(h),a.udoc(a.mdom,{op:_},a),e(a.mdom.d()))),0<b.length&&(m={op:b},o=a.gjs(),a.gs(),o&&(l=i(),m.meta=l.coffMeta,e(m)),e(_=[m]),a.gop2sm(_,"opm",a))}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"./off":540}],542:[function(t,f,r){var n,e=(n=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/typeof")),s=n(t("@babel/runtime/helpers/slicedToArray")),i=t("../util/lib").clearTimer,l=(n=t("../../../codox-shared/src/com/util")).clone,o=n.logClone,a=(t("../../../codox-shared/src/com/log").stringify,t("../../../codox-shared/src/com/log").ins),c=t("../../../codox-shared/src/com/constants").ONLINE,u=t("../../../codox-json-ot/lib/").type.transform,h=t("../../../codox-shared/src/dtf/dtf").tp,p=(n=t("../../../codox-shared/src/com/lib")).mfso,m=n.ppos,b=n.pid,_=n.idlt,v=n.idif,w=t("../../../codox-shared/src/gt/xf").tfp;f.exports=function(x){var S=x.cw,E=x.app,k=x.cmd,D=x.type,N=x.obfroh,O=(x=x.obfcr,S),R=k,A=D,z=N,H=x,$={},M=O.pt.gct(),J=null,K=E,P=E.cid,U=O.glx(),V=O.gdft(),G=O.gfln(),F=O.gfl(),q=O.gqj(),T=O.gtn(),I=O.gjs(),L=O.gcm(),B=O.gtx(),Y=O.gsj(),Z=(S=O.gmi(),(k=(0,s.default)(S,3))[0]),rt=k[1],Q=k[2],tt=O.gs,nt=O.scp,et=O.gcp,at=O.ssl,ct=O.rsl;function gt(yt,jt){return yt.startid!==jt.startid||yt.start!==jt.start||yt.endid!==jt.endid||yt.end!==jt.end}function wt(yt,jt,At){if(!O.sus()&&(O.gam(),!O.bium()&&(jt=$,JSON.stringify(jt)!=="{}"))){for(var It in yt&&yt=="timer"||i(St),jt)(It=jt[It]).start==-1&&(It.update=!0);o(jt),At&&At!==M.sid&&jt[At]&&(jt[At].update=!0),o(jt),yt=Lt(),K.a.c(P,yt),At=R.d(),o(At)}}var St=null;function Mt(yt,jt){if(!O.gime()&&(!I||V||U)){var At=l($);if(V||U)return a(yt),void(0,R.urds)(At);if(!O.sus()&&!G&&(O.gam()||O.gsap())){var It=JSON.stringify($);if(yt&&yt=="timer"||i(St),a($),It!=="{}"){for(var Ot in At)(Ot=At[Ot]).start==-1&&(Ot.update=!0);if(o(At),jt&&jt!==M.sid&&At[jt]&&(At[jt].update=!0),o(At),(q||L)&&R&&(yt=R.Q(At),K.a.c(P,yt)),Y&&(It=R.S(At),K.a.c(P,It)),B&&(jt=R.f(At),K.a.c(P,jt)),v(O)&&!B&&!V&&!U){if(!O.gam()&&!O.gsap()||O.bium())return;yt=Lt(),K.a.c(P,yt)}}}}}function Lt(yt){o(yt=$);var jt=document.activeElement,At=M.dmid,It=(z||!G&&!F||At===R.dmid||R.x.focus(),at(R)),Ot=R.d(),Et=[];if(G)(Nt=function(kt,ee){if(JSON.stringify(ee)!="{}"&&(ee=function(Oe){var Rt,Ut={};for(Rt in Oe){var se=Oe[Rt];se.start!=-1&&se.end!=-1&&se.startid!=-1&&se.endid!=-1&&(Ut[Rt]=se)}return Ut}(ee),JSON.stringify(ee)!="{}")){for(var pe=kt.gj(),Le=(o(pe),[]),Be=l(pe),qe=-1,ze=0,Ie={},He="",hn=function(Oe){o(Oe);var Rt,Ut=[];for(Rt in Oe){var se=Oe[Rt],bt=(o(se),{});bt.pos=se.start,bt.bid=se.startid,bt.end=!1,bt.sid=Rt,Ut.push(bt),o(bt),se.startid===se.endid&&se.start===se.end||((bt={}).pos=se.end,bt.bid=se.endid,bt.end=!0,bt.sid=Rt,Ut.push(bt),o(bt))}o(Ut);var ft=Ut.sort(function(xt,Bt){return xt.bid-Bt.bid||xt.pos-Bt.pos});return o(ft),ft}(ee),Tt=kt.i(),ae=0;ae<hn.length;ae++){var de=hn[ae].bid,we=(hn[ae],de!=qe&&(qe!==-1&&(He+=Ie.content.slice(ze),we={id:Ie.id,content:He},Le.push(we),Be.splice(qe,1,we)),ze=0,He="",Ie=pe[qe=de]),hn[ae].pos);de=Pt(Tt,hn[ae]),0<=we&&(He=He+Ie.content.slice(ze,we)+de,ze=we)}return He+=Ie.content.slice(ze),ee={id:Ie.id,content:He},Le.push(ee),Be.splice(qe,1,ee),a(Le),ee=kt.r(Le),kt=R.d(),o(kt),o(ee),ee}}(R,yt))&&Nt.length&&(Et=R.f(Z,yt),R.r(Nt),Nt=R.d(),o(Nt));else{for(var Ct=R,Nt=yt,ht=Ct.gj(),dt="",Ft=function(kt){var ee,pe=[];for(ee in kt){var Le={};Le.pos=kt[ee].start,Le.end=!1,Le.sid=ee,pe.push(Le),kt[ee].start!==kt[ee].end&&((Le={}).pos=kt[ee].end,Le.end=!0,Le.sid=ee,pe.push(Le))}var Be=pe.sort(function(qe,ze){return qe.pos-ze.pos});return Be}(Nt),Jt=0,Xt=0;Xt<Ft.length;Xt++){var Qt=Ft[Xt].pos,ve=Pt(Ct.i(),Ft[Xt]);0<Qt&&(dt=dt+ht.slice(Jt,Qt)+ve,Jt=Qt)}dt+=ht.slice(Jt),Ct.e(dt),Et=R.f(Z,yt),R.e(Ot)}return ct(R,It),(G||F)&&jt&&At!==R.dmid&&jt.focus(),Et}function Pt(yt,jt){var At;return typeof document<"u"?(H||(At=jt.sid,jt.end?yt.innerHTML=rt+At+"_end"+Q:yt.innerHTML=rt+At+Q),yt.innerHTML):""}this.grcs=function(){return $},this.srcs=function(yt){$=yt},this.arcs=function(yt){if(!Array.isArray(yt))throw Error("ESTOP:addRCSObjects array required");o(yt),o($);for(var jt=0;jt<yt.length;jt++){var At=yt[jt].sid;At!==M.sid&&(Y?$[At]={start:-1,end:-1,path:[-1,-1],startpath:[-1,-1],endpath:[-1,-1]}:q?$[At]={start:-1,end:-1}:L?$[At]={start:0,end:0}:T?$[At]={start:3,end:3}:F?$[At]={start:-1,end:-1}:G?($[At]={start:-1,end:-1,startid:-1,endid:-1},a($)):V||U?($[At]={start:-1,end:-1,startBlkPos:-1,endBlkPos:-1},a($)):B&&($[At]={start:1,end:1}))}o($)},this.rrcs=function(yt){if(!Array.isArray(yt))throw Error("ESTOP:removeRCSObjects array required");o($);for(var jt=0;jt<yt.length;jt++){var At=yt[jt];$[At]&&delete $[At]}o($)},this.urcs=function(yt){if(!I&&!O.sus()&&(o(yt),tt()===c)){var jt,At=yt.op;if(Y&&yt.context.sid===M.sid&&yt.op.length!==0&&(At=yt.op[0].po),yt.context.dmid!==0)_(O)||G||(jt=et(yt.context.dmid),jt=yt.context.sid===M.sid?((0,e.default)(At[0])===A[2]&&At[0]!==jt&&(jt=At[0],At[0]),w(jt,At,"A")):w(jt,At,"B"),nt(yt.context.dmid,jt));else{var It,Ot={};for(It in $){var Et,Ct,Nt,ht,dt=$[It];q||L?yt.context.sid!==It?(dt.start=h(At,dt.start,!0),dt.end=h(At,dt.end,!0)):yt.op.length!==0?(o(yt),At[0].tg?(dt.start=At[0].tg,dt.end=At[0].tg):(dt.start=0,dt.end=0),dt.start=h(At,dt.start,!1),dt.end=h(At,dt.end,!1)):(dt.start=yt.context.ks,dt.end=yt.context.js,o(dt)):Y?yt.context.sid!==It?(Ct={pos:dt.start,path:dt.startpath},Et={pos:dt.end,path:dt.endpath},J(At,Ct,!0),J(At,Et,!0),dt.start=Ct.pos,dt.end=Et.pos,dt.path=Ct.path):(dt.start=yt.context.ks,dt.end=yt.context.js,dt.path=yt.context.pt,dt.startpath=yt.context.pt1,dt.endpath=yt.context.pt2):G?(Et=l(dt),a(Et),It===yt.context.sid?(dt.start=yt.context.ks,dt.end=yt.context.js,dt.startid=yt.context.startid,dt.endid=yt.context.endid,gt(Et,dt)&&(Ct=l(dt),Ot[It]=Ct,a(Ot))):(a(dt),Nt=p(dt.startid,dt.start),ht=p(dt.endid,dt.end),a(At),Nt=u([Nt],At,0),ht=u([ht],At,0),Nt&&0<Nt.length&&ht&&0<ht.length?(dt.startid=b(Nt[0]),dt.start=m(Nt[0]),dt.endid=b(ht[0]),dt.end=m(ht[0])):(dt.startid=-1,dt.start=-1,dt.endid=-1,dt.end=-1),a(dt),gt(Et,dt)&&(Nt=l(dt),Ot[It]=Nt))):(It===yt.context.sid?(dt.start=yt.context.ks,dt.end=yt.context.js):(dt.start=w(dt.start,At,"B"),dt.end=w(dt.end,At,"B")),ht=et(yt.context.dmid),ht=yt.context.sid===M.sid?w(ht,At,"A"):w(ht,At,"B"),nt(yt.context.dmid,ht))}yt.context.sid!==M.sid?(o(yt),0<At.length?G?wt("rop",Ot,yt.context.sid):Mt("rop",yt.context.sid):G?wt("rop",Ot):Mt("rop")):(i(St),St=setTimeout(G?function(){wt("timer",Ot),St=null}:function(){Mt("timer"),St=null},0))}}},this.qurcs=function(yt,jt){if(!O.sus()){o(yt),o($);var At,It,Ot=yt.op;for(At in $)!$.hasOwnProperty(At)||(It=$[At]).start!=-1&&It.end!=-1&&M.sid!==At&&(It.start=h(Ot,It.start,!1),It.end=h(Ot,It.end,!1));tt()==c&&Mt("qjs"),o($)}},this.uc=Mt,this.nuc=wt,this.sppt=function(yt){J=yt},this.pct=function(yt){o(M)}}},{"../../../codox-json-ot/lib/":59,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/dtf/dtf":220,"../../../codox-shared/src/gt/xf":224,"../util/lib":551,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572,"@babel/runtime/helpers/typeof":574}],543:[function(t,f,r){t("./rjmtest").rjmtest;var n=t("../../../codox-shared/src/com/log").ins,e=(o=t("../../../codox-shared/src/com/util")).clone,s=o.logClone,i=t("../../../codox-shared/src/com/lib"),l=(o=t("./opm")).dltmg,o=o.difmg,a=l,c=o,u=(o=(l=t("../../../codox-shared/src/gt/xf")).ccp,l=l.ctf,o),h=l,p=t("../../../codox-shared/src/com/constants").codoxHighestto,m=null;function b(x,S){s(x),s(S),((0,i.idlt)(m)?a:c)(S,x,m)}function _(x,S){for(var E=0;E<x.length;E++){var k=x[E];if(k.context.seq==S.seq)return S.seq,s(k),k}throw new Error("getOrgLop found no orglop")}function v(x,S){return n(x),n(S),S.length==0?x:S=u(e(S),x,m)}function w(x){if(s(x),x.length==0)return s(x),[];for(var S=[],E=0;E<x.length;E++)S=u(S,x[E].op,m);return s(S),S}f.exports={rjm:function(x,S,E){m=E,E=x.offTo;var k=x.offOpLog,D=(x=x.coffDelta,S.offCaid),N=S.offTo,O=S.offOpLog;S=S.coffDelta,O=function(R,A){if(!Array.isArray(R))throw Error("ESTOP:findUnAckLops array required");s(R);var z=[],H=R.length;if(0<H)for(var $=H-1;0<=$;$--){var M=R[$];if(M.context.sid!=A||M.context.to!=p)return s(z),z;z.unshift(M)}return z}(O,D),E==N?O.length==0?b(x,S):b(x,v(S,w(function(R,A){if(!Array.isArray(R))throw Error("ESTOP:findLostLops array required");for(var z=0;z<R.length;z++)if(!function(H,$){if(!Array.isArray($))throw Error("ESTOP:isInOpLogSM array required");for(var M=0;M<$.length;M++){var J=$[M];if(H.context.sid==J.sid&&H.context.seq==J.seq)return 1}}(R[z],A))return R.slice(z);return[]}(O,k)))):((E=function(R,A){if(!Array.isArray(A))throw Error("ESTOP:findLostMops array required");s(A);var z=[];if(R==null)return A;if(A.length==0&&typeof R=="number")return[];for(var H=A.length-1;0<=H;H--){var $=A[H];if(!($.to>R)){if($.to==R)return s(z),z;throw new Error("findLostMops: found no mop with equal To")}s($),z.unshift($)}throw new Error("findLostMops: offOpLogSM may be too small")}(N,k)).length!=0&&s(E),O.length==0?(N=S,b(v(x,w(E)),N)):(k=O,N=x,O=S,S=(x=function(R,A){if(!Array.isArray(R))throw Error("ESTOP:separateRopsLops array required");for(var z=[],H=[],$=0;$<R.length;$++){var M=R[$];(R[$].sid!==A?z:H).push(M)}var J={lostrops:z,smAcklostlops:H};return s(J),J}(x=E,S=D)).lostrops,k=function(R,A){var z=[],H=null,$=[];if(A.length==0)return{orgAcklostlops:$,lostlops:z=R};for(var M=0;M<R.length;M++){for(var J=R[M],K=!1,P=0;P<A.length;P++)if(J.context.seq==A[P].seq){K=!0;break}if(!K)return s(J),H={orgAcklostlops:$,lostlops:z=R.slice(M)},$.length!==A.length&&($.length,A.length),{orgAcklostlops:$,lostlops:z};s(J),$.push(J)}return H={orgAcklostlops:$,lostlops:z},$.length!==A.length&&($.length,A.length),H}(k,x=x.smAcklostlops),E=k.orgAcklostlops,k=k.lostlops,b(v(N,function(R,A,z){if(!Array.isArray(R)||!Array.isArray(A)||!Array.isArray(z))throw Error("ESTOP:contextualizeLostRops array required");if(A.length!==z.length)throw A.length,z.length,new Error("invalid orgAcklostlops.length= "+A.length+" vs smAcklostlops.length = "+z.length);return R.length==0?[]:z.length==0?w(R):(R=function(H){s(H);for(var $=[],M=0;M<H.length;M++)$=u($,H[M].rop,m),s($),$=h(H[M].lop,$,m),s($);return $}(function(H){s(H);for(var $=0;$<H.length;$++)H[$].rop=w(H[$].rop),H[$].lop=w(H[$].lop);return s(H),H}(function(H,$,M){for(var J=[],K=H,P=0;P<$.length;P++){var U,V=$[P],G=(s(V),function(T,I){for(var L=[],B=0;B<I.length;B++){var Y=I[B];if(!(Y.to<T.to))return s(L),L;L.push(Y),s(L)}return s(L),L}(V,K)),F=G.length;if(0<F){G={rop:G,lop:[_(M,V)]},J.push(G);for(var q=0;q<F;q++)K.shift();s(K),s(J)}else 0<J.length?(G=J[J.length-1],(K.length==0||0<K.length&&V.to<K[0].to)&&(U=_(M,V),G.lop.push(U),s(V),s(G))):s(V)}return 0<K.length&&(s(H={rop:K,lop:[]}),J.push(H)),J}(R,A,z))),R)}(S,x,E)),v(O,w(k)))))}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/gt/xf":224,"./opm":541,"./rjmtest":544}],544:[function(t,f,r){var n=t("../../../codox-shared/src/com/log").ins,e=t("../../../codox-shared/src/com/util").logClone;f.exports={rjmtest:function(s,i){if(s.offOpLog.length==0||i.offOpLog.length==0)return n(s.offOpLog),void n(i.offOpLog);if(s.coffDelta.length==0||i.coffDelta.length==0)return n(s.coffDelta),void n(i.coffDelta);var l=s,o=i,a=o.offOpLog,c=l.offOpLog;console.log("testmergeWithInterleavingLostMop (before change): offToC = "+o.offTo),console.log("testmergeWithInterleavingLostMop (before change): offToSM = "+l.offTo),console.log("testmergeWithInterleavingLostMop (before change): offOpLogC = ",e(a)),console.log("testmergeWithInterleavingLostMop (before change): offOpLogSM = ",e(c)),a.splice(a.length-2,2),a.splice(a.length-4,2),a.splice(a.length-6,2),a[a.length-1].context.to=null,a[a.length-2].context.to=null,a[a.length-3].context.to=null,a[a.length-4].context.to=null;for(var u=a.length-1;0<=u;u--)if(a[u].context.to!==null){o.offTo=a[u].context.to;break}for(var h=c.length-1;0<=h;h--)if(c[h].to!==null){l.offTo=c[h].to;break}console.log("testmergeWithInterleavingLostMop (after change): offToC = "+o.offTo),console.log("testmergeWithInterleavingLostMop (after change): offToSM = "+l.offTo),console.log("testmergeWithInterleavingLostMop (after change): offOpLogC = ",e(a)),console.log("testmergeWithInterleavingLostMop (after change): offOpLogSM = ",e(c))}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219}],545:[function(t,f,r){t("../../../codox-shared/src/com/log").stringify,f.exports=function(n,e,s){n.lcmm(),n.dec;var i,l,o=n.co,a=null,c=null,u=null,h=null,p=null,m=null,b={},_={},v=null,w=null,x=null,S=null,E=null,k=null,D=[function(F,q){if(F.text.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else F=function(T){var I,L={},B=(L.dm=T.path,L.do=[],{});if(!T.offset||0<(I=T.offset)&&(B.tg=I,L.do.push(B),B={}),B.cr=T.text,0<T.marks.length){for(var Y={},Z=0;Z<T.marks.length;Z++)Y[T.marks[Z].type]=!0;B.sx=Y}return L.do.push(B),L.tn=T.data.tn,L.aon=T.data.n,L.pon=1,L}(F),q.push(F);return!0},function(F,q){var T,I,L,B=null;if(F.text.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else(I={}).dm=F.path,I.do=[],L={},F.offset&&0<(T=F.offset)&&(L.tg=T,I.do.push(L),L={}),L.sc=F.text.length,I.do.push(L),I.tn=F.data.tn,I.aon=F.data.n,I.pon=1,B=I,q.push(B);return!0},function(F,q){var T,I,L,B=null;if(F.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else I={},(T={}).dm=F.path,T.do=[],0<(L=F.offset)&&(I.tg=L,T.do.push(I),I={}),(L={})[F.mark.type]=!0,I.tg=F.length,I.sx=L,I.ao="am",T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,T.pon=1,B=T,q.push(B);return!0},function(F,q){var T,I,L,B=null;if(F.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else I={},(T={}).dm=F.path,T.do=[],0<(L=F.offset)&&(I.tg=L,T.do.push(I),I={}),(L={})[F.mark.type]=null,I.tg=F.length,I.sx=L,I.ao="rm",T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,T.pon=1,B=T,q.push(B);return!0},function(F,q){return!!(F=M(F))&&(q.push(F),!0)},function(F,q){return F=z(F),q.push(F),!0},function(F,q){var T;return!(T=U(F)).do[0].dmpo&&1<F.data.tn&&0<q.length&&a(q[q.length-1])&&0<F.position&&(q[q.length-1].do[0].target=F.position),q.push(T),!0},function(F,q){for(var T=K(F),I=0;I<T.length;I++)T[I].tn=F.data.tn,T[I].aon=F.data.n,T[I].pon=I+1,q.push(T[I]);return!0},function(F,q){var T,I,L;return(T={}).dm=F.path,T.do=[],(I={dmpo:!0}).pos=F.path[F.path.length-1],I.len=1,I.type="del",I.ao="rn",T.tn=F.data.tn,T.aon=F.data.n,T.do.push(I),L=T,q.push(L),!0},function(F,q){var T=function(L){var B=[],Y={},Z=(Y.dm=L.path,Y.do=[],{});if(L.node.object==="text")Z.dmpo=!0,Z.pos=L.path[L.path.length-1],Z.len=1,Z.type="ins",Z.ao="in",Z.text=!0,Y.do.push(Z),Y.tn=L.data.tn,Y.aon=L.data.n,Y.pon=1,B.push(Y);else{if(L.node.object!=="block"&&L.node.object!=="inline")return!1;Z.dmpo=!0,Z.pos=L.path[L.path.length-1],Z.len=1,Z.type="ins",Z.ao="in",Y.do.push(Z),Y.tn=L.data.tn,Y.aon=L.data.n,Y.pon=1,B.push(Y)}return B}(F);if(!T)return!1;for(var I=0;I<T.length;I++)T[I].tn=F.data.tn,T[I].aon=F.data.n,T[I].pon=I+1,q.push(T[I]);return!0}],N=[function(F,q,T){q=function(I){var L=I;if(I.data.ne)return I;var B=R(F,I);if(B===null||B.do.length===0||B.nil)return I.data.ne=!0,I;(I=o(S.itaot)).path=B.dm;var Y=0;return B.do[0].cr?I.offset=0:(I.offset=B.do[0].tg,Y=1),I.text=B.do[Y].cr,B.do[Y].sx&&(I.marks=G(B.do[Y].sx)),I.data=L.data,I}(q),T.push(q)},function(F,q,T){for(var I=[],L=I,B=q,Y=A(F,q),Z=0,rt=0;rt<Y.length;rt++){var Q=o(S.rtaot),tt=(Q.data=B.data,Q.marks=B.marks,Y[rt]);if(tt.nil||tt.do.length===0)Q.data.ne=!0,L.push(Q);else{Q.path=tt.dm;for(var nt=o(tt.do),et=0,at=0,ct=0,gt=0;gt<nt.length;gt++)nt[gt].sc&&(ct+=nt[gt].sc);var wt=Z;for(Z+=ct;0<nt.length;){var St=o(Q),Mt=(St.text=0<wt?B.text.slice(-Z,-wt):B.text.slice(-Z),St.marks=B.marks,St.text,nt.shift());St.offset=et,Mt.tg&&(et+=Mt.tg,St.offset=et,Mt=nt.shift()),Mt.sc&&Mt.sc!=St.text.length&&(Mt.sc,St.text.length,St.text=B.text.slice(at,at+Mt.sc),at+=Mt.sc),L.push(St)}}}for(var Lt=0;Lt<I.length;Lt++)T.push(I[Lt])},function(F,q,T){for(var I=[],L=q,B=I,Y=A(F,L),Z=0;Z<Y.length;Z++){var rt=o(S.amaot),Q=(rt.data=L.data,Y[Z]);if(Q.nil||Q.do.length===0)rt.data.ne=!0,B.push(rt);else{rt.path=Q.dm;for(var tt=o(Q.do),nt=0;0<tt.length;){var et=o(rt),at=((at=tt.shift()).sx?et.offset=0:(nt+=at.tg,et.offset=nt,at=tt.shift()),et.length=at.tg,nt+=at.tg,G(at.sx));et.mark=at[0],B.push(et)}}}for(var ct=0;ct<I.length;ct++)T.push(I[ct])},function(F,q,T){for(var I=[],L=q,B=I,Y=A(F,L),Z=0;Z<Y.length;Z++){var rt=o(S.rmaot),Q=(rt.data=L.data,Y[Z]);if(Q.nil||Q.do.length===0)rt.data.ne=!0,B.push(rt);else{rt.path=Q.dm;for(var tt=o(Q.do),nt=0;0<tt.length;){var et=o(rt),at=((at=tt.shift()).sx?et.offset=0:(nt+=at.tg,et.offset=nt,at=tt.shift()),et.length=at.tg,nt+=at.tg,function(gt){var wt,St=[];for(wt in gt){var Mt;gt[wt]||((Mt=o(E)).type=wt,St.push(Mt))}return St}(at.sx));et.mark=at[0],B.push(et)}}}for(var ct=0;ct<I.length;ct++)T.push(I[ct])},function(F,q,T){q=J(F,q),T.push(q)},function(F,q,T){var I=[];H(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I=[];V(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I=[];P(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I=[];$(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I,L=q;I=R(F,L),L.path=I.dm,(I==null||I.nil||I.do.length===0)&&(L.data.ne=!0),T.push(q)}];function O(F){return F[0].data.tn===4&&F[0].type===k[5]&&F[1].type===k[9]&&F[2].type===k[6]&&F[3].type===k[6]?"pasteindomain":"basic"}function R(F,q){return(F=A(F,q)).length===1?F[0]:F.length===0||1<F.length?null:void 0}function A(F,q){for(var T=[],I=q.data.n,L=0;L<F.length;L++){var B=F[L];if(B.aon==I)T.push(B);else if(B.aon>I)break}return T}function z(F){var q={},T=(q.dm=F.path,q.do=[],{});return F.properties.type?(T.dmpo=!0,T.pos=F.path[F.path.length-1],T.len=1,T.type="ins",T.target=F.target,T.ao="sn",T.p=F.position,q.do.push(T)):(0<F.position&&(T.tg=F.position,q.do.push(T)),q.do.push(T={tg:1,sx:{sa2pn:!0}})),q.tn=F.data.tn,q.aon=F.data.n,q}function H(F,q,T){var I=q;if(0<(L=A(F,q)).length){var L,B,Y=[];Y.push(L[0]);for(var Z=1;Z<L.length;Z++)(B=L[Z]).nil||Y.push(B);if(F=0,(B=(L=Y)[0]).nil||B.do.length===0){if(L.length===1)return;F++}else if(u(B)||h(B)){if(h(B)?(q=o(S.snaotndmpo),B.do[0].sx?q.position=0:q.position=B.do[0].tg):((q=o(S.snaotdmpo)).properties=I.properties,q.target=B.do[0].target,q.position=B.do[0].p),q.path=o(B.dm),q.data=I.data,T.push(q),L.length===1)return;F++}L.length>F&&(B=L[F]).do[0].dmpo&&B.do[0].type==="upd"&&B.do[0].ao==="setn"&&((I=o(S.senaot)).data.tn=L[0].tn,I.data.n=L[0].aon,J([L[F]],I),T.push(I),F++),L.length>F&&(B=L[F]).do[0].dmpo&&B.do[0].ao==="mvn"&&((q=o(S.mvnaot)).data.tn=L[0].tn,q.data.n=L[0].aon,I=[],P(L.slice(F),q,I),T.push(I[0]))}}function $(F,q,T){var I=q,L=A(F,q);if(L.length===0)return q.data.ne=!0,T.push(q);for(var B,Y,Z,rt=[],Q=0;Q<L.length-1;Q++)(B=L[Q]).nil||rt.push(B);rt.push(L[L.length-1]),1<(L=rt).length&&(L[0].do[0].dmpo&&L[0].do[0].ao=="mn"?(F=o(S.mnaotdmpo),Z=o(S.mnaotndmpo),F.data.tn=L[0].tn,F.data.n=L[0].aon,Z.data.tn=L[0].tn,Z.data.n=L[0].aon,V([L[0]],F,Y=[]),T.push(Y[0]),V([L[1]],Z,Y=[])):(F=o(S.snaotndmpo),Z=o(S.snaotdmpo),F.data.n=L[0].aon,F.data.tn=L[0].tn,Z.data.n=L[1].aon,Z.data.tn=L[1].tn,H([L[0]],F,Y=[]),T.push(Y[0]),H([L[1]],Z,Y=[])),T.push(Y[0])),(B=L[L.length-1]).nil||!!B.do.length===0?q.data.ne=!0:((q=o(S.rnaot)).path=B.dm,q.data=I.data),T.push(q)}function M(F){var q,T,I={};return F.properties.type?!!x[F.properties.type]&&(I.dm=F.path,I.do=[],(q={dmpo:!0}).pos=F.path[F.path.length-1],q.len=1,q.type="upd",q.ao="setn",(T={}).type=F.properties.type,q.sx=T,I.do.push(q),I.tn=F.data.tn,I.aon=F.data.n,I):!!F.properties.data&&(I.dm=F.path,I.do=[],(q={dmpo:!0}).pos=F.path[F.path.length-1],q.len=1,q.type="upd",q.ao="setn",I.do.push(q),I.tn=F.data.tn,I.aon=F.data.n,I)}function J(F,q){if((F=R(F,q))==null||F.nil||F.do.length===0)return q.data.ne=!0,q;var T=q;return(q=o(S.senaot)).data=T.data,T.properties&&T.properties.data?(q.path=F.dm,q.properties=T.properties):(q.path=F.dm,q.properties=F.do[0].sx),q}function K(F){var q=[],T={},I=(T.dm=F.path,T.do=[],{});return m(F.path,F.newPath)?(I.dmpo=!0,I.pos=F.path[F.path.length-1],I.len=1,I.ao="mvn",I.type="pt"):(I.dmpo=!0,I.pos=F.path[F.path.length-1],I.len=1,I.type="del",I.ao="mvn",p(F.newPath,F.path)&&(I.pxs="s"),T.tn=F.data.tn,T.aon=F.data.n,T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,q.push(T),(T={}).dm=F.newPath,T.do=[],(I={}).dmpo=!0,I.pos=F.newPath[F.newPath.length-1],I.len=1,I.ao="mvn",p(F.newPath,F.path)?I.type="pt":(I.type="ins",I.pxs="x")),T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,q.push(T),q}function P(F,q,T){var I=q;return(F=A(F,q)).length===0?(q.data.ne=!0,T.push(q)):((q=o(S.mvnaot)).data=I.data,I=1,F.length===1?(F[0].nil||F[0].do.length===0?q.data.ne=!0:(q.path=F[0].dm,q.newPath=F[0].dm),T.push(q)):F.length===2?(F[0].nil||F[0].do.length===0||F[1].nil||F[1].do.length===0?q.data.ne=!0:(q.path=F[0].dm,q.newPath=F[1].dm),T.push(q)):(I=F[0].do[0].type==="pt"?(q.path=o(F[0].dm),q.newPath=o(F[0].dm),T.push(q),1):(q.path=o(F[0].dm),q.newPath=o(F[1].dm),T.push(q),2),void(0<(((q=o(S.senaot)).data.tn=F[0].tn,q.data.n=F[0].aon,q=J([F[I]],q),T.push(q),F[I+=1].do[0].ao==="rn"&&((q=o(S.rnaot)).data.tn=F[0].tn,q.data.n=F[0].aon,$([F[I]],q,q=[]),T.push(q[0]),I+=1),q=o(S.mvnaot)).data.tn=F[0].tn,q.data.n=F[0].aon,F=F.slice(I)).length&&(P(F,q,I=[]),T.push(I[0])))))}function U(F){var q={},T=(q.dm=o(F.path),q.do=[],{});return F.properties.type?(T.dmpo=!0,T.pos=F.path[F.path.length-1],T.len=1,T.type="del",T.target=0,T.p=F.position,T.ao="mn"):(q.dm[F.path.length-1]=q.dm[F.path.length-1]-1,T={},0<F.position&&(T.tg=F.position,q.do.push(T),T={}),T.tg=1,(T.sx={}).ma2pn=!0),q.do.push(T),q.tn=F.data.tn,q.aon=F.data.n,q}function V(F,q,T){var I=q;if((F=A(F,q)).length===0)return q.data.ne=!0,T.push(q);F.length===3&&(L=o(S.mvnaot),F[0].nil||F[1].nil||F[0].do[0].length===0||F[1].do[0].length===0?(L.data.ne=!0,T.push(L)):(L.data.tn=F[0].tn,L.data.n=F[0].aon,P([F[0],F[1]],L,L=[]),T.push(L[0])));var L=F[F.length-1];if(L.nil||L.do.length===0)return q.data.ne=!0,T.push(q);(a(L)||c(L))&&(c(L)?((q=o(S.mnaotndmpo)).path=o(L.dm),q.path[q.path.length-1]=q.path[q.path.length-1]+1,L.do[0].sx?q.position=0:q.position=L.do[0].tg):((q=o(S.mnaotdmpo)).path=o(L.dm),q.properties=I.properties,q.position=L.do[0].p+1),q.data=I.data,T.push(q))}function G(F){var q,T,I=[];for(q in F)F[q]&&((T=o(E)).type=q,I.push(T));return I}this.in=function(F){var q=null;(q=F.ivs?n.dec(F.ivs,n.lcmm()):q).mp&&(w=q.mp),q.ppt&&(x=q.ppt),q.mat&&(E=q.mat),q.aot&&(S=q.aot),i=Object.keys(w),v={};for(var T=0;T<i.length;T++){var I=i[T],L=w[I];v[L]=I}k=Object.keys(v);for(var B=0;B<i.length;B++){var Y=i[B];b[Y]=D[B]}for(var Z=0;Z<i.length;Z++){var rt=i[Z];_[rt]=N[Z]}l=q.p2a,a=e[l[0]],c=e[l[1]],u=e[l[2]],h=e[l[3]],p=e[l[4]],m=e[l[5]],e.at(S),e.sn(z),e.mn(U),e.mvn(K),e.sen(M),q.dmpop&&q.dmpot&&q.dmpoaot&&(q.dmpop,q.dmpot,q.dmpoaot)},this.a2p=function(F){F.ao;var q=null;switch(O(F.ao)){case"basic":q=function(T){T.ao;for(var I,L=T.ao,B=[],Y=[],Z=null,rt=0;rt<L.length;rt++){Z=L[rt];var Q=v[Z.type];if(Z.key=Q,delete Z.type,(Q=b[Z.key])===void 0||!Q(Z,Y))return!1;Z.data.ne||(Y[Y.length-1].tn=Z.data.tn,Y[Y.length-1].aon=Z.data.n),w[Z.key]!==k[9]?((Q={}).key=Z.key,w[Z.key]==k[5]||w[Z.key]==k[6]&&Z.properties.type||w[Z.key]==k[4]&&Z.properties.data?Q.properties=Z.properties:w[Z.key]==k[1]&&(Q.text=Z.text,Q.marks=Z.marks),Q.data=Z.data,B.push(Q)):B.push(Z)}if(B.length===3&&B[0].data.tn===3)w[B[0].key]==k[5]&&w[B[1].key]==k[9]&&w[B[2].key]==k[9]?(Y[1].do[0].ien=!0,Y[2].do[0].ien=!0,Y[1].do[0].pem=L[0].position,Y[2].do[0].pem=L[0].position,I=Y[0].do.length,Y[0].do[I-1].ien=!0):w[B[0].key]==k[8]&&w[B[1].key]==k[1]&&w[B[2].key]==k[6]&&(Y[0].do[0].den=!0,Y[0].do[0].pem=L[2].position,m(Y[0].dm,L[1].path)?(Y[0].do[0].dlen=0,Y[0].do[0].extra=L[1].text.length):(Y[0].do[0].dlen=L[1].text.length,Y[0].do[0].extra=0),Y[0].do[0].two=!0,Y[1].den=!0,Y[2].den=!0);else if(1<B.length&&1<B[0].data.tn&&w[B[0].key]==k[8]&&w[B[B.length-1].key]==k[6]&&(B.length===2||!w[B[B.length-2].key]==k[6])){var tt=0;for(rt=0;rt<B.length;rt++){if(w[B[rt].key]!=k[8]){tt=rt-1;break}Y[rt].do[0].den=!0,Y[rt].do[0].two=!1}for(var nt=0,et=0,at=tt+1;at<B.length-1;at++)m(Y[tt].dm,L[at].path)?et+=L[at].text.length:nt+=L[at].text.length;Y[tt].do[0].pem=L[L.length-1].position,Y[tt].do[0].dlen=nt,Y[tt].do[0].extra=et,Y[tt].do[0].two=!0,Y[Y.length-1].den=!0,2<B.length&&(Y[Y.length-2].den=!0,Y[Y.length-3].den=!0)}return T.ao=B,T.op=Y,T.op,T.ao,!0}(F);break;case"pasteindomain":q=function(T){var I=T.ao,L=[],B={},Y=(B.dm=I[0].path,B.do=[],{});0<I[0].position&&(Y.tg=I[0].position,B.do.push(Y));for(var Z=I[1].node.leaves,rt=0;rt<Z.length;rt++){if((Y={}).cr=Z[rt].text,0<Z[rt].marks.length){for(var Q={},tt=0;tt<Z[rt].marks.length;tt++)Q[Z[rt].marks[tt].type]=!0;Y.sx=Q}B.do.push(Y)}return L.push(B),T.op=L,!0}(F);break;default:F.ao,q=!1}return q},this.p2a=function(F){F.op;var q=null;switch(O(F.ao)){case"basic":q=function(T){T.ao;var I,L=T.op,B=T.ao,Y=[];B.length==2&&B[0].key&&B[1].key&&w[B[0].key]==k[5]&&w[B[1].key]==k[5]?(I=L[0].dm.length,L[1].do[0].p=L[0].dm[I-1]+1):B.length==2&&B[0].key&&B[1].key&&w[B[0].key]==k[6]&&w[B[1].key]==k[6]&&(I=L[1].dm.length,L[0].do[0].p=L[1].dm[I-1]);for(var Z=0;Z<B.length;Z++){var rt=B[Z];if(!rt.data.ne){var Q=rt.type?v[rt.type]:rt.key;if((Q=_[Q])===void 0)return!1;Q(L,rt,Y)}}return T.ao=Y,T.op,T.ao,!0}(F);break;case"pasteindomain":q=function(){var T=F.op,I=F.ao;if(T[0].nil)for(var L=0;L<I.length;L++)I[L].data.ne=!0;else{I[0].path=T[0].dm;for(var B=1;B<I.length;B++){for(var Y=0;Y<T[0].dm.length;Y++)I[B].path[Y]=T[0].dm[Y];I[B].path[I[0].path.length-1]=1}var Z=0,rt=0,Q=(T[0].do[0].tg&&(rt=T[0].do[0].tg,Z=1),I[3].position-I[0].position);I[0].position=rt,I[2].position=rt,I[3].position=rt+Q,T[0].do[0].sx?I[1].position=0:I[1].position=T[0].do[0].tg;var tt=I[1].node.leaves;for(L=0;L<tt.length;L++){var nt=T[0].do[L+Z];if(tt[L].text=nt.cr,nt.sx){gt=void 0,wt=void 0,et=void 0,at=void 0;var et,at,ct=nt.sx,gt=tt[L],wt=[];for(et in ct)ct[et]&&((at=o(E)).type=et,wt.push(at));gt.marks=wt}}}}();break;default:F.ao,q=!1}return q},this.k2t=function(F,q){return w[F]==k[q]},this.k2k=function(F,q){return w[F]==w[q]},this.lt=function(F){return w[F]}}},{"../../../codox-shared/src/com/log":218}],546:[function(t,f,r){var n,e=(n=t("../logger.js")).logger,s=n.SENTRY_LEVEL_H,i=n.I_STOP_MSG_1,l=n.I_STOP_MSG_2,o=n.I_STOP_MSG_3,a=n.SENTRY_RTT_REPORT_LIMIT,c=n.SENTRY_REPORT_LIMIT,u=t("../errors").VersionError,h=((n=t("../../../codox-shared/src/com/util")).clone,n.logClone),p=t("./off.js").gof,m=(n=t("../../../codox-shared/src/com/constants")).STOPPED,b=n.SMINIT,_=n.SMSUB,v=n.SMMSG,w=t("../env").isProd,x=Date;f.exports=function(S,E){var k=S.app,D=S.breadCrumb,N=S.START_TIME,O=S.TZ,R=S.gs,A=S.subm,z=k.codoxLogger,H=k.sockOpenTimer,$=null,M=e.reportError.bind(e),J=c,K=a;function P(q){var T,I=S.ghb();0<J&&(T=(x.now()-N)/1e3,D("[codoxi]- abmsg: #"+q+"; t = "+T+"; hbc = "+I,s),J--)}this.rttReportLimit=a,E.onopen=function(){var q=(x.now()-N)/1e3;D("[codoxi]* csm: t = "+q+"; seid = "+k.sid,s),S.setSMC(!0),clearTimeout(H)},E.onerror=function(q){R()!==m?p(S,"socket error",1006):P(l)},E.onclose=function(q){var T=R(),I=S.ghb();T===m?P(o):1005<q.code&&q.code!==4e3&&q.code!==4111?(q.code,q.reason,p(S,"soc: code="+q.code+";reason="+q.reason,q.code)):(q.code!==4e3&&(T=(x.now()-N)/1e3,D("[codoxe]- sc: t = "+T+"; hbc = "+I+"; sid = "+$,s)),O(1,q.code))},E.onmessage=function(q){var T=R(),I=S.ghb();if(T!==m){if(T=(x.now()-N)/1e3,q==null)return w||console.error("[codoxi]- ome1: t = "+T+"; hbc = "+I+"; sid = "+$),void D("[codoxi]- ome1: t = "+T+"; hbc = "+I+"; sid = "+$,s);if(q&&q.data){var L=q.data;try{var B,Y,Z,rt=L=typeof L=="string"?JSON.parse(L):L,Q=S.ghb(),tt=(h(rt),(x.now()-N)/1e3);if(B=rt,Y=S.ghb(),Z=(x.now()-N)/1e3,B.a?B.a===F||(B.cmd&&B.cmd.t&&B.cmd.t=="HBP"||(w||console.error("[codoxi]- nemsg: t = "+Z+"; hbc = "+Y+"; sid = "+$+"; unexpected msg = ",B),D("[codoxi]- nemsg: t = "+Z+"; hbc = "+Y+"; sid = "+$,s)),0):(w||console.error("[codoxi]- ivmsg: t = "+Z+"; hbc = "+Y+"; sid = "+$+"; missing msg.a, invalidmsg = ",B),D("[codoxi]- ivmsg: t = "+Z+"; hbc = "+Y+"; sid = "+$,s),0))switch(rt.a){case b:var nt=R();if(typeof rt.caid!="string")throw new Error("Invalid client id");z.SMSubSt=z.SMConEd=x.now(),$=rt.caid,S.setSID($),S.sid=$;var et=rt,at=et.ccva,ct=at.join(" "),gt=S.cver,wt=et.smv;if(S.setSMV(et.smv),!at||!wt)throw new u("cve2",gt,wt,ct);for(var St=!1,Mt=0;Mt<at.length;Mt++)if(Math.trunc(gt)==at[Mt]){St=!0;break}if(!St)throw new u("cve1",gt,wt,ct);"codox_handleMessage: Client and SM are compatible: codoxClientV = ".concat(gt," is a member of ccva = ").concat(at,"; codoxSMVersion = ").concat(wt),(et=S.minfo).sid=$,et.userinfo.jointime=new Date,ct=(x.now()-N)/1e3,D("[codoxi]* ssub, t = "+ct+"; seid = "+k.sid,s),G=x.now(),A(),clearTimeout(V),V=setTimeout(function(){var Lt=(x.now()-N)/1e3;D("[codoxe]-- subf(t), r=13; t = "+Lt+"; sid = "+$,s),nt!==m?O(13):D("[codoxe]-- subf(ts), t = "+tt+"; sid = "+$,s)},U),F=_;break;case _:wt=S.subr,z.SMSubEd=x.now(),et=x.now()-G,S.srtt(et),et<0&&(w||console.error("[codoxi]-- rtt-sub: t = "+tt+"; hbC = "+Q+"; rtt= "+et+"; priT="+z.SMSubSt+"; curT="+z.SMSubEd+"; sid="+$),0<K&&(D("[codoxi]-- rtt-sub: t = "+tt+"; hbC = "+Q+"; rtt= "+et+"; priT="+z.SMSubSt+"; curT="+z.SMSubEd+"; sid="+$),M(new Error("reason RTT")),K--)),clearTimeout(V),wt(rt),F=v;break;case v:S.ROH(rt);break;default:w||console.error("[codoxi]- udmsg: t = "+tt+"; hbc = "+Q+"; sid = "+$+"; Unhandled SM message:",rt),D("[codoxi]- udmsg: t = "+tt+"; hbc = "+Q+"; sid = "+$,s)}}catch(Lt){if(w||console.error("codox_handleMessage: err = ",Lt),D("[codoxi]- hme: t = "+T+"; hbc = "+I+"; sid = "+$,s),Lt instanceof u)return void O(800,Lt);if(0<=Lt.message.search(/^ESTOP/))return L={roherr:Lt.message},console.error("codox_handleMessage: ESTOP err = ",L),void O(900,L)}}else w||console.error("[codoxi]- ome2: t = "+T+"; hbc = "+I+"; sid = "+$+"; errormsg = ",q),D("[codoxi]- ome2: t = "+T+"; hbc = "+I+"; sid = "+$,s)}else P(i)};var U=1e4,V=null,G=null,F=b;this.semsg=function(q){F=q},this.clean=function(){clearTimeout(V)}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/util":219,"../env":527,"../errors":528,"../logger.js":530,"./off.js":540}],547:[function(t,f,r){f.exports=function(n,e){var s=n.lhto(),i=n.dtf,l=n.dtfp,o=n.co,a=null;function c(G,F,q){if(G.do.length===0||F.do.length===0)return F;var T,I,L,B=(F=o(F)).dm,Y=G.dm;if(G.do[0].dmpo&&G.do[0].type!=="pt"&&k(Y,B))switch(Y.length,Lt=G.do[0].type){case"ins":(function(Ct,Nt,ht){var dt,Ft,Jt,Xt,Qt=Nt.dm,ve=Ct.dm,kt=ve.length-1,ee=Ct.do[0].ao,pe=Nt.do[0].ao,Le=Nt.do[0].type;if(ve[kt]<Qt[kt])Ct.do[0].ao==="mvn"||(ve[kt]+1==Qt[kt]&&ee==="sn"&&Nt.do[0].dmpo&&Le==="del"&&pe==="rn"&&Nt.tn===3?Nt.nil=!0:u(Ct)?Qt[kt]=Qt[kt]+2:Qt[kt]=Qt[kt]+1);else if(ve[kt]===Qt[kt])if(Nt.do[0].dmpo)switch(ee){case"sn":switch(Le){case"ins":if(pe=="sn"){if(ve.length==Qt.length&&Ct.do[0].p!==Nt.do[0].p)return Ct.do[0].p>Nt.do[0].p||(Qt[kt]=Qt[kt]+1,Nt.do[0].p=Nt.do[0].p-Ct.do[0].p+1);var Be=Ct.do[0].target,qe=Nt.do[0].target;Ct.otg&&(Be=Ct.otg),(qe=Nt.otg?Nt.otg:qe)==Be?Nt.nil=!0:Be<qe&&(Nt.do[0].target=qe-Be,Qt[kt]=Qt[kt]+1,Nt.otg&&delete Nt.otg,Nt.do[0].p=Nt.do[0].p-Ct.do[0].p+1)}else pe!="mvn"&&pe=="in"&&(ve.length!==Qt.length&&Ct.do[0].p!==Qt[1+kt]?Ct.do[0].p>Qt[1+kt]||(Qt[kt]=Qt[kt]+1,Qt[1+kt]=Qt[1+kt]-Ct.do[0].p+1):(qe=Ct.do[0].target,Ct.otg&&(qe=Ct.otg),u(Nt)&&(Nt.do[0].pem>qe||Nt.do[0].pem===qe&&ht)&&(Qt[kt]=Qt[kt]+1,Qt[1+kt]=1,Nt.do[0].pem=Nt.do[0].pem-qe)));break;case"del":$(Nt)?Ct.do[0].target===Nt.do[0].target&&(Qt[kt]=Qt[kt]+1):pe=="mvn"?Nt.do[0].pxs:pe=="rn"&&1<Nt.tn?h(Nt)?ve.length!==Qt.length&&Ct.do[0].p!==Qt[1+kt]+1?Ct.do[0].p>Qt[1+kt]+1||(Qt[kt]=Qt[kt]+1,Qt[1+kt]=Qt[1+kt]-Ct.do[0].p+1):Nt.two&&(Be=Ct.do[0].target,Ct.otg&&(Be=Ct.otg),(Nt.do[0].pem>Be||Nt.do[0].pem===Be&&ht)&&(Qt[kt]=Qt[kt]+1,Qt[1+kt]=1,Nt.do[0].pem=Nt.do[0].pem-Be)):(qe=Nt,Be=Ct.do[0].target,(Ft=o(qe.dm))[qe.dm.length-1]=Ft[qe.dm.length-1]+1,(Jt=o(qe.dm))[Ft.length]=1,(Xt=o(J.mnaotdmpo)).path=Ft,Xt.data.tn=qe.tn,Xt.data.n=qe.aon,(Ft=P(Xt)).do[0].target=Be,Ft.pon=qe.pon+1,(Xt=o(J.mnaotndmpo)).path=Jt,Xt.position=Be,Xt.data.tn=qe.tn,Xt.data.n=qe.aon,(Jt=P(Xt)).pon=qe.pon+2,qe.Xp||(qe.Xp=[]),qe.Xp.push(Ft),qe.Xp.push(Jt)):Qt[kt]=Qt[kt]+1}break;case"mvn":Nt.do[0].type=="ins"&&Nt.do[0].ao=="mvn"?Nt.nil=!0:Qt[Qt.length]=0;break;case"in":if(u(Ct))return u(Nt)?(Ct.do[0].pem<Nt.do[0].pem||Ct.do[0].pem==Nt.do[0].pem&&ht)&&(Qt[kt]=Qt[kt]+2,Nt.do[0].pem=Nt.do[0].pem-Ct.do[0].pem):Qt[kt]=Qt[kt]+2;(Le!="ins"||N(Nt)||pe==="in"&&ht)&&(Qt[kt]=Qt[kt]+1)}else switch(ee){case"sn":if(ve.length!==Qt.length&&Ct.do[0].p!==Qt[Qt.length-1]+1)return Ct.do[0].p>Qt[Qt.length-1]+1||(Qt[kt]=Qt[kt]+1,Qt[Qt.length-1]=Qt[Qt.length-1]-Ct.do[0].p+1);var ze=Ct.do[0].target,Ie=0;if(Nt.do[0].tg&&!Nt.do[0].sx&&(Ie=Nt.do[0].tg),Ct.otg&&(ze=Ct.otg),Nt.otg&&(Ie=Nt.otg),x(Nt)&&Ct.isInDR&&S(Nt,Ct.isInDR)){var He=Nt,hn=Ct.isInDR,Tt=kt,ae=0,de=0;!He.do[0].tg||He.do[0].sx||e||(ae=1,de=He.do[0].tg);for(var we=null,Oe=de,Rt=ae;Rt<He.do.length;Rt++)if(He.do[Rt].tg?Oe+=He.do[Rt].tg:Oe+=He.do[Rt].sc,hn<=Oe){var Ut=null,se=null;if(He.do[Rt].sc){Ut=o(He.do[Rt]),se=o(He.do[Rt]);var bt=hn-(Oe-He.do[Rt].sc),ft=He.do[Rt].sc-bt;if(bt==0||ft==0)break;Ut.sc=bt,se.sc=ft}(we=o(He)).do=He.do.slice(0,Rt),Ut!==null&&we.do.push(Ut),He.do=He.do.slice(Rt+1),se!==null&&He.do.unshift(se),He.dm[Tt]=He.dm[Tt]+1;break}return we!==null&&(He.Xa||(He.Xa=[]),He.pon&&(we.pon=He.pon+1),we.pon=He.pon+1,He.Xa.push(we)),delete Ct.isInDR}if(Ie===ze)O(Nt)?ht&&(H(Nt.do,0),Qt[kt]=Qt[kt]+1,Qt[1+kt]=0):x(Nt)&&Ct.ft&&Nt.ft&&function($t,qt){for(var Wt=0;Wt<$t.length;Wt++)for(var oe=0;oe<qt.length;oe++)if($t[Wt]===qt[oe])return 1}(Nt.ft,Ct.ft)||(O(Nt)&&(Nt.otg=Ie),H(Nt.do,0),Qt[kt]=Qt[kt]+1,Qt[Qt.length-1]=Qt[Qt.length-1]-Ct.do[0].p+1);else if(ze<Ie)O(Nt)&&(Nt.otg=Ie),H(Nt.do,Ie-ze),Qt[kt]=Qt[kt]+1,Qt[Qt.length-1]=Qt[Qt.length-1]-Ct.do[0].p+1;else if(function($t,qt){if(!A($t)&&$t.do.length!==0){var Wt=0,oe=0,X=($t.do[0].tg&&!$t.do[0].sx&&(oe=$t.do[0].tg,Wt=1),oe);if($t.do[Wt].sx){for(var lt=Wt;lt<$t.do.length;lt++)X+=$t.do[lt].tg;if(oe<qt&&qt<X&&!e)return 1}}}(Nt,ze)){var xt=Nt,Bt=ze,ce=kt;de=0,ae=0,xt.do[0].tg&&!xt.do[0].sx&&(de=1,ae=xt.do[0].tg);for(var Ce=null,Te=ae,Ne=de;Ne<xt.do.length;Ne++)if(Bt<=(Te+=xt.do[Ne].tg)&&!e){var Ge=null,be=null;if(xt.do[Ne].sx){Ge=o(xt.do[Ne]),be=o(xt.do[Ne]);var pt=Bt-(Te-xt.do[Ne].tg),Dt=xt.do[Ne].tg-pt;if(pt==0||Dt==0)break;Ge.tg=pt,be.tg=Dt}(Ce=o(xt)).do=xt.do.slice(0,Ne),Ge!==null&&Ce.do.push(Ge),xt.do=xt.do.slice(Ne+1),be!==null&&xt.do.unshift(be),xt.dm[ce]=xt.dm[ce]+1;break}Ce!==null&&(xt.Xa||(xt.Xa=[]),xt.pon&&(Ce.pon=xt.pon+1),Ce.pon=xt.pon+1,xt.Xa.push(Ce))}break;case"mvn":Qt[Qt.length]=0;break;case"in":Qt[kt]=Qt[kt]+1}else u(Ct)&&ve[kt]===Qt[kt]+1&&(ee=Ct.do[0].pem,R(Nt)?Qt[kt]=Qt[kt]+2:(ee<(dt=z(Nt))||ee===dt&&(x(Nt)||ht))&&(Qt[kt]=Qt[kt]+2,O(Nt)&&(Nt.otg=dt),H(Nt.do,dt-ee)))})(G,F,q);break;case"del":var Z,rt,Q,tt,nt=G,et=F,at=nt.dm,ct=et.dm,gt=at.length-1,wt=nt.do[0].ao;if(et.do[0].ao,et.do[0].type,!nt.nil)if(at[gt]<ct[gt])nt.do[0].ao==="mvn"&&nt.do[0].type=="del"&&nt.do[0].pxs&&nt.do[0].pxs==="s"?at[gt]+1===ct[gt]&&et.do[0].dmpo&&et.do[0].type=="del"&&et.do[0].ao=="mn"&&ct.shift():at[gt]+1===ct[gt]&&nt.do[0].type=="del"&&nt.do[0].ao=="rn"&&et.do[0].dmpo&&et.do[0].type=="del"&&et.do[0].ao=="mn"?et.nil=!0:h(nt)&&nt.do[0].two?(R(et)||(Z=z(et),rt=nt.do[0].pem,at[gt]+1===ct[gt]&&H(et.do,Z+rt+nt.do[0].dlen-nt.do[0].extra)),ct[gt]=ct[gt]-2):ct[gt]=ct[gt]-1;else if(at[gt]===ct[gt])if(et.do[0].dmpo)switch(wt){case"mvn":et.do[0].type=="del"&&et.do[0].ao=="mvn"?et.nil=!0:nt.do[0].pxs&&nt.do[0].pxs==="s"?(et.do[0].type=="ins"&&et.do[0].ao,ct.pop(),et.dm=ct):et.do[0].type=="del"&&et.do[0].ao=="rn"?et.nil=!0:0<ct[gt]&&(ct[gt]=ct[gt]-1);break;case"mn":et.do[0].type==="upd"?0<ct[gt]&&(ct[gt]=ct[gt]-1):et.do[0].type==="del"&&et.do[0].ao==="mn"?et.nil=!0:et.do[0].type==="del"&&et.do[0].ao==="rn"?h(et)?0<ct[gt]&&(ct[gt]=ct[gt]-1):w(et,nt.do[0].target,!0):(et.do[0].type==="ins"&&et.do[0].ao,0<ct[gt]&&(ct[gt]=ct[gt]-1)),at.length===ct.length||!(N(et)&&ct[1+gt]===0||ct[1+gt]===1)||0<(Q=nt.do[0].target)&&(et.do[0].tg&&!et.do[0].sx?et.do[0].tg=et.do[0].tg+Q:et.do.unshift({tg:Q})),at.length!==ct.length&&(ct[1+gt]=ct[1+gt]+nt.do[0].p-1);break;case"rn":et.do[0].type==="del"?et.do[0].ao==="rn"||et.do[0].ao==="mn"?et.nil=!0:et.do[0].ao:(et.do[0].type!=="ins"||et.do[0].ao==="sn"||et.do[0].ao==="mvn")&&(et.nil=!0)}else switch(wt){case"mvn":nt.do[0].pxs&&nt.do[0].pxs==="s"?(ct.pop(),et.dm=ct):0<ct[gt]&&(ct[gt]=ct[gt]-1);break;case"mn":0<ct[gt]&&(ct[gt]=ct[gt]-1),at.length!==ct.length&&(O(et)&&ct[1+gt]===0||ct[1+gt]===1)&&0<(tt=nt.do[0].target)&&(et.do[0].tg&&!et.do[0].sx?et.do[0].tg=et.do[0].tg+tt:et.do.unshift({tg:tt})),ct[1+gt]=ct[1+gt]+nt.do[0].p-1;break;case"rn":M(et)?et.nil=!0:O(et)?et.n2b=!0:(x(et),et.nil=!0)}else at[gt]===ct[gt]+1&&nt.do[0].type=="del"&&nt.do[0].ao=="mn"&&et.do[0].dmpo&&et.do[0].type=="del"&&et.do[0].ao=="rn"&&!h(et)&&w(et,nt.do[0].target,!1);break;case"upd":Z=F,rt=q,T=(wt=G).dm,I=Z.dm,T[L=T.length-1]===I[L]&&T.length===I.length&&Z.do[0].dmpo&&Z.do[0].type==="upd"&&rt&&(Z.do[0].sx&&wt.do[0].sx?Z.do[0].sx.type=wt.do[0].sx.type:Z.nil=!0)}else if(G.do[0].dmpo&&G.do[0].type==="ins"&&G.do[0].pxs==="x"&&F.do[0].dmpo&&F.do[0].type==="ins"&&F.do[0].ao==="sn"&&D(B,Y)){B[B.length]=0;var St=F,Mt=((Lt=o(St.dm))[Lt.length-1]=1,o(Lt)),Lt=((1<(jt=o(Mt)).length&&jt.shift(),At=o(J.senaot)).path=Lt,At.data.tn=St.tn,At.data.n=St.aon,V(At)),Pt=((At=o(J.mvnaot)).path=Mt,At.newPath=jt,At.data.tn=St.tn,At.data.n=St.aon,U(At));St.Xa||(St.Xa=[]),Lt.pon=St.pon+1,St.Xa.push(Lt);for(var yt=0;yt<Pt.length;yt++)Pt[yt].pon=St.pon+2+yt,St.Xa.push(Pt[yt])}else if(G.do[0].dmpo&&G.do[0].type==="ins"&&G.do[0].pxs==="x"&&F.do[0].dmpo&&F.do[0].type==="del"&&F.do[0].ao==="mn"&&k(B,Y)){var jt,At,It=F,Ot=(Mt=o(It.dm),((jt=o(Mt)).unshift(0),At=o(J.mvnaot)).path=Mt,At.newPath=jt,At.data.tn=It.tn,At.data.n=It.aon,U(At));It.Xp||(It.Xp=[]);for(var Et=0;Et<Ot.length;Et++)Ot[Et].pon=It.pon+1+Et,It.Xp.push(Ot[Et]);B.unshift(0)}else(u(G)&&F.do[0].dmpo&&!u(F)&&Y.length===B.length||u(G)&&A(F)&&Y.length===B.length)&&(B[B.length-1]=B[B.length-1]+2);return F}function u(G){return G&&G.do&&G.do[0].dmpo&&G.do[0].ao==="in"&&G.do[0].ien}function h(G){return G&&G.do&&G.do[0].dmpo&&G.do[0].ao==="rn"&&G.do[0].den}function p(G,F){$(G)&&M(F)&&!e&&((F=z(F))!==G.do[0].target&&G.do[0].target,G.do[0].target=F)}function m(G,F){$(G)&&M(F)&&G.nil&&!e&&(F.nil=!0)}function b(G,F){O(G)&&N(F)&&F.nil&&!e&&(G.nil=!0,G.n2b)}function _(G,F,q,T){var I;G.nil?T&&N(F)&&!e&&(F.nil=!0):O(G)&&N(F)&&(G.otg&&(F.otg=G.otg,delete G.otg),T=z(G),F.do[0].target-T!=0&&F.do[0].target,x(q)&&T<F.do[0].target&&!e&&(I=Math.random(),F.ft||(F.ft=[]),F.ft.push(I),q.ft||(q.ft=[]),q.ft.push(I)),G.isInDR&&(F.isInDR=G.isInDR,delete G.isInDR),F.do[0].target=T)}function v(G){for(var F=[],q=0;q<G.length;q++)if(G[q].Xa){F.push(G[q]);for(var T=0;T<G[q].Xa.length;T++)F.push(G[q].Xa[T]);delete G[q].Xa}else if(G[q].Xp){for(var I=0;I<G[q].Xp.length;I++)F.push(G[q].Xp[I]);F.push(G[q]),delete G[q].Xp}else F.push(G[q]);return F}function w(G,F,q){var T,I=o(G.dm);((q&&(I[G.dm.length-1]=I[G.dm.length-1]-1),q=o(I))[I.length]=0,T=o(J.snaotndmpo)).path=q,T.position=F,T.data.tn=G.tn,T.data.n=G.aon,(((q=K(T)).pon=G.pon+1,T=o(J.snaotdmpo)).path=I,T.target=F,T.data.tn=G.tn,T.data.n=G.aon,I=K(T)).pon=G.pon+2,G.Xp||(G.Xp=[]),G.Xp.push(q),G.Xp.push(I)}function x(G){var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),0<G.do.length&&G.do[F].sc}function S(G,F){if(A(G)||G.do.length===0)return!1;var q=0,T=0;if(0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&!e&&(q=1,T=G.do[0].tg),G.do[q].sc){for(var I=T,L=q;L<G.do.length;L++)G.do[L].tg?I+=G.do[L].tg:I+=G.do[L].sc;if(T<F&&F<I)return!0}return!1}function E(G,F){if(G===null||F===null||G&&G.length===0||F&&F.length===0||G.length!==F.length)return!1;for(var q=0;q<G.length;q++)if(G[q]!==F[q])return!1;return!0}function k(G,F){if(G!==null&&F!==null&&!(G&&G.length===0||F&&F.length===0||G.length>F.length)){for(var q=0;q<G.length-1;q++)if(G[q]!==F[q])return;return 1}}function D(G,F){if(G===null||F===null||G&&G.length===0||G&&F.length===0||G.length>=F.length)return!1;for(var q=0;q<G.length;q++)if(G[q]!==F[q])return!1;return!0}function N(G){return!(!(0<G.do.length&&G.do[0].dmpo&&G.do[0].type==="ins"&&G.do[0].ao==="sn")||e)}function O(G){var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),!(!(0<G.do.length&&G.do[F].sx&&G.do[F].sx.sa2pn)||e)}function R(G){return 0<G.do.length&&G.do[0].dmpo&&!e}function A(G){if(G.do.length===0)return!1;var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),!(!(0<G.do.length&&G.do[F].sx&&(G.do[F].sx.sa2pn||G.do[F].sx.ma2pn))||e)}function z(G){return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx?G.do[0].tg:0}function H(G,F){G[0].tg&&!G[0].sx?0<F?G[0].tg=F:G.shift():0<F&&G.unshift({tg:F})}function $(G){return!(!(0<G.do.length&&G.do[0].dmpo&&G.do[0].type==="del"&&G.do[0].ao==="mn")||e)}function M(G){var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),!(!(0<G.do.length&&G.do[F].sx&&G.do[F].sx.ma2pn)||e)}var J=null,K=null,P=null,U=null,V=null;this.in=function(G){G.ivs&&(G=n.dec(G.ivs,n.lcmm()),a=G.c2p),i=n[a[0]],l=n[a[1]],o=n[a[2]]},this.xf=function(G,F,q){G.op,F.op;for(var T,I,L=null,B=(I=q?!(L=!1):!(L=F.context.to===s||F.context.to>G.context.to),0);B<G.op.length;B++)if(G.op[B].nil||G.op[B].n2b||e)G.op[B];else{G.op[B];for(var Y=0;Y<F.op.length;Y++)if(F.op[Y].nil||F.op[Y].n2b||e)F.op[Y];else{F.op[Y];var Z=G.op[B],rt=F.op[Y],Q=A(G.op[B]),tt=A(F.op[Y]),nt=(nt=G.op[B],T=F.op[Y],nt===null||T===null||nt&&nt.do&&nt.do.length===0||T&&T.do&&T.do.length===0?"wgqui":nt.do[0].dmpo||T.do[0].dmpo?"xgqui":E(nt.dm,T.dm)?"tqui":"wgqui");switch(nt){case"tqui":var et,at=[],ct=[];Q&&tt?ct=u(G.op[B+1])||u(F.op[Y+1])?(at=o(G.op[B].do),o(F.op[Y].do)):(at=i(F.op[Y].do,G.op[B].do,!0),i(G.op[B].do,F.op[Y].do,!0)):Q&&!tt?(et=z(G.op[B]),S(F.op[Y],et)&&(G.op[B].isInDR=et),et=i(F.op[Y].do,et,!1),F.op[Y].do,at=o(G.op[B].do),ct=o(F.op[Y].do),H(at,et)):!Q&&tt?(et=z(F.op[Y]),S(G.op[B],et)&&(F.op[Y].isInDR=et),G.op[B].do,et=i(G.op[B].do,et,!1),ct=o(F.op[Y].do),at=o(G.op[B].do),H(ct,et)):(at=i(F.op[Y].do,G.op[B].do,L),ct=i(G.op[B].do,F.op[Y].do,I)),Z.do=at,rt.do=ct;break;case"xgqui":Z=c(F.op[Y],G.op[B],L),rt=c(G.op[B],F.op[Y],I)}if(G.op[B]=Z,F.op[Y]=rt,G.op[B].do.length===0&&(G.op[B].nil=!0),B<G.op.length-1&&_(G.op[B],G.op[B+1],F.op[Y],Q),0<B&&b(G.op[B-1],G.op[B]),F.op[Y].do.length===0&&(F.op[Y].nil=!0),Y<F.op.length-1&&_(F.op[Y],F.op[Y+1],G.op[B],tt),0<Y&&b(F.op[Y-1],F.op[Y]),B<G.op.length-1&&m(G.op[B],G.op[B+1]),0<B&&p(G.op[B-1],G.op[B]),Y<F.op.length-1&&m(F.op[Y],F.op[Y+1]),0<Y&&p(F.op[Y-1],F.op[Y]),G.op[B].nil||G.op[B].n2b||e){G.op[B];break}}}G.op,F.op,q=v(G.op);var gt=v(F.op);G.op=q,F.op=gt,G.op,F.op},this.ppt=function(G,F,q){for(var T,I=0;I<G.length;I++)if(G[I].do.length!==0&&!G[I].nil&&!e){T=F;var L=(L=G[I])===null||L.do.length===0?"wglou":L.do[0].dmpo&&!L.do[0].upd&&k(L.dm,T.path)?"xglou":E(L.dm,T.path)?"tlou":"wglou";switch(L){case"tlou":F.pos=l(G[I].do,F.pos,!q);break;case"xglou":Q=Y=void 0;var B=G[I],Y=F,Z=q,rt=B.dm,Q=Y.path,tt=rt.length-1,nt=B.do[0].pos;switch(B.do[0].type){case"ins":nt<Q[tt]&&!e?B.do[0].ao==="mvn"||(Q[tt]=Q[tt]+B.do[0].len):nt===Q[tt]&&(B.do[0].ao==="sn"?(Y.pos>B.do[0].target||Y.pos==B.do[0].target&&Z)&&(Y.pos,B.do[0].target,Q[tt]=Q[tt]+1,Y.pos=Y.pos-B.do[0].target):B.do[0].ao==="mvn"?Q[Q.length]=0:B.do[0].ao==="in"?Q[tt]=Q[tt]+1:B.do[0].ao);break;case"del":nt<Q[tt]&&!e?B.do[0].ao==="mvn"&&B.do[0].pxs&&B.do[0].pxs==="s"||(Q[tt]=Q[tt]-B.do[0].len):nt===Q[tt]&&(B.do[0].ao==="mvn"?B.do[0].pxs&&B.do[0].pxs==="s"?(Q=Q.slice(0,Q.length-1),Y.path=Q):0<Q[tt]&&(Q[tt]=Q[tt]-B.do[0].len):B.do[0].ao==="mn"?0<Q[tt]&&(Q[tt]=Q[tt]-1,Y.pos=Y.pos+B.do[0].target):B.do[0].ao==="rn"?0<Q[tt]&&(Q[tt]=Q[tt]-1,Y.pos=0):B.do[0].ao);break;default:B.do[0].type}}}},this.ep=E,this.issp=D,this.ndmn=M,this.dmn=$,this.ndsn=O,this.dsn=N,this.at=function(G){J=G},this.sn=function(G){K=G},this.mn=function(G){P=G},this.mvn=function(G){U=G},this.sen=function(G){V=G}}},{}],548:[function(t,f,r){var n=t("../../../codox-shared/src/com/log").ins,e=t("../../../codox-shared/src/com/util").logClone,s=t("pako"),i=0;f.exports={hso:function(l,o){l.to,i=l.to,(a=l).so.length,(c=s.inflate(a.so,{to:"string"})).length,a.so=c,n(l.so);var a=l.so,c=o,u=(l=c.gqj(),o=c.gcm(),c.cdm),h=c.rsce;n(a),a=JSON.parse(a),l?(l=c.dtf.c2d,a.ops=l(a.ops)):o&&(a=a.cr),u.h2(a),h("smsync")},sof:function(l){return!!(l.context&&l.context.rto!==null&&l.context.rto<i)&&(l.context.rto,l.context.sid,l.cmd?(l.cmd.t==5&&(l.context.CAID=!1),!1):(l.context.rto,l.context.sid,e(l),!0))}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,pako:705}],549:[function(t,f,r){f.exports={smVer:1,clientVer:"5.0"}},{}],550:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/classCallCheck"))),s=(n=n(t("@babel/runtime/helpers/createClass")),t("uuid"));function i(){(0,e.default)(this,i),this.id=(0,s.v4)()}(0,n.default)(i,[{key:"next",get:function(){return this.id=(0,s.v4)(),"codox-block-"+this.id}}]),t=new i,r.default=t},{"@babel/runtime/helpers/classCallCheck":557,"@babel/runtime/helpers/createClass":559,"@babel/runtime/helpers/interopRequireDefault":563,uuid:727}],551:[function(t,f,r){(function(n){(function(){var e=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/defineProperty"));function s(u,h){var p,m=Object.keys(u);return Object.getOwnPropertySymbols&&(p=Object.getOwnPropertySymbols(u),h&&(p=p.filter(function(b){return Object.getOwnPropertyDescriptor(u,b).enumerable})),m.push.apply(m,p)),m}function i(u){for(var h=1;h<arguments.length;h++){var p=arguments[h]!=null?arguments[h]:{};h%2?s(Object(p),!0).forEach(function(m){(0,e.default)(u,m,p[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(m){Object.defineProperty(u,m,Object.getOwnPropertyDescriptor(p,m))})}return u}function l(){return(65536*(1+Math.random())|0).toString(16).substring(1)}t("extend");var o=t("../env").isProd,a=t("util"),c="data:application/json;base64,";f.exports={isArray:function(u){return Object.prototype.toString.call(u)=="[object Array]"},jsonEscape:function(u){return u.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")},getStyle:function(u,h){var p,m,b=(u.ownerDocument||document).defaultView;return b&&b.getComputedStyle?(h=h.replace(/([A-Z])/g,"-$1").toLowerCase(),b.getComputedStyle(u,null).getPropertyValue(h)):u.currentStyle?(h=h.replace(/\-(\w)/g,function(_,v){return v.toUpperCase()}),b=u.currentStyle[h],/^\d+(em|pt|%|ex)?$/i.test(b)?(h=b,p=u.style.left,m=u.runtimeStyle.left,u.runtimeStyle.left=u.currentStyle.left,u.style.left=h||0,h=u.style.pixelLeft+"px",u.style.left=p,u.runtimeStyle.left=m,h):b):void 0},keyBy:function(u,h){return(u||[]).reduce(function(p,m){return i(i({},p),{},(0,e.default)({},h?m[h]:m,m))},{})},splitComment:function(u){var h=document.createElement("div");return h.innerHTML=u,u=function(p){for(var m=[],b=0;b<p.childNodes.length;b++){var _=p.childNodes[b];_.nodeType,_.innerHTML,_.data,_.nodeType===8&&_.data.includes("tinycomment")&&m.push(_)}return m}(h),u.length,u.length?((u=u[0]).remove(),{comment:u,doc:h.innerHTML}):{comment:null,doc:h.innerHTML}},mergeComment:function(u){var h=document.createElement("div");return h.innerHTML=u.doc,u.comment&&h.appendChild(u.comment),h.innerHTML},extractComment:function(u){if(!u||u.nodeType!==8)throw Error("[extractComment] did not receive a valid comment node");var h=(u=u.data).indexOf(c)+29,p=u.substr(0,h);return u=u.substr(h),{header:p,commentJSON:JSON.parse(n.from(u,"base64").toString("utf8"))}},buildComment:function(u){h=JSON.stringify(u.commentJSON);var h=n.from(h,"utf8").toString("base64");return u="".concat(u.header).concat(h),document.createComment(u)},isTinycomment:function(u){var h=document.createElement("div");return h.innerHTML=u,h.childNodes[0].nodeType==8},createDOMComment:function(u){return document.createComment(u)},rand4:l,guid:function(){return l()+l()+"-"+l()+"-"+l()+"-"+l()+"-"+l()+l()+l()},deepCopy:function(u){return JSON.parse(JSON.stringify(u))},shallowCopy:function(u){return Object.assign({},u)},parsePos:function(u){return parseFloat(u,10)||0},extendClass:function(u,h){u.prototype=Object.create(h.prototype),Object.defineProperty(u.prototype,"constructor",{enumerable:!1,value:u,writable:!0}),u.prototype.super=function(){for(var p=arguments.length,m=new Array(p),b=0;b<p;b++)m[b]=arguments[b];h.call.apply(h,[this].concat(m))}},clearTimer:function(u){u!==void 0&&clearTimeout(u)},printOpList:function(u){var h="";if(u.length===0)return"[]";for(var p=0;p<u[0].op.length;p++)h=h+p+": = "+JSON.stringify(u[0].op[p])+`
|
|
197
|
-
`;return h},getTabId:function(){return window.sessionStorage?window.sessionStorage.getItem("_cdxTabId"):null},clone:function(u){try{return JSON.parse(JSON.stringify(u))}catch(h){o||console.error(h)}},ins:function(u){return a.inspect(u,{colors:!0,depth:null})}}}).call(this)}).call(this,t("buffer").Buffer)},{"../env":527,"@babel/runtime/helpers/defineProperty":560,"@babel/runtime/helpers/interopRequireDefault":563,buffer:372,extend:577,util:423}],552:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectors=r.normalizeNodes=r.normalizeComment=r.normalizeClasses=r.normalizeAttributes=r.classes=void 0,r.selectors={tinymce:[{selector:"span",attr:"data-mce-annotation-uid"}],froala:[{selector:"img",attr:"src",attrMatch:"blob"}]},r.classes={tinymce:["tox-comment--active"],froala:["fr-selected-cell","fr-cell-fixed"]},r.normalizeComment=function(n){var e=document.createElement("div");e.innerHTML=n;for(var s=0;s<e.childNodes.length;s++){var i=e.childNodes[s];i.nodeType===8&&(e.removeChild(i),s--)}return e.innerHTML},r.normalizeClasses=function(n,e){var s=document.createElement("div");return s.innerHTML=n,e.forEach(function(i){var l=s.getElementsByClassName(i);[].slice.call(l).forEach(function(o){o.outerHTML,o.classList.remove(i),o.classList.length===0&&o.removeAttribute("class"),o.outerHTML})}),s.innerHTML},r.normalizeAttributes=function(n,e){var s=document.createElement("div");return s.innerHTML=n,s.innerHTML,e.forEach(function(i){var l="".concat(i.selector,"[").concat(i.attr,"]");s.querySelectorAll(l).forEach(function(o){(!i.attrMatch||-1<o.getAttribute(i.attr).indexOf(i.attrMatch))&&o.removeAttribute(i.attr)})}),s.innerHTML},r.normalizeNodes=function(n,e){var s=document.createElement("div");return s.innerHTML=n,e.forEach(function(i){var l="".concat(i.selector,"[").concat(i.attr,"]");s.querySelectorAll(l).forEach(function(o){(!i.attrMatch||-1<o.getAttribute(i.attr).indexOf(i.attrMatch))&&o.remove()})}),s.innerHTML}},{}],553:[function(t,f,r){arguments[4][1][0].apply(r,arguments)},{dup:1}],554:[function(t,f,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],555:[function(t,f,r){arguments[4][3][0].apply(r,arguments)},{"./arrayLikeToArray.js":553,dup:3}],556:[function(t,f,r){arguments[4][4][0].apply(r,arguments)},{dup:4}],557:[function(t,f,r){arguments[4][5][0].apply(r,arguments)},{dup:5}],558:[function(t,f,r){arguments[4][6][0].apply(r,arguments)},{"./isNativeReflectConstruct.js":565,"./setPrototypeOf.js":571,dup:6}],559:[function(t,f,r){arguments[4][7][0].apply(r,arguments)},{dup:7}],560:[function(t,f,r){arguments[4][8][0].apply(r,arguments)},{dup:8}],561:[function(t,f,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],562:[function(t,f,r){arguments[4][10][0].apply(r,arguments)},{"./setPrototypeOf.js":571,dup:10}],563:[function(t,f,r){arguments[4][11][0].apply(r,arguments)},{dup:11}],564:[function(t,f,r){arguments[4][12][0].apply(r,arguments)},{dup:12}],565:[function(t,f,r){arguments[4][13][0].apply(r,arguments)},{dup:13}],566:[function(t,f,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],567:[function(t,f,r){arguments[4][15][0].apply(r,arguments)},{dup:15}],568:[function(t,f,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],569:[function(t,f,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],570:[function(t,f,r){arguments[4][18][0].apply(r,arguments)},{"./assertThisInitialized.js":556,"./typeof.js":574,dup:18}],571:[function(t,f,r){arguments[4][19][0].apply(r,arguments)},{dup:19}],572:[function(t,f,r){arguments[4][20][0].apply(r,arguments)},{"./arrayWithHoles.js":554,"./iterableToArrayLimit.js":567,"./nonIterableRest.js":568,"./unsupportedIterableToArray.js":575,dup:20}],573:[function(t,f,r){arguments[4][21][0].apply(r,arguments)},{"./arrayWithoutHoles.js":555,"./iterableToArray.js":566,"./nonIterableSpread.js":569,"./unsupportedIterableToArray.js":575,dup:21}],574:[function(t,f,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],575:[function(t,f,r){arguments[4][23][0].apply(r,arguments)},{"./arrayLikeToArray.js":553,dup:23}],576:[function(t,f,r){arguments[4][24][0].apply(r,arguments)},{"./construct.js":558,"./getPrototypeOf.js":561,"./isNativeFunction.js":564,"./setPrototypeOf.js":571,dup:24}],577:[function(t,f,r){arguments[4][174][0].apply(r,arguments)},{dup:174}],578:[function(t,f,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],579:[function(t,f,r){var n=-1,e=1,s=0;function i(_,v,w,x){if(_===v)return _?[[s,_]]:[];if(w!=null&&(w=function(k,D,N){var O=typeof N=="number"?{index:N,length:0}:N.oldRange,R=(N=typeof N=="number"?null:N.newRange,k.length),A=D.length;if(O.length===0&&(N===null||N.length===0)){var z=O.index,H=k.slice(0,z),$=k.slice(z),M=N?N.index:null,J=z+A-R;if((M===null||M===J)&&!(J<0||A<J)){var K=D.slice(0,J),P=D.slice(J);if(P===$){var U=Math.min(z,J),V=H.slice(0,U);if(V===(q=K.slice(0,U)))return m(V,H.slice(U),K.slice(U),$)}}if((M===null||M===z)&&(J=z,K=D.slice(0,J),P=D.slice(J),K===H)){var G=Math.min(R-J,A-J),F=$.slice($.length-G);if(F===(T=P.slice(P.length-G)))return m(H,$.slice(0,$.length-G),P.slice(0,P.length-G),F)}}if(0<O.length&&N&&N.length===0&&(V=k.slice(0,O.index),F=k.slice(O.index+O.length),!(A<(U=V.length)+(G=F.length)))){var q=D.slice(0,U),T=D.slice(A-G);if(V===q&&F===T)return m(V,k.slice(U,R-G),D.slice(U,A-G),F)}return null}(_,v,w),w))return w;w=o(_,v);var S=_.substring(0,w),E=(w=a(_=_.substring(w),v=v.substring(w)),_.substring(_.length-w));return _=function(k,D){if(!k)return[[e,D]];if(!D)return[[n,k]];var N,O,R=k.length>D.length?k:D,A=k.length>D.length?D:k,z=R.indexOf(A);return z!==-1?(R=[[e,R.substring(0,z)],[s,A],[e,R.substring(z+A.length)]],k.length>D.length&&(R[0][0]=R[2][0]=n),R):A.length===1?[[n,k],[e,D]]:(z=function(H,$){var M=H.length>$.length?H:$,J=H.length>$.length?$:H;if(M.length<4||2*J.length<M.length)return null;function K(q,T,I){for(var L,B,Y,Z,rt=q.substring(I,I+Math.floor(q.length/4)),Q=-1,tt="";(Q=T.indexOf(rt,Q+1))!==-1;){var nt=o(q.substring(I),T.substring(Q)),et=a(q.substring(0,I),T.substring(0,Q));tt.length<et+nt&&(tt=T.substring(Q-et,Q)+T.substring(Q,Q+nt),L=q.substring(0,I-et),B=q.substring(I+nt),Y=T.substring(0,Q-et),Z=T.substring(Q+nt))}return 2*tt.length>=q.length?[L,B,Y,Z,tt]:null}var P,U,V,G,F=K(M,J,Math.ceil(M.length/4));return J=K(M,J,Math.ceil(M.length/2)),F||J?(M=!J||F&&F[4].length>J[4].length?F:J,H.length>$.length?(P=M[0],U=M[1],V=M[2],G=M[3]):(V=M[0],G=M[1],P=M[2],U=M[3]),[P,U,V,G,F=M[4]]):null}(k,D),z?(R=z[0],A=z[1],O=z[2],N=z[3],z=z[4],R=i(R,O),O=i(A,N),R.concat([[s,z]],O)):function(H,$){for(var M=H.length,J=$.length,K=Math.ceil((M+J)/2),P=K,U=2*K,V=new Array(U),G=new Array(U),F=0;F<U;F++)V[F]=-1,G[F]=-1;V[P+1]=0,G[P+1]=0;for(var q=M-J,T=q%2!=0,I=0,L=0,B=0,Y=0,Z=0;Z<K;Z++){for(var rt=-Z+I;rt<=Z-L;rt+=2){for(var Q=P+rt,tt=(gt=rt===-Z||rt!==Z&&V[Q-1]<V[Q+1]?V[Q+1]:V[Q-1]+1)-rt;gt<M&&tt<J&&H.charAt(gt)===$.charAt(tt);)gt++,tt++;if(V[Q]=gt,M<gt)L+=2;else if(J<tt)I+=2;else if(T){var nt;if(0<=(at=P+q-rt)&&at<U&&G[at]!==-1&&(nt=M-G[at])<=gt)return l(H,$,gt,tt)}}for(var et=-Z+B;et<=Z-Y;et+=2){for(var at=P+et,ct=(nt=et===-Z||et!==Z&&G[at-1]<G[at+1]?G[at+1]:G[at-1]+1)-et;nt<M&&ct<J&&H.charAt(M-nt-1)===$.charAt(J-ct-1);)nt++,ct++;if(G[at]=nt,M<nt)Y+=2;else if(J<ct)B+=2;else if(!T&&0<=(Q=P+q-et)&&Q<U&&V[Q]!==-1){var gt=V[Q];if(tt=P+gt-Q,(nt=M-nt)<=gt)return l(H,$,gt,tt)}}}return[[n,H],[e,$]]}(k,D))}(_=_.substring(0,_.length-w),v=v.substring(0,v.length-w)),S&&_.unshift([s,S]),E&&_.push([s,E]),function k(D,N){D.push([s,""]);for(var O=0,R=0,A=0,z="",H="";O<D.length;)if(O<D.length-1&&!D[O][1])D.splice(O,1);else switch(D[O][0]){case e:A++,H+=D[O][1],O++;break;case n:R++,z+=D[O][1],O++;break;case s:var $,M,J=O-A-R-1;if(N&&(0<=J&&p(D[J][1])&&(M=D[J][1].slice(-1),D[J][1]=D[J][1].slice(0,-1),z=M+z,H=M+H,D[J][1]||(D.splice(J,1),O--,D[$=J-1]&&D[$][0]===e&&(A++,H=D[$][1]+H,$--),D[$]&&D[$][0]===n&&(R++,z=D[$][1]+z,$--),J=$)),h(D[O][1])&&(M=D[O][1].charAt(0),D[O][1]=D[O][1].slice(1),z+=M,H+=M)),O<D.length-1&&!D[O][1]){D.splice(O,1);break}(0<z.length||0<H.length)&&(0<z.length&&0<H.length&&(($=o(H,z))!==0&&(0<=J?D[J][1]+=H.substring(0,$):(D.splice(0,0,[s,H.substring(0,$)]),O++),H=H.substring($),z=z.substring($)),($=a(H,z))!==0&&(D[O][1]=H.substring(H.length-$)+D[O][1],H=H.substring(0,H.length-$),z=z.substring(0,z.length-$))),J=A+R,z.length===0&&H.length===0?(D.splice(O-J,J),O-=J):O=z.length===0?(D.splice(O-J,J,[e,H]),O-J+1):H.length===0?(D.splice(O-J,J,[n,z]),O-J+1):(D.splice(O-J,J,[n,z],[e,H]),O-J+2)),O!==0&&D[O-1][0]===s?(D[O-1][1]+=D[O][1],D.splice(O,1)):O++,R=A=0,H=z=""}D[D.length-1][1]===""&&D.pop();var K=!1;for(O=1;O<D.length-1;)D[O-1][0]===s&&D[O+1][0]===s&&(D[O][1].substring(D[O][1].length-D[O-1][1].length)===D[O-1][1]?(D[O][1]=D[O-1][1]+D[O][1].substring(0,D[O][1].length-D[O-1][1].length),D[O+1][1]=D[O-1][1]+D[O+1][1],D.splice(O-1,1),K=!0):D[O][1].substring(0,D[O+1][1].length)==D[O+1][1]&&(D[O-1][1]+=D[O+1][1],D[O][1]=D[O][1].substring(D[O+1][1].length)+D[O+1][1],D.splice(O+1,1),K=!0)),O++;K&&k(D,N)}(_,x),_}function l(_,v,w,x){var S=_.substring(0,w),E=v.substring(0,x);return _=_.substring(w),w=v.substring(x),v=i(S,E),x=i(_,w),v.concat(x)}function o(_,v){if(!_||!v||_.charAt(0)!==v.charAt(0))return 0;for(var w=0,x=Math.min(_.length,v.length),S=x,E=0;w<S;)_.substring(E,S)==v.substring(E,S)?E=w=S:x=S,S=Math.floor((x-w)/2+w);return c(_.charCodeAt(S-1))&&S--,S}function a(_,v){if(!_||!v||_.slice(-1)!==v.slice(-1))return 0;for(var w=0,x=Math.min(_.length,v.length),S=x,E=0;w<S;)_.substring(_.length-S,_.length-E)==v.substring(v.length-S,v.length-E)?E=w=S:x=S,S=Math.floor((x-w)/2+w);return u(_.charCodeAt(_.length-S))&&S--,S}function c(_){return 55296<=_&&_<=56319}function u(_){return 56320<=_&&_<=57343}function h(_){return u(_.charCodeAt(0))}function p(_){return c(_.charCodeAt(_.length-1))}function m(_,v,w,x){if(p(_)||h(x))return null;for(var S=[[s,_],[n,v],[e,w],[s,x]],E=[],k=0;k<S.length;k++)0<S[k][1].length&&E.push(S[k]);return E}function b(_,v,w){return i(_,v,w,!0)}b.INSERT=e,b.DELETE=n,b.EQUAL=s,f.exports=b},{}],580:[function(t,f,r){(function(n){(function(){var e="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",l="[object Boolean]",o="[object Date]",a="[object Function]",c="[object GeneratorFunction]",u="[object Map]",h="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",_="[object Set]",v="[object String]",w="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",k="[object Float32Array]",D="[object Float64Array]",N="[object Int8Array]",O="[object Int16Array]",R="[object Int32Array]",A="[object Uint8Array]",z="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",M=/\w*$/,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,P={},U=(P[i]=P["[object Array]"]=P[S]=P[E]=P[l]=P[o]=P[k]=P[D]=P[N]=P[O]=P[R]=P[u]=P[h]=P[p]=P[b]=P[_]=P[v]=P[w]=P[A]=P[z]=P[H]=P[$]=!0,P["[object Error]"]=P[a]=P[x]=!1,typeof n=="object"&&n&&n.Object===Object&&n),V=typeof self=="object"&&self&&self.Object===Object&&self,G=(U=U||V||Function("return this")(),(G=(V=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f)&&G.exports===V);function F(bt,ft){return bt.set(ft[0],ft[1]),bt}function q(bt,ft){return bt.add(ft),bt}function T(bt,ft,xt,Bt){var ce=-1,Ce=bt?bt.length:0;for(Bt&&Ce&&(xt=bt[++ce]);++ce<Ce;)xt=ft(xt,bt[ce],ce,bt);return xt}function I(bt){var ft=!1;if(bt!=null&&typeof bt.toString!="function")try{ft=!!(bt+"")}catch{}return ft}function L(bt){var ft=-1,xt=Array(bt.size);return bt.forEach(function(Bt,ce){xt[++ft]=[ce,Bt]}),xt}function B(bt,ft){return function(xt){return bt(ft(xt))}}function Y(bt){var ft=-1,xt=Array(bt.size);return bt.forEach(function(Bt){xt[++ft]=Bt}),xt}V=Array.prototype;var Z=Function.prototype,rt=Object.prototype,Q=U["__core-js_shared__"],tt=(Q=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"",nt=Z.toString,et=rt.hasOwnProperty,at=rt.toString,ct=RegExp("^"+nt.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gt=(Q=G?U.Buffer:void 0,Z=U.Symbol,U.Uint8Array),wt=B(Object.getPrototypeOf,Object),St=Object.create,Mt=rt.propertyIsEnumerable,Lt=V.splice,Pt=(G=Object.getOwnPropertySymbols,V=Q?Q.isBuffer:void 0,B(Object.keys,Object)),yt=(Q=ze(U,"DataView"),ze(U,"Map")),jt=ze(U,"Promise"),At=ze(U,"Set"),It=(U=ze(U,"WeakMap"),ze(Object,"create")),Ot=Tt(Q),Et=Tt(yt),Ct=Tt(jt),Nt=Tt(At),ht=Tt(U),dt=(Z=Z?Z.prototype:void 0)?Z.valueOf:void 0;function Ft(bt){var ft=-1,xt=bt?bt.length:0;for(this.clear();++ft<xt;){var Bt=bt[ft];this.set(Bt[0],Bt[1])}}function Jt(bt){var ft=-1,xt=bt?bt.length:0;for(this.clear();++ft<xt;){var Bt=bt[ft];this.set(Bt[0],Bt[1])}}function Xt(bt){var ft=-1,xt=bt?bt.length:0;for(this.clear();++ft<xt;){var Bt=bt[ft];this.set(Bt[0],Bt[1])}}function Qt(bt){this.__data__=new Jt(bt)}function ve(bt,ft){var xt,Bt,ce,Ce,Te=de(bt)||function(be){return function(pt){return pt&&typeof pt=="object"}(be)&&we(be)}(xt=bt)&&et.call(xt,"callee")&&(!Mt.call(xt,"callee")||at.call(xt)==i)?function(be,pt){for(var Dt=-1,$t=Array(be);++Dt<be;)$t[Dt]=pt(Dt);return $t}(bt.length,String):[],Ne=Te.length,Ge=!!Ne;for(Bt in bt)!ft&&!et.call(bt,Bt)||Ge&&(Bt=="length"||(ce=Bt,(Ce=(Ce=Ne)==null?s:Ce)&&(typeof ce=="number"||K.test(ce))&&-1<ce&&ce%1==0&&ce<Ce))||Te.push(Bt);return Te}function kt(bt,ft,xt){var Bt=bt[ft];et.call(bt,ft)&&ae(Bt,xt)&&(xt!==void 0||ft in bt)||(bt[ft]=xt)}function ee(bt,ft){for(var xt=bt.length;xt--;)if(ae(bt[xt][0],ft))return xt;return-1}function pe(bt,ft,xt,Bt,ce,Ce,Te){var Ne;if((Ne=Bt?Ce?Bt(bt,ce,Ce,Te):Bt(bt):Ne)!==void 0)return Ne;if(!Ut(bt))return bt;if(ce=de(bt)){if(Ne=function(Yt){var me=Yt.length,Ee=Yt.constructor(me);return me&&typeof Yt[0]=="string"&&et.call(Yt,"index")&&(Ee.index=Yt.index,Ee.input=Yt.input),Ee}(bt),!ft){var Ge=bt,be=Ne,pt=-1,Dt=Ge.length;for(be=be||Array(Dt);++pt<Dt;)be[pt]=Ge[pt];return be}}else{var $t,qt,Wt=He(bt),oe=Wt==a||Wt==c;if(Oe(bt))return $t=bt,(qt=ft)?$t.slice():(qt=new $t.constructor($t.length),$t.copy(qt),qt);if(Wt==p||Wt==i||oe&&!Ce){if(I(bt))return Ce?bt:{};if(Ne=typeof($t=oe?{}:bt).constructor!="function"||hn($t)?{}:function(Yt){return Ut(Yt)?St(Yt):{}}(wt($t)),!ft)return oe=qt=bt,oe=(lt=Ne)&&Be(oe,se(oe),lt),Be(qt,Ie(qt),oe)}else{if(!P[Wt])return Ce?bt:{};Ne=function(Yt,me,Ee,Ue){var Ae=Yt.constructor;switch(me){case S:return Le(Yt);case l:case o:return new Ae(+Yt);case E:return function(We,nn){return nn=nn?Le(We.buffer):We.buffer,new We.constructor(nn,We.byteOffset,We.byteLength)}(Yt,Ue);case k:case D:case N:case O:case R:case A:case z:case H:case $:return function(We,nn){return nn=nn?Le(We.buffer):We.buffer,new We.constructor(nn,We.byteOffset,We.length)}(Yt,Ue);case u:return function(We,nn,cn){return T(nn?cn(L(We),!0):L(We),F,new We.constructor)}(Yt,Ue,Ee);case h:case v:return new Ae(Yt);case b:return function(We){var nn=new We.constructor(We.source,M.exec(We));return nn.lastIndex=We.lastIndex,nn}(Yt);case _:return function(We,nn,cn){return T(nn?cn(Y(We),!0):Y(We),q,new We.constructor)}(Yt,Ue,Ee);case w:return function(We){return dt?Object(dt.call(We)):{}}(Yt)}}(bt,Wt,pe,ft)}}var X,lt=(Te=Te||new Qt).get(bt);if(lt)return lt;Te.set(bt,Ne);for(var vt=(X=ce?X:xt?function(Yt,me,Ee){return me=me(Yt),de(Yt)?me:function(Ue,Ae){for(var We=-1,nn=Ae.length,cn=Ue.length;++We<nn;)Ue[cn+We]=Ae[We];return Ue}(me,Ee(Yt))}(bt,se,Ie):se(bt))||bt,Vt=function(Yt,me){X&&(Yt=bt[me=Yt]),kt(Ne,me,pe(Yt,ft,xt,Bt,me,bt,Te))},te=-1,Zt=vt?vt.length:0;++te<Zt&&Vt(vt[te],te)!==!1;);return Ne}function Le(bt){var ft=new bt.constructor(bt.byteLength);return new gt(ft).set(new gt(bt)),ft}function Be(bt,ft,xt,Bt){xt=xt||{};for(var ce=-1,Ce=ft.length;++ce<Ce;){var Te=ft[ce],Ne=Bt?Bt(xt[Te],bt[Te],Te,xt,bt):void 0;kt(xt,Te,Ne===void 0?bt[Te]:Ne)}return xt}function qe(bt,ft){var xt,Bt;return bt=bt.__data__,((Bt=typeof(xt=ft))=="string"||Bt=="number"||Bt=="symbol"||Bt=="boolean"?xt!=="__proto__":xt===null)?bt[typeof ft=="string"?"string":"hash"]:bt.map}function ze(bt,ft){return function(xt){if(Ut(xt)&&(!tt||!(tt in xt)))return(Rt(xt)||I(xt)?ct:J).test(Tt(xt))}(bt=bt==null?void 0:bt[ft])?bt:void 0}Ft.prototype.clear=function(){this.__data__=It?It(null):{}},Ft.prototype.delete=function(bt){return this.has(bt)&&delete this.__data__[bt]},Ft.prototype.get=function(bt){var ft,xt=this.__data__;return It?(ft=xt[bt])===e?void 0:ft:et.call(xt,bt)?xt[bt]:void 0},Ft.prototype.has=function(bt){var ft=this.__data__;return It?ft[bt]!==void 0:et.call(ft,bt)},Ft.prototype.set=function(bt,ft){return this.__data__[bt]=It&&ft===void 0?e:ft,this},Jt.prototype.clear=function(){this.__data__=[]},Jt.prototype.delete=function(bt){var ft=this.__data__;return!((bt=ee(ft,bt))<0||(bt==ft.length-1?ft.pop():Lt.call(ft,bt,1),0))},Jt.prototype.get=function(bt){var ft=this.__data__;return(bt=ee(ft,bt))<0?void 0:ft[bt][1]},Jt.prototype.has=function(bt){return-1<ee(this.__data__,bt)},Jt.prototype.set=function(bt,ft){var xt=this.__data__,Bt=ee(xt,bt);return Bt<0?xt.push([bt,ft]):xt[Bt][1]=ft,this},Xt.prototype.clear=function(){this.__data__={hash:new Ft,map:new(yt||Jt),string:new Ft}},Xt.prototype.delete=function(bt){return qe(this,bt).delete(bt)},Xt.prototype.get=function(bt){return qe(this,bt).get(bt)},Xt.prototype.has=function(bt){return qe(this,bt).has(bt)},Xt.prototype.set=function(bt,ft){return qe(this,bt).set(bt,ft),this},Qt.prototype.clear=function(){this.__data__=new Jt},Qt.prototype.delete=function(bt){return this.__data__.delete(bt)},Qt.prototype.get=function(bt){return this.__data__.get(bt)},Qt.prototype.has=function(bt){return this.__data__.has(bt)},Qt.prototype.set=function(bt,ft){var xt=this.__data__;if(xt instanceof Jt){var Bt=xt.__data__;if(!yt||Bt.length<199)return Bt.push([bt,ft]),this;xt=this.__data__=new Xt(Bt)}return xt.set(bt,ft),this};var Ie=G?B(G,Object):function(){return[]},He=function(bt){return at.call(bt)};function hn(bt){var ft=bt&&bt.constructor;return bt===(typeof ft=="function"&&ft.prototype||rt)}function Tt(bt){if(bt!=null){try{return nt.call(bt)}catch{}try{return bt+""}catch{}}return""}function ae(bt,ft){return bt===ft||bt!=bt&&ft!=ft}(Q&&He(new Q(new ArrayBuffer(1)))!=E||yt&&He(new yt)!=u||jt&&He(jt.resolve())!=m||At&&He(new At)!=_||U&&He(new U)!=x)&&(He=function(bt){var ft=at.call(bt);if(bt=(bt=ft==p?bt.constructor:void 0)?Tt(bt):void 0)switch(bt){case Ot:return E;case Et:return u;case Ct:return m;case Nt:return _;case ht:return x}return ft});var de=Array.isArray;function we(bt){return bt!=null&&typeof(ft=bt.length)=="number"&&-1<ft&&ft%1==0&&ft<=s&&!Rt(bt);var ft}var Oe=V||function(){return!1};function Rt(bt){return(bt=Ut(bt)?at.call(bt):"")==a||bt==c}function Ut(bt){var ft=typeof bt;return bt&&(ft=="object"||ft=="function")}function se(bt){return(we(bt)?ve:function(ft){if(!hn(ft))return Pt(ft);var xt,Bt=[];for(xt in Object(ft))et.call(ft,xt)&&xt!="constructor"&&Bt.push(xt);return Bt})(bt)}f.exports=function(bt){return pe(bt,!0,!0)}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],581:[function(t,f,r){(function(n){(function(){var e="__lodash_hash_undefined__",s=1,i=2,l=9007199254740991,o="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",p="[object Error]",m="[object Function]",b="[object GeneratorFunction]",_="[object Map]",v="[object Number]",w="[object Null]",x="[object Object]",S="[object Promise]",E="[object Proxy]",k="[object RegExp]",D="[object Set]",N="[object String]",O="[object Undefined]",R="[object WeakMap]",A="[object ArrayBuffer]",z="[object DataView]",H=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,M={},J=(M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[o]=M[a]=M[A]=M[u]=M[z]=M[h]=M[p]=M[m]=M[_]=M[v]=M[x]=M[k]=M[D]=M[N]=M[R]=!1,typeof n=="object"&&n&&n.Object===Object&&n),K=typeof self=="object"&&self&&self.Object===Object&&self,P=(K=J||K||Function("return this")(),(gt=(gt=(q=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f)&>.exports===q)&&J.process);function U(ft){var xt=-1,Bt=Array(ft.size);return ft.forEach(function(ce,Ce){Bt[++xt]=[Ce,ce]}),Bt}function V(ft){var xt=-1,Bt=Array(ft.size);return ft.forEach(function(ce){Bt[++xt]=ce}),Bt}J=(q=function(){try{return P&&P.binding&&P.binding("util")}catch{}}())&&q.isTypedArray;var G,F,q=Array.prototype,T=Function.prototype,I=Object.prototype,L=K["__core-js_shared__"],B=T.toString,Y=I.hasOwnProperty,Z=(T=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",rt=I.toString,Q=RegExp("^"+B.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tt=(L=gt?K.Buffer:void 0,T=K.Symbol,K.Uint8Array),nt=I.propertyIsEnumerable,et=q.splice,at=T?T.toStringTag:void 0,ct=Object.getOwnPropertySymbols,gt=L?L.isBuffer:void 0,wt=(G=Object.keys,F=Object,function(ft){return G(F(ft))}),St=(q=Be(K,"DataView"),Be(K,"Map")),Mt=(L=Be(K,"Promise"),Be(K,"Set")),Lt=(K=Be(K,"WeakMap"),Be(Object,"create")),Pt=Ie(q),yt=Ie(St),jt=Ie(L),At=Ie(Mt),It=Ie(K),Ot=(T=T?T.prototype:void 0)?T.valueOf:void 0;function Et(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.clear();++xt<Bt;){var ce=ft[xt];this.set(ce[0],ce[1])}}function Ct(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.clear();++xt<Bt;){var ce=ft[xt];this.set(ce[0],ce[1])}}function Nt(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.clear();++xt<Bt;){var ce=ft[xt];this.set(ce[0],ce[1])}}function ht(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.__data__=new Nt;++xt<Bt;)this.add(ft[xt])}function dt(ft){ft=this.__data__=new Ct(ft),this.size=ft.size}function Ft(ft,xt){var Bt,ce,Ce,Te=Tt(ft),Ne=!Te&&hn(ft),Ge=!Te&&!Ne&&ae(ft),be=!Te&&!Ne&&!Ge&&se(ft),pt=Te||Ne||Ge||be,Dt=pt?function(qt,Wt){for(var oe=-1,X=Array(qt);++oe<qt;)X[oe]=Wt(oe);return X}(ft.length,String):[],$t=Dt.length;for(Bt in ft)!xt&&!Y.call(ft,Bt)||pt&&(Bt=="length"||Ge&&(Bt=="offset"||Bt=="parent")||be&&(Bt=="buffer"||Bt=="byteLength"||Bt=="byteOffset")||(ce=Bt,(Ce=(Ce=$t)==null?l:Ce)&&(typeof ce=="number"||$.test(ce))&&-1<ce&&ce%1==0&&ce<Ce))||Dt.push(Bt);return Dt}function Jt(ft,xt){for(var Bt=ft.length;Bt--;)if(He(ft[Bt][0],xt))return Bt;return-1}function Xt(ft){if(ft==null)return ft===void 0?O:w;if(at&&at in Object(ft)){var xt=ft,Bt=Y.call(xt,at),ce=xt[at];try{var Ce=!(xt[at]=void 0)}catch{}var Te=rt.call(xt);return Ce&&(Bt?xt[at]=ce:delete xt[at]),Te}return rt.call(ft)}function Qt(ft){return Rt(ft)&&Xt(ft)==o}function ve(ft,xt,Bt,ce,Ce){if(ft===xt)return!0;if(ft==null||xt==null||!Rt(ft)&&!Rt(xt))return ft!=ft&&xt!=xt;var Te=ve,Ne=Tt(ft),Ge=Tt(xt),be=Ne?a:ze(ft),pt=(Ge=Ge?a:ze(xt),(be=be==o?x:be)==x),Dt=(Ge=Ge==o?x:Ge)==x;if((Ge=be==Ge)&&ae(ft)){if(!ae(xt))return!1;pt=!(Ne=!0)}if(Ge&&!pt){if(Ce=Ce||new dt,Ne||se(ft))return ee(ft,xt,Bt,ce,Te,Ce);var $t=ft,qt=xt,Wt=Bt,oe=ce,X=Te,lt=Ce;switch(be){case z:if($t.byteLength!=qt.byteLength||$t.byteOffset!=qt.byteOffset)return!1;$t=$t.buffer,qt=qt.buffer;case A:return!($t.byteLength!=qt.byteLength||!X(new tt($t),new tt(qt)));case u:case h:case v:return He(+$t,+qt);case p:return $t.name==qt.name&&$t.message==qt.message;case k:case N:return $t==qt+"";case _:var vt=U;case D:var Vt=Wt&s;return vt=vt||V,!($t.size!=qt.size&&!Vt)&&((Vt=lt.get($t))?Vt==qt:(Wt|=i,lt.set($t,qt),Vt=ee(vt($t),vt(qt),Wt,oe,X,lt),lt.delete($t),Vt));case"[object Symbol]":if(Ot)return Ot.call($t)==Ot.call(qt)}return!1}if(!(Bt&s)&&(Ne=pt&&Y.call(ft,"__wrapped__"),be=Dt&&Y.call(xt,"__wrapped__"),Ne||be))return Te(pt=Ne?ft.value():ft,Dt=be?xt.value():xt,Bt,ce,Ce=Ce||new dt);if(Ge){var te=ft,Zt=xt,Yt=Bt,me=ce,Ee=Te,Ue=Ce=Ce||new dt,Ae=Yt&s,We=pe(te),nn=We.length;if(nn!=(Ne=pe(Zt).length)&&!Ae)return!1;for(var cn=nn;cn--;){var An=We[cn];if(!(Ae?An in Zt:Y.call(Zt,An)))return!1}if((Ne=Ue.get(te))&&Ue.get(Zt))return Ne==Zt;for(var un=!0,bn=(Ue.set(te,Zt),Ue.set(Zt,te),Ae);++cn<nn;){var Nn,Ln=te[An=We[cn]],er=Zt[An];if(!((Nn=me?Ae?me(er,Ln,An,Zt,te,Ue):me(Ln,er,An,te,Zt,Ue):Nn)===void 0?Ln===er||Ee(Ln,er,Yt,me,Ue):Nn)){un=!1;break}bn=bn||An=="constructor"}return un&&!bn&&(Ne=te.constructor)!=(be=Zt.constructor)&&"constructor"in te&&"constructor"in Zt&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof be=="function"&&be instanceof be)&&(un=!1),Ue.delete(te),Ue.delete(Zt),un}return!1}function kt(ft){if(Bt=typeof(Bt=(xt=ft)&&xt.constructor)=="function"&&Bt.prototype||I,xt!==Bt)return wt(ft);var xt,Bt,ce,Ce=[];for(ce in Object(ft))Y.call(ft,ce)&&ce!="constructor"&&Ce.push(ce);return Ce}function ee(ft,xt,Bt,ce,Ce,Te){var Ne=Bt&s,Ge=ft.length,be=xt.length;if(Ge!=be&&!(Ne&&Ge<be))return!1;if((be=Te.get(ft))&&Te.get(xt))return be==xt;var pt=-1,Dt=!0,$t=Bt&i?new ht:void 0;for(Te.set(ft,xt),Te.set(xt,ft);++pt<Ge;){var qt,Wt=ft[pt],oe=xt[pt];if((qt=ce?Ne?ce(oe,Wt,pt,xt,ft,Te):ce(Wt,oe,pt,ft,xt,Te):qt)!==void 0){if(qt)continue;Dt=!1;break}if($t){if(!function(X,lt){for(var vt=-1,Vt=X==null?0:X.length;++vt<Vt;)if(lt(X[vt],vt))return 1}(xt,function(X,lt){return!$t.has(lt)&&(Wt===X||Ce(Wt,X,Bt,ce,Te))&&$t.push(lt)})){Dt=!1;break}}else if(Wt!==oe&&!Ce(Wt,oe,Bt,ce,Te)){Dt=!1;break}}return Te.delete(ft),Te.delete(xt),Dt}function pe(ft){var xt=bt,Bt=qe;if(xt=xt(ft),Tt(ft))return xt;for(var ce=xt,Ce=Bt(ft),Te=-1,Ne=Ce.length,Ge=ce.length;++Te<Ne;)ce[Ge+Te]=Ce[Te];return ce}function Le(ft,xt){var Bt,ce;return ft=ft.__data__,((ce=typeof(Bt=xt))=="string"||ce=="number"||ce=="symbol"||ce=="boolean"?Bt!=="__proto__":Bt===null)?ft[typeof xt=="string"?"string":"hash"]:ft.map}function Be(ft,xt){return function(Bt){if(Oe(Bt)&&(!Z||!(Z in Bt)))return(de(Bt)?Q:H).test(Ie(Bt))}(ft=ft==null?void 0:ft[xt])?ft:void 0}Et.prototype.clear=function(){this.__data__=Lt?Lt(null):{},this.size=0},Et.prototype.delete=function(ft){return ft=this.has(ft)&&delete this.__data__[ft],this.size-=ft?1:0,ft},Et.prototype.get=function(ft){var xt,Bt=this.__data__;return Lt?(xt=Bt[ft])===e?void 0:xt:Y.call(Bt,ft)?Bt[ft]:void 0},Et.prototype.has=function(ft){var xt=this.__data__;return Lt?xt[ft]!==void 0:Y.call(xt,ft)},Et.prototype.set=function(ft,xt){var Bt=this.__data__;return this.size+=this.has(ft)?0:1,Bt[ft]=Lt&&xt===void 0?e:xt,this},Ct.prototype.clear=function(){this.__data__=[],this.size=0},Ct.prototype.delete=function(ft){var xt=this.__data__;return!((ft=Jt(xt,ft))<0||(ft==xt.length-1?xt.pop():et.call(xt,ft,1),--this.size,0))},Ct.prototype.get=function(ft){var xt=this.__data__;return(ft=Jt(xt,ft))<0?void 0:xt[ft][1]},Ct.prototype.has=function(ft){return-1<Jt(this.__data__,ft)},Ct.prototype.set=function(ft,xt){var Bt=this.__data__,ce=Jt(Bt,ft);return ce<0?(++this.size,Bt.push([ft,xt])):Bt[ce][1]=xt,this},Nt.prototype.clear=function(){this.size=0,this.__data__={hash:new Et,map:new(St||Ct),string:new Et}},Nt.prototype.delete=function(ft){return ft=Le(this,ft).delete(ft),this.size-=ft?1:0,ft},Nt.prototype.get=function(ft){return Le(this,ft).get(ft)},Nt.prototype.has=function(ft){return Le(this,ft).has(ft)},Nt.prototype.set=function(ft,xt){var Bt=Le(this,ft),ce=Bt.size;return Bt.set(ft,xt),this.size+=Bt.size==ce?0:1,this},ht.prototype.add=ht.prototype.push=function(ft){return this.__data__.set(ft,e),this},ht.prototype.has=function(ft){return this.__data__.has(ft)},dt.prototype.clear=function(){this.__data__=new Ct,this.size=0},dt.prototype.delete=function(ft){var xt=this.__data__;return ft=xt.delete(ft),this.size=xt.size,ft},dt.prototype.get=function(ft){return this.__data__.get(ft)},dt.prototype.has=function(ft){return this.__data__.has(ft)},dt.prototype.set=function(ft,xt){var Bt=this.__data__;if(Bt instanceof Ct){var ce=Bt.__data__;if(!St||ce.length<199)return ce.push([ft,xt]),this.size=++Bt.size,this;Bt=this.__data__=new Nt(ce)}return Bt.set(ft,xt),this.size=Bt.size,this};var qe=ct?function(ft){if(ft==null)return[];ft=Object(ft);for(var xt=ct(ft),Bt=function(be){return nt.call(ft,be)},ce=-1,Ce=xt==null?0:xt.length,Te=0,Ne=[];++ce<Ce;){var Ge=xt[ce];Bt(Ge)&&(Ne[Te++]=Ge)}return Ne}:function(){return[]},ze=Xt;function Ie(ft){if(ft!=null){try{return B.call(ft)}catch{}try{return ft+""}catch{}}return""}function He(ft,xt){return ft===xt||ft!=ft&&xt!=xt}(q&&ze(new q(new ArrayBuffer(1)))!=z||St&&ze(new St)!=_||L&&ze(L.resolve())!=S||Mt&&ze(new Mt)!=D||K&&ze(new K)!=R)&&(ze=function(ft){var xt=Xt(ft);if(ft=(ft=xt==x?ft.constructor:void 0)?Ie(ft):"")switch(ft){case Pt:return z;case yt:return _;case jt:return S;case At:return D;case It:return R}return xt});var hn=Qt(function(){return arguments}())?Qt:function(ft){return Rt(ft)&&Y.call(ft,"callee")&&!nt.call(ft,"callee")},Tt=Array.isArray,ae=gt||function(){return!1};function de(ft){if(Oe(ft))return(ft=Xt(ft))==m||ft==b||ft==c||ft==E}function we(ft){return typeof ft=="number"&&-1<ft&&ft%1==0&&ft<=l}function Oe(ft){var xt=typeof ft;return ft!=null&&(xt=="object"||xt=="function")}function Rt(ft){return ft!=null&&typeof ft=="object"}var Ut,se=J?(Ut=J,function(ft){return Ut(ft)}):function(ft){return Rt(ft)&&we(ft.length)&&!!M[Xt(ft)]};function bt(ft){return((xt=ft)!=null&&we(xt.length)&&!de(xt)?Ft:kt)(ft);var xt}f.exports=function(ft,xt){return ve(ft,xt)}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],582:[function(t,f,r){t=t("./_getNative")(t("./_root"),"DataView"),f.exports=t},{"./_getNative":637,"./_root":672}],583:[function(t,f,r){var n=t("./_hashClear"),e=t("./_hashDelete"),s=t("./_hashGet"),i=t("./_hashHas");function l(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var u=o[a];this.set(u[0],u[1])}}t=t("./_hashSet"),l.prototype.clear=n,l.prototype.delete=e,l.prototype.get=s,l.prototype.has=i,l.prototype.set=t,f.exports=l},{"./_hashClear":643,"./_hashDelete":644,"./_hashGet":645,"./_hashHas":646,"./_hashSet":647}],584:[function(t,f,r){var n=t("./_listCacheClear"),e=t("./_listCacheDelete"),s=t("./_listCacheGet"),i=t("./_listCacheHas");function l(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var u=o[a];this.set(u[0],u[1])}}t=t("./_listCacheSet"),l.prototype.clear=n,l.prototype.delete=e,l.prototype.get=s,l.prototype.has=i,l.prototype.set=t,f.exports=l},{"./_listCacheClear":654,"./_listCacheDelete":655,"./_listCacheGet":656,"./_listCacheHas":657,"./_listCacheSet":658}],585:[function(t,f,r){t=t("./_getNative")(t("./_root"),"Map"),f.exports=t},{"./_getNative":637,"./_root":672}],586:[function(t,f,r){var n=t("./_mapCacheClear"),e=t("./_mapCacheDelete"),s=t("./_mapCacheGet"),i=t("./_mapCacheHas");function l(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var u=o[a];this.set(u[0],u[1])}}t=t("./_mapCacheSet"),l.prototype.clear=n,l.prototype.delete=e,l.prototype.get=s,l.prototype.has=i,l.prototype.set=t,f.exports=l},{"./_mapCacheClear":659,"./_mapCacheDelete":660,"./_mapCacheGet":661,"./_mapCacheHas":662,"./_mapCacheSet":663}],587:[function(t,f,r){t=t("./_getNative")(t("./_root"),"Promise"),f.exports=t},{"./_getNative":637,"./_root":672}],588:[function(t,f,r){t=t("./_getNative")(t("./_root"),"Set"),f.exports=t},{"./_getNative":637,"./_root":672}],589:[function(t,f,r){var n=t("./_MapCache"),e=t("./_setCacheAdd");function s(i){var l=-1,o=i==null?0:i.length;for(this.__data__=new n;++l<o;)this.add(i[l])}t=t("./_setCacheHas"),s.prototype.add=s.prototype.push=e,s.prototype.has=t,f.exports=s},{"./_MapCache":586,"./_setCacheAdd":673,"./_setCacheHas":674}],590:[function(t,f,r){var n=t("./_ListCache"),e=t("./_stackClear"),s=t("./_stackDelete"),i=t("./_stackGet"),l=t("./_stackHas");function o(a){a=this.__data__=new n(a),this.size=a.size}t=t("./_stackSet"),o.prototype.clear=e,o.prototype.delete=s,o.prototype.get=i,o.prototype.has=l,o.prototype.set=t,f.exports=o},{"./_ListCache":584,"./_stackClear":676,"./_stackDelete":677,"./_stackGet":678,"./_stackHas":679,"./_stackSet":680}],591:[function(t,f,r){t=t("./_root").Symbol,f.exports=t},{"./_root":672}],592:[function(t,f,r){t=t("./_root").Uint8Array,f.exports=t},{"./_root":672}],593:[function(t,f,r){t=t("./_getNative")(t("./_root"),"WeakMap"),f.exports=t},{"./_getNative":637,"./_root":672}],594:[function(t,f,r){f.exports=function(n,e,s,i){for(var l=-1,o=n==null?0:n.length;++l<o;){var a=n[l];e(i,a,s(a),n)}return i}},{}],595:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=n==null?0:n.length,l=0,o=[];++s<i;){var a=n[s];e(a,s,n)&&(o[l++]=a)}return o}},{}],596:[function(t,f,r){var n=t("./_baseTimes"),e=t("./isArguments"),s=t("./isArray"),i=t("./isBuffer"),l=t("./_isIndex"),o=t("./isTypedArray"),a=Object.prototype.hasOwnProperty;f.exports=function(c,u){var h,p=s(c),m=!p&&e(c),b=!p&&!m&&i(c),_=!p&&!m&&!b&&o(c),v=p||m||b||_,w=v?n(c.length,String):[],x=w.length;for(h in c)!u&&!a.call(c,h)||v&&(h=="length"||b&&(h=="offset"||h=="parent")||_&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||l(h,x))||w.push(h);return w}},{"./_baseTimes":621,"./_isIndex":648,"./isArguments":688,"./isArray":689,"./isBuffer":691,"./isTypedArray":697}],597:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=n==null?0:n.length,l=Array(i);++s<i;)l[s]=e(n[s],s,n);return l}},{}],598:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=e.length,l=n.length;++s<i;)n[l+s]=e[s];return n}},{}],599:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=n==null?0:n.length;++s<i;)if(e(n[s],s,n))return!0;return!1}},{}],600:[function(t,f,r){var n=t("./eq");f.exports=function(e,s){for(var i=e.length;i--;)if(n(e[i][0],s))return i;return-1}},{"./eq":684}],601:[function(t,f,r){var n=t("./_baseEach");f.exports=function(e,s,i,l){return n(e,function(o,a,c){s(l,o,i(o),c)}),l}},{"./_baseEach":602}],602:[function(t,f,r){var n=t("./_baseForOwn");t=t("./_createBaseEach")(n),f.exports=t},{"./_baseForOwn":604,"./_createBaseEach":628}],603:[function(t,f,r){t=t("./_createBaseFor")(),f.exports=t},{"./_createBaseFor":629}],604:[function(t,f,r){var n=t("./_baseFor"),e=t("./keys");f.exports=function(s,i){return s&&n(s,i,e)}},{"./_baseFor":603,"./keys":698}],605:[function(t,f,r){var n=t("./_castPath"),e=t("./_toKey");f.exports=function(s,i){for(var l=0,o=(i=n(i,s)).length;s!=null&&l<o;)s=s[e(i[l++])];return l&&l==o?s:void 0}},{"./_castPath":625,"./_toKey":682}],606:[function(t,f,r){var n=t("./_arrayPush"),e=t("./isArray");f.exports=function(s,i,l){return i=i(s),e(s)?i:n(i,l(s))}},{"./_arrayPush":598,"./isArray":689}],607:[function(t,f,r){var n=t("./_Symbol"),e=t("./_getRawTag"),s=t("./_objectToString"),i=n?n.toStringTag:void 0;f.exports=function(l){return l==null?l===void 0?"[object Undefined]":"[object Null]":(i&&i in Object(l)?e:s)(l)}},{"./_Symbol":591,"./_getRawTag":638,"./_objectToString":670}],608:[function(t,f,r){f.exports=function(n,e){return n!=null&&e in Object(n)}},{}],609:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isObjectLike");f.exports=function(s){return e(s)&&n(s)=="[object Arguments]"}},{"./_baseGetTag":607,"./isObjectLike":695}],610:[function(t,f,r){var n=t("./_baseIsEqualDeep"),e=t("./isObjectLike");f.exports=function s(i,l,o,a,c){return i===l||(i==null||l==null||!e(i)&&!e(l)?i!=i&&l!=l:n(i,l,o,a,s,c))}},{"./_baseIsEqualDeep":611,"./isObjectLike":695}],611:[function(t,f,r){var n=t("./_Stack"),e=t("./_equalArrays"),s=t("./_equalByTag"),i=t("./_equalObjects"),l=t("./_getTag"),o=t("./isArray"),a=t("./isBuffer"),c=t("./isTypedArray"),u="[object Arguments]",h="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;f.exports=function(b,_,v,w,x,S){var E=o(b),k=o(_),D=E?h:l(b),N=(k=k?h:l(_),(D=D==u?p:D)==p),O=(k=k==u?p:k)==p;if((k=D==k)&&a(b)){if(!a(_))return!1;N=!(E=!0)}return k&&!N?(S=S||new n,E||c(b)?e(b,_,v,w,x,S):s(b,_,D,v,w,x,S)):1&v||(E=N&&m.call(b,"__wrapped__"),D=O&&m.call(_,"__wrapped__"),!E&&!D)?!!k&&(S=S||new n,i(b,_,v,w,x,S)):x(E?b.value():b,D?_.value():_,v,w,S=S||new n)}},{"./_Stack":590,"./_equalArrays":630,"./_equalByTag":631,"./_equalObjects":632,"./_getTag":640,"./isArray":689,"./isBuffer":691,"./isTypedArray":697}],612:[function(t,f,r){var n=t("./_Stack"),e=t("./_baseIsEqual");f.exports=function(s,i,l,o){var a=l.length,c=a,u=!o;if(s==null)return!c;for(s=Object(s);a--;){var h=l[a];if(u&&h[2]?h[1]!==s[h[0]]:!(h[0]in s))return!1}for(;++a<c;){var p=(h=l[a])[0],m=s[p],b=h[1];if(u&&h[2]){if(m===void 0&&!(p in s))return!1}else{var _,v=new n;if(!((_=o?o(m,b,p,s,i,v):_)===void 0?e(b,m,3,o,v):_))return!1}}return!0}},{"./_Stack":590,"./_baseIsEqual":610}],613:[function(t,f,r){var n=t("./isFunction"),e=t("./_isMasked"),s=t("./isObject"),i=t("./_toSource"),l=/^\[object .+?Constructor\]$/,o=(t=Function.prototype,Object.prototype),a=(t=t.toString,o=o.hasOwnProperty,RegExp("^"+t.call(o).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"));f.exports=function(c){return!(!s(c)||e(c))&&(n(c)?a:l).test(i(c))}},{"./_isMasked":651,"./_toSource":683,"./isFunction":692,"./isObject":694}],614:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isLength"),s=t("./isObjectLike"),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,f.exports=function(l){return s(l)&&e(l.length)&&!!i[n(l)]}},{"./_baseGetTag":607,"./isLength":693,"./isObjectLike":695}],615:[function(t,f,r){var n=t("./_baseMatches"),e=t("./_baseMatchesProperty"),s=t("./identity"),i=t("./isArray"),l=t("./property");f.exports=function(o){return typeof o=="function"?o:o==null?s:typeof o=="object"?i(o)?e(o[0],o[1]):n(o):l(o)}},{"./_baseMatches":617,"./_baseMatchesProperty":618,"./identity":687,"./isArray":689,"./property":701}],616:[function(t,f,r){var n=t("./_isPrototype"),e=t("./_nativeKeys"),s=Object.prototype.hasOwnProperty;f.exports=function(i){if(!n(i))return e(i);var l,o=[];for(l in Object(i))s.call(i,l)&&l!="constructor"&&o.push(l);return o}},{"./_isPrototype":652,"./_nativeKeys":668}],617:[function(t,f,r){var n=t("./_baseIsMatch"),e=t("./_getMatchData"),s=t("./_matchesStrictComparable");f.exports=function(i){var l=e(i);return l.length==1&&l[0][2]?s(l[0][0],l[0][1]):function(o){return o===i||n(o,i,l)}}},{"./_baseIsMatch":612,"./_getMatchData":636,"./_matchesStrictComparable":665}],618:[function(t,f,r){var n=t("./_baseIsEqual"),e=t("./get"),s=t("./hasIn"),i=t("./_isKey"),l=t("./_isStrictComparable"),o=t("./_matchesStrictComparable"),a=t("./_toKey");f.exports=function(c,u){return i(c)&&l(u)?o(a(c),u):function(h){var p=e(h,c);return p===void 0&&p===u?s(h,c):n(u,p,3)}}},{"./_baseIsEqual":610,"./_isKey":649,"./_isStrictComparable":653,"./_matchesStrictComparable":665,"./_toKey":682,"./get":685,"./hasIn":686}],619:[function(t,f,r){f.exports=function(n){return function(e){return e==null?void 0:e[n]}}},{}],620:[function(t,f,r){var n=t("./_baseGet");f.exports=function(e){return function(s){return n(s,e)}}},{"./_baseGet":605}],621:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=Array(n);++s<n;)i[s]=e(s);return i}},{}],622:[function(t,f,r){var n=t("./_Symbol"),e=t("./_arrayMap"),s=t("./isArray"),i=t("./isSymbol"),l=(t=n?n.prototype:void 0)?t.toString:void 0;f.exports=function o(a){if(typeof a=="string")return a;if(s(a))return e(a,o)+"";if(i(a))return l?l.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}},{"./_Symbol":591,"./_arrayMap":597,"./isArray":689,"./isSymbol":696}],623:[function(t,f,r){f.exports=function(n){return function(e){return n(e)}}},{}],624:[function(t,f,r){f.exports=function(n,e){return n.has(e)}},{}],625:[function(t,f,r){var n=t("./isArray"),e=t("./_isKey"),s=t("./_stringToPath"),i=t("./toString");f.exports=function(l,o){return n(l)?l:e(l,o)?[l]:s(i(l))}},{"./_isKey":649,"./_stringToPath":681,"./isArray":689,"./toString":704}],626:[function(t,f,r){t=t("./_root")["__core-js_shared__"],f.exports=t},{"./_root":672}],627:[function(t,f,r){var n=t("./_arrayAggregator"),e=t("./_baseAggregator"),s=t("./_baseIteratee"),i=t("./isArray");f.exports=function(l,o){return function(a,c){var u=i(a)?n:e,h=o?o():{};return u(a,l,s(c,2),h)}}},{"./_arrayAggregator":594,"./_baseAggregator":601,"./_baseIteratee":615,"./isArray":689}],628:[function(t,f,r){var n=t("./isArrayLike");f.exports=function(e,s){return function(i,l){if(i==null)return i;if(!n(i))return e(i,l);for(var o=i.length,a=s?o:-1,c=Object(i);(s?a--:++a<o)&&l(c[a],a,c)!==!1;);return i}}},{"./isArrayLike":690}],629:[function(t,f,r){f.exports=function(n){return function(e,s,i){for(var l=-1,o=Object(e),a=i(e),c=a.length;c--;){var u=a[n?c:++l];if(s(o[u],u,o)===!1)break}return e}}},{}],630:[function(t,f,r){var n=t("./_SetCache"),e=t("./_arraySome"),s=t("./_cacheHas");f.exports=function(i,l,o,a,c,u){var h=1&o,p=i.length;if(p!=(m=l.length)&&!(h&&p<m))return!1;var m=u.get(i),b=u.get(l);if(m&&b)return m==l&&b==i;var _=-1,v=!0,w=2&o?new n:void 0;for(u.set(i,l),u.set(l,i);++_<p;){var x,S=i[_],E=l[_];if((x=a?h?a(E,S,_,l,i,u):a(S,E,_,i,l,u):x)!==void 0){if(x)continue;v=!1;break}if(w){if(!e(l,function(k,D){if(!s(w,D)&&(S===k||c(S,k,o,a,u)))return w.push(D)})){v=!1;break}}else if(S!==E&&!c(S,E,o,a,u)){v=!1;break}}return u.delete(i),u.delete(l),v}},{"./_SetCache":589,"./_arraySome":599,"./_cacheHas":624}],631:[function(t,f,r){var n=t("./_Symbol"),e=t("./_Uint8Array"),s=t("./eq"),i=t("./_equalArrays"),l=t("./_mapToArray"),o=t("./_setToArray"),a=(t=n?n.prototype:void 0)?t.valueOf:void 0;f.exports=function(c,u,h,p,m,b,_){switch(h){case"[object DataView]":if(c.byteLength!=u.byteLength||c.byteOffset!=u.byteOffset)return!1;c=c.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(c.byteLength!=u.byteLength||!b(new e(c),new e(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+c,+u);case"[object Error]":return c.name==u.name&&c.message==u.message;case"[object RegExp]":case"[object String]":return c==u+"";case"[object Map]":var v=l;case"[object Set]":if(v=v||o,c.size!=u.size&&!(1&p))return!1;var w=_.get(c);return w?w==u:(p|=2,_.set(c,u),w=i(v(c),v(u),p,m,b,_),_.delete(c),w);case"[object Symbol]":if(a)return a.call(c)==a.call(u)}return!1}},{"./_Symbol":591,"./_Uint8Array":592,"./_equalArrays":630,"./_mapToArray":664,"./_setToArray":675,"./eq":684}],632:[function(t,f,r){var n=t("./_getAllKeys"),e=Object.prototype.hasOwnProperty;f.exports=function(s,i,l,o,a,c){var u=1&l,h=n(s),p=h.length;if(p!=n(i).length&&!u)return!1;for(var m=p;m--;){var b=h[m];if(!(u?b in i:e.call(i,b)))return!1}var _=c.get(s),v=c.get(i);if(_&&v)return _==i&&v==s;for(var w=!0,x=(c.set(s,i),c.set(i,s),u);++m<p;){var S,E=s[b=h[m]],k=i[b];if(!((S=o?u?o(k,E,b,i,s,c):o(E,k,b,s,i,c):S)===void 0?E===k||a(E,k,l,o,c):S)){w=!1;break}x=x||b=="constructor"}return w&&!x&&(_=s.constructor)!=(v=i.constructor)&&"constructor"in s&&"constructor"in i&&!(typeof _=="function"&&_ instanceof _&&typeof v=="function"&&v instanceof v)&&(w=!1),c.delete(s),c.delete(i),w}},{"./_getAllKeys":634}],633:[function(t,f,r){(function(n){(function(){var e=typeof n=="object"&&n&&n.Object===Object&&n;f.exports=e}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],634:[function(t,f,r){var n=t("./_baseGetAllKeys"),e=t("./_getSymbols"),s=t("./keys");f.exports=function(i){return n(i,s,e)}},{"./_baseGetAllKeys":606,"./_getSymbols":639,"./keys":698}],635:[function(t,f,r){var n=t("./_isKeyable");f.exports=function(e,s){return e=e.__data__,n(s)?e[typeof s=="string"?"string":"hash"]:e.map}},{"./_isKeyable":650}],636:[function(t,f,r){var n=t("./_isStrictComparable"),e=t("./keys");f.exports=function(s){for(var i=e(s),l=i.length;l--;){var o=i[l],a=s[o];i[l]=[o,a,n(a)]}return i}},{"./_isStrictComparable":653,"./keys":698}],637:[function(t,f,r){var n=t("./_baseIsNative"),e=t("./_getValue");f.exports=function(s,i){return s=e(s,i),n(s)?s:void 0}},{"./_baseIsNative":613,"./_getValue":641}],638:[function(t,f,r){t=t("./_Symbol");var n=Object.prototype,e=n.hasOwnProperty,s=n.toString,i=t?t.toStringTag:void 0;f.exports=function(l){var o=e.call(l,i),a=l[i];try{var c=!(l[i]=void 0)}catch{}var u=s.call(l);return c&&(o?l[i]=a:delete l[i]),u}},{"./_Symbol":591}],639:[function(t,f,r){var n=t("./_arrayFilter"),e=(t=t("./stubArray"),Object.prototype.propertyIsEnumerable),s=Object.getOwnPropertySymbols;f.exports=s?function(i){return i==null?[]:(i=Object(i),n(s(i),function(l){return e.call(i,l)}))}:t},{"./_arrayFilter":595,"./stubArray":702}],640:[function(t,f,r){var n=t("./_DataView"),e=t("./_Map"),s=t("./_Promise"),i=t("./_Set"),l=t("./_WeakMap"),o=t("./_baseGetTag"),a=t("./_toSource"),c="[object Map]",u="[object Promise]",h="[object Set]",p="[object WeakMap]",m="[object DataView]",b=a(n),_=a(e),v=a(s),w=a(i),x=a(l);t=o,(n&&t(new n(new ArrayBuffer(1)))!=m||e&&t(new e)!=c||s&&t(s.resolve())!=u||i&&t(new i)!=h||l&&t(new l)!=p)&&(t=function(S){var E=o(S);if(S=(S=E=="[object Object]"?S.constructor:void 0)?a(S):"")switch(S){case b:return m;case _:return c;case v:return u;case w:return h;case x:return p}return E}),f.exports=t},{"./_DataView":582,"./_Map":585,"./_Promise":587,"./_Set":588,"./_WeakMap":593,"./_baseGetTag":607,"./_toSource":683}],641:[function(t,f,r){f.exports=function(n,e){return n==null?void 0:n[e]}},{}],642:[function(t,f,r){var n=t("./_castPath"),e=t("./isArguments"),s=t("./isArray"),i=t("./_isIndex"),l=t("./isLength"),o=t("./_toKey");f.exports=function(a,c,u){for(var h=-1,p=(c=n(c,a)).length,m=!1;++h<p;){var b=o(c[h]);if(!(m=a!=null&&u(a,b)))break;a=a[b]}return m||++h!=p?m:!!(p=a==null?0:a.length)&&l(p)&&i(b,p)&&(s(a)||e(a))}},{"./_castPath":625,"./_isIndex":648,"./_toKey":682,"./isArguments":688,"./isArray":689,"./isLength":693}],643:[function(t,f,r){var n=t("./_nativeCreate");f.exports=function(){this.__data__=n?n(null):{},this.size=0}},{"./_nativeCreate":667}],644:[function(t,f,r){f.exports=function(n){return n=this.has(n)&&delete this.__data__[n],this.size-=n?1:0,n}},{}],645:[function(t,f,r){var n=t("./_nativeCreate"),e=Object.prototype.hasOwnProperty;f.exports=function(s){var i,l=this.__data__;return n?(i=l[s])==="__lodash_hash_undefined__"?void 0:i:e.call(l,s)?l[s]:void 0}},{"./_nativeCreate":667}],646:[function(t,f,r){var n=t("./_nativeCreate"),e=Object.prototype.hasOwnProperty;f.exports=function(s){var i=this.__data__;return n?i[s]!==void 0:e.call(i,s)}},{"./_nativeCreate":667}],647:[function(t,f,r){var n=t("./_nativeCreate");f.exports=function(e,s){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&s===void 0?"__lodash_hash_undefined__":s,this}},{"./_nativeCreate":667}],648:[function(t,f,r){var n=/^(?:0|[1-9]\d*)$/;f.exports=function(e,s){var i=typeof e;return!!(s=s??9007199254740991)&&(i=="number"||i!="symbol"&&n.test(e))&&-1<e&&e%1==0&&e<s}},{}],649:[function(t,f,r){var n=t("./isArray"),e=t("./isSymbol"),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;f.exports=function(l,o){if(n(l))return!1;var a=typeof l;return!(a!="number"&&a!="symbol"&&a!="boolean"&&l!=null&&!e(l))||i.test(l)||!s.test(l)||o!=null&&l in Object(o)}},{"./isArray":689,"./isSymbol":696}],650:[function(t,f,r){f.exports=function(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}},{}],651:[function(t,f,r){t=t("./_coreJsData");var n=(t=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";f.exports=function(e){return!!n&&n in e}},{"./_coreJsData":626}],652:[function(t,f,r){var n=Object.prototype;f.exports=function(e){var s=e&&e.constructor;return e===(typeof s=="function"&&s.prototype||n)}},{}],653:[function(t,f,r){var n=t("./isObject");f.exports=function(e){return e==e&&!n(e)}},{"./isObject":694}],654:[function(t,f,r){f.exports=function(){this.__data__=[],this.size=0}},{}],655:[function(t,f,r){var n=t("./_assocIndexOf"),e=Array.prototype.splice;f.exports=function(s){var i=this.__data__;return!((s=n(i,s))<0||(s==i.length-1?i.pop():e.call(i,s,1),--this.size,0))}},{"./_assocIndexOf":600}],656:[function(t,f,r){var n=t("./_assocIndexOf");f.exports=function(e){var s=this.__data__;return(e=n(s,e))<0?void 0:s[e][1]}},{"./_assocIndexOf":600}],657:[function(t,f,r){var n=t("./_assocIndexOf");f.exports=function(e){return-1<n(this.__data__,e)}},{"./_assocIndexOf":600}],658:[function(t,f,r){var n=t("./_assocIndexOf");f.exports=function(e,s){var i=this.__data__,l=n(i,e);return l<0?(++this.size,i.push([e,s])):i[l][1]=s,this}},{"./_assocIndexOf":600}],659:[function(t,f,r){var n=t("./_Hash"),e=t("./_ListCache"),s=t("./_Map");f.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||e),string:new n}}},{"./_Hash":583,"./_ListCache":584,"./_Map":585}],660:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e){return e=n(this,e).delete(e),this.size-=e?1:0,e}},{"./_getMapData":635}],661:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e){return n(this,e).get(e)}},{"./_getMapData":635}],662:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e){return n(this,e).has(e)}},{"./_getMapData":635}],663:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e,s){var i=n(this,e),l=i.size;return i.set(e,s),this.size+=i.size==l?0:1,this}},{"./_getMapData":635}],664:[function(t,f,r){f.exports=function(n){var e=-1,s=Array(n.size);return n.forEach(function(i,l){s[++e]=[l,i]}),s}},{}],665:[function(t,f,r){f.exports=function(n,e){return function(s){return s!=null&&s[n]===e&&(e!==void 0||n in Object(s))}}},{}],666:[function(t,f,r){var n=t("./memoize");f.exports=function(e){var s=(e=n(e,function(i){return s.size===500&&s.clear(),i})).cache;return e}},{"./memoize":699}],667:[function(t,f,r){t=t("./_getNative")(Object,"create"),f.exports=t},{"./_getNative":637}],668:[function(t,f,r){t=t("./_overArg")(Object.keys,Object),f.exports=t},{"./_overArg":671}],669:[function(t,f,r){t=t("./_freeGlobal");var n=(r=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f,e=n&&n.exports===r&&t.process;r=function(){try{return n&&n.require&&n.require("util").types||e&&e.binding&&e.binding("util")}catch{}}(),f.exports=r},{"./_freeGlobal":633}],670:[function(t,f,r){var n=Object.prototype.toString;f.exports=function(e){return n.call(e)}},{}],671:[function(t,f,r){f.exports=function(n,e){return function(s){return n(e(s))}}},{}],672:[function(t,f,r){t=t("./_freeGlobal");var n=typeof self=="object"&&self&&self.Object===Object&&self;t=t||n||Function("return this")(),f.exports=t},{"./_freeGlobal":633}],673:[function(t,f,r){f.exports=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this}},{}],674:[function(t,f,r){f.exports=function(n){return this.__data__.has(n)}},{}],675:[function(t,f,r){f.exports=function(n){var e=-1,s=Array(n.size);return n.forEach(function(i){s[++e]=i}),s}},{}],676:[function(t,f,r){var n=t("./_ListCache");f.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":584}],677:[function(t,f,r){f.exports=function(n){var e=this.__data__;return n=e.delete(n),this.size=e.size,n}},{}],678:[function(t,f,r){f.exports=function(n){return this.__data__.get(n)}},{}],679:[function(t,f,r){f.exports=function(n){return this.__data__.has(n)}},{}],680:[function(t,f,r){var n=t("./_ListCache"),e=t("./_Map"),s=t("./_MapCache");f.exports=function(i,l){var o=this.__data__;if(o instanceof n){var a=o.__data__;if(!e||a.length<199)return a.push([i,l]),this.size=++o.size,this;o=this.__data__=new s(a)}return o.set(i,l),this.size=o.size,this}},{"./_ListCache":584,"./_Map":585,"./_MapCache":586}],681:[function(t,f,r){t=t("./_memoizeCapped");var n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g;t=t(function(s){var i=[];return s.charCodeAt(0)===46&&i.push(""),s.replace(n,function(l,o,a,c){i.push(a?c.replace(e,"$1"):o||l)}),i}),f.exports=t},{"./_memoizeCapped":666}],682:[function(t,f,r){var n=t("./isSymbol");f.exports=function(e){if(typeof e=="string"||n(e))return e;var s=e+"";return s=="0"&&1/e==-1/0?"-0":s}},{"./isSymbol":696}],683:[function(t,f,r){var n=Function.prototype.toString;f.exports=function(e){if(e!=null){try{return n.call(e)}catch{}try{return e+""}catch{}}return""}},{}],684:[function(t,f,r){f.exports=function(n,e){return n===e||n!=n&&e!=e}},{}],685:[function(t,f,r){var n=t("./_baseGet");f.exports=function(e,s,i){return(e=e==null?void 0:n(e,s))===void 0?i:e}},{"./_baseGet":605}],686:[function(t,f,r){var n=t("./_baseHasIn"),e=t("./_hasPath");f.exports=function(s,i){return s!=null&&e(s,i,n)}},{"./_baseHasIn":608,"./_hasPath":642}],687:[function(t,f,r){f.exports=function(n){return n}},{}],688:[function(t,f,r){var n=t("./_baseIsArguments"),e=t("./isObjectLike"),s=(t=Object.prototype).hasOwnProperty,i=t.propertyIsEnumerable;t=n(function(){return arguments}())?n:function(l){return e(l)&&s.call(l,"callee")&&!i.call(l,"callee")},f.exports=t},{"./_baseIsArguments":609,"./isObjectLike":695}],689:[function(t,f,r){var n=Array.isArray;f.exports=n},{}],690:[function(t,f,r){var n=t("./isFunction"),e=t("./isLength");f.exports=function(s){return s!=null&&e(s.length)&&!n(s)}},{"./isFunction":692,"./isLength":693}],691:[function(t,f,r){var n,e=t("./_root");t=t("./stubFalse"),r=(n=(n=(r=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f)&&n.exports===r?e.Buffer:void 0)?n.isBuffer:void 0,f.exports=r||t},{"./_root":672,"./stubFalse":703}],692:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isObject");f.exports=function(s){return!!e(s)&&((s=n(s))=="[object Function]"||s=="[object GeneratorFunction]"||s=="[object AsyncFunction]"||s=="[object Proxy]")}},{"./_baseGetTag":607,"./isObject":694}],693:[function(t,f,r){f.exports=function(n){return typeof n=="number"&&-1<n&&n%1==0&&n<=9007199254740991}},{}],694:[function(t,f,r){f.exports=function(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}},{}],695:[function(t,f,r){f.exports=function(n){return n!=null&&typeof n=="object"}},{}],696:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isObjectLike");f.exports=function(s){return typeof s=="symbol"||e(s)&&n(s)=="[object Symbol]"}},{"./_baseGetTag":607,"./isObjectLike":695}],697:[function(t,f,r){var n=t("./_baseIsTypedArray"),e=t("./_baseUnary");e=(t=(t=t("./_nodeUtil"))&&t.isTypedArray)?e(t):n,f.exports=e},{"./_baseIsTypedArray":614,"./_baseUnary":623,"./_nodeUtil":669}],698:[function(t,f,r){var n=t("./_arrayLikeKeys"),e=t("./_baseKeys"),s=t("./isArrayLike");f.exports=function(i){return(s(i)?n:e)(i)}},{"./_arrayLikeKeys":596,"./_baseKeys":616,"./isArrayLike":690}],699:[function(t,f,r){var n=t("./_MapCache");function e(s,i){if(typeof s!="function"||i!=null&&typeof i!="function")throw new TypeError("Expected a function");function l(){var o=arguments,a=i?i.apply(this,o):o[0],c=l.cache;return c.has(a)?c.get(a):(o=s.apply(this,o),l.cache=c.set(a,o)||c,o)}return l.cache=new(e.Cache||n),l}e.Cache=n,f.exports=e},{"./_MapCache":586}],700:[function(t,f,r){t=t("./_createAggregator")(function(n,e,s){n[s?0:1].push(e)},function(){return[[],[]]}),f.exports=t},{"./_createAggregator":627}],701:[function(t,f,r){var n=t("./_baseProperty"),e=t("./_basePropertyDeep"),s=t("./_isKey"),i=t("./_toKey");f.exports=function(l){return s(l)?n(i(l)):e(l)}},{"./_baseProperty":619,"./_basePropertyDeep":620,"./_isKey":649,"./_toKey":682}],702:[function(t,f,r){f.exports=function(){return[]}},{}],703:[function(t,f,r){f.exports=function(){return!1}},{}],704:[function(t,f,r){var n=t("./_baseToString");f.exports=function(e){return e==null?"":n(e)}},{"./_baseToString":622}],705:[function(t,f,r){arguments[4][194][0].apply(r,arguments)},{"./lib/deflate":706,"./lib/inflate":707,"./lib/utils/common":708,"./lib/zlib/constants":711,dup:194}],706:[function(t,f,r){arguments[4][195][0].apply(r,arguments)},{"./utils/common":708,"./utils/strings":709,"./zlib/deflate":713,"./zlib/messages":718,"./zlib/zstream":720,dup:195}],707:[function(t,f,r){arguments[4][196][0].apply(r,arguments)},{"./utils/common":708,"./utils/strings":709,"./zlib/constants":711,"./zlib/gzheader":714,"./zlib/inflate":716,"./zlib/messages":718,"./zlib/zstream":720,dup:196}],708:[function(t,f,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],709:[function(t,f,r){arguments[4][198][0].apply(r,arguments)},{"./common":708,dup:198}],710:[function(t,f,r){arguments[4][199][0].apply(r,arguments)},{dup:199}],711:[function(t,f,r){arguments[4][200][0].apply(r,arguments)},{dup:200}],712:[function(t,f,r){arguments[4][201][0].apply(r,arguments)},{dup:201}],713:[function(t,f,r){arguments[4][202][0].apply(r,arguments)},{"../utils/common":708,"./adler32":710,"./crc32":712,"./messages":718,"./trees":719,dup:202}],714:[function(t,f,r){arguments[4][203][0].apply(r,arguments)},{dup:203}],715:[function(t,f,r){arguments[4][204][0].apply(r,arguments)},{dup:204}],716:[function(t,f,r){arguments[4][205][0].apply(r,arguments)},{"../utils/common":708,"./adler32":710,"./crc32":712,"./inffast":715,"./inftrees":717,dup:205}],717:[function(t,f,r){arguments[4][206][0].apply(r,arguments)},{"../utils/common":708,dup:206}],718:[function(t,f,r){arguments[4][207][0].apply(r,arguments)},{dup:207}],719:[function(t,f,r){arguments[4][208][0].apply(r,arguments)},{"../utils/common":708,dup:208}],720:[function(t,f,r){arguments[4][209][0].apply(r,arguments)},{dup:209}],721:[function(t,f,r){var n,e=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e(t("lodash.clonedeep"))),i=e(t("lodash.isequal"));(e=n=n||{}).compose=function(l,o,a){typeof(l=l===void 0?{}:l)!="object"&&(l={});var c,u=s.default(o=typeof(o=o===void 0?{}:o)!="object"?{}:o);for(c in a||(u=Object.keys(u).reduce(function(h,p){return u[p]!=null&&(h[p]=u[p]),h},{})),l)l[c]!==void 0&&o[c]===void 0&&(u[c]=l[c]);return 0<Object.keys(u).length?u:void 0},e.diff=function(l,o){typeof(l=l===void 0?{}:l)!="object"&&(l={}),typeof(o=o===void 0?{}:o)!="object"&&(o={});var a=Object.keys(l).concat(Object.keys(o)).reduce(function(c,u){return i.default(l[u],o[u])||(c[u]=o[u]===void 0?null:o[u]),c},{});return 0<Object.keys(a).length?a:void 0},e.invert=function(l,o){o===void 0&&(o={}),l=(l=l===void 0?{}:l)||{};var a=Object.keys(o).reduce(function(c,u){return o[u]!==l[u]&&l[u]!==void 0&&(c[u]=o[u]),c},{});return Object.keys(l).reduce(function(c,u){return l[u]!==o[u]&&o[u]===void 0&&(c[u]=null),c},a)},e.transform=function(l,o,a){return a===void 0&&(a=!1),typeof l!="object"?o:typeof o=="object"?a?(a=Object.keys(o).reduce(function(c,u){return l[u]===void 0&&(c[u]=o[u]),c},{}),0<Object.keys(a).length?a:void 0):o:void 0},r.default=n},{"lodash.clonedeep":580,"lodash.isequal":581}],722:[function(t,f,r){var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},e=n(t("fast-diff")),s=n(t("lodash.clonedeep")),i=n(t("lodash.isequal")),l=n(t("./AttributeMap")),o=n(t("./Op")),a=String.fromCharCode(0);function c(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]}c.prototype.insert=function(u,h){var p={};return typeof u=="string"&&u.length===0?this:(p.insert=u,h!=null&&typeof h=="object"&&0<Object.keys(h).length&&(p.attributes=h),this.push(p))},c.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},c.prototype.retain=function(u,h){return u<=0?this:(u={retain:u},h!=null&&typeof h=="object"&&0<Object.keys(h).length&&(u.attributes=h),this.push(u))},c.prototype.push=function(u){var h=this.ops.length,p=this.ops[h-1];if(u=s.default(u),typeof p=="object"){if(typeof u.delete=="number"&&typeof p.delete=="number")return this.ops[h-1]={delete:p.delete+u.delete},this;if(typeof p.delete=="number"&&u.insert!=null&&typeof(p=this.ops[--h-1])!="object")return this.ops.unshift(u),this;if(i.default(u.attributes,p.attributes)){if(typeof u.insert=="string"&&typeof p.insert=="string")return this.ops[h-1]={insert:p.insert+u.insert},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof p.retain=="number")return this.ops[h-1]={retain:p.retain+u.retain},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this}}return h===this.ops.length?this.ops.push(u):this.ops.splice(h,0,u),this},c.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},c.prototype.filter=function(u){return this.ops.filter(u)},c.prototype.forEach=function(u){this.ops.forEach(u)},c.prototype.map=function(u){return this.ops.map(u)},c.prototype.partition=function(u){var h=[],p=[];return this.forEach(function(m){(u(m)?h:p).push(m)}),[h,p]},c.prototype.reduce=function(u,h){return this.ops.reduce(u,h)},c.prototype.changeLength=function(){return this.reduce(function(u,h){return h.insert?u+o.default.length(h):h.delete?u-h.delete:u},0)},c.prototype.length=function(){return this.reduce(function(u,h){return u+o.default.length(h)},0)},c.prototype.slice=function(u,h){u===void 0&&(u=0),h===void 0&&(h=1/0);for(var p=[],m=o.default.iterator(this.ops),b=0;b<h&&m.hasNext();){var _=void 0;b<u?_=m.next(u-b):(_=m.next(h-b),p.push(_)),b+=o.default.length(_)}return new c(p)},c.prototype.compose=function(u){var h=o.default.iterator(this.ops),p=o.default.iterator(u.ops),m=[];if((u=p.peek())!=null&&typeof u.retain=="number"&&u.attributes==null){for(var b=u.retain;h.peekType()==="insert"&&h.peekLength()<=b;)b-=h.peekLength(),m.push(h.next());0<u.retain-b&&p.next(u.retain-b)}for(var _=new c(m);h.hasNext()||p.hasNext();)if(p.peekType()==="insert")_.push(p.next());else if(h.peekType()==="delete")_.push(h.next());else{var v=Math.min(h.peekLength(),p.peekLength()),w=h.next(v),x=p.next(v);if(typeof x.retain=="number"){var S={};if(typeof w.retain=="number"?S.retain=v:S.insert=w.insert,(v=l.default.compose(w.attributes,x.attributes,typeof w.retain=="number"))&&(S.attributes=v),_.push(S),!p.hasNext()&&i.default(_.ops[_.ops.length-1],S))return v=new c(h.rest()),_.concat(v).chop()}else typeof x.delete=="number"&&typeof w.retain=="number"&&_.push(x)}return _.chop()},c.prototype.concat=function(u){var h=new c(this.ops.slice());return 0<u.ops.length&&(h.push(u.ops[0]),h.ops=h.ops.concat(u.ops.slice(1))),h},c.prototype.diff=function(u,h){if(this.ops===u.ops)return new c;var p=[this,u].map(function(v){return v.map(function(w){if(w.insert!=null)return typeof w.insert=="string"?w.insert:a;throw new Error("diff() called "+(v===u?"on":"with")+" non-document")}).join("")}),m=new c,b=(p=e.default(p[0],p[1],h),o.default.iterator(this.ops)),_=o.default.iterator(u.ops);return p.forEach(function(v){for(var w=v[1].length;0<w;){var x=0;switch(v[0]){case e.default.INSERT:x=Math.min(_.peekLength(),w),m.push(_.next(x));break;case e.default.DELETE:x=Math.min(w,b.peekLength()),b.next(x),m.delete(x);break;case e.default.EQUAL:x=Math.min(b.peekLength(),_.peekLength(),w);var S=b.next(x),E=_.next(x);i.default(S.insert,E.insert)?m.retain(x,l.default.diff(S.attributes,E.attributes)):m.push(E).delete(x)}w-=x}}),m.chop()},c.prototype.eachLine=function(u,h){h===void 0&&(h=`
|
|
198
|
-
`);for(var p=o.default.iterator(this.ops),m=new c,b=0;p.hasNext();){if(p.peekType()!=="insert")return;var _=p.peek(),v=o.default.length(_)-p.peekLength();if((_=typeof _.insert=="string"?_.insert.indexOf(h,v)-v:-1)<0)m.push(p.next());else if(0<_)m.push(p.next(_));else{if(u(m,p.next(1).attributes||{},b)===!1)return;b+=1,m=new c}}0<m.length()&&u(m,{},b)},c.prototype.invert=function(u){var h=new c;return this.reduce(function(p,m){if(m.insert)h.delete(o.default.length(m));else{if(m.retain&&m.attributes==null)return h.retain(m.retain),p+m.retain;var b;if(m.delete||m.retain&&m.attributes)return b=m.delete||m.retain,u.slice(p,p+b).forEach(function(_){m.delete?h.push(_):m.retain&&m.attributes&&h.retain(o.default.length(_),l.default.invert(m.attributes,_.attributes))}),p+b}return p},0),h.chop()},c.prototype.transform=function(u,h){if(h=!!(h=h!==void 0&&h),typeof u=="number")return this.transformPosition(u,h);for(var p,m,b,_=o.default.iterator(this.ops),v=o.default.iterator(u.ops),w=new c;_.hasNext()||v.hasNext();)_.peekType()!=="insert"||!h&&v.peekType()==="insert"?v.peekType()==="insert"?w.push(v.next()):(p=Math.min(_.peekLength(),v.peekLength()),m=_.next(p),b=v.next(p),m.delete||(b.delete?w.push(b):w.retain(p,l.default.transform(m.attributes,b.attributes,h)))):w.retain(o.default.length(_.next()));return w.chop()},c.prototype.transformPosition=function(u,h){h=!!(h=h!==void 0&&h);for(var p=o.default.iterator(this.ops),m=0;p.hasNext()&&m<=u;){var b=p.peekLength(),_=p.peekType();p.next(),_==="delete"?u-=Math.min(b,u-m):(_==="insert"&&(m<u||!h)&&(u+=b),m+=b)}return u},c.Op=o.default,c.AttributeMap=l.default,f.exports=c},{"./AttributeMap":721,"./Op":724,"fast-diff":579,"lodash.clonedeep":580,"lodash.isequal":581}],723:[function(t,f,r){var n=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=(Object.defineProperty(r,"__esModule",{value:!0}),n(t("./Op")));function s(i){this.ops=i,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(i){i=i||1/0;var l,o,a=this.ops[this.index];return a?(l=this.offset,(o=e.default.length(a))-l<=i?(i=o-l,this.index+=1,this.offset=0):this.offset+=i,typeof a.delete=="number"?{delete:i}:(o={},a.attributes&&(o.attributes=a.attributes),typeof a.retain=="number"?o.retain=i:typeof a.insert=="string"?o.insert=a.insert.substr(l,i):o.insert=a.insert,o)):{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?e.default.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},s.prototype.rest=function(){var i,l,o,a;return this.hasNext()?this.offset===0?this.ops.slice(this.index):(i=this.offset,l=this.index,o=this.next(),a=this.ops.slice(this.index),this.offset=i,this.index=l,[o].concat(a)):[]},r.default=s},{"./Op":724}],724:[function(t,f,r){var n,e=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e(t("./Iterator")));(e=n=n||{}).iterator=function(i){return new s.default(i)},e.length=function(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1},r.default=n},{"./Iterator":723}],725:[function(t,f,r){var n;n=function(){var e="object",s="function",i="undefined",l=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],o=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],a=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],c=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u(L,B){var Y=typeof L[B];return Y==s||!(Y!=e||!L[B])||Y=="unknown"}function h(L,B){return!(typeof L[B]!=e||!L[B])}function p(L,B){return typeof L[B]!=i}function m(L){return function(B,Y){for(var Z=Y.length;Z--;)if(!L(B,Y[Z]))return!1;return!0}}var b=m(u),_=m(h),v=m(p);function w(L){return L&&b(L,c)&&v(L,a)}function x(L){return h(L,"body")?L.body:L.getElementsByTagName("body")[0]}var S,E,k,D={},N=typeof window!=i&&typeof document!=i,O={isHostMethod:u,isHostObject:h,isHostProperty:p,areHostMethods:b,areHostObjects:_,areHostProperties:v,isTextRange:w,getBody:x,forEach:[].forEach?function(L,B){L.forEach(B)}:function(L,B){for(var Y=0,Z=L.length;Y<Z;++Y)B(L[Y],Y)}},R={version:"1.3.1",initialized:!1,isBrowser:N,supported:!0,util:O,features:{},modules:D,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==i||rangyAutoInitialize}};function A(L){typeof console!=i&&u(console,"log")&&console.log(L)}function z(L,B){(N&&B?alert:A)(L)}function H(L){R.initialized=!0,R.supported=!1,z("Rangy is not supported in this environment. Reason: "+L,R.config.alertOnFail)}if(R.fail=H,R.warn=function(L){z("Rangy warning: "+L,R.config.alertOnWarn)},{}.hasOwnProperty?(O.extend=S=function(L,B,Y){var Z,rt,Q;for(Q in B)B.hasOwnProperty(Q)&&(Z=L[Q],rt=B[Q],Y&&Z!==null&&typeof Z=="object"&&rt!==null&&typeof rt=="object"&&S(Z,rt,!0),L[Q]=rt);return B.hasOwnProperty("toString")&&(L.toString=B.toString),L},O.createOptions=function(L,B){var Y={};return S(Y,B),L&&S(Y,L),Y}):H("hasOwnProperty not supported"),N||H("Rangy can only run in a browser"),N){var $=((_=document.createElement("div")).appendChild(document.createElement("span")),[].slice);try{$.call(_.childNodes,0)[0].nodeType==1&&(E=function(L){return $.call(L,0)})}catch{}}O.toArray=E=E||function(L){for(var B=[],Y=0,Z=L.length;Y<Z;++Y)B[Y]=L[Y];return B},N&&(u(document,"addEventListener")?k=function(L,B,Y){L.addEventListener(B,Y,!1)}:u(document,"attachEvent")?k=function(L,B,Y){L.attachEvent("on"+B,Y)}:H("Document does not have required addEventListener or attachEvent method"),O.addListener=k);var M=[];function J(L){return L.message||L.description||String(L)}function K(){if(N&&!R.initialized){var L,B,Y,Z=!1,rt=!1,Q=(u(document,"createRange")&&(L=document.createRange(),b(L,o)&&v(L,l)&&(Z=!0)),x(document));if(Q&&Q.nodeName.toLowerCase()=="body")if(Q&&u(Q,"createTextRange")&&w(L=Q.createTextRange())&&(rt=!0),Z||rt){for(Y in R.initialized=!0,R.features={implementsDomRange:Z,implementsTextRange:rt},D)(B=D[Y])instanceof G&&B.init(B,R);for(var tt=0,nt=M.length;tt<nt;++tt)try{M[tt](R)}catch(et){A("Rangy init listener threw an exception. Continuing. Detail: "+J(et))}}else H("Neither Range nor TextRange are available");else H("No body element found")}}function P(L,B,Y){Y&&(L+=" in module "+Y.name),R.warn("DEPRECATED: "+L+" is deprecated. Please use "+B+" instead.")}function U(L,B,Y,Z){L[B]=function(){return P(B,Y,Z),L[Y].apply(L,O.toArray(arguments))}}O.deprecationNotice=P,O.createAliasForDeprecatedMethod=U,R.init=K,R.addInitListener=function(L){R.initialized?L(R):M.push(L)};var V=[];function G(L,B,Y){this.name=L,this.dependencies=B,this.initialized=!1,this.supported=!1,this.initializer=Y}function F(L,B,Y){return B=new G(L,B,function(Z){if(!Z.initialized){Z.initialized=!0;try{Y(R,Z),Z.supported=!0}catch(rt){A("Module '"+L+"' failed to load: "+J(rt)),rt.stack&&A(rt.stack)}}}),D[L]=B}function q(){}function T(L){I||(I=!0,!R.initialized&&R.config.autoInitialize&&K())}R.addShimListener=function(L){V.push(L)},N&&(R.shim=R.createMissingNativeApi=function(L){L=L||window,K();for(var B=0,Y=V.length;B<Y;++B)V[B](L)},U(R,"createMissingNativeApi","shim")),G.prototype={init:function(){for(var L,B,Y=this.dependencies||[],Z=0,rt=Y.length;Z<rt;++Z){if(B=Y[Z],!((L=D[B])&&L instanceof G))throw new Error("required module '"+B+"' not found");if(L.init(),!L.supported)throw new Error("required module '"+B+"' not supported")}this.initializer(this)},fail:function(L){throw this.initialized=!0,this.supported=!1,new Error(L)},warn:function(L){R.warn("Module "+this.name+": "+L)},deprecationNotice:function(L,B){R.warn("DEPRECATED: "+L+" in module "+this.name+" is deprecated. Please use "+B+" instead")},createError:function(L){return new Error("Error in Rangy "+this.name+" module: "+L)}},R.createModule=function(L){var B,Y=F(L,Y=arguments.length==2?(B=arguments[1],[]):(B=arguments[2],arguments[1]),B);R.initialized&&R.supported&&Y.init()},R.createCoreModule=function(L,B,Y){F(L,B,Y)},R.RangePrototype=q,R.rangePrototype=new q,R.selectionPrototype=new function(){},R.createCoreModule("DomUtil",[],function(L,B){function Y(ht,dt){for(var Ft=ht.length;Ft--;)if(ht[Ft]===dt)return!0;return!1}var Z,rt,Q,tt="undefined",nt=L.util,et=nt.getBody,at=(nt.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||B.fail("document missing a Node creation method"),nt.isHostMethod(document,"getElementsByTagName")||B.fail("document missing getElementsByTagName method"),document.createElement("div"));function ct(ht){for(var dt=0;ht=ht.previousSibling;)++dt;return dt}function gt(ht,dt){for(var Ft=[],Jt=ht;Jt;Jt=Jt.parentNode)Ft.push(Jt);for(Jt=dt;Jt;Jt=Jt.parentNode)if(Y(Ft,Jt))return Jt;return null}function wt(ht,dt,Ft){for(var Jt=Ft?dt:dt.parentNode;Jt;){if(Jt===ht)return!0;Jt=Jt.parentNode}return!1}function St(ht,dt,Ft){for(var Jt,Xt=Ft?ht:ht.parentNode;Xt;){if((Jt=Xt.parentNode)===dt)return Xt;Xt=Jt}return null}function Mt(ht){return(ht=ht.nodeType)==3||ht==4||ht==8}function Lt(ht,dt){var Ft=dt.nextSibling;return dt=dt.parentNode,Ft?dt.insertBefore(ht,Ft):dt.appendChild(ht),ht}function Pt(ht){if(ht.nodeType==9)return ht;if(typeof ht.ownerDocument!=tt)return ht.ownerDocument;if(typeof ht.document!=tt)return ht.document;if(ht.parentNode)return Pt(ht.parentNode);throw B.createError("getDocument: no document found for node")}function yt(ht){if(typeof(ht=Pt(ht)).defaultView!=tt)return ht.defaultView;if(typeof ht.parentWindow!=tt)return ht.parentWindow;throw B.createError("Cannot get a window object for node")}function jt(ht){if(typeof ht.contentDocument!=tt)return ht.contentDocument;if(typeof ht.contentWindow!=tt)return ht.contentWindow.document;throw B.createError("getIframeDocument: No Document object found for iframe element")}function At(ht){return ht&&nt.isHostMethod(ht,"setTimeout")&&nt.isHostObject(ht,"document")}function It(ht){try{return ht.parentNode,!1}catch{return!0}}function Ot(ht){return ht?Z&&It(ht)?"[Broken node]":Mt(ht)?'"'+ht.data+'"':ht.nodeType==1?(dt=ht.id?' id="'+ht.id+'"':"","<"+ht.nodeName+dt+">[index:"+ct(ht)+",length:"+ht.childNodes.length+"]["+(ht.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"):ht.nodeName:"[No node]";var dt}function Et(ht){this.root=ht,this._next=ht}function Ct(ht,dt){this.node=ht,this.offset=dt}function Nt(ht){this.code=this[ht],this.codeName=ht,this.message="DOMException: "+this.codeName}nt.areHostMethods(at,["insertBefore","appendChild","cloneNode"])||B.fail("Incomplete Element implementation"),nt.isHostProperty(at,"innerHTML")||B.fail("Element is missing innerHTML property"),at=document.createTextNode("test"),nt.areHostMethods(at,["splitText","deleteData","insertData","appendData","cloneNode"])||B.fail("Incomplete Text Node implementation"),(at=document.createElement("b")).innerHTML="1",rt=at.firstChild,at.innerHTML="<br />",Z=It(rt),L.features.crashyTextNodes=Z,typeof window.getComputedStyle!=tt?Q=function(ht,dt){return yt(ht).getComputedStyle(ht,null)[dt]}:typeof document.documentElement.currentStyle!=tt?Q=function(ht,dt){return ht.currentStyle?ht.currentStyle[dt]:""}:B.fail("No means of obtaining computed style properties found"),Et.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var ht,dt,Ft=this._current=this._next;if(this._current)if(ht=Ft.firstChild)this._next=ht;else{for(dt=null;Ft!==this.root&&!(dt=Ft.nextSibling);)Ft=Ft.parentNode;this._next=dt}return this._current},detach:function(){this._current=this._next=this.root=null}},Ct.prototype={equals:function(ht){return!!ht&&this.node===ht.node&&this.offset==ht.offset},inspect:function(){return"[DomPosition("+Ot(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},(Nt.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24}).toString=function(){return this.message},L.dom={arrayContains:Y,isHtmlNamespace:function(ht){return typeof ht.namespaceURI==tt||(ht=ht.namespaceURI)===null||ht=="http://www.w3.org/1999/xhtml"},parentElement:function(ht){return(ht=ht.parentNode).nodeType==1?ht:null},getNodeIndex:ct,getNodeLength:function(ht){switch(ht.nodeType){case 7:case 10:return 0;case 3:case 8:return ht.length;default:return ht.childNodes.length}},getCommonAncestor:gt,isAncestorOf:wt,isOrIsAncestorOf:function(ht,dt){return wt(ht,dt,!0)},getClosestAncestorIn:St,isCharacterDataNode:Mt,isTextOrCommentNode:function(ht){return!!ht&&((ht=ht.nodeType)==3||ht==8)},insertAfter:Lt,splitDataNode:function(ht,dt,Ft){var Jt=ht.cloneNode(!1);if(Jt.deleteData(0,dt),ht.deleteData(dt,ht.length-dt),Lt(Jt,ht),Ft)for(var Xt,Qt=0;Xt=Ft[Qt++];)Xt.node==ht&&Xt.offset>dt?(Xt.node=Jt,Xt.offset-=dt):Xt.node==ht.parentNode&&Xt.offset>ct(ht)&&++Xt.offset;return Jt},getDocument:Pt,getWindow:yt,getIframeWindow:function(ht){if(typeof ht.contentWindow!=tt)return ht.contentWindow;if(typeof ht.contentDocument!=tt)return ht.contentDocument.defaultView;throw B.createError("getIframeWindow: No Window object found for iframe element")},getIframeDocument:jt,getBody:et,isWindow:At,getContentDocument:function(ht,dt,Ft){var Jt;if(ht?nt.isHostProperty(ht,"nodeType")?Jt=(ht.nodeType==1&&ht.tagName.toLowerCase()=="iframe"?jt:Pt)(ht):At(ht)&&(Jt=ht.document):Jt=document,Jt)return Jt;throw dt.createError(Ft+"(): Parameter must be a Window object or DOM node")},getRootContainer:function(ht){for(var dt;dt=ht.parentNode;)ht=dt;return ht},comparePoints:function(ht,dt,Ft,Jt){var Xt,Qt,ve,kt;if(ht==Ft)return dt===Jt?0:dt<Jt?-1:1;if(Xt=St(Ft,ht,!0))return dt<=ct(Xt)?-1:1;if(Xt=St(ht,Ft,!0))return ct(Xt)<Jt?-1:1;if(!(dt=gt(ht,Ft)))throw new Error("comparePoints error: nodes have no common ancestor");if((Qt=ht===dt?dt:St(ht,dt,!0))===(ve=Ft===dt?dt:St(Ft,dt,!0)))throw B.createError("comparePoints got to case 4 and childA and childB are the same!");for(kt=dt.firstChild;kt;){if(kt===Qt)return-1;if(kt===ve)return 1;kt=kt.nextSibling}},isBrokenNode:It,inspectNode:Ot,getComputedStyleProperty:Q,createTestElement:function(ht,dt,Ft){var Jt=et(ht);return(ht=ht.createElement("div")).contentEditable=""+!!Ft,dt&&(ht.innerHTML=dt),(Ft=Jt.firstChild)?Jt.insertBefore(ht,Ft):Jt.appendChild(ht),ht},removeNode:function(ht){return ht.parentNode.removeChild(ht)},fragmentFromNodeChildren:function(ht){for(var dt,Ft=Pt(ht).createDocumentFragment();dt=ht.firstChild;)Ft.appendChild(dt);return Ft},createIterator:function(ht){return new Et(ht)},DomPosition:Ct},L.DOMException=Nt}),R.createCoreModule("DomRange",["DomUtil"],function(L,B){var Y=L.dom,Z=L.util,rt=Y.DomPosition,Q=L.DOMException,tt=Y.isCharacterDataNode,nt=Y.getNodeIndex,et=Y.isOrIsAncestorOf,at=Y.getDocument,ct=Y.comparePoints,gt=Y.splitDataNode,wt=Y.getClosestAncestorIn,St=Y.getNodeLength,Mt=Y.arrayContains,Lt=Y.getRootContainer,Pt=L.features.crashyTextNodes,yt=Y.removeNode;function jt(X,lt){return X.nodeType!=3&&(et(X,lt.startContainer)||et(X,lt.endContainer))}function At(X){return X.document||at(X.startContainer)}function It(X){return new rt(X.parentNode,nt(X))}function Ot(X){return new rt(X.parentNode,nt(X)+1)}function Et(X,lt,vt){var Vt=X.nodeType==11?X.firstChild:X;return tt(lt)?vt==lt.length?Y.insertAfter(X,lt):lt.parentNode.insertBefore(X,vt==0?lt:gt(lt,vt)):vt>=lt.childNodes.length?lt.appendChild(X):lt.insertBefore(X,lt.childNodes[vt]),Vt}function Ct(X,lt,vt){if(Oe(X),Oe(lt),At(lt)!=At(X))throw new Q("WRONG_DOCUMENT_ERR");var Vt=ct(X.startContainer,X.startOffset,lt.endContainer,lt.endOffset);return X=ct(X.endContainer,X.endOffset,lt.startContainer,lt.startOffset),vt?Vt<=0&&0<=X:Vt<0&&0<X}function Nt(X,lt,vt){var Vt,te,Zt,Yt;for(vt=vt||{stop:!1};Zt=X.next();)if(X.isPartiallySelectedSubtree()){if(lt(Zt)===!1)return void(vt.stop=!0);if(Nt(Yt=X.getSubtreeIterator(),lt,vt),Yt.detach(),vt.stop)return}else for(Vt=Y.createIterator(Zt);te=Vt.next();)if(lt(te)===!1)return void(vt.stop=!0)}function ht(X){for(var lt;X.next();)X.isPartiallySelectedSubtree()?(ht(lt=X.getSubtreeIterator()),lt.detach()):X.remove()}function dt(X){for(var lt,vt,Vt=At(X.range).createDocumentFragment();lt=X.next();){if(X.isPartiallySelectedSubtree()?(lt=lt.cloneNode(!1),vt=X.getSubtreeIterator(),lt.appendChild(dt(vt)),vt.detach()):X.remove(),lt.nodeType==10)throw new Q("HIERARCHY_REQUEST_ERR");Vt.appendChild(lt)}return Vt}function Ft(X){return"["+(X.getName===void 0?"Range":X.getName())+"("+Y.inspectNode(X.startContainer)+":"+X.startOffset+", "+Y.inspectNode(X.endContainer)+":"+X.endOffset+")]"}function Jt(X,lt){this.range=X,this.clonePartiallySelectedTextNodes=lt,X.collapsed||(this.sc=X.startContainer,this.so=X.startOffset,this.ec=X.endContainer,this.eo=X.endOffset,lt=X.commonAncestorContainer,this.sc===this.ec&&tt(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==lt||tt(this.sc)?wt(this.sc,lt,!0):this.sc.childNodes[this.so],this._last=this.ec!==lt||tt(this.ec)?wt(this.ec,lt,!0):this.ec.childNodes[this.eo-1]))}Jt.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var X=this._current=this._next;return X&&(this._next=X!==this._last?X.nextSibling:null,tt(X)&&this.clonePartiallySelectedTextNodes&&(X===this.ec&&(X=X.cloneNode(!0)).deleteData(this.eo,X.length-this.eo),this._current===this.sc&&(X=X.cloneNode(!0)).deleteData(0,this.so))),X},remove:function(){var X,lt,vt=this._current;!tt(vt)||vt!==this.sc&&vt!==this.ec?vt.parentNode&&yt(vt):(X=vt===this.sc?this.so:0)!=(lt=vt===this.ec?this.eo:vt.length)&&vt.deleteData(X,lt-X)},isPartiallySelectedSubtree:function(){return jt(this._current,this.range)},getSubtreeIterator:function(){var X,lt,vt,Vt,te,Zt;return this.isSingleCharacterDataNode?(X=this.range.cloneRange()).collapse(!1):(X=new oe(At(this.range)),lt=this._current,Vt=0,Zt=St(te=vt=lt),et(lt,this.sc)&&(vt=this.sc,Vt=this.so),et(lt,this.ec)&&(te=this.ec,Zt=this.eo),Wt(X,vt,Vt,te,Zt)),new Jt(X,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var Xt=[1,3,4,5,7,8,10],Qt=[2,9,11],ve=[1,3,4,5,7,8,10,11],kt=[1,3,4,5,7,8];function ee(X){return function(lt,vt){for(var Vt,te=vt?lt:lt.parentNode;te;){if(Vt=te.nodeType,Mt(X,Vt))return te;te=te.parentNode}return null}}var pe=ee([9,11]),Le=ee([5,6,10,12]),Be=ee([6,10,12]),qe=ee([1]);function ze(X,lt){if(Be(X,lt))throw new Q("INVALID_NODE_TYPE_ERR")}function Ie(X,lt){if(!Mt(lt,X.nodeType))throw new Q("INVALID_NODE_TYPE_ERR")}function He(X,lt){if(lt<0||lt>(tt(X)?X:X.childNodes).length)throw new Q("INDEX_SIZE_ERR")}function hn(X,lt){if(pe(X,!0)!==pe(lt,!0))throw new Q("WRONG_DOCUMENT_ERR")}function Tt(X){if(Le(X,!0))throw new Q("NO_MODIFICATION_ALLOWED_ERR")}function ae(X,lt){if(!X)throw new Q(lt)}function de(X,lt){return lt<=(tt(X)?X:X.childNodes).length}function we(X){return!!X.startContainer&&!!X.endContainer&&!(Pt&&(Y.isBrokenNode(X.startContainer)||Y.isBrokenNode(X.endContainer)))&&Lt(X.startContainer)==Lt(X.endContainer)&&de(X.startContainer,X.startOffset)&&de(X.endContainer,X.endOffset)}function Oe(X){if(!we(X))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+X.inspect()+")")}var Rt=document.createElement("style"),Ut=!1;try{Rt.innerHTML="<b>x</b>",Ut=Rt.firstChild.nodeType==3}catch{}function se(X,lt){Oe(X);var vt=X.startContainer,Vt=X.startOffset,te=X.endContainer,Zt=X.endOffset,Yt=vt===te;tt(te)&&0<Zt&&Zt<te.length&>(te,Zt,lt),tt(vt)&&0<Vt&&Vt<vt.length&&(vt=gt(vt,Vt,lt),Yt?(Zt-=Vt,te=vt):te==vt.parentNode&&Zt>=nt(vt)&&Zt++,Vt=0),X.setStartAndEnd(vt,Vt,te,Zt)}function bt(X){Oe(X);var lt=X.commonAncestorContainer.parentNode.cloneNode(!1);return lt.appendChild(X.cloneContents()),lt.innerHTML}L.features.htmlParsingConforms=Ut;var ft=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],xt=0,Bt=1,ce=2,Ce=3,Te=0,Ne=1,Ge=2,be=3;function pt(X){X.START_TO_START=xt,X.START_TO_END=Bt,X.END_TO_END=ce,X.END_TO_START=Ce,X.NODE_BEFORE=Te,X.NODE_AFTER=Ne,X.NODE_BEFORE_AND_AFTER=Ge,X.NODE_INSIDE=be}function Dt(X){pt(X),pt(X.prototype)}function $t(X,lt){return function(){Oe(this);var vt=this.startContainer,Vt=this.startOffset,te=this.commonAncestorContainer,Zt=new Jt(this,!0);return vt!==te&&(vt=(te=Ot(wt(vt,te,!0))).node,Vt=te.offset),Nt(Zt,Tt),Zt.reset(),te=X(Zt),Zt.detach(),lt(this,vt,Vt,vt,Vt),te}}function qt(X,lt){function vt(Yt,me){return function(Ee){Ie(Ee,Xt),Ie(Lt(Ee),Qt),Ee=(Yt?It:Ot)(Ee),(me?Vt:te)(this,Ee.node,Ee.offset)}}function Vt(Yt,me,Ee){var Ue=Yt.endContainer,Ae=Yt.endOffset;me===Yt.startContainer&&Ee===Yt.startOffset||(Lt(me)==Lt(Ue)&&ct(me,Ee,Ue,Ae)!=1||(Ue=me,Ae=Ee),lt(Yt,me,Ee,Ue,Ae))}function te(Yt,me,Ee){var Ue=Yt.startContainer,Ae=Yt.startOffset;me===Yt.endContainer&&Ee===Yt.endOffset||(Lt(me)==Lt(Ue)&&ct(me,Ee,Ue,Ae)!=-1||(Ue=me,Ae=Ee),lt(Yt,Ue,Ae,me,Ee))}function Zt(){}Zt.prototype=L.rangePrototype,X.prototype=new Zt,Z.extend(X.prototype,{setStart:function(Yt,me){ze(Yt,!0),He(Yt,me),Vt(this,Yt,me)},setEnd:function(Yt,me){ze(Yt,!0),He(Yt,me),te(this,Yt,me)},setStartAndEnd:function(){var Yt=arguments,me=Yt[0],Ee=Yt[1],Ue=me,Ae=Ee;switch(Yt.length){case 3:Ae=Yt[2];break;case 4:Ue=Yt[2],Ae=Yt[3]}ze(me,!0),He(me,Ee),ze(Ue,!0),He(Ue,Ae),lt(this,me,Ee,Ue,Ae)},setBoundary:function(Yt,me,Ee){this["set"+(Ee?"Start":"End")](Yt,me)},setStartBefore:vt(!0,!0),setStartAfter:vt(!1,!0),setEndBefore:vt(!0,!1),setEndAfter:vt(!1,!1),collapse:function(Yt){Oe(this),Yt?lt(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):lt(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(Yt){ze(Yt,!0),lt(this,Yt,0,Yt,St(Yt))},selectNode:function(Yt){ze(Yt,!1),Ie(Yt,Xt);var me=It(Yt);Yt=Ot(Yt),lt(this,me.node,me.offset,Yt.node,Yt.offset)},extractContents:$t(dt,lt),deleteContents:$t(ht,lt),canSurroundContents:function(){Oe(this),Tt(this.startContainer),Tt(this.endContainer);var Yt=new Jt(this,!0),me=Yt._first&&jt(Yt._first,this)||Yt._last&&jt(Yt._last,this);return Yt.detach(),!me},splitBoundaries:function(){se(this)},splitBoundariesPreservingPositions:function(Yt){se(this,Yt)},normalizeBoundaries:function(){function Yt(un){var bn=un.nextSibling;bn&&bn.nodeType==un.nodeType&&(cn=(nn=un).length,un.appendData(bn.data),yt(bn))}function me(un){var bn,Nn=un.previousSibling;Nn&&Nn.nodeType==un.nodeType&&(bn=(Ae=un).length,We=Nn.length,un.insertData(0,Nn.data),yt(Nn),Ae==nn?(cn+=We,nn=Ae):nn==un.parentNode&&(Nn=nt(un),cn==Nn?(nn=un,cn=bn):Nn<cn&&cn--))}Oe(this);var Ee,Ue,Ae=this.startContainer,We=this.startOffset,nn=this.endContainer,cn=this.endOffset,An=!0;tt(nn)?cn==nn.length?Yt(nn):cn==0&&(Ee=nn.previousSibling)&&Ee.nodeType==nn.nodeType&&(cn=Ee.length,Ae==nn&&(An=!1),Ee.appendData(nn.data),yt(nn),nn=Ee):(0<cn&&(Ue=nn.childNodes[cn-1])&&tt(Ue)&&Yt(Ue),An=!this.collapsed),An?tt(Ae)?We==0?me(Ae):We==Ae.length&&(Ee=Ae.nextSibling)&&Ee.nodeType==Ae.nodeType&&(nn==Ee&&(cn+=(nn=Ae).length),Ae.appendData(Ee.data),yt(Ee)):We<Ae.childNodes.length&&(Ue=Ae.childNodes[We])&&tt(Ue)&&me(Ue):(Ae=nn,We=cn),lt(this,Ae,We,nn,cn)},collapseToPoint:function(Yt,me){ze(Yt,!0),He(Yt,me),this.setStartAndEnd(Yt,me)},parentElement:function(){return Oe(this),this.commonAncestorContainer?qe(this.commonAncestorContainer,!0):null}}),Dt(X)}function Wt(X,lt,vt,Vt,te){X.startContainer=lt,X.startOffset=vt,X.endContainer=Vt,X.endOffset=te,X.document=Y.getDocument(lt),(vt=X).collapsed=vt.startContainer===vt.endContainer&&vt.startOffset===vt.endOffset,vt.commonAncestorContainer=vt.collapsed?vt.startContainer:Y.getCommonAncestor(vt.startContainer,vt.endContainer)}function oe(X){Wt(this,X,0,X,0)}Z.extend(L.rangePrototype,{compareBoundaryPoints:function(X,lt){Oe(this),hn(this.startContainer,lt.startContainer);var vt=X==Ce||X==xt?"start":"end",Vt=(X=X==Bt||X==xt?"start":"end",this[vt+"Container"]),te=(vt=this[vt+"Offset"],lt[X+"Container"]);return lt=lt[X+"Offset"],ct(Vt,vt,te,lt)},insertNode:function(X){if(Oe(this),Ie(X,ve),Tt(this.startContainer),et(X,this.startContainer))throw new Q("HIERARCHY_REQUEST_ERR");X=Et(X,this.startContainer,this.startOffset),this.setStartBefore(X)},cloneContents:function(){if(Oe(this),this.collapsed)return At(this).createDocumentFragment();if(this.startContainer===this.endContainer&&tt(this.startContainer))return(lt=this.startContainer.cloneNode(!0)).data=lt.data.slice(this.startOffset,this.endOffset),(X=At(this).createDocumentFragment()).appendChild(lt),X;var X=new Jt(this,!0),lt=function vt(Vt){for(var te,Zt,Yt=At(Vt.range).createDocumentFragment();te=Vt.next();){if(Zt=Vt.isPartiallySelectedSubtree(),te=te.cloneNode(!Zt),Zt&&(Zt=Vt.getSubtreeIterator(),te.appendChild(vt(Zt)),Zt.detach()),te.nodeType==10)throw new Q("HIERARCHY_REQUEST_ERR");Yt.appendChild(te)}return Yt}(X);return X.detach(),lt},canSurroundContents:function(){Oe(this),Tt(this.startContainer),Tt(this.endContainer);var X=new Jt(this,!0),lt=X._first&&jt(X._first,this)||X._last&&jt(X._last,this);return X.detach(),!lt},surroundContents:function(X){if(Ie(X,kt),!this.canSurroundContents())throw new Q("INVALID_STATE_ERR");var lt=this.extractContents();if(X.hasChildNodes())for(;X.lastChild;)X.removeChild(X.lastChild);Et(X,this.startContainer,this.startOffset),X.appendChild(lt),this.selectNode(X)},cloneRange:function(){Oe(this);for(var X,lt=new oe(At(this)),vt=ft.length;vt--;)lt[X=ft[vt]]=this[X];return lt},toString:function(){Oe(this);var X,lt=this.startContainer;return lt===this.endContainer&&tt(lt)?lt.nodeType==3||lt.nodeType==4?lt.data.slice(this.startOffset,this.endOffset):"":(X=[],Nt(lt=new Jt(this,!0),function(vt){vt.nodeType!=3&&vt.nodeType!=4||X.push(vt.data)}),lt.detach(),X.join(""))},compareNode:function(X){Oe(this);var lt=X.parentNode;if(X=nt(X),!lt)throw new Q("NOT_FOUND_ERR");var vt=this.comparePoint(lt,X);return lt=this.comparePoint(lt,X+1),vt<0?0<lt?Ge:Te:0<lt?Ne:be},comparePoint:function(X,lt){return Oe(this),ae(X,"HIERARCHY_REQUEST_ERR"),hn(X,this.startContainer),ct(X,lt,this.startContainer,this.startOffset)<0?-1:0<ct(X,lt,this.endContainer,this.endOffset)?1:0},createContextualFragment:Ut?function(X){var lt=this.startContainer,vt=at(lt);if(!lt)throw new Q("INVALID_STATE_ERR");var Vt=null;return lt.nodeType==1?Vt=lt:tt(lt)&&(Vt=Y.parentElement(lt)),(Vt=Vt===null||Vt.nodeName=="HTML"&&Y.isHtmlNamespace(at(Vt).documentElement)&&Y.isHtmlNamespace(Vt)?vt.createElement("body"):Vt.cloneNode(!1)).innerHTML=X,Y.fragmentFromNodeChildren(Vt)}:function(X){var lt=At(this).createElement("body");return lt.innerHTML=X,Y.fragmentFromNodeChildren(lt)},toHtml:function(){return bt(this)},intersectsNode:function(X,lt){if(Oe(this),Lt(X)!=Lt(this.startContainer))return!1;var vt=X.parentNode;if(X=nt(X),!vt)return!0;var Vt=ct(vt,X,this.endContainer,this.endOffset);return vt=ct(vt,X+1,this.startContainer,this.startOffset),lt?Vt<=0&&0<=vt:Vt<0&&0<vt},isPointInRange:function(X,lt){return Oe(this),ae(X,"HIERARCHY_REQUEST_ERR"),hn(X,this.startContainer),0<=ct(X,lt,this.startContainer,this.startOffset)&&ct(X,lt,this.endContainer,this.endOffset)<=0},intersectsRange:function(X){return Ct(this,X,!1)},intersectsOrTouchesRange:function(X){return Ct(this,X,!0)},intersection:function(X){var lt,vt,Vt;return this.intersectsRange(X)?(lt=ct(this.startContainer,this.startOffset,X.startContainer,X.startOffset),vt=ct(this.endContainer,this.endOffset,X.endContainer,X.endOffset),Vt=this.cloneRange(),lt==-1&&Vt.setStart(X.startContainer,X.startOffset),vt==1&&Vt.setEnd(X.endContainer,X.endOffset),Vt):null},union:function(X){var lt;if(this.intersectsOrTouchesRange(X))return lt=this.cloneRange(),ct(X.startContainer,X.startOffset,this.startContainer,this.startOffset)==-1&<.setStart(X.startContainer,X.startOffset),ct(X.endContainer,X.endOffset,this.endContainer,this.endOffset)==1&<.setEnd(X.endContainer,X.endOffset),lt;throw new Q("Ranges do not intersect")},containsNode:function(X,lt){return lt?this.intersectsNode(X,!1):this.compareNode(X)==be},containsNodeContents:function(X){return 0<=this.comparePoint(X,0)&&this.comparePoint(X,St(X))<=0},containsRange:function(X){var lt=this.intersection(X);return lt!==null&&X.equals(lt)},containsNodeText:function(X){var lt=this.cloneRange(),vt=(lt.selectNode(X),lt.getNodes([3]));return 0<vt.length?(lt.setStart(vt[0],0),vt=vt.pop(),lt.setEnd(vt,vt.length),this.containsRange(lt)):this.containsNodeContents(X)},getNodes:function(X,lt){return Oe(this),vt=this,Vt=lt,Zt=!(!(lt=X)||!lt.length),Yt=!!Vt,Zt&&(te=new RegExp("^("+lt.join("|")+")$")),Nt(new Jt(vt,!(me=[])),function(Ee){var Ue;Zt&&!te.test(Ee.nodeType)||Yt&&!Vt(Ee)||Ee==(Ue=vt.startContainer)&&tt(Ue)&&vt.startOffset==Ue.length||Ee==(Ue=vt.endContainer)&&tt(Ue)&&vt.endOffset==0||me.push(Ee)}),me;var vt,Vt,te,Zt,Yt,me},getDocument:function(){return At(this)},collapseBefore:function(X){this.setEndBefore(X),this.collapse(!1)},collapseAfter:function(X){this.setStartAfter(X),this.collapse(!0)},getBookmark:function(X){var lt=At(this),vt=L.createRange(lt),Vt=0,te=0;return X=X||Y.getBody(lt),vt.selectNodeContents(X),(lt=this.intersection(vt))&&(vt.setEnd(lt.startContainer,lt.startOffset),te=(Vt=vt.toString().length)+lt.toString().length),{start:Vt,end:te,containerNode:X}},moveToBookmark:function(X){for(var lt,vt,Vt,te,Zt=X.containerNode,Yt=0,me=(this.setStart(Zt,0),this.collapse(!0),[Zt]),Ee=!1,Ue=!1;!Ue&&(lt=me.pop());)if(lt.nodeType==3)vt=Yt+lt.length,!Ee&&X.start>=Yt&&X.start<=vt&&(this.setStart(lt,X.start-Yt),Ee=!0),Ee&&X.end>=Yt&&X.end<=vt&&(this.setEnd(lt,X.end-Yt),Ue=!0),Yt=vt;else for(Vt=(te=lt.childNodes).length;Vt--;)me.push(te[Vt])},getName:function(){return"DomRange"},equals:function(X){return oe.rangesEqual(this,X)},isValid:function(){return we(this)},inspect:function(){return Ft(this)},detach:function(){}}),qt(oe,Wt),Z.extend(oe,{rangeProperties:ft,RangeIterator:Jt,copyComparisonConstants:Dt,createPrototypeRange:qt,inspect:Ft,toHtml:bt,getRangeDocument:At,rangesEqual:function(X,lt){return X.startContainer===lt.startContainer&&X.startOffset===lt.startOffset&&X.endContainer===lt.endContainer&&X.endOffset===lt.endOffset}}),L.DomRange=oe}),R.createCoreModule("WrappedRange",["DomRange"],function(L,B){var Y,Z,rt,Q,tt=L.dom,nt=L.util,et=tt.DomPosition,at=L.DomRange,ct=tt.getBody,gt=tt.getContentDocument,wt=tt.isCharacterDataNode;if(L.features.implementsDomRange){let It=function(Ot){for(var Et,Ct=Mt.length;Ct--;)Ot[Et=Mt[Ct]]=Ot.nativeRange[Et];Ot.collapsed=Ot.startContainer===Ot.endContainer&&Ot.startOffset===Ot.endOffset};var St,Mt=at.rangeProperties;at.createPrototypeRange(Y=function(Ot){if(!Ot)throw B.createError("WrappedRange: Range must be specified");this.nativeRange=Ot,It(this)},function(Ot,Et,Ct,Nt,ht){var dt=Ot.startContainer!==Et||Ot.startOffset!=Ct,Ft=Ot.endContainer!==Nt||Ot.endOffset!=ht,Jt=!Ot.equals(Ot.nativeRange);(dt||Ft||Jt)&&(Ot.setEnd(Nt,ht),Ot.setStart(Et,Ct))}),(St=Y.prototype).selectNode=function(Ot){this.nativeRange.selectNode(Ot),It(this)},St.cloneContents=function(){return this.nativeRange.cloneContents()},St.surroundContents=function(Ot){this.nativeRange.surroundContents(Ot),It(this)},St.collapse=function(Ot){this.nativeRange.collapse(Ot),It(this)},St.cloneRange=function(){return new Y(this.nativeRange.cloneRange())},St.refresh=function(){It(this)},St.toString=function(){return this.nativeRange.toString()};var Lt=document.createTextNode("test"),Pt=(ct(document).appendChild(Lt),document.createRange());Pt.setStart(Lt,0),Pt.setEnd(Lt,0);try{Pt.setStart(Lt,1),St.setStart=function(Ot,Et){this.nativeRange.setStart(Ot,Et),It(this)},St.setEnd=function(Ot,Et){this.nativeRange.setEnd(Ot,Et),It(this)},yt=function(Ot){return function(Et){this.nativeRange[Ot](Et),It(this)}}}catch{St.setStart=function(Et,Ct){try{this.nativeRange.setStart(Et,Ct)}catch{this.nativeRange.setEnd(Et,Ct),this.nativeRange.setStart(Et,Ct)}It(this)},St.setEnd=function(Et,Ct){try{this.nativeRange.setEnd(Et,Ct)}catch{this.nativeRange.setStart(Et,Ct),this.nativeRange.setEnd(Et,Ct)}It(this)},yt=function(Et,Ct){return function(Nt){try{this.nativeRange[Et](Nt)}catch{this.nativeRange[Ct](Nt),this.nativeRange[Et](Nt)}It(this)}}}St.setStartBefore=yt("setStartBefore","setEndBefore"),St.setStartAfter=yt("setStartAfter","setEndAfter"),St.setEndBefore=yt("setEndBefore","setStartBefore"),St.setEndAfter=yt("setEndAfter","setStartAfter"),St.selectNodeContents=function(Ot){this.setStartAndEnd(Ot,0,tt.getNodeLength(Ot))},Pt.selectNodeContents(Lt),Pt.setEnd(Lt,3);var yt=document.createRange();yt.selectNodeContents(Lt),yt.setEnd(Lt,4),yt.setStart(Lt,2),Pt.compareBoundaryPoints(Pt.START_TO_END,yt)==-1&&Pt.compareBoundaryPoints(Pt.END_TO_START,yt)==1?St.compareBoundaryPoints=function(Ot,Et){return Ot==(Et=Et.nativeRange||Et).START_TO_END?Ot=Et.END_TO_START:Ot==Et.END_TO_START&&(Ot=Et.START_TO_END),this.nativeRange.compareBoundaryPoints(Ot,Et)}:St.compareBoundaryPoints=function(Ot,Et){return this.nativeRange.compareBoundaryPoints(Ot,Et.nativeRange||Et)},(yt=document.createElement("div")).innerHTML="123";var jt=yt.firstChild,At=ct(document);At.appendChild(yt),Pt.setStart(jt,1),Pt.setEnd(jt,2),Pt.deleteContents(),jt.data=="13"&&(St.deleteContents=function(){this.nativeRange.deleteContents(),It(this)},St.extractContents=function(){var Ot=this.nativeRange.extractContents();return It(this),Ot}),At.removeChild(yt),At=null,nt.isHostMethod(Pt,"createContextualFragment")&&(St.createContextualFragment=function(Ot){return this.nativeRange.createContextualFragment(Ot)}),ct(document).removeChild(Lt),St.getName=function(){return"WrappedRange"},L.WrappedRange=Y,L.createNativeRange=function(Ot){return(Ot=gt(Ot,B,"createNativeRange")).createRange()}}L.features.implementsTextRange&&(Z=function(It,Ot,Et,Ct,Nt){var ht=It.duplicate(),dt=(ht.collapse(Et),ht.parentElement());if(!(dt=tt.isOrIsAncestorOf(Ot,dt)?dt:Ot).canHaveHTML)return{boundaryPosition:Ot=new et(dt.parentNode,tt.getNodeIndex(dt)),nodeInfo:{nodeIndex:Ot.offset,containerElement:Ot.node}};var Ft=tt.getDocument(dt).createElement("span");Ft.parentNode&&tt.removeNode(Ft);for(var Jt,Xt,Qt=Et?"StartToStart":"StartToEnd",ve=Nt&&Nt.containerElement==dt?Nt.nodeIndex:0,kt=dt.childNodes.length,ee=kt,pe=ee;pe==kt?dt.appendChild(Ft):dt.insertBefore(Ft,dt.childNodes[pe]),ht.moveToElementText(Ft),(Jt=ht.compareEndPoints(Qt,It))!=0&&ve!=ee;){if(Jt==-1){if(ee==ve+1)break;ve=pe}else ee=ee==ve+1?ve:pe;pe=Math.floor((ve+ee)/2),dt.removeChild(Ft)}if(Ot=Ft.nextSibling,Jt==-1&&Ot&&wt(Ot)){if(ht.setEndPoint(Et?"EndToStart":"EndToEnd",It),/[\r\n]/.test(Ot.data))for(var Le=ht.duplicate(),Be=(Nt=Le.text.replace(/\r\n/g,"\r").length,Le.moveStart("character",Nt));(Jt=Le.compareEndPoints("StartToEnd",Le))==-1;)Be++,Le.moveStart("character",1);else Be=ht.text.length;Xt=new et(Ot,Be)}else Nt=(Ct||!Et)&&Ft.previousSibling,Xt=(Ot=(Ct||Et)&&Ft.nextSibling)&&wt(Ot)?new et(Ot,0):Nt&&wt(Nt)?new et(Nt,Nt.data.length):new et(dt,tt.getNodeIndex(Ft));return tt.removeNode(Ft),{boundaryPosition:Xt,nodeInfo:{nodeIndex:pe,containerElement:dt}}},rt=function(It,Ot){var Et,Ct=It.offset,Nt=tt.getDocument(It.node),ht=ct(Nt).createTextRange(),dt=wt(It.node),Ft=dt?(Et=It.node).parentNode:(Et=Ct<(Ft=It.node.childNodes).length?Ft[Ct]:null,It.node);return(It=Nt.createElement("span")).innerHTML="&#feff;",Et?Ft.insertBefore(It,Et):Ft.appendChild(It),ht.moveToElementText(It),ht.collapse(!Ot),Ft.removeChild(It),dt&&ht[Ot?"moveStart":"moveEnd"]("character",Ct),ht},((jt=function(It){this.textRange=It,this.refresh()}).prototype=new at(document)).refresh=function(){Ot=(Et=this.textRange).parentElement(),(Nt=Et.duplicate()).collapse(!0),Ct=Nt.parentElement(),(Nt=Et.duplicate()).collapse(!1),Et=Nt.parentElement();var It,Ot,Et,Ct=(Nt=Ct==Et?Ct:tt.getCommonAncestor(Ct,Et))==Ot?Nt:tt.getCommonAncestor(Ot,Nt),Nt=(Et=this.textRange).compareEndPoints("StartToEnd",Et)==0?It=Z(this.textRange,Ct,!0,!0).boundaryPosition:(It=(Ot=Z(this.textRange,Ct,!0,!1)).boundaryPosition,Z(this.textRange,Ct,!1,!1,Ot.nodeInfo).boundaryPosition);this.setStart(It.node,It.offset),this.setEnd(Nt.node,Nt.offset)},jt.prototype.getName=function(){return"WrappedTextRange"},at.copyComparisonConstants(jt),jt.rangeToTextRange=Q=function(It){var Ot,Et;return It.collapsed?rt(new et(It.startContainer,It.startOffset),!0):(Ot=rt(new et(It.startContainer,It.startOffset),!0),Et=rt(new et(It.endContainer,It.endOffset),!1),(It=ct(at.getRangeDocument(It)).createTextRange()).setEndPoint("StartToStart",Ot),It.setEndPoint("EndToEnd",Et),It)},jt.prototype.toTextRange=function(){return Q(this)},L.WrappedTextRange=jt,L.features.implementsDomRange&&!L.config.preferTextRange||((yt=Function("return this;")()).Range===void 0&&(yt.Range=jt),L.createNativeRange=function(It){return It=gt(It,B,"createNativeRange"),ct(It).createTextRange()},L.WrappedRange=jt)),L.createRange=function(It){return It=gt(It,B,"createRange"),new L.WrappedRange(L.createNativeRange(It))},L.createRangyRange=function(It){return It=gt(It,B,"createRangyRange"),new at(It)},nt.createAliasForDeprecatedMethod(L,"createIframeRange","createRange"),nt.createAliasForDeprecatedMethod(L,"createIframeRangyRange","createRangyRange"),L.addShimListener(function(It){var Ot=It.document;Ot.createRange===void 0&&(Ot.createRange=function(){return L.createRange(Ot)}),Ot=null})}),R.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(L,B){L.config.checkSelectionRanges=!0;var Y,Z,rt="number",Q=L.dom,tt=L.util,nt=tt.isHostMethod,et=L.DomRange,at=L.WrappedRange,ct=L.DOMException,gt=Q.DomPosition,wt=L.features,St="Control",Mt=Q.getDocument,Lt=Q.getBody,Pt=et.rangesEqual;function yt(X){return typeof X=="string"?/^backward(s)?$/i.test(X):!!X}function jt(X,lt){return X?Q.isWindow(X)?X:X instanceof xt?X.win:(X=Q.getContentDocument(X,B,lt),Q.getWindow(X)):window}function At(X){return jt(X,"getDocSelection").document.selection}function It(X){return!!X.anchorNode&&Q.comparePoints(X.anchorNode,X.anchorOffset,X.focusNode,X.focusOffset)==1}var Ot=nt(window,"getSelection"),Et=tt.isHostObject(document,"selection"),Ct=(wt.implementsWinGetSelection=Ot,(wt.implementsDocSelection=Et)&&(!Ot||L.config.preferTextRange));if(Ct)Y=At,L.isSelectionValid=function(X){var lt=(X=jt(X,"isSelectionValid").document).selection;return lt.type!="None"||Mt(lt.createRange().parentElement())==X};else{if(!Ot)return B.fail("Neither document.selection or window.getSelection() detected."),!1;Y=function(X){return jt(X,"getWinSelection").getSelection()},L.isSelectionValid=function(){return!0}}if(!(Ot=(L.getNativeSelection=Y)()))return B.fail("Native selection was null (possibly issue 138?)"),!1;var Nt=L.createNativeRange(document),ht=Lt(document),dt=tt.areHostProperties(Ot,["anchorNode","focusNode","anchorOffset","focusOffset"]),Ft=(wt.selectionHasAnchorAndFocus=dt,nt(Ot,"extend")),Jt=(wt.selectionHasExtend=Ft,nt(Ot,"setBaseAndExtent")),Xt=(wt.selectionHasSetBaseAndExtent=Jt,typeof Ot.rangeCount==rt),Qt=(wt.selectionHasRangeCount=Xt,!1),ve=!0,kt=Ft?function(X,lt){var vt=et.getRangeDocument(lt);(vt=L.createRange(vt)).collapseToPoint(lt.endContainer,lt.endOffset),X.addRange(Oe(vt)),X.extend(lt.startContainer,lt.startOffset)}:null;if(tt.areHostMethods(Ot,["addRange","getRangeAt","removeAllRanges"])&&typeof Ot.rangeCount==rt&&wt.implementsDomRange){var ee=window.getSelection();if(ee){for(var pe=ee.rangeCount,Le=1<pe,Be=[],qe=It(ee),ze=0;ze<pe;++ze)Be[ze]=ee.getRangeAt(ze);var Ie=Q.createTestElement(document,"",!1),He=Ie.appendChild(document.createTextNode(" "));for((be=document.createRange()).setStart(He,1),be.collapse(!0),ee.removeAllRanges(),ee.addRange(be),ve=ee.rangeCount==1,ee.removeAllRanges(),Le||(Le=window.navigator.appVersion.match(/Chrome\/(.*?) /),Qt=!(Le&&36<=parseInt(Le[1]))&&(Le=be.cloneRange(),be.setStart(He,0),Le.setEnd(He,3),Le.setStart(He,2),ee.addRange(be),ee.addRange(Le),ee.rangeCount==2)),Q.removeNode(Ie),ee.removeAllRanges(),ze=0;ze<pe;++ze)ze==0&&qe?kt?kt(ee,Be[ze]):(L.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),ee.addRange(Be[ze])):ee.addRange(Be[ze])}}wt.selectionSupportsMultipleRanges=Qt,wt.collapsedNonEditableSelectionsSupported=ve;var hn,Tt=!1;function ae(X,lt,vt){var Vt=vt?"end":"start";vt=vt?"start":"end",X.anchorNode=lt[Vt+"Container"],X.anchorOffset=lt[Vt+"Offset"],X.focusNode=lt[vt+"Container"],X.focusOffset=lt[vt+"Offset"]}function de(X){X.anchorNode=X.focusNode=null,X.anchorOffset=X.focusOffset=0,X.rangeCount=0,X.isCollapsed=!0,X._ranges.length=0,we(X)}function we(X){X.type=X.rangeCount==0?"None":Z(X)?"Caret":"Range"}function Oe(X){var lt;return X instanceof et?((lt=L.createNativeRange(X.getDocument())).setEnd(X.endContainer,X.endOffset),lt.setStart(X.startContainer,X.startOffset)):X instanceof at?lt=X.nativeRange:wt.implementsDomRange&&X instanceof Q.getWindow(X.startContainer).Range&&(lt=X),lt}function Rt(X){var lt=X.getNodes();if(function(vt){if(vt.length&&vt[0].nodeType==1){for(var Vt=1,te=vt.length;Vt<te;++Vt)if(!Q.isAncestorOf(vt[0],vt[Vt]))return;return 1}}(lt))return lt[0];throw B.createError("getSingleElementFromRange: range "+X.inspect()+" did not consist of a single element")}function Ut(X){return X&&X.text!==void 0}function se(X,lt){lt=new at(lt),X._ranges=[lt],ae(X,lt,!1),X.rangeCount=1,X.isCollapsed=lt.collapsed,we(X)}function bt(X){if(X._ranges.length=0,X.docSelection.type=="None")de(X);else{var lt=X.docSelection.createRange();if(Ut(lt))se(X,lt);else{X.rangeCount=lt.length;for(var vt,Vt=Mt(lt.item(0)),te=0;te<X.rangeCount;++te)(vt=L.createRange(Vt)).selectNode(lt.item(te)),X._ranges.push(vt);X.isCollapsed=X.rangeCount==1&&X._ranges[0].collapsed,ae(X,X._ranges[X.rangeCount-1],!1),we(X)}}}function ft(X,lt){for(var vt=X.docSelection.createRange(),Vt=(lt=Rt(lt),Mt(vt.item(0))),te=Lt(Vt).createControlRange(),Zt=0,Yt=vt.length;Zt<Yt;++Zt)te.add(vt.item(Zt));try{te.add(lt)}catch{throw B.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}te.select(),bt(X)}function xt(X,lt,vt){this.nativeSelection=X,this.docSelection=lt,this._ranges=[],this.win=vt,this.refresh()}function Bt(X){X.win=X.anchorNode=X.focusNode=X._ranges=null,X.rangeCount=X.anchorOffset=X.focusOffset=0,X.detached=!0,we(X)}ht&&nt(ht,"createControlRange")&&(He=ht.createControlRange(),tt.areHostProperties(He,["item","add"])&&(Tt=!0)),wt.implementsControlRange=Tt,Z=dt?function(X){return X.anchorNode===X.focusNode&&X.anchorOffset===X.focusOffset}:function(X){return!!X.rangeCount&&X.getRangeAt(X.rangeCount-1).collapsed},nt(Ot,"getRangeAt")?hn=function(X,lt){try{return X.getRangeAt(lt)}catch{return null}}:dt&&(hn=function(X){var lt=Mt(X.anchorNode);return(lt=L.createRange(lt)).setStartAndEnd(X.anchorNode,X.anchorOffset,X.focusNode,X.focusOffset),lt.collapsed!==this.isCollapsed&<.setStartAndEnd(X.focusNode,X.focusOffset,X.anchorNode,X.anchorOffset),lt}),xt.prototype=L.selectionPrototype;var ce=[];function Ce(X,lt){for(var vt,Vt,te=ce.length;te--;)if(Vt=(vt=ce[te]).selection,lt=="deleteAll")Bt(Vt);else if(vt.win==X)return lt=="delete"?(ce.splice(te,1),!0):Vt;return lt=="deleteAll"&&(ce.length=0),null}function Te(X){if(X&&X instanceof xt)return X.refresh(),X;var lt=Ce(X=jt(X,"getNativeSelection")),vt=Y(X),Vt=Et?At(X):null;return lt?(lt.nativeSelection=vt,lt.docSelection=Vt,lt.refresh()):(lt=new xt(vt,Vt,X),ce.push({win:X,selection:lt})),lt}L.getSelection=Te,tt.createAliasForDeprecatedMethod(L,"getIframeSelection","getSelection");var Ne,Ge,be=xt.prototype;function pt(X,lt){for(var vt,Vt=Mt(lt[0].startContainer),te=Lt(Vt).createControlRange(),Zt=0,Yt=lt.length;Zt<Yt;++Zt){vt=Rt(lt[Zt]);try{te.add(vt)}catch{throw B.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}te.select(),bt(X)}if(!Ct&&dt&&tt.areHostMethods(Ot,["removeAllRanges","addRange"])){let X=function(lt,vt){kt(lt.nativeSelection,vt),lt.refresh()};be.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),de(this)},be.addRange=Xt?function(lt,vt){if(Tt&&Et&&this.docSelection.type==St)ft(this,lt);else if(yt(vt)&&Ft)X(this,lt);else{vt=Qt?this.rangeCount:(this.removeAllRanges(),0);var Vt=Oe(lt).cloneRange();try{this.nativeSelection.addRange(Vt)}catch{}this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==vt+1?(L.config.checkSelectionRanges&&(Vt=hn(this.nativeSelection,this.rangeCount-1))&&!Pt(Vt,lt)&&(lt=new at(Vt)),this._ranges[this.rangeCount-1]=lt,ae(this,lt,Ge(this.nativeSelection)),this.isCollapsed=Z(this),we(this)):this.refresh()}}:function(lt,vt){yt(vt)&&Ft?X(this,lt):(this.nativeSelection.addRange(Oe(lt)),this.refresh())},be.setRanges=function(lt){if(Tt&&Et&&1<lt.length)pt(this,lt);else{this.removeAllRanges();for(var vt=0,Vt=lt.length;vt<Vt;++vt)this.addRange(lt[vt])}}}else{if(!(nt(Ot,"empty")&&nt(Nt,"select")&&Tt&&Ct))return B.fail("No means of selecting a Range or TextRange was found"),!1;be.removeAllRanges=function(){try{var X,lt;this.docSelection.empty(),this.docSelection.type!="None"&&(this.anchorNode?X=Mt(this.anchorNode):this.docSelection.type==St&&(lt=this.docSelection.createRange()).length&&(X=Mt(lt.item(0))),X&&(Lt(X).createTextRange().select(),this.docSelection.empty()))}catch{}de(this)},be.addRange=function(X){this.docSelection.type==St?ft(this,X):(L.WrappedTextRange.rangeToTextRange(X).select(),this._ranges[0]=X,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,ae(this,X,!1),we(this))},be.setRanges=function(X){this.removeAllRanges();var lt=X.length;1<lt?pt(this,X):lt&&this.addRange(X[0])}}if(be.getRangeAt=function(X){if(X<0||X>=this.rangeCount)throw new ct("INDEX_SIZE_ERR");return this._ranges[X].cloneRange()},Ct)Ne=function(X){var lt;L.isSelectionValid(X.win)?lt=X.docSelection.createRange():(lt=Lt(X.win.document).createTextRange()).collapse(!0),X.docSelection.type==St?bt(X):Ut(lt)?se(X,lt):de(X)};else if(nt(Ot,"getRangeAt")&&typeof Ot.rangeCount==rt)Ne=function(X){if(Tt&&Et&&X.docSelection.type==St)bt(X);else if(X._ranges.length=X.rangeCount=X.nativeSelection.rangeCount,X.rangeCount){for(var lt=0,vt=X.rangeCount;lt<vt;++lt)X._ranges[lt]=new L.WrappedRange(X.nativeSelection.getRangeAt(lt));ae(X,X._ranges[X.rangeCount-1],Ge(X.nativeSelection)),X.isCollapsed=Z(X),we(X)}else de(X)};else{if(!dt||typeof Ot.isCollapsed!="boolean"||typeof Nt.collapsed!="boolean"||!wt.implementsDomRange)return B.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;Ne=function(X){var lt,vt=X.nativeSelection;vt.anchorNode?(vt=hn(vt,0),X._ranges=[vt],X.rangeCount=1,lt=(vt=X).nativeSelection,vt.anchorNode=lt.anchorNode,vt.anchorOffset=lt.anchorOffset,vt.focusNode=lt.focusNode,vt.focusOffset=lt.focusOffset,X.isCollapsed=Z(X),we(X)):de(X)}}function Dt(X,lt){var vt=X.getAllRanges();X.removeAllRanges();for(var Vt=0,te=vt.length;Vt<te;++Vt)Pt(lt,vt[Vt])||X.addRange(vt[Vt]);X.rangeCount||de(X)}function $t(X,lt){if(X.win.document!=Mt(lt))throw new ct("WRONG_DOCUMENT_ERR")}function qt(X,lt){if(lt<0||lt>(Q.isCharacterDataNode(X)?X:X.childNodes).length)throw new ct("INDEX_SIZE_ERR")}function Wt(X){return function(lt,vt){var Vt;this.rangeCount?(Vt=this.getRangeAt(0))["set"+(X?"Start":"End")](lt,vt):(Vt=L.createRange(this.win.document)).setStartAndEnd(lt,vt),this.setSingleRange(Vt,this.isBackward())}}function oe(X){var lt=[],vt=new gt(X.anchorNode,X.anchorOffset),Vt=new gt(X.focusNode,X.focusOffset),te=typeof X.getName=="function"?X.getName():"Selection";if(X.rangeCount!==void 0)for(var Zt=0,Yt=X.rangeCount;Zt<Yt;++Zt)lt[Zt]=et.inspect(X.getRangeAt(Zt));return"["+te+"(Ranges: "+lt.join(", ")+")(anchor: "+vt.inspect()+", focus: "+Vt.inspect()+"]"}be.refresh=function(X){var lt=X?this._ranges.slice(0):null,vt=this.anchorNode,Vt=this.anchorOffset;if(Ne(this),X){var te=lt.length;if(te!=this._ranges.length||this.anchorNode!=vt||this.anchorOffset!=Vt)return!0;for(;te--;)if(!Pt(lt[te],this._ranges[te]))return!0;return!1}},be.removeRange=Tt&&Et?function(X){if(this.docSelection.type==St){for(var lt=this.docSelection.createRange(),vt=Rt(X),Vt=Mt(lt.item(0)),te=Lt(Vt).createControlRange(),Zt=!1,Yt=0,me=lt.length;Yt<me;++Yt)lt.item(Yt)!==vt||Zt?te.add(lt.item(Yt)):Zt=!0;te.select(),bt(this)}else Dt(this,X)}:function(X){Dt(this,X)},!Ct&&dt&&wt.implementsDomRange?(Ge=It,be.isBackward=function(){return Ge(this)}):Ge=be.isBackward=function(){return!1},be.isBackwards=be.isBackward,be.toString=function(){for(var X=[],lt=0,vt=this.rangeCount;lt<vt;++lt)X[lt]=""+this._ranges[lt];return X.join("")},be.collapse=function(X,lt){$t(this,X);var vt=L.createRange(X);vt.collapseToPoint(X,lt),this.setSingleRange(vt),this.isCollapsed=!0},be.collapseToStart=function(){if(!this.rangeCount)throw new ct("INVALID_STATE_ERR");var X=this._ranges[0];this.collapse(X.startContainer,X.startOffset)},be.collapseToEnd=function(){if(!this.rangeCount)throw new ct("INVALID_STATE_ERR");var X=this._ranges[this.rangeCount-1];this.collapse(X.endContainer,X.endOffset)},be.selectAllChildren=function(X){$t(this,X);var lt=L.createRange(X);lt.selectNodeContents(X),this.setSingleRange(lt)},Jt?be.setBaseAndExtent=function(X,lt,vt,Vt){this.nativeSelection.setBaseAndExtent(X,lt,vt,Vt),this.refresh()}:Ft&&(be.setBaseAndExtent=function(X,lt,vt,Vt){qt(X,lt),qt(vt,Vt),$t(this,X),$t(this,vt);var te=L.createRange(node),Zt=Q.comparePoints(X,lt,vt,Vt)==-1;Zt?te.setStartAndEnd(vt,Vt,X,lt):te.setStartAndEnd(X,lt,vt,Vt),this.setSingleRange(te,Zt)}),be.deleteFromDocument=function(){if(Tt&&Et&&this.docSelection.type==St){for(var X,lt=this.docSelection.createRange();lt.length;)X=lt.item(0),lt.remove(X),Q.removeNode(X);this.refresh()}else if(this.rangeCount){var vt=this.getAllRanges();if(vt.length){this.removeAllRanges();for(var Vt=0,te=vt.length;Vt<te;++Vt)vt[Vt].deleteContents();this.addRange(vt[te-1])}}},be.eachRange=function(X,lt){for(var vt=0,Vt=this._ranges.length;vt<Vt;++vt)if(X(this.getRangeAt(vt)))return lt},be.getAllRanges=function(){var X=[];return this.eachRange(function(lt){X.push(lt)}),X},be.setSingleRange=function(X,lt){this.removeAllRanges(),this.addRange(X,lt)},be.callMethodOnEachRange=function(X,lt){var vt=[];return this.eachRange(function(Vt){vt.push(Vt[X].apply(Vt,lt||[]))}),vt},be.setStart=Wt(!0),be.setEnd=Wt(!1),L.rangePrototype.select=function(X){Te(this.getDocument()).setSingleRange(this,X)},be.changeEachRange=function(X){var lt=[],vt=this.isBackward();this.eachRange(function(Vt){X(Vt),lt.push(Vt)}),this.removeAllRanges(),vt&<.length==1?this.addRange(lt[0],"backward"):this.setRanges(lt)},be.containsNode=function(X,lt){return this.eachRange(function(vt){return vt.containsNode(X,lt)},!0)||!1},be.getBookmark=function(X){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[X])}},be.moveToBookmark=function(X){for(var lt,vt,Vt=[],te=0;lt=X.rangeBookmarks[te++];)(vt=L.createRange(this.win)).moveToBookmark(lt),Vt.push(vt);X.backward?this.setSingleRange(Vt[0],"backward"):this.setRanges(Vt)},be.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},be.restoreRanges=function(X){this.removeAllRanges();for(var lt,vt=0;lt=X.ranges[vt];++vt)this.addRange(lt,X.backward&&vt==0)},be.toHtml=function(){var X=[];return this.eachRange(function(lt){X.push(et.toHtml(lt))}),X.join("")},wt.implementsTextRange&&(be.getNativeTextRange=function(){if(X=this.docSelection){var X=X.createRange();if(Ut(X))return X;throw B.createError("getNativeTextRange: selection is a control selection")}if(0<this.rangeCount)return L.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw B.createError("getNativeTextRange: selection contains no range")}),be.getName=function(){return"WrappedSelection"},be.inspect=function(){return oe(this)},be.detach=function(){Ce(this.win,"delete"),Bt(this)},xt.detachAll=function(){Ce(null,"deleteAll")},xt.inspect=oe,xt.isDirectionBackward=yt,L.Selection=xt,L.selectionPrototype=be,L.addShimListener(function(X){X.getSelection===void 0&&(X.getSelection=function(){return Te(X)}),X=null})});var I=!1;return N&&(document.readyState=="complete"?T():(u(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",T,!1),k(window,"load",T))),R},f!==void 0&&typeof r=="object"?f.exports=n():this.rangy=n()},{}],726:[function(t,f,r){var n;n=function(e){return e.createModule("SaveRestore",["WrappedSelection"],function(s,i){var l=s.dom,o=l.removeNode,a=s.Selection.isDirectionBackward,c="\uFEFF";function u(S,E){return(E||document).getElementById(S)}function h(S,E){var k="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),D=l.getDocument(S.startContainer);return(S=S.cloneRange()).collapse(E),(E=D.createElement("span")).id=k,E.style.lineHeight="0",E.style.display="none",E.className="rangySelectionBoundary",E.appendChild(D.createTextNode(c)),S.insertNode(E),E}function p(S,E,k,D){(k=u(k,S))?(E[D?"setStartBefore":"setEndBefore"](k),o(k)):i.warn("Marker element has been removed. Cannot restore selection.")}function m(S,E){return E.compareBoundaryPoints(S.START_TO_START,S)}function b(S,E){var k,D=s.DomRange.getRangeDocument(S),N=S.toString();return E=a(E),S.collapsed?{document:D,markerId:(k=h(S,!1)).id,collapsed:!0}:(k=h(S,!1),{document:D,startMarkerId:h(S,!0).id,endMarkerId:k.id,collapsed:!1,backward:E,toString:function(){return"original text: '"+N+"', new text: '"+S.toString()+"'"}})}function _(S,E){var k,D,N=S.document,O=(E===void 0&&(E=!0),s.createRange(N));return S.collapsed?(k=u(S.markerId,N))?(k.style.display="inline",(D=k.previousSibling)&&D.nodeType==3?(o(k),O.collapseToPoint(D,D.length)):(O.collapseBefore(k),o(k))):i.warn("Marker element has been removed. Cannot restore selection."):(p(N,O,S.startMarkerId,!0),p(N,O,S.endMarkerId,!1)),E&&O.normalizeBoundaries(),O}function v(S,E){var k,D,N=[],O=a(E);(S=S.slice(0)).sort(m);for(var R=0,A=S.length;R<A;++R)N[R]=b(S[R],O);for(R=A-1;0<=R;--R)k=S[R],D=s.DomRange.getRangeDocument(k),k.collapsed?k.collapseAfter(u(N[R].markerId,D)):(k.setEndBefore(u(N[R].endMarkerId,D)),k.setStartAfter(u(N[R].startMarkerId,D)));return N}function w(S){for(var E=[],k=S.length-1;0<=k;k--)E[k]=_(S[k],!0);return E}function x(S,E){(E=u(E,S))&&o(E)}s.util.extend(s,{saveRange:b,restoreRange:_,saveRanges:v,restoreRanges:w,saveSelection:function(S){if(!s.isSelectionValid(S))return i.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var E=s.getSelection(S),k=E.getAllRanges(),D=k.length==1&&E.isBackward(),N=v(k,D);return D?E.setSingleRange(k[0],D):E.setRanges(k),{win:S,rangeInfos:N,restored:!1}},restoreSelection:function(S,E){var k,D,N;S.restored||(k=S.rangeInfos,D=s.getSelection(S.win),N=w(k),k.length==1&&E&&s.features.selectionHasExtend&&k[0].backward?(D.removeAllRanges(),D.addRange(N[0],!0)):D.setRanges(N),S.restored=!0)},removeMarkerElement:x,removeMarkers:function(S){for(var E,k=S.rangeInfos,D=0,N=k.length;D<N;++D)(E=k[D]).collapsed?x(S.doc,E.markerId):(x(S.doc,E.startMarkerId),x(S.doc,E.endMarkerId))}})}),e},f!==void 0&&typeof r=="object"?f.exports=n(t("rangy")):n(this.rangy)},{rangy:725}],727:[function(t,f,r){arguments[4][424][0].apply(r,arguments)},{"./v1":730,"./v4":731,dup:424}],728:[function(t,f,r){arguments[4][425][0].apply(r,arguments)},{dup:425}],729:[function(t,f,r){arguments[4][426][0].apply(r,arguments)},{dup:426}],730:[function(t,f,r){arguments[4][427][0].apply(r,arguments)},{"./lib/bytesToUuid":728,"./lib/rng":729,dup:427}],731:[function(t,f,r){arguments[4][428][0].apply(r,arguments)},{"./lib/bytesToUuid":728,"./lib/rng":729,dup:428}],732:[function(t,f,r){f.exports={name:"@codoxhq/wave-core",version:"2.3.4-rc.41",main:"dist/index.js",directories:{test:"tests"},scripts:{test:"jest --watch",prod:"webpack --config ./webpack.config.js --mode=production","prod-dsm":"webpack --config ./webpack.dsm.config.js --mode=production","bump:prerelease":"npm version prerelease --preid=rc","bump:patch":"npm version patch","bump:minor":"npm version minor","bump:major":"npm version major","bump:rc":"npm version prerelease --preid=rc",version:""},repository:{type:"git",url:"git+https://github.com/davidnus/wave.git"},author:"nuser",license:"SEE LICENSE IN LICENSE.md",bugs:{url:"https://github.com/davidnus/wave/issues"},browserify:{transform:[["babelify",{presets:["@babel/preset-env"],plugins:["@babel/plugin-syntax-dynamic-import"]}]]},dependencies:{"crypto-js":"^3.1.9-1","deep-equal":"^1.0.1",extend:"^3.0.2","fast-deep-equal":"^3.1.3",pako:"^1.0.3","quill-delta":"^4.2.2",rangy:"^1.3.0",webworkify:"^1.5.0"},devDependencies:{"@babel/preset-env":"^7.13.15","@babel/runtime":"^7.9.6","ansi-colors":"^4.1.1","babel-eslint":"^10.1.0",babelify:"^10.0.0",browserify:"^17.0.0",chai:"^4.2.0","clean-webpack-plugin":"^4.0.0-alpha.0",dateformat:"^2.2.0",del:"^6.0.0",eslint:"^8.9.0","eslint-config-google":"^0.14.0","eslint-plugin-babel":"^5.3.1","eslint-plugin-jest":"^26.1.1",gulp:"^4.0.2","gulp-bump":"^3.2.0","gulp-concat":"^2.6.1","gulp-cond":"^1.0.0","gulp-eslint":"^6.0.0","gulp-header":"^2.0.9","gulp-insert":"^0.5.0","gulp-rename":"^2.0.0","gulp-replace":"^1.1.3","gulp-sourcemaps":"^3.0.0","gulp-streamify":"^1.0.2","gulp-uglify":"^3.0.2","gulp-util":"^3.0.8",jest:"^25.1.0",mocha:"^7.1.2",uglifyify:"^5.0.2","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0",watchify:"^4.0.0",webpack:"^5.35.0","webpack-cli":"^4.6.0"},homepage:"https://github.com/davidnus/wave#readme",description:""}},{}]},{},[448])(448)},191:(y,d,g)=>{g.d(d,{A:()=>e});var t=g(379),f=g.n(t),r=g(364),n=g.n(r)()(f());n.push([y.id,`/**
|
|
196
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var v,w=!0,x=!1;return{s:function(){_=_.call(p)},n:function(){var S=_.next();return w=S.done,S},e:function(S){x=!0,v=S},f:function(){try{w||_.return==null||_.return()}finally{if(x)throw v}}}}function c(p,m){(m==null||m>p.length)&&(m=p.length);for(var b=0,_=new Array(m);b<m;b++)_[b]=p[b];return _}function u(p,m){var b=i.apps.kora,_=(this.super(p.el,0,b),this.elem);function v(){var x=p.api.getContent();return function S(E){var k,D=a(E);try{for(D.s();!(k=D.n()).done;){var N=k.value;N.type==="block"&&(N.nested?S(N.nested):N.nested=[])}}catch(O){D.e(O)}finally{D.f()}}(x),JSON.parse(JSON.stringify(x))}function w(x,S){if(!x.length)return S;var E=x[0];if(S[E])return w(x.slice(1),S[E]);throw new Error("Path element ".concat(E," does not exist in content"))}this.appType=b,this.adjustAwareness=function(x){var S=_.closest(".fr-wrapper"),E={scrollTop:S&&S.scrollTop||0,scrollLeft:S&&S.scrollLeft||0};return x.map(function(k){var D,N,O,R=k.selection,A=k.siteId,z=k.cursor;return k=k.update,{siteId:A,cursor:(O=(A=E).scrollTop,A=A.scrollLeft,{top:z.top+O,bottom:z.bottom+O,left:z.left+A,right:z.right+A,lineHeight:z.lineHeight,height:z.height,width:z.width}),selection:(D=E.scrollTop,N=E.scrollLeft,R.map(function(H){return{top:H.top+D,bottom:H.bottom+D,left:H.left+N,right:H.right+N,height:H.height,width:H.width}})),update:k}})},this.n=function(){var x=Array.from(_.getElementsByTagName("img")).some(function(k){k.getAttribute("src"),k=k.getAttribute("data-fr-old-src")}),S=_.getElementsByClassName("fr-selected-cell"),E=0<_.parentNode.getElementsByClassName("fr-image-resizer fr-active").length;return(0,l.stringify)(x),(0,l.stringify)(S),x||E||!!S.length},this.e=function(x,S,E){if(!_)throw new Error("Element undefined");(0,l.stringify)(x),E?E&&E.forEach(function(k){var D=k;k.context&&(D=k.op),k=D,(0,o.logClone)(k),(0,o.logClone)(v()),(0,l.stringify)(k),k.forEach(function(N){var O,R=N.t,A=N.v,z=N.ld,H=N.li,$=N.oi,M=(N.od,N.lm,N.p),J=(N.cop,v());if($&&M.length&&M[M.length-1]==="nested"&&(O=function K(P,U){var V=P[0];if(U[V])return P.length==2?U[V]:K(P.slice(1),U[V]);throw new Error("Path element ".concat(V," does not exist in content"))}(M,J),p.api.insertNestBlock(O.id,$),O.id),R==="rt"&&(M.pop(),$=w(M,J),p.api.replaceBlockContent($.id,A),$.id),H&&(H.id,H.content,(O=M.pop())>=(R=w(M,J)).length?(A=R[R.length-1],p.api.createBlockAfter(A.id,H),A.id):($=R[O],p.api.createBlockBefore($.id,H),$.id)),z){if(!(A=z.id))throw new Error("ld op has no id field");p.api.removeBlock(A)}N.lm&&(R=Array.isArray(N.lm)?N.lm:[N.lm],O=M.pop(),H=R.pop(),$=w(M,J),z=w(R,J),A=$[O],!z.length&&0<R.length?(R.pop(),z=w(R,J),p.api.removeBlock(A.id),p.api.insertNestBlock(z.id,A,0)):H>=z.length?(N=z[H-1],p.api.moveBlockAfter(N.id,A)):(M=z[H],p.api.moveBlockBefore(M.id,A)))})}):p.api.setContent(x)},this.r=function(x){if(!_)throw new Error("Element undefined");(0,l.stringify)(x);var S=[];return x.forEach(function(E){var k=E.id,D=(E=E.content,p.api.getBlockContent(k));D&&(S.push(D),p.api.replaceBlockContent(k,E))}),(0,l.stringify)(S),S},this.d=v,this.hf=function(){for(var x=document.activeElement,S=p.el,E=x.parentNode;E;){if(E===S)return!0;E=E.parentNode}return!1},this.m=function(){var x;(x=_.getElementsByClassName("fr-video fr-active"))&&((0,l.stringify)(x),[].forEach.call(x,function(S){S.classList.remove("fr-active")}))},this.disable=function(){},this.enable=function(){}}function h(p,m){this.super(),this.init=function(){this.D.kora=new u(p),this.D},this.uninit=function(){delete this.D.kora}}(0,n.extendClass)(u,s.default),(0,n.extendClass)(h,e.default),r.default=h},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants/apps":510,"../../util/idGen":550,"../../util/lib":551,"../../util/normalizer":552,"../domains":523,"../rt":525,"@babel/runtime/helpers/interopRequireDefault":563}],519:[function(t,f,r){var n=t("quill-delta"),e=(t=t("./../../util/lib")).isArray,s=t.jsonEscape;function i(l){var o=l;try{if(!(o=typeof l=="string"?JSON.parse(s(l)):o)||!o.ops||!e(o.ops))throw new Error}catch{throw new Error(JSON.stringify(l))}return o}f.exports={contentToDelta:function(l){return l=i(l),new n(l)},parseAndValidate:i}},{"./../../util/lib":551,"quill-delta":722}],520:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/slicedToArray"))),s=t("../../constants/apps"),i=n(t("../domains")),l=n(t("../rt")),o=t("./../../logger"),a=t("./../../util/lib"),c=t("./../../env"),u=t("./qjs-util"),h=t("./../../../../cu-delta-filter/index.js"),p=t("../../../../codox-shared/src/com/log"),m=t("../../../../codox-shared/src/com/util"),b=(n=t("../../constants")).ONLINE,_=(n.OFFLINE,"silent");function v(x,S,E){var k=function(){try{var L,B=x.scrollingContainer||x.root;return(L=B.className&&-1<B.className.indexOf("ql-editor")?B:B.getElementsByClassName("ql-editor")[0])?L.contentEditable?L:void console.error("[qjs][getEditorDOM] Editor dom is not contenteditable"):void console.error("[qjs][getEditorDOM] Editor dom not found")}catch(Y){console.error(Y),o.logger.reportError(Y)}}();this.super(k,0,"quilljs"),this.appType=s.apps.quill;var D,N,O=null,R=0,A=this,z=null;function H(){x&&(R=x.getLength())}function $(L,B){B=1<arguments.length&&B!==void 0?B:_;try{x&&L&&(L.index+L.length<x.getLength()||function(Y){if(x&&Y){var Z=Y.index,rt=Y.length,Q=x.getLength();if(Q<Z)return Y.index=Q-1,Y.length=0;Q<Z+rt&&(Y.index=Z,Y.length=Q-1)}}(L),x.setSelection(L,B))}catch(Y){o.logger.reportError(Y)}}function M(){try{return x&&x.getSelection()}catch(L){o.logger.reportError(L)}}function J(L,B){c.isProd,c.isProd}function K(L){H();for(var B=arguments.length,Y=new Array(1<B?B-1:0),Z=1;Z<B;Z++)Y[Z-1]=arguments[Z];return L==="text-change"?(Y[0],Y[1],Y[2],c.isProd||x.getLength(),D.apply(void 0,Y)):L==="selection-change"?N.apply(void 0,Y):void 0}function P(L){var B=1<arguments.length&&arguments[1]!==void 0&&arguments[1];try{c.isProd;var Y=M(),Z=(x.updateContents(L,"codox"),H(),x.getContents());S.i({source:"r",delta:L,content:Z}),B&&$(Y)}catch(rt){o.logger.reportError(rt)}}function U(){try{if(x)return x.getContents();throw new Error("editor is null")}catch(L){throw o.logger.reportError(L),L}}function V(){try{return E}catch(L){o.logger.reportError(L)}}function G(L){try{var B=x.getBounds(L);return{left:B.left+k.scrollLeft,right:B.right+k.scrollLeft,bottom:B.bottom+k.scrollTop,top:B.top+k.scrollTop,height:B.height}}catch(Y){return o.logger.reportError(Y),null}}H(),this.hook=function(L){try{if(l.default.prototype.hook.call(this,L),x){x&&(D=function(Z,rt,Q){if(Z.ops,Q!="codox"&&Q!="undo"&&!(0,h.filterDelta)(Z)){if(A.isWriter()||A.isCommenter()&&Z.ops&&Z.ops.every(function(nt){return Object.keys(nt).every(function(et){return["retain","attributes"].includes(et)})&&(!nt.attributes||nt.attributes&&Object.keys(nt.attributes).every(function(et){return et==="comment"||et==="comment_draft"}))}))return Y({delta:Z,oldDelta:rt},"e");Q=x.getContents();var tt=0;Z=Z.ops[0].retain,Q=Q.diff(rt,tt=Z||tt),x.updateContents(Q,"undo"),setTimeout(function(){x.setSelection(null,"undo")},0)}},B=Y=L,N=function(Z,rt,Q){if(Q!==_&&Q!=="api")return B({delta:Z,oldDelta:rt},"c")},x.on("editor-change",K));try{x&&(x.setContents=J)}catch(Z){o.logger.reportError(Z)}}}catch(Z){o.logger.reportError(Z)}var B,Y},this.unhook=function(){try{l.default.prototype.unhook.call(this),x&&(x&&x.emitter&&x.emitter.removeListener("editor-change",K),x.hasOwnProperty("setContents")&&delete x.setContents)}catch(L){o.logger.reportError(L)}},this.getLAid=function(){var L=x.getContents();return{len:x.getLength(),textLen:(L&&L.ops?L.ops.filter(function(B){return typeof B.insert=="string"}).map(function(B){return B.insert}).join(""):"").length,laid:R}};var F=null,q=null,T=!(this.setWave=function(L){F=(O=L).hacm,q=O.app}),I=!1;this.loh=function(L,B){var Y,Z,rt,Q=L.delta,tt=L.oldDelta;return(0,m.logClone)(Q),(0,m.logClone)(tt),B==="e"?(q.a.i({source:"l",delta:Q}),I?void 0:(O.gs()!=b||O.sus()||O.slotimer("lohqjs"),L=Q,Y=tt,Z=U(),rt=0,L.ops[0].retain&&(rt=L.ops[0].retain),Z=Z.diff(Y,rt),O.pt.gct().seq,Y={op:O.dtf.d2c(L.ops),inverse:O.dtf.d2c(Z.ops)},O.dop2sm(Y,"lohqjs",O),void(T=!1))):B==="c"?O.gs()!==b||O.sus()?void 0:(T=!0,void setTimeout(function(){var nt,et;nt=Q,et=tt,T&&!I&&nt!==null&&(et={start:nt.index,end:nt.index+nt.length},F(et),T=!1)},0)):B=="u"?void O.pu.pu():void"QuillDomain codox_QJS_LOH: capturing an unexpected evt: delta = ".concat(Q,", ").concat(tt,", ").concat(B)},this.roh=function(L){(0,p.stringify)(new Date),(0,m.logClone)(L),P({ops:O.dtf.c2d(L.op)}),L.context&&O.rcs.urcs(L),(0,m.logClone)(L)},this.c=function(){try{I=!0;var L=M(),B=L?{start:L.index,end:L.index+L.length}:{start:-1,end:-1};return I=!1,B}catch(Y){o.logger.reportError(Y)}},this.getLength=function(){try{return x&&x.getLength()}catch(L){o.logger.reportError(L)}},this.disable=function(){x&&Object.getPrototypeOf(x).enable.bind(x)(!1)},this.enable=function(){x&&Object.getPrototypeOf(x).enable.bind(x)(!0)},this.setContents=function(L){var B=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];try{var Y,Z,rt=null;return x&&(Y=V(),(Z=(0,h.compareDelta)(Y.constructor,Y,L).change)&&Z.ops&&Z.ops.length&&(rt=M(),Object.getPrototypeOf(x).setContents.bind(x),x.updateContents(Z,"codox"),B&&$(rt),S.i(L),H())),rt}catch(Q){o.logger.reportError(Q)}},this.updateContents=P,this.getContents=U,this.initContents=V,this.setText=function(L){try{x&&x.setText(L,"codox")}catch(B){o.logger.reportError(B)}},this.tpop2delta=function(L){try{if(!Array.isArray(L))throw new Error("op is not array",L);var B={ops:[]};return L.forEach(function(Y){typeof Y=="number"&&B.ops.push({retain:Y}),Y.d&&typeof Y.d=="number"&&B.ops.push({delete:Y.d}),typeof Y=="string"&&B.ops.push({insert:Y})}),B}catch(Y){o.logger.reportError(Y)}},this.Q=function(){var L=0<arguments.length&&arguments[0]!==void 0?arguments[0]:z;if(!L)return null;z=L;var B=Object.keys(L).map(function(Y){var Z=(Q=L[Y]).start,rt=Q.end,Q=Q.update;return Z===-1?{cursor:null,selection:[],siteId:Y,update:!0}:Z===rt?{cursor:G(Z),selection:[],siteId:Y,update:Q}:{cursor:G(Z),selection:function(tt,nt){try{var et=tt,at=nt-tt+1,ct=x.getLeaf(tt),gt=(0,e.default)(ct,2),wt=gt[0],St=gt[1],Mt=x.getLeaf(nt),Lt=(0,e.default)(Mt,2),Pt=Lt[0],yt=Lt[1];if(wt==null||Pt==null)return[];var jt=document.createRange(),At=wt.position(St,!0),It=(0,e.default)(At,2),Ot=It[0],Et=It[1],Ct=(jt.setStart(Ot,Et),Pt.position(yt,!0)),Nt=(0,e.default)(Ct,2),ht=Nt[0],dt=Nt[1],Ft=[],Jt=(Ft=Ot===ht?(jt.setEnd(ht,dt),Array.from(jt.getClientRects())):(jt.setEndAfter(Ot.childNodes[Et]||Ot),Ft=Array.from(jt.getClientRects()),jt.setStartBefore(ht.childNodes[dt]||ht),jt.setEnd(ht,dt),Ft.concat(Array.from(jt.getClientRects()))),x.scroll.descendants(function(Fe){return Fe!==wt&&Fe!==Pt&&Fe.statics.blotName==="text"&&(jt.selectNode(Fe.domNode),Ft=Ft.concat(Array.from(jt.getClientRects())),!0)},et,at),k.getBoundingClientRect()),Xt=(Le=k,{paddingLeft:parseFloat((0,a.getStyle)(Le,"padding-left"))||0,marginLeft:parseFloat((0,a.getStyle)(Le,"margin-left"))||0,borderLeft:parseFloat((0,a.getStyle)(Le,"border-left"))||0,boxSizing:(0,a.getStyle)(Le,"box-sizing")}),Qt=Xt.boxSizing,ve=Xt.paddingLeft,kt=Xt.marginLeft,ee=Xt.borderLeft,pe=k;return Ft.map(function(Fe){return Fe={left:Fe.left-Jt.left+pe.scrollLeft,right:Fe.right-Jt.left+pe.scrollLeft,top:Fe.top-Jt.top+pe.scrollTop,bottom:Fe.bottom-Jt.top+pe.scrollTop,width:Fe.width,height:Fe.height},Qt==="border-box"&&(Fe.left+=kt,Fe.right+=kt),Qt==="content-box"&&(Fe.left+=kt+ve+ee,Fe.right+=kt+ve+ee),Fe}).filter(function(Fe){return 1<Fe.height&&1<Fe.width})}catch(Fe){return o.logger.reportError(Fe),[]}var Le}(Z,rt),siteId:Y,update:Q}});return B},this.n=function(){var L=k.getElementsByClassName("slash-command");return!(!L||!L.length)},this.m=function(){var L=new KeyboardEvent("keydown",{key:"Escape"});k.dispatchEvent(L)},this.forceSync=function(L){var B=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"api";if(B===_)throw new Error('[codox] forceSync "silent" changes are not synced');try{var Y=M(),Z=Object.getPrototypeOf(x);(Z&&Z.setContents.bind(x))(L,B),$(Y)}catch(rt){o.logger.reportError(rt)}},this.toDelta=function(L){return(0,u.contentToDelta)(L)},this.x=k}function w(x,S,E){this.super(),this.init=function(){this.D.quilljs=new v(x,S,E)},this.uninit=function(){delete this.D.quilljs}}(0,a.extendClass)(v,l.default),(0,a.extendClass)(w,i.default),r.default=w},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants":509,"../../constants/apps":510,"../domains":523,"../rt":525,"./../../../../cu-delta-filter/index.js":225,"./../../env":527,"./../../logger":530,"./../../util/lib":551,"./qjs-util":519,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572}],521:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("../domains"))),s=t("../../util/lib"),i=n(t("../pt"));function l(o,a,c){this.super(),this.init=function(){this.D.text=new i.default(o,a,c),this.D},this.uninit=function(){delete this.D.text}}(0,s.extendClass)(l,e.default),r.default=l},{"../../util/lib":551,"../domains":523,"../pt":524,"@babel/runtime/helpers/interopRequireDefault":563}],522:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,t("../../constants/apps")),s=n(t("../domains")),i=t("../../util/normalizer"),l=t("../../util/lib"),o=(t("./../../logger"),n=n(t("../rt")),window.tinymce);function a(u,h){this.super(u.getBody(),0);var p=u.getBody(),m=e.apps.tiny;if(this.appType=m,!u)throw new Error("Internal error: Tiny editor not found");m=Object.assign({},u.settings,{forced_root_block:!1,indent:!1,element_format:"html",remove_trailing_brs:!1});var b=Object.assign({},u.schema);o&&o.html&&new o.html.Serializer(m,b),this.getMouseHookElem=function(){if((u&&u.settings).inline)return null;var _=u.getDoc();return _&&_.getElementsByTagName("html")[0]},this.getCaretPos=function(_){var v,w=(_=u.dom.getRect(_)).x,x=_.y,S=_.w;return _=_.h,u.settings.inline?{left:w-(v=u.getBody().parentNode.getBoundingClientRect()).left,top:x-v.top,bottom:x+_,right:w+S,width:S,height:_}:{left:w,top:x,bottom:x+_,right:w+S,width:S,height:_}},this.adjustAwareness=function(_){var v,w,x=u.getBody().parentNode;return w=u.settings.inline?{scrollTop:-1*(v=x.getBoundingClientRect()).top,scrollLeft:-1*v.left}:{scrollTop:x.scrollTop,scrollLeft:x.scrollLeft},_.map(function(S){var E,k,D=S.selection,N=S.siteId,O=S.cursor;return S=S.update,{siteId:N,cursor:O,selection:(E=(N=w).scrollTop,k=N.scrollLeft,D.map(function(R){return{top:R.top+E,bottom:R.bottom+E,left:R.left+k,right:R.right+k,height:R.height,width:R.width}})),update:S}})},this.d=function(){try{if(!u||!u.getContent)throw new Error("Editor instance null");var _=u.getContent({format:"raw"});return(0,i.normalizeClasses)(_,i.classes.tinymce)}catch(v){console.error(v)}},this.e=function(_,v){if(!p)throw new Error("Element undefined");var w=document.createElement("div");for(w.innerHTML=_;p.firstChild;)p.removeChild(p.firstChild);Array.from(w.childNodes).forEach(function(x){p.appendChild(x)}),v&&h.i({source:"r"})},this.cc=function(_){if(p)return(_=p.getElementsByClassName("rangySelectionBoundary")[_])?_.outerHTML&&_.outerHTML.replace(/[\u200B-\u200D\uFEFF]/g,""):null;throw new Error("Can't get selection marker on element")},this.m=function(){var _;["data-mce-bogus='all'","data-mce-bogus='1'"].forEach(function(v){var w=p.querySelectorAll("[".concat(v,"]"));w&&[].forEach.call(w,function(x){x.parentNode.removeChild(x)}),p.querySelectorAll("[".concat(v,"]"))}),(_=p.querySelectorAll("[data-mce-selected='1']"))&&[].forEach.call(_,function(v){v.removeAttribute("data-mce-selected"),v.classname+=" faux-selection"})},this.n=function(){var _=p.ownerDocument||window.document,v=_.getElementsByClassName("mce-resizehandle");return!(!v||!v.length)||!(!(v=_.getElementsByClassName("mce-visual-caret"))||!v.length)},this.disable=function(){}}function c(u,h){this.super(),this.init=function(){this.D.tiny=new a(u,h),this.D},this.uninit=function(){this.D.tiny=null},this.hf=function(){return!u.settings.inline||document.activeElement===u.getBody()}}(0,l.extendClass)(a,n.default),(0,l.extendClass)(c,s.default),r.default=c},{"../../constants/apps":510,"../../util/lib":551,"../../util/normalizer":552,"../domains":523,"../rt":525,"./../../logger":530,"@babel/runtime/helpers/interopRequireDefault":563}],523:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=t("../../../codox-shared/src/com/log"),e=t("../../../codox-shared/src/com/util");r.default=function(){function s(l){for(var o in i)if(i.hasOwnProperty(o)&&(o=i[o]).dmid===l)return o;return null}var i={};this.D=i,this.a=function(){for(var l in i)if(i.hasOwnProperty(l)){if((l=i[l]).y==="quilljs"||l.y==="slate"||l.y=="codemirror")return void(l.k=null);if(l.y==="json")return o=l.d(),void l.sj(o);l.y;var o=l.d();l.sj(o)}},this.b=function(){var l,o=[];for(l in i)i.hasOwnProperty(l)&&o.push(i[l]);return o},this.c=function(){for(var l in i)if(i.hasOwnProperty(l)&&(l=i[l]).dmid===0)return l;return null},this.d=s,this.e=function(){var l,o=[];for(l in i)if(i.hasOwnProperty(l)){var a=i[l];if(a.y==="quilljs"||a.y==="slate"||a.y=="codemirror"){var c=a.k?JSON.stringify(a.k):JSON.stringify(a.getContents()),u=a.getLAid&&JSON.stringify(a.getLAid());(0,n.stringify)(u),c={dmid:a.dmid,spst:c,laid:u},o.push(c)}else if(a.y==="froalaNew"||a.y=="kora"||a.y=="json")u=JSON.stringify(a.gj()),(0,n.ins)(u),c={dmid:a.dmid,spst:u},o.push(c);else{if(!a.x)throw console.error("getSVals: undefined dom.x "),Error("undefined dom.x in getSVals");a={dmid:a.dmid,spst:a.gj()},o.push(a)}}return(0,e.logClone)(o),o},this.h=function(l){(0,e.logClone)(l);for(var o=0;o<l.length;o++){var a,c,u=s(l[o].dmid);if(u.y==="quilljs"||u.y==="slate"||u.y=="codemirror")return l[o].spst,a=JSON.parse(l[o].spst),void u.setContents(a);if(u.y==="json")return a=JSON.parse(l[o].spst),void u.initState(a,!0);u.y=="froalaNew"?(c=l[o].spst,(0,n.ins)(c),u.sj(c)):(c=l[o].spst.op[0],(0,n.ins)(c),u.sj(c)),u.e(u.gj())}},this.h2=function(l){(0,e.logClone)(l);var o=s(0);return o.y==="quilljs"||o.y==="slate"||o.y=="codemirror"?void o.setContents(l):o.y==="json"?void o.initState(l,!0):(o.sj(l),void o.e(l))},this.k=function(l){for(var o in i)!i.hasOwnProperty(o)||(o=i[o]).dmid===l&&(o.dmid,o.l())},this.u=function(l){for(var o in i)!i.hasOwnProperty(o)||(o=i[o]).dmid===l&&o.m()},this.T={rt:"rt",pt:"pt"}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219}],524:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/slicedToArray"))),s=(t("../constants/apps"),n(t("./shadowelem"))),i=t("../util/lib"),l=(n(t("lodash/partition")),t("./../logger"),n(t("rangy/lib/rangy-selectionsaverestore")));r.default=function(o,a,c){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:"pt",h=(l.default.initialized||l.default.init(),this),p=(this.dmid=0,this.spst="",this.CKPSVal="",this.elem=o,new s.default);p.init(o),p.setText(o.value),this.h=function(){return this.dmid===0},this.a=function(m){return p&&p.setText(m)},this.b=function(m,b){if(b=b||m,o&&typeof o.setSelectionRange=="function")return o.setSelectionRange(m,b);throw new Error("Can't set selection range on element")},this.c=function(){if(o&&o.selectionStart!==void 0&&o.selectionEnd!==void 0)return{start:o.selectionStart,end:o.selectionEnd};throw new Error("Can't get selection range on element")},this.d=function(){return o.value},this.e=function(m,b){p&&p.setText(m),o.value=m,b&&a.i({source:"r"})},this.l=function(){o.blur(),o.focus()},this.f=function(m){p&&p.updateStyle();for(var b,_,v,w,x,S=[],E=0,k=Object.entries(m);E<k.length;E++){var D=(N=(0,e.default)(k[E],2))[0],N=((N=N[1]).sid=D,p&&p.embedCaret(N)),O=(N=(0,e.default)(N,2))[0],R=(N=N[1],A=(A=void 0,i.getStyle)(R=O,"font-size"),A=Math.floor(parseInt(A.replace("px",""),10)),{left:(R=R.getBoundingClientRect()).left,right:R.right,top:R.top,bottom:R.bottom,height:R.height,width:R.width,lineHeight:A}),A=[];N&&(A=function(z,H){var $=l.default.createRange();$.setStartBefore(z),$.setEndAfter(H),$.normalizeBoundaries();for(var M=document.createNodeIterator($.commonAncestorContainer,NodeFilter.SHOW_ALL,{acceptNode:function(K){return NodeFilter.FILTER_ACCEPT}}),J=[];M.nextNode()&&(J.length===0&&M.referenceNode!==z||(J.push(M.referenceNode),M.referenceNode!==H)););return J.reduce(function(K,P){return P.nodeType!=3?K:($.selectNode(P),K.concat(Array.from($.nativeRange.getClientRects())))},[]).filter(function(K){return 1<K.height&&1<K.width})}(O,N)),S.push({cursor:R,siteId:D,selection:A})}return m=S,_=(b=o).getBoundingClientRect(),v=p.getDim(),w={scrollTop:b.scrollTop||0,scrollLeft:b.scrollLeft||0,left:_.left||0,top:_.top||0},x={left:v.left,top:v.top},m.map(function(z){var H,$,M,J,K=z.selection,P=z.siteId,U=z.cursor;return z=z.update,{siteId:P,cursor:(J=(P=x).left,P=P.top,{top:U.top+w.top-P,bottom:U.bottom+w.top-P,left:U.left+w.left-J,right:U.right+w.left-J,lineHeight:U.lineHeight,height:U.height,width:U.width}),selection:(H=w,$=x.left,M=x.top,K.map(function(V){return{top:V.top+H.top-M,bottom:V.bottom+H.top-M,left:V.left+H.left-$,right:V.right+H.left-$,height:V.height,width:V.width}})),update:z}})},this.j=this.spst,this.sj=function(m){h.spst=m},this.gj=function(){return h.spst},this.k=this.CKPSVal,this.y=u,this.x=this.elem,this.setPermission=function(m){},this.hf=function(){var m;return!(!document||!h.elem)&&(h.elem,m=document.activeElement,h.elem===m)}}},{"../constants/apps":510,"../util/lib":551,"./../logger":530,"./shadowelem":526,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572,"lodash/partition":700,"rangy/lib/rangy-selectionsaverestore":726}],525:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/slicedToArray"))),s=t("../constants/apps"),i=t("../util/lib"),l=n(t("lodash/partition")),o=t("./../logger"),a=t("../env"),c=(t("../../../codox-shared/src/com/log"),t("../../../codox-shared/src/com/util")),u=Date,h=["read","write","commentOnly"];function p(m,b){var _,v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"rt",w=null,x=(a.isClickup||(w=t("rangy/lib/rangy-selectionsaverestore")).initialized||w.init(),this);function S(N,O){if(w){var R=w.createRange();R.setStartBefore(N),R.setEndAfter(O),R.normalizeBoundaries();for(var A=document.createNodeIterator(R.commonAncestorContainer,NodeFilter.SHOW_ALL,{acceptNode:function(H){return NodeFilter.FILTER_ACCEPT}}),z=[];A.nextNode()&&(z.length===0&&A.referenceNode!==N||(z.push(A.referenceNode),A.referenceNode!==O)););return z.reduce(function(H,$){return $.nodeType!=3?H:(R.selectNode($),H.concat(Array.from(R.nativeRange.getClientRects())))},[]).filter(function(H){return 1<H.height&&1<H.width})}}this.elem=m,this.dmid=b||0,this.spst="",this.CKPSVal="",this.type=v,this.permission="write",this.isWriter=function(){return this.permission&&this.permission==="write"},this.isReader=function(){return this.permission&&this.permission==="read"},this.isCommenter=function(){return this.permission&&this.permission==="commentOnly"},this.getMouseHookElem=function(){return this.elem},this.hookMouse=function(N){var O,R,A,z=this.getMouseHookElem();z&&(O=N,A=0,_=function(H){var $,M,J;R&&($=H.clientX,M=H.clientY,(M={x:$-(J=($=R).getBoundingClientRect()).left+$.scrollLeft,y:M-J.top+$.scrollTop}).l=H.type==="click",M.t=Math.round(u.now()),A%E!=0&&!M.l||O([M],"pt"),A++)},(R=z).addEventListener("mousemove",_),z.addEventListener("click",_))},this.unHookMouse=function(){var N=this.getMouseHookElem();N&&(N.removeEventListener("mousemove",_),N.removeEventListener("click",_),_=null)};var E=5,k=null;function D(N,O,R){try{for(var A=R=R==null||R<0?0:R;A<N.length;A++){var z=N[A],H=z.id,$=z.content,M=$&&$.indexOf(O);if(0<=M)return(0,c.clone)(N[A]),{id:H,index:A,p:M}}}catch(J){console.error(J)}return null}this.setWave=function(N){k=N},this.c=function(){var N,O=k.gfln(),R=k.ssl,A=k.rsl,z=k.mdom,H=(R=R(z),z.d()),$=-1,M=-1,J=-1,K=-1,P=null,U=null;return R&&R.rangeInfos[0]&&((P=z.cc(0))&&(O?(N=D(H,P,0))!==null&&(M=N.index,$=N.p):$=H.indexOf(P)),(U=z.cc(1))&&(O?(N=D(H,U,M))!==null&&(K=N.index,J=N.p):J=H.indexOf(U))),A(z,R),O?(P&&!U&&(K=M,J=$),P&&U&&M==K&&(J-=P.length),0<=$&&0<=J?{startid:M,start:$,endid:K,end:J}:{startid:-1,start:-1,endid:-1,end:-1}):($<0&&($=0),U?J-=P.length:J=$,{start:$,end:J})},this.gp=D,this.b=function(N,O){if(O=O||N,m&&typeof m.setSelectionRange=="function")return m.setSelectionRange(N,O);throw new Error("Can't set selection range on element")},this.cc=function(N){if(m)return(N=m.getElementsByClassName("rangySelectionBoundary")[N])?N=N.outerHTML:null;throw new Error("Can't get selection marker on element")},this.d=function(){if(m)return m.innerHTML;throw new Error("Element undefined")},this.e=function(N,O){if(!m)throw new Error("Element undefined");m.innerHTML=N},this.f=function(N,O){var R="[id^=".concat(N,"]");if(!(R=Array.prototype.slice.call(m.querySelectorAll(R)||[])).length)return[];R=R.map(function(H){var $=function(M,J){if(J=new RegExp("^".concat(J,"_([^_]+)(_end$)?")),J=(M=M.match(J))&&M[1])return{siteId:J,isEnd:!(!M||!M[2])};throw new Error("Can't get site id from caret id")}(H.id,N);return{marker:H,siteId:$.siteId,isEnd:$.isEnd}}),R=(0,l.default)(R,{isEnd:!1});var A=(R=(0,e.default)(R,2))[0],z=(R=R[1],(0,i.keyBy)(R,"siteId"));return R=A.reduce(function(H,$){var M,J=$.siteId,K=(M=$=$.marker,K=s.apps.froala,x.appType===K&&(M.style.display="inline-block"),K=typeof x.getCaretPos=="function"?x.getCaretPos(M):M.getBoundingClientRect(),M=(0,i.getStyle)(M,"font-size"),M=Math.floor(parseInt(M.replace("px",""),10)),{left:K.left,right:K.right,top:K.top,bottom:K.bottom,height:K.height,width:K.width,lineHeight:M});return z[J]?H[J]={cursor:K,selection:S($,z[J].marker),siteId:J,update:!0}:H[J]={cursor:K,selection:[],siteId:J,update:!0},H},{}),A=Object.values(R),x.adjustAwareness(A)},this.h=function(){return b===0},this.i=function(){var N=null;if(N=m.ownerDocument)return N.createElement("div")},this.sj=function(N){x.spst=N},this.gj=function(){return x.spst},this.k=this.CKPSVal,this.l=function(){m.blur(),m.focus()},this.m=function(){},this.n=function(){return!1},this.x=this.elem,this.y=v,this.H=!0,this.hf=function(){var N;return!(!document||!x.elem)&&(x.elem,N=document.activeElement,x.elem===N)},this.getRemoteSelection=S,this.adjustAwareness=function(N){return N.map(function(O){var R=O.selection,A=O.siteId,z=O.cursor;return O=O.update,{siteId:A,cursor:z,selection:R.map(function(H){return{top:H.top,bottom:H.bottom,left:H.left,right:H.right,height:H.height,width:H.width}}),update:O}})}}p.prototype.hook=function(m,b,_){try{this.elem&&_&&this.hookMouse(m)}catch(v){o.logger.reportError(v)}},p.prototype.unhook=function(){try{this.elem&&this.unHookMouse()}catch(m){o.logger.reportError(m)}},p.prototype.setPermission=function(m){try{h.includes(m)&&(this.permission=m)}catch(b){o.logger.reportError(b)}},p.prototype.forceSync=function(m){try{m&&this.e(m)}catch(b){o.logger.reportError(b)}},r.default=p},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../constants/apps":510,"../env":527,"../util/lib":551,"./../logger":530,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572,"lodash/partition":700,"rangy/lib/rangy-selectionsaverestore":726}],526:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=["direction","boxSizing","width","overflow","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","scrollWidth","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize","marginLeft","marginRight","marginTop","marginBottom","margin"];r.default=function(){this.init=function(e){var s=this,i=(this.element=e,this.div=document.createElement("div"),this.div.class="textarea-mirror",document.body.appendChild(this.div),this.div.style);this.computed=window.getComputedStyle?getComputedStyle(e):e.currentStyle,i.whiteSpace="pre-wrap",e.nodeName!=="INPUT"&&(i.wordWrap="break-word"),i.position="absolute",i.visibility="hidden",n.forEach(function(l){i[l]=s.computed[l]}),i.height="0px",i.overflow="hidden"},this.setWidth=function(){var e=parseFloat(this.computed.paddingLeft.replace("px","")),s=parseFloat(this.computed.paddingLeft.replace("px",""));e=this.element.scrollWidth-e-s+"px",this.div.style.width=e},this.destroy=function(){this.div&&document.body.removeChild(this.div)},this.setText=function(e){this.text=e},this.getContainer=function(){return this.div},this.updateStyle=function(){var e=this,s=this.div.style;this.computed=window.getComputedStyle?getComputedStyle(this.element):this.element.currentStyle,n.forEach(function(i){s[i]=e.computed[i]}),this.div.scrollTop=this.element.scrollTop},this.embedCaret=function(e){this.div.innerHTML="";var s=e.start,i=e.end,l=(e=e.sid,document.createTextNode(this.text.substring(0,s))),o=document.createTextNode(this.text.substring(i)),a=document.createElement("span"),c=(a.setAttribute("data-pt-caret-start",e),a.style.display="inline",null),u=null;return s!==i&&(u=document.createTextNode(this.text.substring(s,i)),(c=document.createElement("span")).setAttribute("data-pt-caret-end",e),c.style.display="inline"),this.div.appendChild(l),this.div.appendChild(a),u&&(this.div.appendChild(u),this.div.appendChild(c)),this.div.appendChild(o),this.updateStyle(),[a,c]},this.getDim=function(){if(this.div)return this.div.getBoundingClientRect()},this.updateCarets=function(e){this.div.innerHTML="",this.updateStyle();var s=Object.keys(e),i=(e=Object.values(e),this.div.textContent=this.text.substring(0,e[0].start),document.createElement("span"));i.setAttribute("data-pt-caret",s[0]),i.textContent=this.text.substring(e[0].start,this.text.length),this.div.appendChild(i)}}},{}],527:[function(t,f,r){f.exports={isProd:!1,isDev:!1,isClickup:!1,environment:null,setEnv:function(n){}}},{}],528:[function(t,f,r){var n=(a=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/createClass")),e=a(t("@babel/runtime/helpers/classCallCheck")),s=a(t("@babel/runtime/helpers/assertThisInitialized")),i=a(t("@babel/runtime/helpers/inherits")),l=a(t("@babel/runtime/helpers/possibleConstructorReturn")),o=a(t("@babel/runtime/helpers/getPrototypeOf")),a=a(t("@babel/runtime/helpers/wrapNativeSuper"));function c(S){var E=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var k,D=(0,o.default)(S);return k=E?(k=(0,o.default)(this).constructor,Reflect.construct(D,arguments,k)):D.apply(this,arguments),(0,l.default)(this,k)}}t=(0,a.default)(Error),(0,i.default)(x,t),m=c(x),a=(0,n.default)(x),(0,i.default)(w,a),p=c(w),t=(0,n.default)(w);var u,h,p,m,b=((0,i.default)(v,t),h=c(v),(0,n.default)(v));function _(S,E,k){return(0,e.default)(this,_),(S=u.call(this,S||"CBError")).ASErrInfo=E,S.failedCmd=k,S}function v(S,E,k,D){return(0,e.default)(this,v),(S=h.call(this,S||"VersionError")).clientVer=E,S.serverVer=k,S.compatible=D,S}function w(S){return(0,e.default)(this,w),(S=p.call(this,S||"TerminalError")).reconnect=!1,S}function x(S,E){return(0,e.default)(this,x),(S=m.call(this,S)).name=S.constructor.name,Error.captureStackTrace((0,s.default)(S),S.constructor),S}(0,i.default)(_,t),u=c(_),i=(0,n.default)(_),f.exports={CoreError:a,TerminalError:t,VersionError:b,CBError:i}},{"@babel/runtime/helpers/assertThisInitialized":556,"@babel/runtime/helpers/classCallCheck":557,"@babel/runtime/helpers/createClass":559,"@babel/runtime/helpers/getPrototypeOf":561,"@babel/runtime/helpers/inherits":562,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/possibleConstructorReturn":570,"@babel/runtime/helpers/wrapNativeSuper":576}],529:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"AppAPI",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"Bootstrap",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(r,"Errors",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"WavePreDsm",{enumerable:!0,get:function(){return i.default}}),r.default=void 0,n(t("./api/bootstrap"))),s=n(t("./api/appApi")),i=n(t("./predsm/codox")),l=n(t("./errors"));n=n(t("../package.json")),t={Bootstrap:e.default,AppAPI:s.default,WavePreDsm:i.default,Errors:l.default},r.default=t,console.log("\x1B[43m wave-core: ".concat(n.default.version," \x1B[0m"))},{"../package.json":732,"./api/appApi":505,"./api/bootstrap":506,"./errors":528,"./predsm/codox":532,"@babel/runtime/helpers/interopRequireDefault":563}],530:[function(t,f,r){t("./env").isProd,t=new function(){this.init=function(n){this.sentry=n},this.reportError=function(n){},this.reportInfo=function(n){},this.addBreadcrumb=function(n){},this.addTag=function(n,e){}},f.exports={logger:t,SENTRY_LEVEL_H:1,SENTRY_LEVEL_M:2,SENTRY_LEVEL_L:3,I_STOP_MSG_1:3001,I_STOP_MSG_2:3002,I_STOP_MSG_3:3003,I_STOP_MSG_4:3004,SENTRY_REPORT_LIMIT:2,SENTRY_RTT_REPORT_LIMIT:2}},{"./env":527}],531:[function(t,f,r){var n={read:"r",write:"w",commentOnly:"w",no_access:"r"};f.exports={accessToRole:function(e){var s;if((s=e)&&s.trim().toLowerCase(),n[e])return n[e];throw new Error("access type: ".concat(e," undefined"))},roles:{Read:"r",Write:"w"}}},{}],532:[function(t,f,r){var n,e=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/typeof")),s=Date,i=(n=t("./ver")).smVer,l=n.clientVer,o=(n=t("../env")).isProd,a=(n.isDev,n.isClickup),c=(n=t("../../../codox-shared/src/com/log")).ins,u=((n.stringify,n=t("../../../codox-shared/src/com/util")).clone,n.logClone),h=(n=t("../util/lib")).getTabId,p=n.clearTimer,m=(n=t("../logger.js")).logger,b=n.SENTRY_LEVEL_H,_=(n=t("../../../codox-shared/src/com/constants")).JOINING,v=n.ONLINE,w=n.STOPPED,x=n.OFFLINE,S=(n=t("../../../codox-shared/src/com/constants")).STARTED_LOG,E=(n.JOINED_LOG,n.STOPPED_LOG,n.INVALID_LOG,n=t("../constants")).SMSUB,k=n.SMMSG,D=t("./rcs.js"),N=t("./dsm.js"),O=t("../../../codox-shared/src/gt/pt.js"),R=t("../../../codox-shared/src/gt/pu.js"),A=(n=t("./off.js")).gos,z=n.srjn,H=n.offLOH,$=(n.offLOHJson,n.isrjn,n=t("./opm")).dltmg,M=n.difmg,J=(n=t("./msg")).msg2sm,K=n.log2sm,P=(n=t("./sync")).hso,U=n.sof,V=(n=t("./difap.js")).flop,G=n.plop,F=n.glop,q=n.rss,T=n.loh,I=n.roh,L=n.udoc,B=t("./dltap.js"),Y=t("./ext/ime.js"),Z=t("./ext/uim.js"),rt=t("./ext/pvp.js"),Q=t("./soh.js"),tt=t("../../../codox-shared/src/com/lib"),nt=t("../../../codox-shared/src/dtf/dtf.js"),et=tt.isop,at=tt.ipop,ct=tt.idlt,gt=tt.idif,wt=tt.dct,St=tt.gran,Mt=tt.csmais,Lt=tt.dcdcm,Pt=t("../../../codox-shared/src/gt/xf"),yt=(n=t("../../../codox-rt-type/src/")).sdf,jt=n.rtf,At=t("../../../codox-json-ot/lib/"),It=(t("./sapa.js"),t("./spot.js"),n=t("./access")).accessToRole,Ot=n.roles;t("../errors").VersionError,f.exports=function(Et,Ct,Nt){var ht=s.now(),dt=(this.START_TIME=ht,this.endpoint=Et.endpoint,this.tm=Nt,yt.gop),Ft=jt.iwop,Jt=jt.cko,Xt=nt.d2c,Qt=i,ve=(this.setSMV=function(zt){Qt=zt},l),kt=(this.cver=ve,null),ee=(this.setSID=function(zt){kt=zt},1),pe=14,Le=16,Fe=20,qe=21,ze=501,Ie=o,He=Et.codoxLogger,hn=Et.startCb,Tt=Et.sockOpenTimer,ae=Et.editorInstance,de=m.reportError.bind(m),we=m.addBreadcrumb.bind(m),Oe=m.addTag.bind(m),Rt=(this.breadCrumb=we,console.log("codoxwave constructor (begin) codox4.0xxx--x-2024-6 new1draft-lex start ",Et),this.editorInstance=ae,we("[codoxi]* ccw: t = 0; CV="+ve+"; seid = "+Et.sid,b),Oe("clientVersion",ve),Et.ver),Ut=this,se=(this.app=Et).appType,bt=Et.sid,ft=Et.domains,xt=Et.cid,Bt=(ft.b(),ft.c()),ce=(Bt.sw&&Bt.sw(this),Et.sysInfo),Ce=Et.anyClient,Te=Et.founder,Ne=Ot.Write,Ge=(Et.role&&(Ne=Et.role),hn),be={sid:kt,jointime:new Date,userinfo:Object.assign({},Et.user),role:Ne,founder:Te},pt=(this.minfo=be,null),Dt=null,$t=null,qt=(a||(this.rangy||(this.rangy=t("rangy/lib/rangy-selectionsaverestore")),this.rangy.initialized||this.rangy.init()),this.rangy=t("rangy/lib/rangy-selectionsaverestore"),this.rangy.init(),0),Wt=null,oe=null,X=null,lt=[],vt=null,Vt=s.now(),te=0,Zt=_,Yt=rt.pmod(),me=!1,Ee=null,Ue=!1,Ae=(this.setSMC=function(zt){Ue=zt},null),We=null,nn=null,cn=null,An=null,un=null,bn=null,Nn=null,Ln=null,er=null,nr=!0,ka=!0,Ui=!0,to=!0,Lr=!0,Hr=!0,wn=!0,$i=!0,gn=null,In=null,Ao=null,jr=null,eo=null,Br=null,_r=null,Oa=null,yo=null,qr=null,vn=null,Nu=null,Hl=null,Jr=null,Pu=null,ql=null,Ta=null;function No(zt){return zt&&zt!=="pt"&&vn.mbs.length,Zt!==x&&vn&&vn.mbs&&vn.mbs.length===1}function Po(zt,ne){if(Ct)try{if(Ct.readyState!==1)throw new Error("WebSocket is in OPEN state.");Ct.close(),Ct=null}catch{we("socket error readyState = ".concat(Ct.readyState," err=").concat(ne)),zt.error=ne,o||console.error("[codox] exception in closing socket")}}function Io(zt,ne){if(Zt!=x){if(ke=new Date,sn=null,Wi&&(sn=vn.mbs.length),tn=null,tn={state:Zt,connected:Ue,subr:di,subs:Wi,JnC:tn=qr?1:tn,joined:me,members:sn,reason:null,error:null,wid:Et.waveId,app:se,ts:ke},sn={},tn.reason=zt||500,zt==800)return tn.reason=800,sn.reason=800,Po(tn,13),void ai(xt,zt);if(Zt===w)tn.error=1;else{if(!zt)return Po(tn,3),void(Nt||ai(xt,500));if(!Ue)return tn.error=6,zt!==ze&&de(new Error("init socket connection failure"),{tags:sn,extra:tn}),Ba(zt),void(Nt||ai(xt,zt));Ct&&Do("stopflush");var fe,ke=null;Ct&&zt!=ee&&zt!=200&&(fe=function(en,Ve){return(en=en!=null&&(0,e.default)(en)==="object"?en:{}).code=Ve.reason,en.st=Ve.state,en.cn=Ve.connected,en.subr=Ve.subr,en.subs=Ve.subs,en.jnd=Ve.joined,Wi&&(en.dos=Us(),en.mbn=vn.mbs.length),(Ve=JSON.stringify(en)).length,Ve}(ne,tn),ke=Ct.close(4111,fe)),(zt==200||zt==ee&&ne!==4e3||zt!==ee&&zt==200&&ke<0)&&(tn.error=12,we("stop reason = ".concat(zt,"; sid = ").concat(kt)),de(new Error("reason ".concat(zt)),{tags:sn,extra:tn,details:ne})),Nt||ai(xt,zt)}}else zt.message;var sn,tn}function ai(zt,ne){var fe;Zt!=w&&(Zt=w,0<lt.length&&(u(lt),lt=[]),Ct&&(Ct.onclose=null,Ct.onmessage=null,Ct.onerror=null,Ct.onopen=null),p(vt),p(oe),p(X),p(Tt),za.clean(),fe=(s.now()-ht)/1e3,me?(we("[codoxi]* cdxclose: t = "+fe+"; r="+ne+"; hbc = "+Ji+"; sid = "+In&&kt,b),Et.a.a(zt,ne)):((0,e.default)(ne)!=="object"?we("[codoxi]* cdxcb(n): t = "+fe+"; r="+ne,b):ne.message,Ge(null,ne)),Et.domains=null,be=Bt=ft=In=Ge=Ut=null,qr&&qr.clean(),qr=null)}function Ls(){return Ne===Ot.Read}function Bs(zt,ne,fe){var ke,sn;ci||(zn?fe=="e"&&(fe=zt,zt=ne,ke=Bt.getContents(),sn=0,fe=fe.ops[0].retain,ke=ke.diff(zt,sn=fe||sn),Bt.updateContents(ke),Bt.disable()):ne=="e"&&ft.b().forEach(function(tn){var en=tn.gj(),Ve=tn.d(),Un=en;(Ar?JSON.stringify(Un)!=JSON.stringify(Ve):Un!=Ve)&&tn.e(en,!1)}))}function ja(zt){return Zt==x||No(zt)||ui()||!Yt}this.LOHF=function(){Do("stopflush")},Ut.DMODE=ja,Ut.pflusher=function(zt){return zt=="LoT"||zt=="HBP"||zt=="lohjs"||zt=="opm"||zt=="smrjn"||zt=="smncm"||zt=="off"},Ut.blimit=function(zt,ne,fe){return No()?fe<=JSON.stringify(zt).length:ne<=(fe=zt.length)},Ut.susloh=function(zt,ne){return!0};var Aa={success:!(Ut.dcploh=function(zt,ne){if(!Array.isArray(zt))throw new Error("ESTOP: DCPLOHcontrol requires an array of lohops");if(u(zt),Zt==x){if(Ro)return u(zt),!1;for(var fe=0;fe<zt.length;fe++)H(zt[fe],Ut);return!1}if(Ut.bium()){for(var ke=Pt.ccp,sn=0;sn<zt.length;sn++)vn.DCPLopsN++,vn.DCPLopsN,zt[sn],vn.DCPLops=ke(vn.DCPLops,zt[sn].op,Ut,"LOHdmod");return ne=="stopflush"}return!0}),state:null},hr=null,Na=!1;function Pa(zt){Na=!1,zt.success&&c(zt),hr!==null&&hr(zt)}var si=[],li={},Fs=!1,zn=!1,ci=!1,Ia=!1,Ar=!1,Ra=!1,Ro=!1,bo=ae!==void 0&&ae.type==="draft",Mo=ae!==void 0&&ae.type==="lexical",Ma=!1,vo=!1;function Do(zt){var ne;zt!=="a2ia"&&(qi=!0),p(vt),ct(Ut)?(0,B.flop)(zt,Ut):Ro?V(zt,Ut):(ne=F(Ut),G(ne,zt,Ut)),Wt=null}function Hi(zt,ne){La(zt,ne)}var qi=!0;function Da(){return!(!qi||Zt!==v||!Yt||ui())}function zs(){return!(!Fs||Zt!==v||!Yt||ui())}function ui(){return Y.bime()||Z.buim()}function Us(){return Bt?ct(Ut)?Bt.getLength():Ar||bo||Mo?JSON.stringify(Bt.gj()).length:Bt.gj().length:null}function Iu(zt,ne){if((!Ro||bo||Mo)&&ne!==void 0){var fe=(s.now()-ht)/1e3;if(zt!==ne){if(Ro||ct(Ut))throw console.error(new Error("[codox_checkCAID] (QJS/SJS/JSON): inconsistent AID states. Local = "+zt+"; Remote = "+ne)),we("[codoxe]-- caid: t = "+fe+"; l="+zt+"; r="+ne+"; sid = "+kt,b),new Error("ESTOP: caid error");var ke;if((ke=Ar||bo||Mo?JSON.stringify(Bt.gj()).length:Bt.gj().length)!==ne)throw console.error(new Error("codox_checkCAID: irrecoverable CAID-error: local-externalinfo = "+zt+" local-internalinfo = "+ke+"; remote-externalinfo = "+ne)),we("[codoxi]-- caid: t = "+fe+"; li="+ke+"le="+zt+" r="+ne+"; sid = "+kt,b),new Error("ESTOP: caid error");we("[codoxi]- caid: t = "+fe+"; li="+ke+"le="+zt+" r="+ne+"; sid = "+kt,b)}}}function La(zt,ne){J(zt,ne,Ut)}function ur(zt,ne,fe){K(zt,ne,fe,He,Ut)}function Ba(zt){Nt||(zt!==pe&&zt!=Le||Et.a.b(xt,vn.mbs),(zt=zt===ee?Zt===_?Fe:qe:zt)!==ze&&Et.a.e(xt,zt))}var Ji=0,Fa=null;function Jl(zt,ne){if(!Array.isArray(zt)||!Array.isArray(ne))throw new Error("equalArrays: invalid inputs: ",zt,ne);if(zt.length===ne.length){for(var fe=0;fe<zt.length;fe++)if(zt[fe]!==ne[fe])return;return 1}}function Wl(zt){var ne,fe,ke,sn=zt.context.sid,tn=Jr.grcs(),en=tn[sn];if(tn===void 0)throw new Error("codox_executeSelectionOp: codoxRCS is undefined");if(u(zt),u(tn),ne=tn[sn],fe=zt.op,ne!=null&&fe!=null&&(Mo?ne.start==fe.start&&ne.end==fe.end&&Jl(ne.startBlkPos,fe.startBlkPos)&&Jl(ne.endBlkPos,fe.endBlkPos):bo&&ne.start==fe.start&&ne.end==fe.end&&ne.startBlkPos==fe.startBlkPos&&ne.endBlkPos==fe.endBlkPos))return u(zt),void u(tn);tn[sn]=zt.op,u(zt),u(tn),Da()||zs()?Ar?Ta("exe-slop",{rcsobj:en},sn):ql("exe-slop",sn):(ke={rcsobj:en},p(Fa),Fa=setTimeout(function(){(function Ve(Un,ar){Fa=Da()||zs()?(Ar?Ta("missed-cr",Un,ar):ql("missed-cr",ar),null):(p(Fa),setTimeout(function(){Ve(Un,ar)},1e3))})(ke,sn)},1e3))}var Lo,di=!1,Wi=!1;function $s(zt){var ne=zt,fe=(Vt=s.now(),zt.caid=kt,zt.cak=$t,zt.d=bt,"");if(!Ct)throw new Error("ESTOP:socket nonexistence");Ct.canSendJSON||((fe=JSON.stringify(zt)).length,fe.length);try{Ct.send(fe)}catch(ke){throw u(ne),Ie||console.error(ke),new Error("ESTOP:so-send error")}Ct.bufferedAmount,Ct.bufferedAmount}this.gamm=function(){return Dt},this.gmmsize=function(){return cn},this.gdmsize=function(){return An},this.gsts=function(){return Ee},this.gssd=function(){return Wi},this.TZ=Io,this.LOH=function(){try{return(function(){for(var zt=arguments.length,ne=new Array(zt),fe=0;fe<zt;fe++)ne[fe]=arguments[fe];var ke,sn,tn=ne[0],en=ne[1],Ve=ne[2];if(ke=tn,en==="e"&&No()&&(gt(Ut)?(sn=(Ve=ft.d(Ve)).d(),Ve.gj()!==sn&&Et.a.i({source:"l"})):ke.delta?Et.a.i({source:"l",delta:ke.delta}):Et.a.i({source:"l",delta:ke})),(function(){return!Ls()||(we("[codoxi]- rv1; sid = "+kt,b),Bs.apply(void 0,arguments),!1)}).apply(void 0,ne)&&Zt!==_&&Zt!==w)return en==="pt"?ja("pt")?void 0:function(Un,ar){u(ar={t:1<arguments.length&&ar!==void 0?ar:"pt",op:Un}),jr(ar),Hi(ar,null)}(tn,en):ct(Ut)?B.loh.apply(B,ne.concat([Ut])):void T.apply(void 0,ne.concat([Ut]))}).apply(void 0,arguments)}catch(zt){if(Ie||console.error("codoxLOH: err = ",zt),0<=zt.message.search(/^ESTOP/))return void Io(901,{loherr:zt.message})}},this.ROH=function(zt){var ne,fe,ke;zt.cmg&&Lt(zt,Dt,Ut),(ne=zt).context&&ne.context.sid===kt&&ne.cmd&&ne.cmd.t===5&&(fe=s.now(),(te=fe-ne.context.st)<0&&(ke=(s.now()-ht)/1e3,o||console.error("[codoxi]-- rtt-roh: t = "+ke+"; hbC = "+Ji+"; rtt= "+te+"; priT="+ne.context.st+"; curT="+fe+"; sid="+kt),0<za.rttReportLimit&&(we("[codoxi]-- rtt-roh: t = "+ke+"; hbC = "+Ji+"; rtt= "+te+"; priT="+ne.context.st+"; curT="+fe+"; sid="+kt),de(new Error("reason RTT")),za.rttReportLimit--))),Zt===_&&!zt.cmd||zt.context&&zt.context.sid===kt&&at(zt)||(lt.push(zt),lt.length,lt.length===1&&function sn(tn){var en,Ve;lt.length!=0&&(Ve=s.now()-Wt,Yt&&!ui()&&Zt===v&&Ve<250&&tn<2e3?(p(oe),oe=setTimeout(function(){sn(tn+250),oe=null},250)):(lt.length,Ve=lt.shift(),nr&&(Lr=!Lr),Lr||Zt===_||!Ve.context||Ve.context.sid===kt||Ut.bium()||Do("ROH"),Ve.so?P(Ve,Ut):U(Ve)||(Ve.hasOwnProperty("to")&&In&&(In.rto=Ve.to,Ve.context&&(Ve.context.to=Ve.to),Ve.to,In.rto),Ve.cmd?Nu(Ve):(en={},!ci||Ve.t&&Ve.t==="sl"?en.op=Ve.op:(en.op=Ve.op[0].po,en.ao=Ve.op[0].ao),en.context=Ve.context,Ve.t&&(en.t=Ve.t),Lr||(at(Ve=en)?Et.a.j(xt,{coords:Ve.op,sid:Ve.context.sid}):(Ve=Ao(Ve))!=null&&Ve.op.length!==0&&(et(Ve)?Wl(Ve):!zs()&&!Da()||Lr?(Ve.context.CAID=!1,en=Pt.ccp,vn.DCPRops=en(vn.DCPRops,Ve.op,Ut,"ROHdmod"),vn.DCPRopsN++,vn.DCPRopsN,u(vn.DCPRops)):(ct(Ut)?B.roh(Ve,Ut):I(Ve,Ut),!Ut.bium()&&Ve.context.CAID&&(u(Ve),Iu(Us(),Ve.context.caidinfo)))))),s.now()),0<lt.length&&sn(1500)))}(0),s.now())},this.gls=function(){if(Zt!==v)return Zt(),Aa;var zt=null;return Ar||Ra||vo||Ia?zt=Bt.d():(zn||Ma||ci)&&(zt=Bt.getContents()),{success:!0,state:zt=JSON.stringify(zt)}},this.gss=function(zt){return hr=zt,Zt!==v?(Zt(),Pa(Aa)):Na?Pa(Aa):(Do("syn"),$s({a:k,smacmd:{t:"ggs"}}),Na=!0,setTimeout(function(){Pa(Aa)},1e4)),"made a SMA4GS request"},this.smagsr=Pa,this.lcmm=function(){return pt},this.dec=wt,this.lhto=function(){return null},this.ssm=La,this.dssm=Hi,this.wxsp=function(){return!(!Fs||!Yt||ui())},this.wxpm=function(){return!(!qi||!Yt||ui())},this.gpm=function(){return Yt},this.gs=function(){return Zt},this.ss=function(zt){(Zt=zt)==x&&(Wt=null)},this.bium=ui,this.gime=Y.bime,this.gam=function(){return qi},this.gsap=function(){return Fs},this.gmi=function(){return[Nn,Ln,'"></span>']},this.gcp=function(zt){return(zt=li[zt])?(zt.pos,zt.pos):0},this.scp=function(zt,ne){var fe=li[zt];fe||(li[zt]=fe={}),fe.pos=ne},this.ssl=function(zt){var ne=null;if(!qi)return null;if(zt&&zt.x)try{ne=Ut.rangy.saveSelection(zt.x)}catch(fe){o||console.error(fe)}return ne},this.rsl=function(zt,ne){ne&&Ut.rangy.restoreSelection(ne,!0),(ne=Array.from(document.getElementsByClassName("rangySelectionBoundary"))).forEach(function(fe){return fe.remove()})},this.sj=function(zt){me=zt},this.ece=function(){Et.a.g(xt);var zt=(s.now()-ht)/1e3;we("[codoxi]* eco: t = "+zt+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b)},this.dce=function(){p(vt),B.rss("nce"),q("nce"),rt.rss("nce"),Wi&&Et.a.f(xt);var zt=(s.now()-ht)/1e3;we("[codoxi]* dco: t = "+zt+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b)},this.pm=Da,this.spm=zs,this.gcaid=Us,this.ccaid=Iu,this.raid=function(zt){var ne=[];if(zt.dmid!==0||Lr||zt.y==="pt")return ne;var fe,ke=zt.d();return ke!==((fe=document.createElement("div")).innerHTML=zt.gj(),fe=fe.innerHTML)&&(zt.gj().length,fe.length,ke.length,ne=dt(fe,ke),zt.sj(ke)),ne},this.grtt=function(){return te},this.srtt=function(zt){te=zt},this.glst=function(){return Vt},this.nu=Ba,this.nsi=function(zt,ne){if(!Nt){Et.a.b(xt,vn.mbs);for(var fe=[],ke=0;ke<ne.length;ke++)ne[ke].sid!==kt&&fe.push(ne[ke]);0<fe.length&&Et.a.e(xt,zt,fe)}},this.nsm=ur,this.ihb=function(){return++Ji},this.ghb=function(){return Ji},this.JS=function(){return Bt.js.apply(Bt,arguments)},this.ws=function(){return Zt===v},this.dop2sm=B.plop,this.udoc=L,this.gop2sm=G,this.hacm=function(zt){var ne;zt?Zt!==v||No()||(Do("cmv"),In.dmid=Bt.dmid,jr(ne={t:"sl",op:zt}),Hi(ne,null)):c(zt)},this.slotimer=function(zt){var ne=Wt;Wt=s.now(),ne===null&&(p(vt),vt=setTimeout(function(){(function fe(ke){var sn=s.now()-Wt,tn=250,en=2e3;return No()&&ct(Ut)&&(tn=2e3,en=1e4),qt+=tn,sn<tn&&qt<en?(p(vt),vt=setTimeout(function(){fe()},tn),0):(Do("LoT"),qt=0,void(vt=Wt=null))})()},250),qt=0)},this.sr=function(zt){var ne=It(zt);Ne=ne,zn&&(Ls()?Bt.disable():Bt.enable()),Bt.setPermission&&Bt.setPermission(zt)},this.udc=Bt.updateContents,this.rsce=function(zt){B.rss(zt),q(zt),Hl(zt),rt.rss(zt),qi=!0;var ne,fe=Jr.grcs();for(ne in fe){var ke=fe[ne];ke.start&&(ke.start=-1),ke.end&&(ke.end=-1)}clearTimeout(vt),qt=0,$t=vt=null,lt=[],Br("all"),qr.rsto()},this.sosd=$s,this.gso=function(){return Ct},this.sso=function(zt){Ct=zt},this.gaid=function(){return se},this.gsid=function(){return bt},this.sst=function(zt){Tt=zt},this.gatype=function(){return{codoxQJS:zn,codoxSJS:ci,codoxTinymce:vo,codoxFroala:Ra,codoxFroalaNew:Ar,codoxCodeMirror:Ma,codoxText:Ia,codoxJSON:Ro,codoxDraft:bo,codoxLex:Mo}},this.gdft=function(){return bo},this.glx=function(){return Mo},this.gqj=function(){return zn},this.gcm=function(){return Ma},this.gsj=function(){return ci},this.gjs=function(){return Ro},this.gtx=function(){return Ia},this.gtn=function(){return vo},this.gfl=function(){return Ra},this.gfln=function(){return Ar},this.mdom=Bt,this.cdm=ft,this.cid=xt,this.lohl=Do,this.ntu=Ba,this.xi=function(zt){var ne=ft.d(zt.context.dmid);if(ne){var fe=ne.gj();if(Ft(zt)==="d"){var ke=yo(zt),sn=(0,e.default)(zt.op[0])===Ae[2]?zt.op[0]:0;if((ke=fe.indexOf(ke,sn))!==sn)return!1}return!!function(tn,en){Jt(en);for(var Ve="",Un=tn.gj(),ar=0,Vl=0;Vl<en.length;Vl++){var Ru,rr=en[Vl];switch((0,e.default)(rr)){case Ae[0]:Ve+=rr;break;case Ae[1]:if((ar+=rr.d)>Un.length)return Un.length,0;break;case Ae[2]:if(ar+rr>Un.length)throw Un.length,Ru="perr=1001; epos ="+(ar+rr)+"; doclen = "+Un.length,new Error("ESTOP:"+Ru);Ve+=Un.slice(ar,ar+rr),ar+=rr}}return Ve+=Un.slice(ar),tn.sj(Ve),1}(ne,zt.op)&&(ft.d(zt.context.dmid).y!=="rt"||function(tn){return vo?1:((en=document.createElement("div")).innerHTML=tn,(en=en.innerHTML)===tn||(tn.length,en.length,0));var en}(ne.gj())?(L(ne,zt,Ut),!0):(ne.sj(fe),!1))}return u(zt.context.dmid),!1},this.sm2sm=La,this.sloet=function(zt){Wt=zt},this.sus=No,this.ird=Ls,this.sjsroh=function(zt){var ne=function(fe){null(fe);var ke=function(en){for(var Ve=[],Un=0;Un<en.length;Un++)en[Un].data.ne?en[Un]:Ve.push(en[Un]);return Ve}(fe.ao);if(0<ke.length)for(var sn=0;sn<ke.length;sn++){var tn=ke[sn];tn.key&&(tn.type=null.lt(tn.key),delete tn.key)}return ke}(zt);0<ne.length&&Bt.updateContents(ne),Pu(zt)},this.sjsloh=function(zt,ne,fe){var ke;ne==="e"?(Et.a.i({source:"l"}),si.push(zt),zt.data.n<zt.data.tn||(ke={op:[],ao:si,inverse:[]},si=[],null(ke)&&B.plop(ke,"loh",Ut))):ne==="c"?zt.type==="set_selection"&&(zt={start:(ke=Bt.c()).anchor.offset,end:ke.focus.offset,path:ke.anchor.path,startpath:ke.anchor.path,endpath:ke.focus.path},ke=zt,Zt===v&&ke.start!==null&&ke.end!==null&&ke.path!==null&&(Do("SJScmv"),In.dmid=Bt.dmid,jr(ke={t:"sl",op:ke}),Hi(ke,Us()))):ne=="u"&&Oa()},this.subm=function(){var zt,ne=Et.waveId,fe=Et.user,ke=Et.subId,sn=Et.mid,tn=(Et.sub,Et.token,Et.url),en=Et.docId,Ve=Et.prevAid;if(5e7<=((ne={a:E,c:se,cx:ae?ae.type:null,v:ve,u:{memberinfo:be,waveid:ne,username:fe&&fe.name,sysinfo:ce,f:Te,any:Ce,subid:ke,mid:sn,paid:Ve||"First",v:{token:Et.token},u:tn,d:en,tabId:h(),jsConf:Et.jsonConfig,isBFM:!1}}).u.jsConf,Zt==x&&(fe=A(),ne.rjn={offCaid:fe.offCaid,offTo:fe.offTo,sts:fe.sessiontimestamp},ne.rjn),ne.gcs=(ke=null,se=="quilljs"?(zt=Bt.getContents(),c(zt),ke=Xt(zt.ops,["delete","insert","retain","attributes"]),c(ke)):se=="codemirror"?(zt=Bt.getContents(),c(zt),c(ke=[{cr:zt}])):se=="json"&&(bo||Mo)?(ke=Bt.d(),c(ke)):(ft.a(),ke=ft.e()),ke),Mt(ne),sn=ne.gcs.length))return console.error("codox_sendSubscribe2SM: oversize init GCS = "+sn),we("[codoxe]-- osgcs: r=10; len="+sn+"; sid = "+kt),void Io(10);ne.cmm=St(36),pt=ne.cmm,u(ne),$s(ne)},this.subr=function(zt){di=!0;var ne=wt(zt.data,pt);if(!zt.data||!ne)return we("[codoxe] subf(sm): r=13; sid = "+kt,b),void Io(13);if(ne.y)if(ne.ok===void 0||ne.amm===void 0||ne.cak===void 0||ne.f===void 0||ne.r===void 0)Io(13,{subf:"o"});else{nr=ne.ok,to=nr,Dt=ne.amm,$t=ne.cak,Te=ne.f,ne.r!==Ne&&ne.r,ne.v&&(Qt=ne.v),Wi=!0;var fe=(s.now()-ht)/1e3;if(we("[codoxi]* subs: t = "+fe+"; f = "+Te+"; SMV="+Qt+"; sid = "+kt,b),Oe("smVersion",Qt),Ee=(fe=zt).sts,Zt!=x){$i=wn=Hr=Lr=to=Ui=ka=nr;var ke=null;if((fe=ke=fe.ivs?wt(fe.ivs,pt):ke).cat){switch(We=fe.cat,se){case We[0]:ci=!0;break;case We[1]:zn=!0;break;case We[2]:vo=!0;break;case We[13]:Ar=!0;break;case We[8]:Ra=!0;break;case We[9]:zn=!0;break;case We[11]:Ia=!0;break;case We[10]:Ro=!0;break;case We[12]:Ma=!0;break;default:de(new Error("setCodoxAppType: unknown apptype = "+se)),o||console.error("setCodoxAppType: unknown apptype = "+se)}Fs=Ra||Ar||Ia||vo}if(fe.sot&&(Ae=fe.sot,Ut.jstp=Ae),fe.tmk&&(fe.tmk,un=fe.tmk.o,bn=fe.tmk.c,er=fe.tmk.tn,Nn=fe.tmk.m,Ln='<span id="'+Nn+"_"),fe.lmt&&(fe.lmt,fe.lmt.mos,cn=fe.lmt.mms,An=fe.lmt.dms,Ut.lmt=fe.lmt),fe.dt&&(nn=fe.dt,Ut.dlttp=nn),Hr||(ke=kt,gn=new O(Ut,!1,Hr),(In=gn.gct()).sid=ke,Ao=gn.pr,gn.pl,jr=gn.sc,eo=gn.aptm,Br=gn.rstm,gn.satm,Ut.pt=gn,_r=new R(Ut,gn,Hr,Ae),Oa=_r.pu,_r.prd,yo=_r.gfdt,Ut.pu=_r),!to&&!wn)if($i||!zn&&!Ma)if(Ar||Ro){fe={obf:wn,types:Ae},At.type.init(fe),ke={obf:to,ob:un,cb:bn,tiny:vo,tinysc:er};var sn=Bt.differ;if(!sn)throw new Error("JSON diff not initialized");sn.init(fe,ke),Ut.jdf=sn,Ut.jot=At,Ut.rtf=jt,Ut.sdf=yt}else fe={obf:to,ob:un,cb:bn,tiny:vo,tinysc:er},ke={obf:wn,types:Ae},yt.sdfi(fe),jt.rtfi(ke),Ut.rtf=jt,Ut.sdf=yt;else sn={types:Ae,dt:nn,obf:!1},nt.di(sn),Ut.dtf=nt;Lr||(Jr=new D({cw:Ut,app:Et,cmd:Bt,type:Ae,obfroh:Lr,obfcr:Ui}),Pu=Jr.urcs,Jr.qurcs,ql=Jr.uc,Ta=Jr.nuc,Ut.rcs=Jr),fe=se=="quilljs"||se=="quilljs_clickup"?Bt.getContents():Bt.d(),qr=new N({cw:Ut,cb:Ge,app:Et,cd:ft,cmd:Bt,mi:be,lidoc:fe,log:He,tm:Nt,obf:ka,bv:Rt}),Hl=qr.rs,vn=qr.se,Ut.se=vn,Nu=qr.pc,Ut.dsm=qr,bo||Mo||ft.a(),li[0]=vo?{pos:48}:{pos:-1};for(var tn=1;tn<5;tn++)li[tn]={pos:-1};if(Te){Zt=v,me=!0,vn.mbs.push(be),eo(vn.mbs),Ba(pe);try{ur(S)}catch(en){console.error(en)}!Nt&&Ge&&Ge(kt),ke=(s.now()-ht)/1e3,we("[codoxi]* jnd1: t = "+ke+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b)}}else if(In.sid,In.sid=kt,u(In),p(Tt),Te){Zt=v,me=!0,c(vn.mbs),vn.mbs=[],vn.mbs.push(be),c(vn.mbs),fe=Ut.pt.stm,ke=Ut.pt.gtm,c(ke()),fe([]),eo(vn.mbs),c(ke()),Ba(pe);try{ur(S)}catch(en){console.error(en)}fe=(s.now()-ht)/1e3,we("[codoxi]* jnd1: t = "+fe+"; s="+Zt+"; ss="+vn.mbs.length+"; sid = "+kt,b),z(!1,"off-Founder"),qr.sto(null)}}else Lo=ne.sem,Io(13,{subf:"ppe",rs:ne.rs===Lo[0]||ne.rs===Lo[1]||ne.rs===Lo[2]?24:ne.rs===Lo[3]?25:ne.rs===Lo[4]?600:ne.rs===Lo[5]?700:13})},this.ime=Y.ime,this.imet=Y.imet,this.bime=Y.bime,this.uim=Z.uim,this.uimt=Z.uimt,this.buim=Z.buim,this.dcpm=function(zt){u(vn.DCPRops),u(vn.DCPLops),(ct(zt)?$:M)(vn.DCPLops,vn.DCPRops,zt),Hl("dcpm")},Y.init(Ut),Z.init(Ut);var za=new Q(Ut,Ct);this.semsg=za.semsg,this.lib=tt,this.xf=Pt,this.exsl=Wl}},{"../../../codox-json-ot/lib/":59,"../../../codox-rt-type/src/":143,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/dtf/dtf.js":220,"../../../codox-shared/src/gt/pt.js":222,"../../../codox-shared/src/gt/pu.js":223,"../../../codox-shared/src/gt/xf":224,"../constants":509,"../env":527,"../errors":528,"../logger.js":530,"../util/lib":551,"./access":531,"./difap.js":533,"./dltap.js":534,"./dsm.js":535,"./ext/ime.js":536,"./ext/pvp.js":537,"./ext/uim.js":538,"./msg":539,"./off.js":540,"./opm":541,"./rcs.js":542,"./sapa.js":545,"./soh.js":546,"./spot.js":547,"./sync":548,"./ver":549,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/typeof":574,"rangy/lib/rangy-selectionsaverestore":726}],533:[function(t,f,r){var n,e=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/typeof")),s=(n=t("../../../codox-shared/src/com/constants")).OFFLINE,i=n.ONLINE,l=t("../../../codox-shared/src/com/log").ins,o=(n=t("../../../codox-shared/src/com/util")).clone,a=n.logClone,c=t("../../../codox-shared/src/gt/cpj.js").cpdl,u=Date,h=(t("./off.js"),t("../../../codox-shared/src/gt/xf")),p=!1,m=0,b=u.now(),_=[];function v(A,z,H,$){var M=$.sdf,J=$.jdf,K=$.gfln();return $=$.gs(),K?(K=J.jdf(A,z))&&K.length==0?[]:[{op:K}]:(H&&((J=0)!==J&&$===i||(J=z.length>A.length?A.length-1:z.length-1)),M.gop(A,z))}var w=0;function x(A,z){a(_);var H=z.pt.sc,$=z.pt.pl,M=z.rcs.urcs,J=z.gcaid,K=z.dssm;if((0,z.dcploh)(_,A)){if((0,z.susloh)(_,A)){for(var P=0;P<_.length;P++){var U=_[P];a(U.op),H(U),$({op:U.op,context:U.context}),M(U),K(U,J())}w=0,_=[]}}else _=[]}function S(A,z){var H;return a(A),(H=z.cdm.d(A.context.dmid))&&H.sj(E(H.gj(),A.op,z)),a(A),H}function E(A,z,H){return H.gfln()?H.jot.type.apply(A,z):H.rtf.cap(A,z)}function k(A,z,H){var $=H.rcs,M=H.pt.gct(),J=h.tls,K=H.gfln(),P=H.gfl(),U=H.gtn();if($=$.grcs(),M.dmid,a($),a(z),P||U)(function(Lt,Pt,yt){var jt,At=yt.ssl,It=yt.rsl,Ot=yt.rtf.cap;if((Nt=yt.pt.gct()).dmid!==Lt.dmid)return Nt.dmid,Lt.dmid,Lt.e(Lt.gj(),!1);var Et,Ct,Nt=Lt.d(),ht=(At=At(Lt),Lt.d()),dt=[];if(At&&At.rangeInfos[0]&&(Ct=Et=null,At.rangeInfos[0].collapsed?O(0,ht,Et=Lt.cc(0),dt):(Et=Lt.cc(0),Ct=Lt.cc(1),O(0,ht,Et,dt)&&O(0,ht,Ct,dt)||(dt=[]))),dt.length){var Ft=D((0,yt.sdf.sop2cop)(dt),yt)[0];if(Array.isArray(Pt))for(var Jt=0;Jt<Pt.length;Jt++)N(Ft,Pt[Jt],yt);else N(Ft,Pt,yt);jt=Ot(Lt.gj(),Ft.op),Lt.e(jt,!0),It(Lt,At)}else jt=Lt.gj(),Lt.e(jt,!0)})(A,z,H);else if(K){M=A;var V=z,G=(U=(P=H).ssl,K=P.rsl,P.jot),F=(a(V),M.gj(),M.d(),U=U(M),M.d()),q=[];U&&U.rangeInfos[0]&&(Z=rt=null,U.rangeInfos[0].collapsed?R(F,rt=M.cc(0),q,P):(rt=M.cc(0),Z=M.cc(1),R(F,rt,q,P)&&R(F,Z,q,P)||(q=[]))),a(q);var T=[];if(Array.isArray(V))for(var I=0;I<V.length;I++)T.push(V[I].op);else T.push(V.op);var L=[];if(q.length){var B,Y,Z,rt=q[0];L.push(rt),q.length==2&&(F=q[1],Z=rt.p[0],q=F.p[0],B=rt.cop,Y=F.cop,Z==q?(Z=typeof B[Z=0]=="number"?Y[0]-B[0]-B[1].length:Y[0]-B[0].length,q=Y[1],rt.cop.push(Z),rt.cop.push(q)):L.push(F)),a(L),a(V);for(var Q=[],tt=0;tt<L.length;tt++){var nt=[L[tt]];if(Array.isArray(V))for(var et=0;et<V.length;et++)nt=G.type.transform(nt,V[et].op,0),a(nt);else nt=G.type.transform(nt,V.op,0),a(nt);nt.length!==0&&(Q.push(nt[0]),a(Q))}var at=o(M.gj());if(L.length==Q.length)for(var ct=0;ct<Q.length;ct++)G.type.apply(at,[Q[ct]]),T.push([Q[ct]]),a(T);else a(L),a(Q);P.rangy.removeMarkers(U),M.d(),M.e(at,!0,T),L.length==Q.length?K(M,U):a(Q),M.gj(),M.d()}else U&&P.rangy.removeMarkers(U),M.e(M.gj(),!0,T)}else{var gt=A.c();if(A.e(A.gj(),!0),Array.isArray(z))for(var wt=0;wt<z.length;wt++)J(gt,z[wt].op);else J(gt,z.op);A.b(gt.start,gt.end)}var St=H.rcs.urcs;if(Array.isArray(z))for(var Mt=0;Mt<z.length;Mt++)St(z[Mt]);else z.context&&St(z);a($),H.mdom.d()}function D(A,z){for(var H=z.pt.sc,$=[],M=0;M<A.length;M++){var J={op:A[M].op,context:{}};H(J),$.push(J)}return $}function N(A,z,H){A.op.length!==0&&(a(A),a(z),A.op=H.rtf.ct(A.op,z.op,"B"),a(A))}function O(A,z,H,$){if(H!==null)return(z=z.indexOf(H))!==-1?($.push(z===0?{op:[H]}:{op:[z,H]}),1):void 0}function R(A,z,H,$){if(z!==null){var M=-1,J=0;if(H[0]&&H[0].p&&(J=H[0].p[0]),$=(0,$.mdom.gp)(A,z,J))return M=$.index,J=(A=$.p)===0?{p:[M,"content"],cop:[z],t:"rt"}:{p:[M,"content"],cop:[A,z],t:"rt"},H.push(J),1}}f.exports={rss:function(){p=!1,m=0,b=u.now(),_=[]},loh:function(A,z,H,$){switch(z){case"e":$.slotimer("lohdifap");break;case"c":if($.gs()==s||$.sus()||($.pt.gct().dmid=H)!==0)return;p=!0,setTimeout(function(){var M;p&&(M=$.mdom.c(),$.hacm(M),$.scp($.pt.gct().dmid,M.start),p=!1)},0);break;case"u":$.lohl("u"),$.pu.pu();break;case"r":$.pu.prd()()}},glop:function(A){var z=A.mdom,H=z.gj(),$=z.d();return H=function(M,J,K,P){var U=P.ird,V=P.app,G=P.lmt.mos,F=P.lmt.mms,q=P.breadCrumb,T=P.sid,I=P.nu;if(M&&0<M.length){if(V.a.i({source:"l"}),U())return K.e(K.gj(),!1),[];if(V=function(L,B){var Y=B.gfln(),Z=B.jstp,rt=0;if(Y)rt=JSON.stringify(L).length;else for(var Q=0;Q<L.length;Q++)for(var tt=L[Q],nt=0;nt<tt.op.length;nt++){var et=tt.op[nt];switch((0,e.default)(et)){case Z[2]:case Z[1]:break;case Z[0]:rt+=et.length;break;default:throw new Error("ESTOP:perr=1000;len="+L.length+";opt="+(0,e.default)(et))}}return rt}(M,P),G<V){if((P=(U=u.now())-b)<2e3?m++:m=1,b=U,q("[codoxi]- os = "+V+"; osoti = "+P+"; sid = "+T),3<m||2*F<V)return K.e(K.gj(),!1),I(11),[]}else m=0;K.sj(J)}return M}(v(H,$,z,A),$,z,A),l(H),H},plop:function(A,z,H){var $=H.gfln(),M=H.gjs(),J=H.rtf,K=H.gdft(),P=H.glx();if(!Array.isArray(A))throw new Error("ESTOP: DiffOpPropagate invalid ops");if(A.length!=0||_.length!=0){a(A);for(var U=0;U<A.length;U++){var V=A[U],G=_[_.length-1];!$&&!M&&G&&J.tcps(G,V)?a(_):K||P?(c(_,V,H),w++):(a(_),_.push(V))}var F=H.pflusher,q=H.blimit;F(z)||(K||P)&&1<=w||!K&&!P&&q(_,1,500)?(l(_),x(z,H)):(H.sloet(null),(0,H.slotimer)("difp"))}else a(A)},flop:x,sdif:v,ao2s:E,cp2pp:D,roh:function(A,z){a(A);var H,$=z.raid,M=z.pt.pl,J=z.dssm;z.gjs()?z.mdom.roh(A):((H=S(A,z))&&k(H,A,z),H.y=="rt"&&0<(A=$(H)).length&&(($=D(A,z)[0]).context.cpsop=!0,$.context.CAID=!1,$.context.undoable=!1,M($),$.bc=!0,a($),J($)))},udoc:k,usnap:S}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/gt/cpj.js":221,"../../../codox-shared/src/gt/xf":224,"./off.js":540,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/typeof":574}],534:[function(t,f,r){var n=t("../../../codox-shared/src/com/log"),e=(n.ins,n.stringify),s=t("../../../codox-shared/src/com/util").logClone,i={},l=null;function o(c,u){u.sus;var h=u.gsj();s(i),JSON.stringify(i)!=="{}"&&(0,u.susloh)(i,c)&&(c={},h?c={op:[{po:i.op,ao:i.ao}],inverse:i.inverse}:(c={op:i.op,inverse:i.inverse},s(c)),i={},a(c,l,u))}function a(c,u,h){var p=h.pt.sc,m=h.pt.pl;h=h.dssm,s(c),c&&!c.context&&p(c),m(c),c.inverse&&delete c.inverse,h(c,u)}f.exports={rss:function(){i={},l=null},loh:function(){for(var c=arguments.length,u=new Array(c),h=0;h<c;h++)u[h]=arguments[h];u[0],u[1];var p=u[2],m=p.gqj(),b=p.gcm(),_=p.gsj(),v=p.sjsloh;m||b?(m=p.mdom).loh.apply(m,u):_&&v.apply(void 0,u)},flop:o,plop:function(c,u,h){var p=h.sus,m=h.rcs.qurcs,b=h.gcaid,_=h.dtf.cp,v=h.dtf.tf,w=h.sjsep,x=h.sapa,S=h.slotimer,E=h.gqj(),k=h.gcm(),D=h.gsj();if((0,h.dcploh)([c],u)){if(s(c),p()||!E&&!k||m(c,"local"),u=="opm"||c.context)return s(c),o(u,h),void a(c,b(),h);p=c.op,m=c.inverse;var N,O,R=[],A=(D&&(R=c.ao),JSON.stringify(i)==="{}"?(i.op=p,i.inverse=m,i.ao=R,l=b(),s(i)):(s(i),D&&(w(p[0].dm,i.op[0].dm)&&c.ao[0].data.tn===1&&i.ao[0].data.tn===1&&c.ao[0].key&&(x.k2t(c.ao[0].key,0)||x.k2t(c.ao[0].key,1))&&x.k2k(i.ao[0].key,c.ao[0].key)?(w=i.op[0].do,N=p[0].do,i.op[0].do=_(w,N),x.k2t(c.ao[0].key,1)&&(z=i.ao[0].text,A=R[0].text,O=!1,(w[0].tg&&N[0].tg&&w[0].tg===N[0].tg||!w[0].tg&&!N[0].tg)&&(O=!0),i.ao[0].text=O?z+A:A+z,s(i))):(o(u,h),i.op=p,i.inverse=m,i.ao=R),l=b()),(E||k)&&(i.op=_(i.op,p),l=b(),k||(N=m,(w=i.inverse).length!==0&&N.length!==0&&w[0].tg&&N[0].tg&&w[0].tg>N[0].tg?(i.inverse=_(m,i.inverse),i.inverse):(O=v(i.inverse,m,!0),i.inverse=_(i.inverse,O))),e(i))),h.pflusher),z=h.blimit;A(u)||z(i,2,500)||D&&(1<c.ao[0].data.tn||!c.ao[0].key||c.ao[0].key&&!x.k2t(c.ao[0].key,0)&&!x.k2t(c.ao[0].key,1))?(s(i),o("do",h)):(h.sloet(null),S("dltp"))}},roh:function(c,u){var h=u.sjsroh,p=u.mdom,m=u.gsj(),b=u.gqj();u=u.gcm(),s(c),b||u?(s(c),p.roh(c)):m&&(s(c),h(c))}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219}],535:[function(t,f,r){var n=(A=t("../logger.js")).logger,e=A.SENTRY_LEVEL_H,s=t("../domains/api/qjs-util").contentToDelta,i=Date,l=t("../errors").CBError,o=(A=t("../../../codox-shared/src/com/log")).ins,a=((A.stringify,A=t("../../../codox-shared/src/com/util")).clone,A.logClone),c=(A=t("../../../codox-shared/src/com/constants")).CMD_QUIT,u=A.CMD_SMM,h=A.CMD_HB,p=A.CMD_SMAGS,m=A.CMD_HBP,b=A.CMD_SMAIS,_=A.CMD_SMNCM,v=A.CMD_RC,w=A.CMD_SMDLT,x=A.CMD_SMRJN,S=(A=t("../../../codox-shared/src/com/constants")).JOINED_LOG,E=A.ONLINE,k=A.OFFLINE,D=t("./rjm").rjm,N=(A=t("./off")).gos,O=A.srjn,R=(A=t("./opm")).dltmg,A=A.difmg,z=R,H=A,$=t("../../../codox-shared/src/com/lib"),M=t("../../../codox-shared/src/dtf/dtf.js"),J=t("../../../codox-rt-type/src/").sdf;f.exports=function(K){var P=K.cw,U=K.app,V=K.cb,G=K.cd,F=K.cmd,q=K.mi,T=K.lidoc,I=(K.log,K.tm),L=K.obf,B=(K.bv,P),Y=V,Z=F,rt=G,Q=q,tt=U,nt=I,et=L,at=T,ct=B.pt.gct(),gt=n.addBreadcrumb.bind(n),wt=(n.reportError.bind(n),K=(i.now()-B.START_TIME)/1e3,gt("[codoxi]* dsm: t = "+K+"; sid = "+ct.sid,e),B.TZ),St=B.gs,Mt=B.ss,Lt=B.ece,Pt=B.dce,yt=B.lohl,jt=B.gcaid,At=B.ccaid,It=B.grtt,Ot=B.nsm,Et=B.nu,Ct=B.nsi,Nt=(B.ssm,B.dssm),ht=(B.pt.rstm,B.pt.gcotm),dt=B.pt.aptm,Ft=B.pt.rptm,Jt=B.pt.gstm,Xt=B.pt.gtm,Qt=B.pt.stm,ve=B.pt.uct,kt=B.rcs.urcs,ee=B.rcs.uc,pe=B.rcs.nuc,Le=B.rcs.grcs,Fe=B.rcs.srcs,qe=B.rcs.arcs,ze=B.rcs.rrcs,Ie=(this.clean=function(){Q=Z=rt=ct=Y=B=null},{mbs:[],DCPLopsN:0,DCPRopsN:0,DCPLops:[],DCPRops:[],sts:null,ISTo:null}),He=null;function hn(Rt){for(var Ut=Xt(),se=(a(Ut),Jt(ct.sid)),bt=[],ft=0;ft<Rt.length;ft++){var xt=Rt[ft];xt=Jt(xt.sid),bt.push(xt)}a(bt);for(var Bt=0;Bt<se.tp.length;Bt++){var ce=se.tp[Bt];if(ce.context.sid==ct.sid&&ce.context.to==null)for(var Ce=0;Ce<bt.length;Ce++)bt[Ce].tp.push(ce),a(bt[Ce])}a(Ut)}var Tt=null;function ae(Rt,Ut){var se=null;return B.gfln()||B.gjs()?(a(Rt),a(Ut),B.gdft()&&(Rt=Z.toExS(Rt),Ut=Z.toExS(Ut)),se=B.jdf.jdf(Rt,Ut)):0<(se=J.gop(Rt,Ut)).length&&(se=se[0].op),se}var de=null;function we(Rt,Ut){if(!Array.isArray(Ut))throw Error("ESTOP:SidisMember array required");for(var se=0;se<Ut.length;se++)if(Rt==Ut[se].sid)return 1}function Oe(Rt){if(!Array.isArray(Rt))throw Error("ESTOP:addSessionMember array required");a(Rt),a(Ie.mbs);for(var Ut=[],se=0;se<Rt.length;se++){var bt=Rt[se];!function(xt,Bt){if(!Array.isArray(Bt))throw Error("ESTOP:isMember array required");for(var ce=0;ce<Bt.length;ce++)if(xt.sid==Bt[ce].sid)return 1}(bt,Ie.mbs)&&Ut.push(bt)}for(var ft=0;ft<Ut.length;ft++)Ie.mbs.push(Ut[ft])}this.gto=function(){return Ie.ISTo,Ie.ISTo},this.sto=function(Rt){Ie.ISTo=Rt},this.se=Ie,this.pc=function(Rt){var Ut,se,bt,ft,xt,Bt,ce,Ce,Te,Ne,Ge,be,pt,Dt,$t=$.dcsmais;if(Rt.cmd.t==b&&Rt.cmd.gcs?((Ut=Rt.cmd.gcs).length,Ut=$t(Ut),Rt.cmd.gcs=Ut):Rt.cmd.t==w&&Rt.cmd.dlt?((Ut=Rt.cmd.dlt).length,Ut=$t(Ut),Rt.cmd.dlt=Ut):Rt.cmd.t==p&&Rt.cmd.smags?((Ut=Rt.cmd.smags).length,Ut=$t(Ut),Rt.cmd.smags=Ut):Rt.cmd.t=="quit"?Rt.cmd.t=c:Rt.cmd.t=="SMM"?Rt.cmd.t=u:Rt.cmd.t=="HBP"?Rt.cmd.t=m:Rt.cmd.t=="RC"&&(Rt.cmd.t=v),!et){var qt=Rt;switch(qt.cmd.t){case c:a(Ne=qt),be=St(),pt=(i.now()-B.START_TIME)/1e3,B.pt.gtms(),Ft(Ne.context.sid),Dt=function(Wt,oe){if(!Array.isArray(Wt))throw Error("ESTOP:removeQuitMember array required");for(var X=null,lt=Wt.length;lt;){var vt=Wt.shift();lt--,vt.sid!==oe?Wt.push(vt):X=vt}return X}(Ie.mbs,Ne.context.sid),B.pt.gtms(),Dt&&!nt&&(ze([Ne.context.sid]),B.gfln()?(Ge=Le(),pe("quit",Ge)):ee("quit",Ne.context.sid),Ct(19,[Dt]),Ie.mbs.length,Ne.context.sid,gt("[codoxi] qt: t = "+pt+"; s="+be+"; ss= "+Ie.mbs.length+"; lvrsid = "+Ne.context.sid+"; sid = "+ct.sid,e)),be==E&&Ie.mbs.length===1&&(a(Ie.mbs),Fe({}),Pt());break;case u:(function(Wt){var oe=i.now()-B.START_TIME,X=St();if(Wt&&Wt.cmd){var lt=(vt=Wt.cmd).fg,vt=vt.note;if(lt)return a(vt),tt&&(tt.a,tt.a.serverCommand(vt));if(vt==="PPE Overdue")return a(Wt),ct.sid,gt("[codoxi] ppeod: r=22; t = "+oe+"; s="+X+"; sid = "+ct.sid,e),Et(22);if(vt==="PPE Shutdown")return a(Wt),ct.sid,gt("[codoxe]-- ppesd: r=23; t = "+oe+"; s="+X+"; sid = "+ct.sid,e),wt(23);if(vt==="CB Error")throw a(Wt),Wt.cbMsg.asMsg.statusCode,Wt.cbMsg.asMsg.body,ct.sid,gt("[codoxe]-- cberror: code ="+Wt.cbMsg.asMsg.statusCode+"; t = "+oe+"; s="+X+"; sid = "+ct.sid),new l("code ="+Wt.cbMsg.asMsg.statusCode+"; reason = "+Wt.cbMsg.asMsg.body,Wt.cbMsg.asMsg,Wt.cbMsg.failedCmd)}else console.error(new Error("codox_handleSMMmsg msg.cmd does not exit. skipping..."))})(qt);break;case h:(function(Wt){if(St()===E){var oe=Jt(Wt.context.sid);if(oe&&ct.sid!==Wt.context.sid&&!et&&(ht(oe.tp,Wt.context.rto),B.wxsp(),Z))if(oe.tp.length===0&&Wt.context.CAID){a(Wt);var X=jt();if(Wt.context.rto==null||de==null||Wt.context.rto<de)return Wt.context.caidinfo,Wt.context.rto;At(X,Wt.context.caidinfo),X=B.gdft();var lt=B.glx();(X||lt)&&Wt.context.ks!==void 0&&Wt.context.js!==void 0&&Wt.context.startBlkPos!==void 0&&Wt.context.endBlkPos!==void 0?((X={t:"sl"}).op={start:Wt.context.ks,end:Wt.context.js,startBlkPos:Wt.context.startBlkPos,endBlkPos:Wt.context.endBlkPos},X.context=Wt.context,(0,B.exsl)(X)):kt(Wt)}else Wt.context.sid,oe.tp.length}})(qt);break;case m:qt.cmd.hbc,B.gs()!==E&&!et||(Ge=i.now(),B.ghb(),B.bium()||yt("HBP"),(Dt={op:[],bc:!0,cmd:{t:h},context:{sid:ct.sid,rto:ct.rto,CAID:!0,pub:B.gpm()}}).context.st=Ge,Dt.context.st,Dt.rtt=It(),B.buim()&&(Dt.context.CAID=!1,Dt.context.CAID),pt=jt(),Nt(Dt,pt),B.ihb(),i.now());break;case p:o(Ne=qt),St()===E&&(B.gqj()?(Ne.cmd.smags.ds={ops:M.c2d(Ne.cmd.smags.ds)},Ne.cmd.smags.ds=s(Ne.cmd.smags.ds)):B.gcm()&&(Ne.cmd.smags.ds=Ne.cmd.smags.ds[0].cr),Ne.cmd.smags.success=!0,B.smagsr(Ne.cmd.smags));break;case b:He=qt;break;case _:be=qt,Te=St(),He?(ct.sid,a(be),bt=He,ct.sid,a(bt),qe(bt.cmd.gcs.mbs),a(bt.cmd.gcs.tm),Qt(bt.cmd.gcs.tm),dt([Q]),a(Xt()),a(bt.cmd.gcs.ct),a(ct),ve(bt.cmd.gcs.ct),a(ct),Ie.sts=bt.cmd.gcs.sts,Ie.sts,Ie.ISTo=bt.cmd.gcs.to,Ie.ISTo,ft=St(),xt=$.idlt,Bt=bt.cmd.gcs.clog,ce=null,xt(B)?(ce={ops:M.c2d(Bt)},ce=s(ce),ft!==k&&function(Wt){var oe=Z.getContents();if((B.gcm()&&(oe={ops:[{insert:oe}]},at=s(at={ops:[{insert:at}]}),oe=s(oe)),oe=at.diff(oe)).ops.length==0)return rt.h2(Wt);Wt=at.diff(Wt),a(Wt),oe=M.d2c(oe.ops),Wt=M.d2c(Wt.ops),z(oe,Wt,B)}(ce)):(ce=Bt,B.gfln()||B.gjs()||(ce=Bt[0]),ft!==k&&(xt=ce,Bt=Z.d(),B.glx(),a(at),a(Bt),0<(Ce=ae(at,Bt)).length&&Z.sj(Bt),Ce.length==0?rt.h2(xt):(Bt=ae(at,xt),B.gdft()&&(Ce=(xt=Z.toInO)(Ce),Bt=xt(Bt)),H(Ce,Bt,B)))),ft==k&&rt.h2(ce),Ie.mbs=[],Oe([Q]),a(bt.cmd.gcs.mbs),Oe(bt.cmd.gcs.mbs),Mt(E),B.sj(!0),Et(16),xt=1,bt.ncmn&&(xt=bt.ncmn),Ot(S,xt),Ce=Ie.mbs.length+xt,ft!==k&&(Bt=St(),ce=(i.now()-B.START_TIME)/1e3,!nt&&Y&&(gt("[codoxi]* cdxcb(y): t = "+ce+"; s="+Bt+"; ss="+Ce+"; sid = "+ct.sid),Y(ct.sid))),ct.sid,He=null):(ct.sid,a(be)),et||(qe(be.cmd.newcms),a(Le()),Oe(be.cmd.newcms),a(Ie.mbs),dt(be.cmd.newcms),we(ct.sid,be.cmd.newcms)||hn(be.cmd.newcms),de=be.to,Lt(),Ct(18,Ie.mbs),B.gfln()?(bt=Le(),pe("smncm-f2",bt)):B.gjs()||ee("smncm"),yt("smncm")),Te==k&&O(!1,"off-NCM");break;case w:Tt=qt;break;case x:xt=qt,Tt?(ct.sid,a(xt),se=Tt,ct.sid,a(se),qe(se.cmd.dlt.mbs),a(se.cmd.dlt.tm),Qt(se.cmd.dlt.tm),dt([Q]),a(Xt()),a(se.cmd.dlt.ct),a(ct),ve(se.cmd.dlt.ct),a(ct),B.gjs()&&B.mdom.goffop(),Mt(E),ft=se.cmd.dlt.offstate,ce=N(),D(ft,ce,B),Ie.ISTo=ft.offTo,Ie.ISTo,Ie.mbs=[],Oe([Q]),a(se.cmd.dlt.mbs),Oe(se.cmd.dlt.mbs),B.sj(!0),Et(16),Ot(S,1),ce=Ie.mbs.length+1,ft=St(),se=(i.now()-B.START_TIME)/1e3,nt||gt("[codoxi]* cdxoffrjn(y): t = "+se+"; s="+ft+"; ss="+ce+"; sid = "+ct.sid),ct.sid,Tt=null):(ct.sid,a(xt)),et||(qe(xt.cmd.offcm),a(Le()),Oe(xt.cmd.offcm),Ie.mbs,dt(xt.cmd.offcm),we(ct.sid,xt.cmd.offcm)||hn(xt.cmd.offcm),Lt(),Ct(18,Ie.mbs),B.gfln()?(se=Le(),pe("smrjn-f2",se)):ee("smrjn"),yt("smrjn"),O(!1,"off-RJN"));break;case v:Bt=qt,B.gr(),Bt.cmd.r,B.sr(Bt.cmd.r);break;default:qt.cmd.t}}},this.rs=function(Rt){Rt||(Ie.mbs=[]),Ie.DCPRops=[],Ie.DCPLops=[],Ie.DCPRopsN=0,Ie.DCPLopsN=0},this.rsto=function(){de=null}}},{"../../../codox-rt-type/src/":143,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/dtf/dtf.js":220,"../domains/api/qjs-util":519,"../errors":528,"../logger.js":530,"./off":540,"./opm":541,"./rjm":543}],536:[function(t,f,r){var n=(t=t("../../constants")).OFFLINE,e=t.ONLINE,s=null,i=!1,l=null,o=!1,a=null,c=null,u=null,h=null,p=null;function m(){!i||p()||(l!==null&&(clearTimeout(l),l=null),clearTimeout(l),l=setTimeout(b,1e4))}function b(){l=null,i&&(i=!1,a.k(0),_())}function _(){clearTimeout(l),l=null,i=!1;var w=s.gs(),x=h();w!==e||x||(o=!0,setTimeout(v,0))}function v(){var w=s.gs(),x=h(),S=s.lohl;o&&(S("imeflush"),o=!1,w!==e||x||(0,s.dcpm)(s))}f.exports={init:function(w){a=(s=w).cdm,c=w.app,u=w.cid,h=w.buim,p=w.ird},ime:function(w){var x,S=s.gs();if(S!==n&&i!==w)return p()?void a.k(0):void(i=w?(S=s.lohl,w=h(),x=s.gs(),m(),c.a.f(u),x!==e||w||(S("imestart"),(0,s.dsm.rs)("imestart")),!0):(_(),!1))},imet:m,rss:function(w){i&&a.k(0),clearTimeout(l),w!=="off"&&(s=null),l=null,o=i=!1},bime:function(){return i||o},fime:v}},{"../../constants":509}],537:[function(t,f,r){var n=t("../../constants"),e=(n.OFFLINE,n.ONLINE),s=(t("../../../../codox-shared/src/com/log").ins,t("../../../../codox-shared/src/com/util").clone,!0),i=null,l=null,o=null;f.exports={init:function(a){l=(i=a).cdm,o=a.nu,a.sus},pu2pr:function(){var a=i.pt.se,c=i.lohl,u=i.gs();i.gfln(),i.gfl(),s=s&&(u!==e||(o(6),1<a.mbs.length?c("v2h"):l.a(),l.f2(),a.CKPRops=[]),!1)},pr2pu:function(){var a=i.dcpm,c=i.dsm.rs,u=i.gs();s=s||(u!==e||(o(7),a(i),l.g(),c()),!0)},rss:function(a){a!=="off"&&(i=null),s=!0},pmod:function(){return s}}},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants":509}],538:[function(t,f,r){var n=t("../../constants"),e=n.OFFLINE,s=n.ONLINE,i=(t("../../../../codox-shared/src/com/log").ins,t("../../../../codox-shared/src/com/util").clone,500),l=null,o=!1,a=null,c=!1,u=null,h=null,p=null,m=null,b=null,_=null;function v(E){clearTimeout(a),a=setTimeout(w,i)}function w(){a=null,o&&(l.doc,u.u(0),p.h(!1),x())}function x(){clearTimeout(a),a=null,o=!1;var E=l.gs(),k=b();E!==s||k||(c=!0,l.gqj()?S():setTimeout(S,0))}function S(){var E=l.gs(),k=b(),D=l.lohl;c&&(D("uimflush"),c=!1,E!==s||k||(0,l.dcpm)(l))}f.exports={init:function(E){u=(l=E).cdm,h=E.app,p=E.app.doc,m=E.cid,b=E.bime,_=E.ird},uim:function(E){if(l.gs()!==e&&o!==E)return _()?void u.u(0):void(o=E?(E=l.lohl,k=l.gs(),D=b(),k!==s||D||(v(),h.a.f(m),E("uimstart"),(0,l.dsm.rs)("uimstart")),!0):(x(),!1));var k,D},uimt:v,rss:function(E){o&&u.u(0),E!=="off"&&(l=null),a=null,c=o=!1},buim:function(){return o||c},fuim:S}},{"../../../../codox-shared/src/com/log":218,"../../../../codox-shared/src/com/util":219,"../../constants":509}],539:[function(t,f,r){var n,e=Date,s=((n=t("../../../codox-shared/src/com/util")).clone,n.logClone),i=(t("../../../codox-shared/src/com/log").stringify,t("../constants").SMMSG),l=(n=t("../../../codox-shared/src/com/constants")).STARTED_LOG,o=n.JOINED_LOG,a=n.STOPPED_LOG,c=n.INVALID_LOG,u=(n=t("../../../codox-shared/src/com/lib")).isop,h=n.ipop,p=n.idlt,m=n.ect,b=n.csop,_=n.gqim,v=n.cqim;f.exports={msg2sm:function(w,x,S){var E=S.tm,k=S.ird,D=S;if(k()&&!w.bc)throw s(w),s(w),new Error("ESTOP:perr=1002;RoleVio");w.op&&0<w.op.length&&w.context.seq,s(w),k=w;var N=S,O=N.gjs(),R=N.gdft(),A=N.glx(),z=N.gfln(),H=N.gsj(),$=N.gqj(),M=N.gcm(),J=N.pt.gct(),K=N.tm,P=N.sus,U=N.mdom,V=N.cdm,G=N.ird,F=N.scp;if(K||O&&!R&&!A||h(k)||P()||(u(k)?(k.context.ks=k.op.start,k.context.js=k.op.end,(R||A)&&(k.context.startBlkPos=k.op.startBlkPos,k.context.endBlkPos=k.op.endBlkPos,s(k)),z&&(k.context.startid=k.op.startid,k.context.endid=k.op.endid,s(k))):U&&k.context&&(k.context.dmid||(k.context.dmid=0),K=V.d(k.context.dmid),O={},G()?(O.start=0,O.end=0):O=R||A?(0,N.mdom.gsel)():K.c(),H?(k.context.ks=O.start,k.context.js=O.end,k.context.pt===null?k.context.pt=[0,0]:k.context.pt=O.path,k.context.pt1===null?k.context.pt1=[0,0]:k.context.pt1=O.startpath,k.context.pt2===null?k.context.pt2=[0,0]:k.context.pt2=O.endpath):$||M?(k.context.ks=O.start,k.context.js=O.end):z?(k.context.ks=O.start,k.context.js=O.end,k.context.startid=O.startid,k.context.endid=O.endid):R||A?O==null||(k.context.ks=O.start,k.context.js=O.end,k.context.startBlkPos=O.startBlkPos,k.context.endBlkPos=O.endBlkPos,s(k)):(F(J.dmid,O.start),k.context.ks=O.start,k.context.js=O.end))),w.a=i,w.to=null,w.len=null,w.is=!1,w.im=!1,P=w,!(V=(U=S).gqj())||h(P)||u(P)||0<(V=_(P)).length&&(P.im=!0,P.imo=V,v(P,U)),!E&&w.op&&(b(w,D),s(w)),G=w,N=x,H=(K=S).pm,$=K.spm,M=K.gcaid,z=K.mdom,R=K.tm,K=(A=K).gamm(),F={},G.op&&(F.op=G.op,delete G.op),(H()||$())&&z&&G.context&&!h(G)&&(p(A)&&N?G.context.caidinfo=N:G.context.caidinfo=M(),G.dos=G.context.caidinfo,G.context.caidinfo),G.context&&(F.context=G.context,delete G.context),G.cmd&&(F.cmd=G.cmd,delete G.cmd),G.cmg=F,s(G),R?(G.cmg=F,G.len=JSON.stringify(G.cmg).length):(G.cmg=m(F,K),G.len=G.cmg.length,G.im&&(G.len=G.len+G.imo.length,G.len)),J=w,O=(k=S).gdmsize(),k=k.gmmsize(),J.is&&J.len>O||!J.is&&J.len>k)throw J.len,O="err=10; len="+J.len,new Error("ESTOP:"+O);(0,S.sosd)(w)},log2sm:function(w,x,S,E,k){var D=k.dsm.se,N=k.gcaid,O=k.gssd(),R=e.now(),A={log:{}},z=(A.log.Type=w,N());switch(w){case l:A.log.TotalTime4Start=R-E.SMDIvtSt,A.log.T4SMD=E.SMDIvtEd-E.SMDIvtSt,A.log.T4CLTAftSMD=E.SMConSt-E.SMDIvtEd,A.log.T4SMCon=E.SMConEd-E.SMConSt,A.log.T4SMSub=E.SMSubEd-E.SMSubSt,A.log.T4CLTAftSM=R-E.SMSubEd,A.log.DocSizeatStart=z,A.log;break;case o:A.log.TotoalTime4Join=R-E.SMDJnSt,A.log.T4SMD=E.SMDJnEd-E.SMDJnSt,A.log.T4CLTAftSMD=E.SMConSt-E.SMDJnEd,A.log.T4SMCon=E.SMConEd-E.SMConSt,A.log.T4SMSub=E.SMSubEd-E.SMSubSt,A.log.T4CLTAftSMSub=E.SMJnSt-E.SMSubEd,A.log.T4CKPJn=E.SMJnEd-E.SMJnSt,A.log.CoNewCmNum=x,A.log.SesMemNumatJoin=D.mbs.length,A.log.DocSizeatJoin=N(),A.log;break;case a:A.q=!0,A.log.Reason4StopbyClient=x,A.log.Reason4StopMatrix=S,A.log.T4CLTLive=E.SMDIvtSt?R-E.SMDIvtSt:R-E.SMDJnSt,O&&(A.log.DocSizeatStop=z,A.log.SesMemNumatStop=D.mbs.length),A.log,s(A);break;case c:A.log.InvalidMb=x,A.log.ExistingMbs=S}w=A;var H=k.gamm(),$=k.gmmsize();if(w.a=i,w.len=null,H!=="invalid"?(w.log=m(w.log,H),w.len=w.log.length):w.len=JSON.stringify(w.log).length,w.len>$)throw w.len,H="err=10; loglen="+w.len,new Error("ESTOP:"+H);(0,k.sosd)(w)}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../constants":509}],540:[function(t,f,r){var n,e=t("../logger.js").logger,s=(n=t("../../../codox-shared/src/com/constants")).SMINIT,i=(n.ONLINE,n.OFFLINE),l=(n.codoxHighestto,t("../../../codox-shared/src/com/log").ins),o=((n=t("../../../codox-shared/src/com/util")).clone,n.logClone,t("../../../codox-qdelta-type/src/draftDelta.js").dop2qop),a=(t=(n=t("../../../codox-shared/src/gt/xf")).ccp,n.ctf,t),c=null,u={offCaid:null,offTo:null,offOpLog:[],coffDelta:[],coffMeta:null,coffCount:0,gooffCount:0,gooffReasons:[],sessiontimestamp:null,sts:null},h=!1;function p(b,_){h=b}var m=0;f.exports={srjn:p,rjn:function(b){b.gs()!==i||h||(h=!0,clearTimeout(null),m=0,function _(v){m++;var w=null;try{c=new WebSocket(null),v.sso(c),w=setTimeout(function(){if(p(!1),3<=m)throw new Error("rejoinConnect: failed reconnections (interval 5s) after 3 tries!!");_(v)},5e3)}catch(x){throw e.reportError(x),p(!1),new Error("rejoinConnect:reconnect failed")}v.sst(w),c&&(c.onclose=u.onclose,c.onmessage=u.onmessage,c.onerror=u.onerror,c.onopen=u.onopen),v.semsg(s)}(b))},gof:function(b,_,v){(0,b.TZ)("OfflineDisabled")},offLOH:function(b,_){u.coffCount++,u.coffDelta=a(u.coffDelta,b.op,_,"off")},offLOHJson:function(b,_){_=_.gdft(),l(b),u.coffCount++,u.coffDelta=b.op,u.coffMeta=b.meta,_&&(u.coffDelta=o(b.op),l(u.coffDelta))},gos:function(){return u},isrjn:function(){return h}}},{"../../../codox-qdelta-type/src/draftDelta.js":139,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/gt/xf":224,"../logger.js":530}],541:[function(t,f,r){t("../../../codox-shared/src/com/log").ins;var n=t("../../../codox-shared/src/com/util"),e=(n.clone,n.logClone),s=t("../../../codox-shared/src/com/lib"),i=t("./off").gos;t("../../../codox-shared/src/com/constants").OFFLINE,f.exports={dltmg:function(l,o,a){if(l==null||o==null||o==null||!a)throw new Error("[DeltaOpMerge] one input is null or undefined");if(!(0,s.idlt)(a))throw new Error("[DeltaOpMerge] non-delta app invalid invocation ");var c=a.dtf.tf(o,l,!0);0<(l={op:a.dtf.tf(l,o,!1)}).op.length&&a.mdom.roh(l),0<c.length&&(e(o={op:c,inverse:[]}),a.dop2sm(o,"opm",a))},difmg:function(l,o,a){if(l==null||o==null||o==null||!a)throw new Error("[DiffOpMerge] one input is null or undefined");if(!(0,s.idif)(a))throw new Error("[DiffOpMerge] non-Diff app invalid invocation ");var c,u,h,p,m,b=l,_=o;0<l.length&&0<o.length&&(p=[],h=[],m=(u=a).gfln(),c=u.gjs(),h=m||c?(e(l),e(o),p=u.jot.type.transform(l,o,0),u.jot.type.transform(o,l,1)):(e(p),e(h),p=u.rtf.ct(l,o,"B"),u.rtf.ct(o,l,"A")),e(p),e(h),b=(m={lop:p,rop:h}).lop,_=m.rop),0<_.length&&(a.gjs()?(e(c={op:_}),a.mdom.roh(c)):(u=a.mdom.gj(),e(u),o=u,l=_,h=(p=a).gfln()?p.jot.type.apply(o,l):p.rtf.cap(o,l),a.mdom.sj(h),e(h),a.udoc(a.mdom,{op:_},a),e(a.mdom.d()))),0<b.length&&(m={op:b},o=a.gjs(),a.gs(),o&&(l=i(),m.meta=l.coffMeta,e(m)),e(_=[m]),a.gop2sm(_,"opm",a))}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"./off":540}],542:[function(t,f,r){var n,e=(n=t("@babel/runtime/helpers/interopRequireDefault"))(t("@babel/runtime/helpers/typeof")),s=n(t("@babel/runtime/helpers/slicedToArray")),i=t("../util/lib").clearTimer,l=(n=t("../../../codox-shared/src/com/util")).clone,o=n.logClone,a=(t("../../../codox-shared/src/com/log").stringify,t("../../../codox-shared/src/com/log").ins),c=t("../../../codox-shared/src/com/constants").ONLINE,u=t("../../../codox-json-ot/lib/").type.transform,h=t("../../../codox-shared/src/dtf/dtf").tp,p=(n=t("../../../codox-shared/src/com/lib")).mfso,m=n.ppos,b=n.pid,_=n.idlt,v=n.idif,w=t("../../../codox-shared/src/gt/xf").tfp;f.exports=function(x){var S=x.cw,E=x.app,k=x.cmd,D=x.type,N=x.obfroh,O=(x=x.obfcr,S),R=k,A=D,z=N,H=x,$={},M=O.pt.gct(),J=null,K=E,P=E.cid,U=O.glx(),V=O.gdft(),G=O.gfln(),F=O.gfl(),q=O.gqj(),T=O.gtn(),I=O.gjs(),L=O.gcm(),B=O.gtx(),Y=O.gsj(),Z=(S=O.gmi(),(k=(0,s.default)(S,3))[0]),rt=k[1],Q=k[2],tt=O.gs,nt=O.scp,et=O.gcp,at=O.ssl,ct=O.rsl;function gt(yt,jt){return yt.startid!==jt.startid||yt.start!==jt.start||yt.endid!==jt.endid||yt.end!==jt.end}function wt(yt,jt,At){if(!O.sus()&&(O.gam(),!O.bium()&&(jt=$,JSON.stringify(jt)!=="{}"))){for(var It in yt&&yt=="timer"||i(St),jt)(It=jt[It]).start==-1&&(It.update=!0);o(jt),At&&At!==M.sid&&jt[At]&&(jt[At].update=!0),o(jt),yt=Lt(),K.a.c(P,yt),At=R.d(),o(At)}}var St=null;function Mt(yt,jt){if(!O.gime()&&(!I||V||U)){var At=l($);if(V||U)return a(yt),void(0,R.urds)(At);if(!O.sus()&&!G&&(O.gam()||O.gsap())){var It=JSON.stringify($);if(yt&&yt=="timer"||i(St),a($),It!=="{}"){for(var Ot in At)(Ot=At[Ot]).start==-1&&(Ot.update=!0);if(o(At),jt&&jt!==M.sid&&At[jt]&&(At[jt].update=!0),o(At),(q||L)&&R&&(yt=R.Q(At),K.a.c(P,yt)),Y&&(It=R.S(At),K.a.c(P,It)),B&&(jt=R.f(At),K.a.c(P,jt)),v(O)&&!B&&!V&&!U){if(!O.gam()&&!O.gsap()||O.bium())return;yt=Lt(),K.a.c(P,yt)}}}}}function Lt(yt){o(yt=$);var jt=document.activeElement,At=M.dmid,It=(z||!G&&!F||At===R.dmid||R.x.focus(),at(R)),Ot=R.d(),Et=[];if(G)(Nt=function(kt,ee){if(JSON.stringify(ee)!="{}"&&(ee=function(Oe){var Rt,Ut={};for(Rt in Oe){var se=Oe[Rt];se.start!=-1&&se.end!=-1&&se.startid!=-1&&se.endid!=-1&&(Ut[Rt]=se)}return Ut}(ee),JSON.stringify(ee)!="{}")){for(var pe=kt.gj(),Le=(o(pe),[]),Fe=l(pe),qe=-1,ze=0,Ie={},He="",hn=function(Oe){o(Oe);var Rt,Ut=[];for(Rt in Oe){var se=Oe[Rt],bt=(o(se),{});bt.pos=se.start,bt.bid=se.startid,bt.end=!1,bt.sid=Rt,Ut.push(bt),o(bt),se.startid===se.endid&&se.start===se.end||((bt={}).pos=se.end,bt.bid=se.endid,bt.end=!0,bt.sid=Rt,Ut.push(bt),o(bt))}o(Ut);var ft=Ut.sort(function(xt,Bt){return xt.bid-Bt.bid||xt.pos-Bt.pos});return o(ft),ft}(ee),Tt=kt.i(),ae=0;ae<hn.length;ae++){var de=hn[ae].bid,we=(hn[ae],de!=qe&&(qe!==-1&&(He+=Ie.content.slice(ze),we={id:Ie.id,content:He},Le.push(we),Fe.splice(qe,1,we)),ze=0,He="",Ie=pe[qe=de]),hn[ae].pos);de=Pt(Tt,hn[ae]),0<=we&&(He=He+Ie.content.slice(ze,we)+de,ze=we)}return He+=Ie.content.slice(ze),ee={id:Ie.id,content:He},Le.push(ee),Fe.splice(qe,1,ee),a(Le),ee=kt.r(Le),kt=R.d(),o(kt),o(ee),ee}}(R,yt))&&Nt.length&&(Et=R.f(Z,yt),R.r(Nt),Nt=R.d(),o(Nt));else{for(var Ct=R,Nt=yt,ht=Ct.gj(),dt="",Ft=function(kt){var ee,pe=[];for(ee in kt){var Le={};Le.pos=kt[ee].start,Le.end=!1,Le.sid=ee,pe.push(Le),kt[ee].start!==kt[ee].end&&((Le={}).pos=kt[ee].end,Le.end=!0,Le.sid=ee,pe.push(Le))}var Fe=pe.sort(function(qe,ze){return qe.pos-ze.pos});return Fe}(Nt),Jt=0,Xt=0;Xt<Ft.length;Xt++){var Qt=Ft[Xt].pos,ve=Pt(Ct.i(),Ft[Xt]);0<Qt&&(dt=dt+ht.slice(Jt,Qt)+ve,Jt=Qt)}dt+=ht.slice(Jt),Ct.e(dt),Et=R.f(Z,yt),R.e(Ot)}return ct(R,It),(G||F)&&jt&&At!==R.dmid&&jt.focus(),Et}function Pt(yt,jt){var At;return typeof document<"u"?(H||(At=jt.sid,jt.end?yt.innerHTML=rt+At+"_end"+Q:yt.innerHTML=rt+At+Q),yt.innerHTML):""}this.grcs=function(){return $},this.srcs=function(yt){$=yt},this.arcs=function(yt){if(!Array.isArray(yt))throw Error("ESTOP:addRCSObjects array required");o(yt),o($);for(var jt=0;jt<yt.length;jt++){var At=yt[jt].sid;At!==M.sid&&(Y?$[At]={start:-1,end:-1,path:[-1,-1],startpath:[-1,-1],endpath:[-1,-1]}:q?$[At]={start:-1,end:-1}:L?$[At]={start:0,end:0}:T?$[At]={start:3,end:3}:F?$[At]={start:-1,end:-1}:G?($[At]={start:-1,end:-1,startid:-1,endid:-1},a($)):V||U?($[At]={start:-1,end:-1,startBlkPos:-1,endBlkPos:-1},a($)):B&&($[At]={start:1,end:1}))}o($)},this.rrcs=function(yt){if(!Array.isArray(yt))throw Error("ESTOP:removeRCSObjects array required");o($);for(var jt=0;jt<yt.length;jt++){var At=yt[jt];$[At]&&delete $[At]}o($)},this.urcs=function(yt){if(!I&&!O.sus()&&(o(yt),tt()===c)){var jt,At=yt.op;if(Y&&yt.context.sid===M.sid&&yt.op.length!==0&&(At=yt.op[0].po),yt.context.dmid!==0)_(O)||G||(jt=et(yt.context.dmid),jt=yt.context.sid===M.sid?((0,e.default)(At[0])===A[2]&&At[0]!==jt&&(jt=At[0],At[0]),w(jt,At,"A")):w(jt,At,"B"),nt(yt.context.dmid,jt));else{var It,Ot={};for(It in $){var Et,Ct,Nt,ht,dt=$[It];q||L?yt.context.sid!==It?(dt.start=h(At,dt.start,!0),dt.end=h(At,dt.end,!0)):yt.op.length!==0?(o(yt),At[0].tg?(dt.start=At[0].tg,dt.end=At[0].tg):(dt.start=0,dt.end=0),dt.start=h(At,dt.start,!1),dt.end=h(At,dt.end,!1)):(dt.start=yt.context.ks,dt.end=yt.context.js,o(dt)):Y?yt.context.sid!==It?(Ct={pos:dt.start,path:dt.startpath},Et={pos:dt.end,path:dt.endpath},J(At,Ct,!0),J(At,Et,!0),dt.start=Ct.pos,dt.end=Et.pos,dt.path=Ct.path):(dt.start=yt.context.ks,dt.end=yt.context.js,dt.path=yt.context.pt,dt.startpath=yt.context.pt1,dt.endpath=yt.context.pt2):G?(Et=l(dt),a(Et),It===yt.context.sid?(dt.start=yt.context.ks,dt.end=yt.context.js,dt.startid=yt.context.startid,dt.endid=yt.context.endid,gt(Et,dt)&&(Ct=l(dt),Ot[It]=Ct,a(Ot))):(a(dt),Nt=p(dt.startid,dt.start),ht=p(dt.endid,dt.end),a(At),Nt=u([Nt],At,0),ht=u([ht],At,0),Nt&&0<Nt.length&&ht&&0<ht.length?(dt.startid=b(Nt[0]),dt.start=m(Nt[0]),dt.endid=b(ht[0]),dt.end=m(ht[0])):(dt.startid=-1,dt.start=-1,dt.endid=-1,dt.end=-1),a(dt),gt(Et,dt)&&(Nt=l(dt),Ot[It]=Nt))):(It===yt.context.sid?(dt.start=yt.context.ks,dt.end=yt.context.js):(dt.start=w(dt.start,At,"B"),dt.end=w(dt.end,At,"B")),ht=et(yt.context.dmid),ht=yt.context.sid===M.sid?w(ht,At,"A"):w(ht,At,"B"),nt(yt.context.dmid,ht))}yt.context.sid!==M.sid?(o(yt),0<At.length?G?wt("rop",Ot,yt.context.sid):Mt("rop",yt.context.sid):G?wt("rop",Ot):Mt("rop")):(i(St),St=setTimeout(G?function(){wt("timer",Ot),St=null}:function(){Mt("timer"),St=null},0))}}},this.qurcs=function(yt,jt){if(!O.sus()){o(yt),o($);var At,It,Ot=yt.op;for(At in $)!$.hasOwnProperty(At)||(It=$[At]).start!=-1&&It.end!=-1&&M.sid!==At&&(It.start=h(Ot,It.start,!1),It.end=h(Ot,It.end,!1));tt()==c&&Mt("qjs"),o($)}},this.uc=Mt,this.nuc=wt,this.sppt=function(yt){J=yt},this.pct=function(yt){o(M)}}},{"../../../codox-json-ot/lib/":59,"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/dtf/dtf":220,"../../../codox-shared/src/gt/xf":224,"../util/lib":551,"@babel/runtime/helpers/interopRequireDefault":563,"@babel/runtime/helpers/slicedToArray":572,"@babel/runtime/helpers/typeof":574}],543:[function(t,f,r){t("./rjmtest").rjmtest;var n=t("../../../codox-shared/src/com/log").ins,e=(o=t("../../../codox-shared/src/com/util")).clone,s=o.logClone,i=t("../../../codox-shared/src/com/lib"),l=(o=t("./opm")).dltmg,o=o.difmg,a=l,c=o,u=(o=(l=t("../../../codox-shared/src/gt/xf")).ccp,l=l.ctf,o),h=l,p=t("../../../codox-shared/src/com/constants").codoxHighestto,m=null;function b(x,S){s(x),s(S),((0,i.idlt)(m)?a:c)(S,x,m)}function _(x,S){for(var E=0;E<x.length;E++){var k=x[E];if(k.context.seq==S.seq)return S.seq,s(k),k}throw new Error("getOrgLop found no orglop")}function v(x,S){return n(x),n(S),S.length==0?x:S=u(e(S),x,m)}function w(x){if(s(x),x.length==0)return s(x),[];for(var S=[],E=0;E<x.length;E++)S=u(S,x[E].op,m);return s(S),S}f.exports={rjm:function(x,S,E){m=E,E=x.offTo;var k=x.offOpLog,D=(x=x.coffDelta,S.offCaid),N=S.offTo,O=S.offOpLog;S=S.coffDelta,O=function(R,A){if(!Array.isArray(R))throw Error("ESTOP:findUnAckLops array required");s(R);var z=[],H=R.length;if(0<H)for(var $=H-1;0<=$;$--){var M=R[$];if(M.context.sid!=A||M.context.to!=p)return s(z),z;z.unshift(M)}return z}(O,D),E==N?O.length==0?b(x,S):b(x,v(S,w(function(R,A){if(!Array.isArray(R))throw Error("ESTOP:findLostLops array required");for(var z=0;z<R.length;z++)if(!function(H,$){if(!Array.isArray($))throw Error("ESTOP:isInOpLogSM array required");for(var M=0;M<$.length;M++){var J=$[M];if(H.context.sid==J.sid&&H.context.seq==J.seq)return 1}}(R[z],A))return R.slice(z);return[]}(O,k)))):((E=function(R,A){if(!Array.isArray(A))throw Error("ESTOP:findLostMops array required");s(A);var z=[];if(R==null)return A;if(A.length==0&&typeof R=="number")return[];for(var H=A.length-1;0<=H;H--){var $=A[H];if(!($.to>R)){if($.to==R)return s(z),z;throw new Error("findLostMops: found no mop with equal To")}s($),z.unshift($)}throw new Error("findLostMops: offOpLogSM may be too small")}(N,k)).length!=0&&s(E),O.length==0?(N=S,b(v(x,w(E)),N)):(k=O,N=x,O=S,S=(x=function(R,A){if(!Array.isArray(R))throw Error("ESTOP:separateRopsLops array required");for(var z=[],H=[],$=0;$<R.length;$++){var M=R[$];(R[$].sid!==A?z:H).push(M)}var J={lostrops:z,smAcklostlops:H};return s(J),J}(x=E,S=D)).lostrops,k=function(R,A){var z=[],H=null,$=[];if(A.length==0)return{orgAcklostlops:$,lostlops:z=R};for(var M=0;M<R.length;M++){for(var J=R[M],K=!1,P=0;P<A.length;P++)if(J.context.seq==A[P].seq){K=!0;break}if(!K)return s(J),H={orgAcklostlops:$,lostlops:z=R.slice(M)},$.length!==A.length&&($.length,A.length),{orgAcklostlops:$,lostlops:z};s(J),$.push(J)}return H={orgAcklostlops:$,lostlops:z},$.length!==A.length&&($.length,A.length),H}(k,x=x.smAcklostlops),E=k.orgAcklostlops,k=k.lostlops,b(v(N,function(R,A,z){if(!Array.isArray(R)||!Array.isArray(A)||!Array.isArray(z))throw Error("ESTOP:contextualizeLostRops array required");if(A.length!==z.length)throw A.length,z.length,new Error("invalid orgAcklostlops.length= "+A.length+" vs smAcklostlops.length = "+z.length);return R.length==0?[]:z.length==0?w(R):(R=function(H){s(H);for(var $=[],M=0;M<H.length;M++)$=u($,H[M].rop,m),s($),$=h(H[M].lop,$,m),s($);return $}(function(H){s(H);for(var $=0;$<H.length;$++)H[$].rop=w(H[$].rop),H[$].lop=w(H[$].lop);return s(H),H}(function(H,$,M){for(var J=[],K=H,P=0;P<$.length;P++){var U,V=$[P],G=(s(V),function(T,I){for(var L=[],B=0;B<I.length;B++){var Y=I[B];if(!(Y.to<T.to))return s(L),L;L.push(Y),s(L)}return s(L),L}(V,K)),F=G.length;if(0<F){G={rop:G,lop:[_(M,V)]},J.push(G);for(var q=0;q<F;q++)K.shift();s(K),s(J)}else 0<J.length?(G=J[J.length-1],(K.length==0||0<K.length&&V.to<K[0].to)&&(U=_(M,V),G.lop.push(U),s(V),s(G))):s(V)}return 0<K.length&&(s(H={rop:K,lop:[]}),J.push(H)),J}(R,A,z))),R)}(S,x,E)),v(O,w(k)))))}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/lib":217,"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,"../../../codox-shared/src/gt/xf":224,"./opm":541,"./rjmtest":544}],544:[function(t,f,r){var n=t("../../../codox-shared/src/com/log").ins,e=t("../../../codox-shared/src/com/util").logClone;f.exports={rjmtest:function(s,i){if(s.offOpLog.length==0||i.offOpLog.length==0)return n(s.offOpLog),void n(i.offOpLog);if(s.coffDelta.length==0||i.coffDelta.length==0)return n(s.coffDelta),void n(i.coffDelta);var l=s,o=i,a=o.offOpLog,c=l.offOpLog;console.log("testmergeWithInterleavingLostMop (before change): offToC = "+o.offTo),console.log("testmergeWithInterleavingLostMop (before change): offToSM = "+l.offTo),console.log("testmergeWithInterleavingLostMop (before change): offOpLogC = ",e(a)),console.log("testmergeWithInterleavingLostMop (before change): offOpLogSM = ",e(c)),a.splice(a.length-2,2),a.splice(a.length-4,2),a.splice(a.length-6,2),a[a.length-1].context.to=null,a[a.length-2].context.to=null,a[a.length-3].context.to=null,a[a.length-4].context.to=null;for(var u=a.length-1;0<=u;u--)if(a[u].context.to!==null){o.offTo=a[u].context.to;break}for(var h=c.length-1;0<=h;h--)if(c[h].to!==null){l.offTo=c[h].to;break}console.log("testmergeWithInterleavingLostMop (after change): offToC = "+o.offTo),console.log("testmergeWithInterleavingLostMop (after change): offToSM = "+l.offTo),console.log("testmergeWithInterleavingLostMop (after change): offOpLogC = ",e(a)),console.log("testmergeWithInterleavingLostMop (after change): offOpLogSM = ",e(c))}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219}],545:[function(t,f,r){t("../../../codox-shared/src/com/log").stringify,f.exports=function(n,e,s){n.lcmm(),n.dec;var i,l,o=n.co,a=null,c=null,u=null,h=null,p=null,m=null,b={},_={},v=null,w=null,x=null,S=null,E=null,k=null,D=[function(F,q){if(F.text.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else F=function(T){var I,L={},B=(L.dm=T.path,L.do=[],{});if(!T.offset||0<(I=T.offset)&&(B.tg=I,L.do.push(B),B={}),B.cr=T.text,0<T.marks.length){for(var Y={},Z=0;Z<T.marks.length;Z++)Y[T.marks[Z].type]=!0;B.sx=Y}return L.do.push(B),L.tn=T.data.tn,L.aon=T.data.n,L.pon=1,L}(F),q.push(F);return!0},function(F,q){var T,I,L,B=null;if(F.text.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else(I={}).dm=F.path,I.do=[],L={},F.offset&&0<(T=F.offset)&&(L.tg=T,I.do.push(L),L={}),L.sc=F.text.length,I.do.push(L),I.tn=F.data.tn,I.aon=F.data.n,I.pon=1,B=I,q.push(B);return!0},function(F,q){var T,I,L,B=null;if(F.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else I={},(T={}).dm=F.path,T.do=[],0<(L=F.offset)&&(I.tg=L,T.do.push(I),I={}),(L={})[F.mark.type]=!0,I.tg=F.length,I.sx=L,I.ao="am",T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,T.pon=1,B=T,q.push(B);return!0},function(F,q){var T,I,L,B=null;if(F.length<=0){if(F.data.ne=!0,F.data.tn===1)return!1}else I={},(T={}).dm=F.path,T.do=[],0<(L=F.offset)&&(I.tg=L,T.do.push(I),I={}),(L={})[F.mark.type]=null,I.tg=F.length,I.sx=L,I.ao="rm",T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,T.pon=1,B=T,q.push(B);return!0},function(F,q){return!!(F=M(F))&&(q.push(F),!0)},function(F,q){return F=z(F),q.push(F),!0},function(F,q){var T;return!(T=U(F)).do[0].dmpo&&1<F.data.tn&&0<q.length&&a(q[q.length-1])&&0<F.position&&(q[q.length-1].do[0].target=F.position),q.push(T),!0},function(F,q){for(var T=K(F),I=0;I<T.length;I++)T[I].tn=F.data.tn,T[I].aon=F.data.n,T[I].pon=I+1,q.push(T[I]);return!0},function(F,q){var T,I,L;return(T={}).dm=F.path,T.do=[],(I={dmpo:!0}).pos=F.path[F.path.length-1],I.len=1,I.type="del",I.ao="rn",T.tn=F.data.tn,T.aon=F.data.n,T.do.push(I),L=T,q.push(L),!0},function(F,q){var T=function(L){var B=[],Y={},Z=(Y.dm=L.path,Y.do=[],{});if(L.node.object==="text")Z.dmpo=!0,Z.pos=L.path[L.path.length-1],Z.len=1,Z.type="ins",Z.ao="in",Z.text=!0,Y.do.push(Z),Y.tn=L.data.tn,Y.aon=L.data.n,Y.pon=1,B.push(Y);else{if(L.node.object!=="block"&&L.node.object!=="inline")return!1;Z.dmpo=!0,Z.pos=L.path[L.path.length-1],Z.len=1,Z.type="ins",Z.ao="in",Y.do.push(Z),Y.tn=L.data.tn,Y.aon=L.data.n,Y.pon=1,B.push(Y)}return B}(F);if(!T)return!1;for(var I=0;I<T.length;I++)T[I].tn=F.data.tn,T[I].aon=F.data.n,T[I].pon=I+1,q.push(T[I]);return!0}],N=[function(F,q,T){q=function(I){var L=I;if(I.data.ne)return I;var B=R(F,I);if(B===null||B.do.length===0||B.nil)return I.data.ne=!0,I;(I=o(S.itaot)).path=B.dm;var Y=0;return B.do[0].cr?I.offset=0:(I.offset=B.do[0].tg,Y=1),I.text=B.do[Y].cr,B.do[Y].sx&&(I.marks=G(B.do[Y].sx)),I.data=L.data,I}(q),T.push(q)},function(F,q,T){for(var I=[],L=I,B=q,Y=A(F,q),Z=0,rt=0;rt<Y.length;rt++){var Q=o(S.rtaot),tt=(Q.data=B.data,Q.marks=B.marks,Y[rt]);if(tt.nil||tt.do.length===0)Q.data.ne=!0,L.push(Q);else{Q.path=tt.dm;for(var nt=o(tt.do),et=0,at=0,ct=0,gt=0;gt<nt.length;gt++)nt[gt].sc&&(ct+=nt[gt].sc);var wt=Z;for(Z+=ct;0<nt.length;){var St=o(Q),Mt=(St.text=0<wt?B.text.slice(-Z,-wt):B.text.slice(-Z),St.marks=B.marks,St.text,nt.shift());St.offset=et,Mt.tg&&(et+=Mt.tg,St.offset=et,Mt=nt.shift()),Mt.sc&&Mt.sc!=St.text.length&&(Mt.sc,St.text.length,St.text=B.text.slice(at,at+Mt.sc),at+=Mt.sc),L.push(St)}}}for(var Lt=0;Lt<I.length;Lt++)T.push(I[Lt])},function(F,q,T){for(var I=[],L=q,B=I,Y=A(F,L),Z=0;Z<Y.length;Z++){var rt=o(S.amaot),Q=(rt.data=L.data,Y[Z]);if(Q.nil||Q.do.length===0)rt.data.ne=!0,B.push(rt);else{rt.path=Q.dm;for(var tt=o(Q.do),nt=0;0<tt.length;){var et=o(rt),at=((at=tt.shift()).sx?et.offset=0:(nt+=at.tg,et.offset=nt,at=tt.shift()),et.length=at.tg,nt+=at.tg,G(at.sx));et.mark=at[0],B.push(et)}}}for(var ct=0;ct<I.length;ct++)T.push(I[ct])},function(F,q,T){for(var I=[],L=q,B=I,Y=A(F,L),Z=0;Z<Y.length;Z++){var rt=o(S.rmaot),Q=(rt.data=L.data,Y[Z]);if(Q.nil||Q.do.length===0)rt.data.ne=!0,B.push(rt);else{rt.path=Q.dm;for(var tt=o(Q.do),nt=0;0<tt.length;){var et=o(rt),at=((at=tt.shift()).sx?et.offset=0:(nt+=at.tg,et.offset=nt,at=tt.shift()),et.length=at.tg,nt+=at.tg,function(gt){var wt,St=[];for(wt in gt){var Mt;gt[wt]||((Mt=o(E)).type=wt,St.push(Mt))}return St}(at.sx));et.mark=at[0],B.push(et)}}}for(var ct=0;ct<I.length;ct++)T.push(I[ct])},function(F,q,T){q=J(F,q),T.push(q)},function(F,q,T){var I=[];H(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I=[];V(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I=[];P(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I=[];$(F,q,I);for(var L=0;L<I.length;L++)T.push(I[L])},function(F,q,T){var I,L=q;I=R(F,L),L.path=I.dm,(I==null||I.nil||I.do.length===0)&&(L.data.ne=!0),T.push(q)}];function O(F){return F[0].data.tn===4&&F[0].type===k[5]&&F[1].type===k[9]&&F[2].type===k[6]&&F[3].type===k[6]?"pasteindomain":"basic"}function R(F,q){return(F=A(F,q)).length===1?F[0]:F.length===0||1<F.length?null:void 0}function A(F,q){for(var T=[],I=q.data.n,L=0;L<F.length;L++){var B=F[L];if(B.aon==I)T.push(B);else if(B.aon>I)break}return T}function z(F){var q={},T=(q.dm=F.path,q.do=[],{});return F.properties.type?(T.dmpo=!0,T.pos=F.path[F.path.length-1],T.len=1,T.type="ins",T.target=F.target,T.ao="sn",T.p=F.position,q.do.push(T)):(0<F.position&&(T.tg=F.position,q.do.push(T)),q.do.push(T={tg:1,sx:{sa2pn:!0}})),q.tn=F.data.tn,q.aon=F.data.n,q}function H(F,q,T){var I=q;if(0<(L=A(F,q)).length){var L,B,Y=[];Y.push(L[0]);for(var Z=1;Z<L.length;Z++)(B=L[Z]).nil||Y.push(B);if(F=0,(B=(L=Y)[0]).nil||B.do.length===0){if(L.length===1)return;F++}else if(u(B)||h(B)){if(h(B)?(q=o(S.snaotndmpo),B.do[0].sx?q.position=0:q.position=B.do[0].tg):((q=o(S.snaotdmpo)).properties=I.properties,q.target=B.do[0].target,q.position=B.do[0].p),q.path=o(B.dm),q.data=I.data,T.push(q),L.length===1)return;F++}L.length>F&&(B=L[F]).do[0].dmpo&&B.do[0].type==="upd"&&B.do[0].ao==="setn"&&((I=o(S.senaot)).data.tn=L[0].tn,I.data.n=L[0].aon,J([L[F]],I),T.push(I),F++),L.length>F&&(B=L[F]).do[0].dmpo&&B.do[0].ao==="mvn"&&((q=o(S.mvnaot)).data.tn=L[0].tn,q.data.n=L[0].aon,I=[],P(L.slice(F),q,I),T.push(I[0]))}}function $(F,q,T){var I=q,L=A(F,q);if(L.length===0)return q.data.ne=!0,T.push(q);for(var B,Y,Z,rt=[],Q=0;Q<L.length-1;Q++)(B=L[Q]).nil||rt.push(B);rt.push(L[L.length-1]),1<(L=rt).length&&(L[0].do[0].dmpo&&L[0].do[0].ao=="mn"?(F=o(S.mnaotdmpo),Z=o(S.mnaotndmpo),F.data.tn=L[0].tn,F.data.n=L[0].aon,Z.data.tn=L[0].tn,Z.data.n=L[0].aon,V([L[0]],F,Y=[]),T.push(Y[0]),V([L[1]],Z,Y=[])):(F=o(S.snaotndmpo),Z=o(S.snaotdmpo),F.data.n=L[0].aon,F.data.tn=L[0].tn,Z.data.n=L[1].aon,Z.data.tn=L[1].tn,H([L[0]],F,Y=[]),T.push(Y[0]),H([L[1]],Z,Y=[])),T.push(Y[0])),(B=L[L.length-1]).nil||!!B.do.length===0?q.data.ne=!0:((q=o(S.rnaot)).path=B.dm,q.data=I.data),T.push(q)}function M(F){var q,T,I={};return F.properties.type?!!x[F.properties.type]&&(I.dm=F.path,I.do=[],(q={dmpo:!0}).pos=F.path[F.path.length-1],q.len=1,q.type="upd",q.ao="setn",(T={}).type=F.properties.type,q.sx=T,I.do.push(q),I.tn=F.data.tn,I.aon=F.data.n,I):!!F.properties.data&&(I.dm=F.path,I.do=[],(q={dmpo:!0}).pos=F.path[F.path.length-1],q.len=1,q.type="upd",q.ao="setn",I.do.push(q),I.tn=F.data.tn,I.aon=F.data.n,I)}function J(F,q){if((F=R(F,q))==null||F.nil||F.do.length===0)return q.data.ne=!0,q;var T=q;return(q=o(S.senaot)).data=T.data,T.properties&&T.properties.data?(q.path=F.dm,q.properties=T.properties):(q.path=F.dm,q.properties=F.do[0].sx),q}function K(F){var q=[],T={},I=(T.dm=F.path,T.do=[],{});return m(F.path,F.newPath)?(I.dmpo=!0,I.pos=F.path[F.path.length-1],I.len=1,I.ao="mvn",I.type="pt"):(I.dmpo=!0,I.pos=F.path[F.path.length-1],I.len=1,I.type="del",I.ao="mvn",p(F.newPath,F.path)&&(I.pxs="s"),T.tn=F.data.tn,T.aon=F.data.n,T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,q.push(T),(T={}).dm=F.newPath,T.do=[],(I={}).dmpo=!0,I.pos=F.newPath[F.newPath.length-1],I.len=1,I.ao="mvn",p(F.newPath,F.path)?I.type="pt":(I.type="ins",I.pxs="x")),T.do.push(I),T.tn=F.data.tn,T.aon=F.data.n,q.push(T),q}function P(F,q,T){var I=q;return(F=A(F,q)).length===0?(q.data.ne=!0,T.push(q)):((q=o(S.mvnaot)).data=I.data,I=1,F.length===1?(F[0].nil||F[0].do.length===0?q.data.ne=!0:(q.path=F[0].dm,q.newPath=F[0].dm),T.push(q)):F.length===2?(F[0].nil||F[0].do.length===0||F[1].nil||F[1].do.length===0?q.data.ne=!0:(q.path=F[0].dm,q.newPath=F[1].dm),T.push(q)):(I=F[0].do[0].type==="pt"?(q.path=o(F[0].dm),q.newPath=o(F[0].dm),T.push(q),1):(q.path=o(F[0].dm),q.newPath=o(F[1].dm),T.push(q),2),void(0<(((q=o(S.senaot)).data.tn=F[0].tn,q.data.n=F[0].aon,q=J([F[I]],q),T.push(q),F[I+=1].do[0].ao==="rn"&&((q=o(S.rnaot)).data.tn=F[0].tn,q.data.n=F[0].aon,$([F[I]],q,q=[]),T.push(q[0]),I+=1),q=o(S.mvnaot)).data.tn=F[0].tn,q.data.n=F[0].aon,F=F.slice(I)).length&&(P(F,q,I=[]),T.push(I[0])))))}function U(F){var q={},T=(q.dm=o(F.path),q.do=[],{});return F.properties.type?(T.dmpo=!0,T.pos=F.path[F.path.length-1],T.len=1,T.type="del",T.target=0,T.p=F.position,T.ao="mn"):(q.dm[F.path.length-1]=q.dm[F.path.length-1]-1,T={},0<F.position&&(T.tg=F.position,q.do.push(T),T={}),T.tg=1,(T.sx={}).ma2pn=!0),q.do.push(T),q.tn=F.data.tn,q.aon=F.data.n,q}function V(F,q,T){var I=q;if((F=A(F,q)).length===0)return q.data.ne=!0,T.push(q);F.length===3&&(L=o(S.mvnaot),F[0].nil||F[1].nil||F[0].do[0].length===0||F[1].do[0].length===0?(L.data.ne=!0,T.push(L)):(L.data.tn=F[0].tn,L.data.n=F[0].aon,P([F[0],F[1]],L,L=[]),T.push(L[0])));var L=F[F.length-1];if(L.nil||L.do.length===0)return q.data.ne=!0,T.push(q);(a(L)||c(L))&&(c(L)?((q=o(S.mnaotndmpo)).path=o(L.dm),q.path[q.path.length-1]=q.path[q.path.length-1]+1,L.do[0].sx?q.position=0:q.position=L.do[0].tg):((q=o(S.mnaotdmpo)).path=o(L.dm),q.properties=I.properties,q.position=L.do[0].p+1),q.data=I.data,T.push(q))}function G(F){var q,T,I=[];for(q in F)F[q]&&((T=o(E)).type=q,I.push(T));return I}this.in=function(F){var q=null;(q=F.ivs?n.dec(F.ivs,n.lcmm()):q).mp&&(w=q.mp),q.ppt&&(x=q.ppt),q.mat&&(E=q.mat),q.aot&&(S=q.aot),i=Object.keys(w),v={};for(var T=0;T<i.length;T++){var I=i[T],L=w[I];v[L]=I}k=Object.keys(v);for(var B=0;B<i.length;B++){var Y=i[B];b[Y]=D[B]}for(var Z=0;Z<i.length;Z++){var rt=i[Z];_[rt]=N[Z]}l=q.p2a,a=e[l[0]],c=e[l[1]],u=e[l[2]],h=e[l[3]],p=e[l[4]],m=e[l[5]],e.at(S),e.sn(z),e.mn(U),e.mvn(K),e.sen(M),q.dmpop&&q.dmpot&&q.dmpoaot&&(q.dmpop,q.dmpot,q.dmpoaot)},this.a2p=function(F){F.ao;var q=null;switch(O(F.ao)){case"basic":q=function(T){T.ao;for(var I,L=T.ao,B=[],Y=[],Z=null,rt=0;rt<L.length;rt++){Z=L[rt];var Q=v[Z.type];if(Z.key=Q,delete Z.type,(Q=b[Z.key])===void 0||!Q(Z,Y))return!1;Z.data.ne||(Y[Y.length-1].tn=Z.data.tn,Y[Y.length-1].aon=Z.data.n),w[Z.key]!==k[9]?((Q={}).key=Z.key,w[Z.key]==k[5]||w[Z.key]==k[6]&&Z.properties.type||w[Z.key]==k[4]&&Z.properties.data?Q.properties=Z.properties:w[Z.key]==k[1]&&(Q.text=Z.text,Q.marks=Z.marks),Q.data=Z.data,B.push(Q)):B.push(Z)}if(B.length===3&&B[0].data.tn===3)w[B[0].key]==k[5]&&w[B[1].key]==k[9]&&w[B[2].key]==k[9]?(Y[1].do[0].ien=!0,Y[2].do[0].ien=!0,Y[1].do[0].pem=L[0].position,Y[2].do[0].pem=L[0].position,I=Y[0].do.length,Y[0].do[I-1].ien=!0):w[B[0].key]==k[8]&&w[B[1].key]==k[1]&&w[B[2].key]==k[6]&&(Y[0].do[0].den=!0,Y[0].do[0].pem=L[2].position,m(Y[0].dm,L[1].path)?(Y[0].do[0].dlen=0,Y[0].do[0].extra=L[1].text.length):(Y[0].do[0].dlen=L[1].text.length,Y[0].do[0].extra=0),Y[0].do[0].two=!0,Y[1].den=!0,Y[2].den=!0);else if(1<B.length&&1<B[0].data.tn&&w[B[0].key]==k[8]&&w[B[B.length-1].key]==k[6]&&(B.length===2||!w[B[B.length-2].key]==k[6])){var tt=0;for(rt=0;rt<B.length;rt++){if(w[B[rt].key]!=k[8]){tt=rt-1;break}Y[rt].do[0].den=!0,Y[rt].do[0].two=!1}for(var nt=0,et=0,at=tt+1;at<B.length-1;at++)m(Y[tt].dm,L[at].path)?et+=L[at].text.length:nt+=L[at].text.length;Y[tt].do[0].pem=L[L.length-1].position,Y[tt].do[0].dlen=nt,Y[tt].do[0].extra=et,Y[tt].do[0].two=!0,Y[Y.length-1].den=!0,2<B.length&&(Y[Y.length-2].den=!0,Y[Y.length-3].den=!0)}return T.ao=B,T.op=Y,T.op,T.ao,!0}(F);break;case"pasteindomain":q=function(T){var I=T.ao,L=[],B={},Y=(B.dm=I[0].path,B.do=[],{});0<I[0].position&&(Y.tg=I[0].position,B.do.push(Y));for(var Z=I[1].node.leaves,rt=0;rt<Z.length;rt++){if((Y={}).cr=Z[rt].text,0<Z[rt].marks.length){for(var Q={},tt=0;tt<Z[rt].marks.length;tt++)Q[Z[rt].marks[tt].type]=!0;Y.sx=Q}B.do.push(Y)}return L.push(B),T.op=L,!0}(F);break;default:F.ao,q=!1}return q},this.p2a=function(F){F.op;var q=null;switch(O(F.ao)){case"basic":q=function(T){T.ao;var I,L=T.op,B=T.ao,Y=[];B.length==2&&B[0].key&&B[1].key&&w[B[0].key]==k[5]&&w[B[1].key]==k[5]?(I=L[0].dm.length,L[1].do[0].p=L[0].dm[I-1]+1):B.length==2&&B[0].key&&B[1].key&&w[B[0].key]==k[6]&&w[B[1].key]==k[6]&&(I=L[1].dm.length,L[0].do[0].p=L[1].dm[I-1]);for(var Z=0;Z<B.length;Z++){var rt=B[Z];if(!rt.data.ne){var Q=rt.type?v[rt.type]:rt.key;if((Q=_[Q])===void 0)return!1;Q(L,rt,Y)}}return T.ao=Y,T.op,T.ao,!0}(F);break;case"pasteindomain":q=function(){var T=F.op,I=F.ao;if(T[0].nil)for(var L=0;L<I.length;L++)I[L].data.ne=!0;else{I[0].path=T[0].dm;for(var B=1;B<I.length;B++){for(var Y=0;Y<T[0].dm.length;Y++)I[B].path[Y]=T[0].dm[Y];I[B].path[I[0].path.length-1]=1}var Z=0,rt=0,Q=(T[0].do[0].tg&&(rt=T[0].do[0].tg,Z=1),I[3].position-I[0].position);I[0].position=rt,I[2].position=rt,I[3].position=rt+Q,T[0].do[0].sx?I[1].position=0:I[1].position=T[0].do[0].tg;var tt=I[1].node.leaves;for(L=0;L<tt.length;L++){var nt=T[0].do[L+Z];if(tt[L].text=nt.cr,nt.sx){gt=void 0,wt=void 0,et=void 0,at=void 0;var et,at,ct=nt.sx,gt=tt[L],wt=[];for(et in ct)ct[et]&&((at=o(E)).type=et,wt.push(at));gt.marks=wt}}}}();break;default:F.ao,q=!1}return q},this.k2t=function(F,q){return w[F]==k[q]},this.k2k=function(F,q){return w[F]==w[q]},this.lt=function(F){return w[F]}}},{"../../../codox-shared/src/com/log":218}],546:[function(t,f,r){var n,e=(n=t("../logger.js")).logger,s=n.SENTRY_LEVEL_H,i=n.I_STOP_MSG_1,l=n.I_STOP_MSG_2,o=n.I_STOP_MSG_3,a=n.SENTRY_RTT_REPORT_LIMIT,c=n.SENTRY_REPORT_LIMIT,u=t("../errors").VersionError,h=((n=t("../../../codox-shared/src/com/util")).clone,n.logClone),p=t("./off.js").gof,m=(n=t("../../../codox-shared/src/com/constants")).STOPPED,b=n.SMINIT,_=n.SMSUB,v=n.SMMSG,w=t("../env").isProd,x=Date;f.exports=function(S,E){var k=S.app,D=S.breadCrumb,N=S.START_TIME,O=S.TZ,R=S.gs,A=S.subm,z=k.codoxLogger,H=k.sockOpenTimer,$=null,M=e.reportError.bind(e),J=c,K=a;function P(q){var T,I=S.ghb();0<J&&(T=(x.now()-N)/1e3,D("[codoxi]- abmsg: #"+q+"; t = "+T+"; hbc = "+I,s),J--)}this.rttReportLimit=a,E.onopen=function(){var q=(x.now()-N)/1e3;D("[codoxi]* csm: t = "+q+"; seid = "+k.sid,s),S.setSMC(!0),clearTimeout(H)},E.onerror=function(q){R()!==m?p(S,"socket error",1006):P(l)},E.onclose=function(q){var T=R(),I=S.ghb();T===m?P(o):1005<q.code&&q.code!==4e3&&q.code!==4111?(q.code,q.reason,p(S,"soc: code="+q.code+";reason="+q.reason,q.code)):(q.code!==4e3&&(T=(x.now()-N)/1e3,D("[codoxe]- sc: t = "+T+"; hbc = "+I+"; sid = "+$,s)),O(1,q.code))},E.onmessage=function(q){var T=R(),I=S.ghb();if(T!==m){if(T=(x.now()-N)/1e3,q==null)return w||console.error("[codoxi]- ome1: t = "+T+"; hbc = "+I+"; sid = "+$),void D("[codoxi]- ome1: t = "+T+"; hbc = "+I+"; sid = "+$,s);if(q&&q.data){var L=q.data;try{var B,Y,Z,rt=L=typeof L=="string"?JSON.parse(L):L,Q=S.ghb(),tt=(h(rt),(x.now()-N)/1e3);if(B=rt,Y=S.ghb(),Z=(x.now()-N)/1e3,B.a?B.a===F||(B.cmd&&B.cmd.t&&B.cmd.t=="HBP"||(w||console.error("[codoxi]- nemsg: t = "+Z+"; hbc = "+Y+"; sid = "+$+"; unexpected msg = ",B),D("[codoxi]- nemsg: t = "+Z+"; hbc = "+Y+"; sid = "+$,s)),0):(w||console.error("[codoxi]- ivmsg: t = "+Z+"; hbc = "+Y+"; sid = "+$+"; missing msg.a, invalidmsg = ",B),D("[codoxi]- ivmsg: t = "+Z+"; hbc = "+Y+"; sid = "+$,s),0))switch(rt.a){case b:var nt=R();if(typeof rt.caid!="string")throw new Error("Invalid client id");z.SMSubSt=z.SMConEd=x.now(),$=rt.caid,S.setSID($),S.sid=$;var et=rt,at=et.ccva,ct=at.join(" "),gt=S.cver,wt=et.smv;if(S.setSMV(et.smv),!at||!wt)throw new u("cve2",gt,wt,ct);for(var St=!1,Mt=0;Mt<at.length;Mt++)if(Math.trunc(gt)==at[Mt]){St=!0;break}if(!St)throw new u("cve1",gt,wt,ct);"codox_handleMessage: Client and SM are compatible: codoxClientV = ".concat(gt," is a member of ccva = ").concat(at,"; codoxSMVersion = ").concat(wt),(et=S.minfo).sid=$,et.userinfo.jointime=new Date,ct=(x.now()-N)/1e3,D("[codoxi]* ssub, t = "+ct+"; seid = "+k.sid,s),G=x.now(),A(),clearTimeout(V),V=setTimeout(function(){var Lt=(x.now()-N)/1e3;D("[codoxe]-- subf(t), r=13; t = "+Lt+"; sid = "+$,s),nt!==m?O(13):D("[codoxe]-- subf(ts), t = "+tt+"; sid = "+$,s)},U),F=_;break;case _:wt=S.subr,z.SMSubEd=x.now(),et=x.now()-G,S.srtt(et),et<0&&(w||console.error("[codoxi]-- rtt-sub: t = "+tt+"; hbC = "+Q+"; rtt= "+et+"; priT="+z.SMSubSt+"; curT="+z.SMSubEd+"; sid="+$),0<K&&(D("[codoxi]-- rtt-sub: t = "+tt+"; hbC = "+Q+"; rtt= "+et+"; priT="+z.SMSubSt+"; curT="+z.SMSubEd+"; sid="+$),M(new Error("reason RTT")),K--)),clearTimeout(V),wt(rt),F=v;break;case v:S.ROH(rt);break;default:w||console.error("[codoxi]- udmsg: t = "+tt+"; hbc = "+Q+"; sid = "+$+"; Unhandled SM message:",rt),D("[codoxi]- udmsg: t = "+tt+"; hbc = "+Q+"; sid = "+$,s)}}catch(Lt){if(w||console.error("codox_handleMessage: err = ",Lt),D("[codoxi]- hme: t = "+T+"; hbc = "+I+"; sid = "+$,s),Lt instanceof u)return void O(800,Lt);if(0<=Lt.message.search(/^ESTOP/))return L={roherr:Lt.message},console.error("codox_handleMessage: ESTOP err = ",L),void O(900,L)}}else w||console.error("[codoxi]- ome2: t = "+T+"; hbc = "+I+"; sid = "+$+"; errormsg = ",q),D("[codoxi]- ome2: t = "+T+"; hbc = "+I+"; sid = "+$,s)}else P(i)};var U=1e4,V=null,G=null,F=b;this.semsg=function(q){F=q},this.clean=function(){clearTimeout(V)}}},{"../../../codox-shared/src/com/constants":215,"../../../codox-shared/src/com/util":219,"../env":527,"../errors":528,"../logger.js":530,"./off.js":540}],547:[function(t,f,r){f.exports=function(n,e){var s=n.lhto(),i=n.dtf,l=n.dtfp,o=n.co,a=null;function c(G,F,q){if(G.do.length===0||F.do.length===0)return F;var T,I,L,B=(F=o(F)).dm,Y=G.dm;if(G.do[0].dmpo&&G.do[0].type!=="pt"&&k(Y,B))switch(Y.length,Lt=G.do[0].type){case"ins":(function(Ct,Nt,ht){var dt,Ft,Jt,Xt,Qt=Nt.dm,ve=Ct.dm,kt=ve.length-1,ee=Ct.do[0].ao,pe=Nt.do[0].ao,Le=Nt.do[0].type;if(ve[kt]<Qt[kt])Ct.do[0].ao==="mvn"||(ve[kt]+1==Qt[kt]&&ee==="sn"&&Nt.do[0].dmpo&&Le==="del"&&pe==="rn"&&Nt.tn===3?Nt.nil=!0:u(Ct)?Qt[kt]=Qt[kt]+2:Qt[kt]=Qt[kt]+1);else if(ve[kt]===Qt[kt])if(Nt.do[0].dmpo)switch(ee){case"sn":switch(Le){case"ins":if(pe=="sn"){if(ve.length==Qt.length&&Ct.do[0].p!==Nt.do[0].p)return Ct.do[0].p>Nt.do[0].p||(Qt[kt]=Qt[kt]+1,Nt.do[0].p=Nt.do[0].p-Ct.do[0].p+1);var Fe=Ct.do[0].target,qe=Nt.do[0].target;Ct.otg&&(Fe=Ct.otg),(qe=Nt.otg?Nt.otg:qe)==Fe?Nt.nil=!0:Fe<qe&&(Nt.do[0].target=qe-Fe,Qt[kt]=Qt[kt]+1,Nt.otg&&delete Nt.otg,Nt.do[0].p=Nt.do[0].p-Ct.do[0].p+1)}else pe!="mvn"&&pe=="in"&&(ve.length!==Qt.length&&Ct.do[0].p!==Qt[1+kt]?Ct.do[0].p>Qt[1+kt]||(Qt[kt]=Qt[kt]+1,Qt[1+kt]=Qt[1+kt]-Ct.do[0].p+1):(qe=Ct.do[0].target,Ct.otg&&(qe=Ct.otg),u(Nt)&&(Nt.do[0].pem>qe||Nt.do[0].pem===qe&&ht)&&(Qt[kt]=Qt[kt]+1,Qt[1+kt]=1,Nt.do[0].pem=Nt.do[0].pem-qe)));break;case"del":$(Nt)?Ct.do[0].target===Nt.do[0].target&&(Qt[kt]=Qt[kt]+1):pe=="mvn"?Nt.do[0].pxs:pe=="rn"&&1<Nt.tn?h(Nt)?ve.length!==Qt.length&&Ct.do[0].p!==Qt[1+kt]+1?Ct.do[0].p>Qt[1+kt]+1||(Qt[kt]=Qt[kt]+1,Qt[1+kt]=Qt[1+kt]-Ct.do[0].p+1):Nt.two&&(Fe=Ct.do[0].target,Ct.otg&&(Fe=Ct.otg),(Nt.do[0].pem>Fe||Nt.do[0].pem===Fe&&ht)&&(Qt[kt]=Qt[kt]+1,Qt[1+kt]=1,Nt.do[0].pem=Nt.do[0].pem-Fe)):(qe=Nt,Fe=Ct.do[0].target,(Ft=o(qe.dm))[qe.dm.length-1]=Ft[qe.dm.length-1]+1,(Jt=o(qe.dm))[Ft.length]=1,(Xt=o(J.mnaotdmpo)).path=Ft,Xt.data.tn=qe.tn,Xt.data.n=qe.aon,(Ft=P(Xt)).do[0].target=Fe,Ft.pon=qe.pon+1,(Xt=o(J.mnaotndmpo)).path=Jt,Xt.position=Fe,Xt.data.tn=qe.tn,Xt.data.n=qe.aon,(Jt=P(Xt)).pon=qe.pon+2,qe.Xp||(qe.Xp=[]),qe.Xp.push(Ft),qe.Xp.push(Jt)):Qt[kt]=Qt[kt]+1}break;case"mvn":Nt.do[0].type=="ins"&&Nt.do[0].ao=="mvn"?Nt.nil=!0:Qt[Qt.length]=0;break;case"in":if(u(Ct))return u(Nt)?(Ct.do[0].pem<Nt.do[0].pem||Ct.do[0].pem==Nt.do[0].pem&&ht)&&(Qt[kt]=Qt[kt]+2,Nt.do[0].pem=Nt.do[0].pem-Ct.do[0].pem):Qt[kt]=Qt[kt]+2;(Le!="ins"||N(Nt)||pe==="in"&&ht)&&(Qt[kt]=Qt[kt]+1)}else switch(ee){case"sn":if(ve.length!==Qt.length&&Ct.do[0].p!==Qt[Qt.length-1]+1)return Ct.do[0].p>Qt[Qt.length-1]+1||(Qt[kt]=Qt[kt]+1,Qt[Qt.length-1]=Qt[Qt.length-1]-Ct.do[0].p+1);var ze=Ct.do[0].target,Ie=0;if(Nt.do[0].tg&&!Nt.do[0].sx&&(Ie=Nt.do[0].tg),Ct.otg&&(ze=Ct.otg),Nt.otg&&(Ie=Nt.otg),x(Nt)&&Ct.isInDR&&S(Nt,Ct.isInDR)){var He=Nt,hn=Ct.isInDR,Tt=kt,ae=0,de=0;!He.do[0].tg||He.do[0].sx||e||(ae=1,de=He.do[0].tg);for(var we=null,Oe=de,Rt=ae;Rt<He.do.length;Rt++)if(He.do[Rt].tg?Oe+=He.do[Rt].tg:Oe+=He.do[Rt].sc,hn<=Oe){var Ut=null,se=null;if(He.do[Rt].sc){Ut=o(He.do[Rt]),se=o(He.do[Rt]);var bt=hn-(Oe-He.do[Rt].sc),ft=He.do[Rt].sc-bt;if(bt==0||ft==0)break;Ut.sc=bt,se.sc=ft}(we=o(He)).do=He.do.slice(0,Rt),Ut!==null&&we.do.push(Ut),He.do=He.do.slice(Rt+1),se!==null&&He.do.unshift(se),He.dm[Tt]=He.dm[Tt]+1;break}return we!==null&&(He.Xa||(He.Xa=[]),He.pon&&(we.pon=He.pon+1),we.pon=He.pon+1,He.Xa.push(we)),delete Ct.isInDR}if(Ie===ze)O(Nt)?ht&&(H(Nt.do,0),Qt[kt]=Qt[kt]+1,Qt[1+kt]=0):x(Nt)&&Ct.ft&&Nt.ft&&function($t,qt){for(var Wt=0;Wt<$t.length;Wt++)for(var oe=0;oe<qt.length;oe++)if($t[Wt]===qt[oe])return 1}(Nt.ft,Ct.ft)||(O(Nt)&&(Nt.otg=Ie),H(Nt.do,0),Qt[kt]=Qt[kt]+1,Qt[Qt.length-1]=Qt[Qt.length-1]-Ct.do[0].p+1);else if(ze<Ie)O(Nt)&&(Nt.otg=Ie),H(Nt.do,Ie-ze),Qt[kt]=Qt[kt]+1,Qt[Qt.length-1]=Qt[Qt.length-1]-Ct.do[0].p+1;else if(function($t,qt){if(!A($t)&&$t.do.length!==0){var Wt=0,oe=0,X=($t.do[0].tg&&!$t.do[0].sx&&(oe=$t.do[0].tg,Wt=1),oe);if($t.do[Wt].sx){for(var lt=Wt;lt<$t.do.length;lt++)X+=$t.do[lt].tg;if(oe<qt&&qt<X&&!e)return 1}}}(Nt,ze)){var xt=Nt,Bt=ze,ce=kt;de=0,ae=0,xt.do[0].tg&&!xt.do[0].sx&&(de=1,ae=xt.do[0].tg);for(var Ce=null,Te=ae,Ne=de;Ne<xt.do.length;Ne++)if(Bt<=(Te+=xt.do[Ne].tg)&&!e){var Ge=null,be=null;if(xt.do[Ne].sx){Ge=o(xt.do[Ne]),be=o(xt.do[Ne]);var pt=Bt-(Te-xt.do[Ne].tg),Dt=xt.do[Ne].tg-pt;if(pt==0||Dt==0)break;Ge.tg=pt,be.tg=Dt}(Ce=o(xt)).do=xt.do.slice(0,Ne),Ge!==null&&Ce.do.push(Ge),xt.do=xt.do.slice(Ne+1),be!==null&&xt.do.unshift(be),xt.dm[ce]=xt.dm[ce]+1;break}Ce!==null&&(xt.Xa||(xt.Xa=[]),xt.pon&&(Ce.pon=xt.pon+1),Ce.pon=xt.pon+1,xt.Xa.push(Ce))}break;case"mvn":Qt[Qt.length]=0;break;case"in":Qt[kt]=Qt[kt]+1}else u(Ct)&&ve[kt]===Qt[kt]+1&&(ee=Ct.do[0].pem,R(Nt)?Qt[kt]=Qt[kt]+2:(ee<(dt=z(Nt))||ee===dt&&(x(Nt)||ht))&&(Qt[kt]=Qt[kt]+2,O(Nt)&&(Nt.otg=dt),H(Nt.do,dt-ee)))})(G,F,q);break;case"del":var Z,rt,Q,tt,nt=G,et=F,at=nt.dm,ct=et.dm,gt=at.length-1,wt=nt.do[0].ao;if(et.do[0].ao,et.do[0].type,!nt.nil)if(at[gt]<ct[gt])nt.do[0].ao==="mvn"&&nt.do[0].type=="del"&&nt.do[0].pxs&&nt.do[0].pxs==="s"?at[gt]+1===ct[gt]&&et.do[0].dmpo&&et.do[0].type=="del"&&et.do[0].ao=="mn"&&ct.shift():at[gt]+1===ct[gt]&&nt.do[0].type=="del"&&nt.do[0].ao=="rn"&&et.do[0].dmpo&&et.do[0].type=="del"&&et.do[0].ao=="mn"?et.nil=!0:h(nt)&&nt.do[0].two?(R(et)||(Z=z(et),rt=nt.do[0].pem,at[gt]+1===ct[gt]&&H(et.do,Z+rt+nt.do[0].dlen-nt.do[0].extra)),ct[gt]=ct[gt]-2):ct[gt]=ct[gt]-1;else if(at[gt]===ct[gt])if(et.do[0].dmpo)switch(wt){case"mvn":et.do[0].type=="del"&&et.do[0].ao=="mvn"?et.nil=!0:nt.do[0].pxs&&nt.do[0].pxs==="s"?(et.do[0].type=="ins"&&et.do[0].ao,ct.pop(),et.dm=ct):et.do[0].type=="del"&&et.do[0].ao=="rn"?et.nil=!0:0<ct[gt]&&(ct[gt]=ct[gt]-1);break;case"mn":et.do[0].type==="upd"?0<ct[gt]&&(ct[gt]=ct[gt]-1):et.do[0].type==="del"&&et.do[0].ao==="mn"?et.nil=!0:et.do[0].type==="del"&&et.do[0].ao==="rn"?h(et)?0<ct[gt]&&(ct[gt]=ct[gt]-1):w(et,nt.do[0].target,!0):(et.do[0].type==="ins"&&et.do[0].ao,0<ct[gt]&&(ct[gt]=ct[gt]-1)),at.length===ct.length||!(N(et)&&ct[1+gt]===0||ct[1+gt]===1)||0<(Q=nt.do[0].target)&&(et.do[0].tg&&!et.do[0].sx?et.do[0].tg=et.do[0].tg+Q:et.do.unshift({tg:Q})),at.length!==ct.length&&(ct[1+gt]=ct[1+gt]+nt.do[0].p-1);break;case"rn":et.do[0].type==="del"?et.do[0].ao==="rn"||et.do[0].ao==="mn"?et.nil=!0:et.do[0].ao:(et.do[0].type!=="ins"||et.do[0].ao==="sn"||et.do[0].ao==="mvn")&&(et.nil=!0)}else switch(wt){case"mvn":nt.do[0].pxs&&nt.do[0].pxs==="s"?(ct.pop(),et.dm=ct):0<ct[gt]&&(ct[gt]=ct[gt]-1);break;case"mn":0<ct[gt]&&(ct[gt]=ct[gt]-1),at.length!==ct.length&&(O(et)&&ct[1+gt]===0||ct[1+gt]===1)&&0<(tt=nt.do[0].target)&&(et.do[0].tg&&!et.do[0].sx?et.do[0].tg=et.do[0].tg+tt:et.do.unshift({tg:tt})),ct[1+gt]=ct[1+gt]+nt.do[0].p-1;break;case"rn":M(et)?et.nil=!0:O(et)?et.n2b=!0:(x(et),et.nil=!0)}else at[gt]===ct[gt]+1&&nt.do[0].type=="del"&&nt.do[0].ao=="mn"&&et.do[0].dmpo&&et.do[0].type=="del"&&et.do[0].ao=="rn"&&!h(et)&&w(et,nt.do[0].target,!1);break;case"upd":Z=F,rt=q,T=(wt=G).dm,I=Z.dm,T[L=T.length-1]===I[L]&&T.length===I.length&&Z.do[0].dmpo&&Z.do[0].type==="upd"&&rt&&(Z.do[0].sx&&wt.do[0].sx?Z.do[0].sx.type=wt.do[0].sx.type:Z.nil=!0)}else if(G.do[0].dmpo&&G.do[0].type==="ins"&&G.do[0].pxs==="x"&&F.do[0].dmpo&&F.do[0].type==="ins"&&F.do[0].ao==="sn"&&D(B,Y)){B[B.length]=0;var St=F,Mt=((Lt=o(St.dm))[Lt.length-1]=1,o(Lt)),Lt=((1<(jt=o(Mt)).length&&jt.shift(),At=o(J.senaot)).path=Lt,At.data.tn=St.tn,At.data.n=St.aon,V(At)),Pt=((At=o(J.mvnaot)).path=Mt,At.newPath=jt,At.data.tn=St.tn,At.data.n=St.aon,U(At));St.Xa||(St.Xa=[]),Lt.pon=St.pon+1,St.Xa.push(Lt);for(var yt=0;yt<Pt.length;yt++)Pt[yt].pon=St.pon+2+yt,St.Xa.push(Pt[yt])}else if(G.do[0].dmpo&&G.do[0].type==="ins"&&G.do[0].pxs==="x"&&F.do[0].dmpo&&F.do[0].type==="del"&&F.do[0].ao==="mn"&&k(B,Y)){var jt,At,It=F,Ot=(Mt=o(It.dm),((jt=o(Mt)).unshift(0),At=o(J.mvnaot)).path=Mt,At.newPath=jt,At.data.tn=It.tn,At.data.n=It.aon,U(At));It.Xp||(It.Xp=[]);for(var Et=0;Et<Ot.length;Et++)Ot[Et].pon=It.pon+1+Et,It.Xp.push(Ot[Et]);B.unshift(0)}else(u(G)&&F.do[0].dmpo&&!u(F)&&Y.length===B.length||u(G)&&A(F)&&Y.length===B.length)&&(B[B.length-1]=B[B.length-1]+2);return F}function u(G){return G&&G.do&&G.do[0].dmpo&&G.do[0].ao==="in"&&G.do[0].ien}function h(G){return G&&G.do&&G.do[0].dmpo&&G.do[0].ao==="rn"&&G.do[0].den}function p(G,F){$(G)&&M(F)&&!e&&((F=z(F))!==G.do[0].target&&G.do[0].target,G.do[0].target=F)}function m(G,F){$(G)&&M(F)&&G.nil&&!e&&(F.nil=!0)}function b(G,F){O(G)&&N(F)&&F.nil&&!e&&(G.nil=!0,G.n2b)}function _(G,F,q,T){var I;G.nil?T&&N(F)&&!e&&(F.nil=!0):O(G)&&N(F)&&(G.otg&&(F.otg=G.otg,delete G.otg),T=z(G),F.do[0].target-T!=0&&F.do[0].target,x(q)&&T<F.do[0].target&&!e&&(I=Math.random(),F.ft||(F.ft=[]),F.ft.push(I),q.ft||(q.ft=[]),q.ft.push(I)),G.isInDR&&(F.isInDR=G.isInDR,delete G.isInDR),F.do[0].target=T)}function v(G){for(var F=[],q=0;q<G.length;q++)if(G[q].Xa){F.push(G[q]);for(var T=0;T<G[q].Xa.length;T++)F.push(G[q].Xa[T]);delete G[q].Xa}else if(G[q].Xp){for(var I=0;I<G[q].Xp.length;I++)F.push(G[q].Xp[I]);F.push(G[q]),delete G[q].Xp}else F.push(G[q]);return F}function w(G,F,q){var T,I=o(G.dm);((q&&(I[G.dm.length-1]=I[G.dm.length-1]-1),q=o(I))[I.length]=0,T=o(J.snaotndmpo)).path=q,T.position=F,T.data.tn=G.tn,T.data.n=G.aon,(((q=K(T)).pon=G.pon+1,T=o(J.snaotdmpo)).path=I,T.target=F,T.data.tn=G.tn,T.data.n=G.aon,I=K(T)).pon=G.pon+2,G.Xp||(G.Xp=[]),G.Xp.push(q),G.Xp.push(I)}function x(G){var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),0<G.do.length&&G.do[F].sc}function S(G,F){if(A(G)||G.do.length===0)return!1;var q=0,T=0;if(0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&!e&&(q=1,T=G.do[0].tg),G.do[q].sc){for(var I=T,L=q;L<G.do.length;L++)G.do[L].tg?I+=G.do[L].tg:I+=G.do[L].sc;if(T<F&&F<I)return!0}return!1}function E(G,F){if(G===null||F===null||G&&G.length===0||F&&F.length===0||G.length!==F.length)return!1;for(var q=0;q<G.length;q++)if(G[q]!==F[q])return!1;return!0}function k(G,F){if(G!==null&&F!==null&&!(G&&G.length===0||F&&F.length===0||G.length>F.length)){for(var q=0;q<G.length-1;q++)if(G[q]!==F[q])return;return 1}}function D(G,F){if(G===null||F===null||G&&G.length===0||G&&F.length===0||G.length>=F.length)return!1;for(var q=0;q<G.length;q++)if(G[q]!==F[q])return!1;return!0}function N(G){return!(!(0<G.do.length&&G.do[0].dmpo&&G.do[0].type==="ins"&&G.do[0].ao==="sn")||e)}function O(G){var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),!(!(0<G.do.length&&G.do[F].sx&&G.do[F].sx.sa2pn)||e)}function R(G){return 0<G.do.length&&G.do[0].dmpo&&!e}function A(G){if(G.do.length===0)return!1;var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),!(!(0<G.do.length&&G.do[F].sx&&(G.do[F].sx.sa2pn||G.do[F].sx.ma2pn))||e)}function z(G){return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx?G.do[0].tg:0}function H(G,F){G[0].tg&&!G[0].sx?0<F?G[0].tg=F:G.shift():0<F&&G.unshift({tg:F})}function $(G){return!(!(0<G.do.length&&G.do[0].dmpo&&G.do[0].type==="del"&&G.do[0].ao==="mn")||e)}function M(G){var F=0;return 0<G.do.length&&G.do[0].tg&&!G.do[0].sx&&(F=1),!(!(0<G.do.length&&G.do[F].sx&&G.do[F].sx.ma2pn)||e)}var J=null,K=null,P=null,U=null,V=null;this.in=function(G){G.ivs&&(G=n.dec(G.ivs,n.lcmm()),a=G.c2p),i=n[a[0]],l=n[a[1]],o=n[a[2]]},this.xf=function(G,F,q){G.op,F.op;for(var T,I,L=null,B=(I=q?!(L=!1):!(L=F.context.to===s||F.context.to>G.context.to),0);B<G.op.length;B++)if(G.op[B].nil||G.op[B].n2b||e)G.op[B];else{G.op[B];for(var Y=0;Y<F.op.length;Y++)if(F.op[Y].nil||F.op[Y].n2b||e)F.op[Y];else{F.op[Y];var Z=G.op[B],rt=F.op[Y],Q=A(G.op[B]),tt=A(F.op[Y]),nt=(nt=G.op[B],T=F.op[Y],nt===null||T===null||nt&&nt.do&&nt.do.length===0||T&&T.do&&T.do.length===0?"wgqui":nt.do[0].dmpo||T.do[0].dmpo?"xgqui":E(nt.dm,T.dm)?"tqui":"wgqui");switch(nt){case"tqui":var et,at=[],ct=[];Q&&tt?ct=u(G.op[B+1])||u(F.op[Y+1])?(at=o(G.op[B].do),o(F.op[Y].do)):(at=i(F.op[Y].do,G.op[B].do,!0),i(G.op[B].do,F.op[Y].do,!0)):Q&&!tt?(et=z(G.op[B]),S(F.op[Y],et)&&(G.op[B].isInDR=et),et=i(F.op[Y].do,et,!1),F.op[Y].do,at=o(G.op[B].do),ct=o(F.op[Y].do),H(at,et)):!Q&&tt?(et=z(F.op[Y]),S(G.op[B],et)&&(F.op[Y].isInDR=et),G.op[B].do,et=i(G.op[B].do,et,!1),ct=o(F.op[Y].do),at=o(G.op[B].do),H(ct,et)):(at=i(F.op[Y].do,G.op[B].do,L),ct=i(G.op[B].do,F.op[Y].do,I)),Z.do=at,rt.do=ct;break;case"xgqui":Z=c(F.op[Y],G.op[B],L),rt=c(G.op[B],F.op[Y],I)}if(G.op[B]=Z,F.op[Y]=rt,G.op[B].do.length===0&&(G.op[B].nil=!0),B<G.op.length-1&&_(G.op[B],G.op[B+1],F.op[Y],Q),0<B&&b(G.op[B-1],G.op[B]),F.op[Y].do.length===0&&(F.op[Y].nil=!0),Y<F.op.length-1&&_(F.op[Y],F.op[Y+1],G.op[B],tt),0<Y&&b(F.op[Y-1],F.op[Y]),B<G.op.length-1&&m(G.op[B],G.op[B+1]),0<B&&p(G.op[B-1],G.op[B]),Y<F.op.length-1&&m(F.op[Y],F.op[Y+1]),0<Y&&p(F.op[Y-1],F.op[Y]),G.op[B].nil||G.op[B].n2b||e){G.op[B];break}}}G.op,F.op,q=v(G.op);var gt=v(F.op);G.op=q,F.op=gt,G.op,F.op},this.ppt=function(G,F,q){for(var T,I=0;I<G.length;I++)if(G[I].do.length!==0&&!G[I].nil&&!e){T=F;var L=(L=G[I])===null||L.do.length===0?"wglou":L.do[0].dmpo&&!L.do[0].upd&&k(L.dm,T.path)?"xglou":E(L.dm,T.path)?"tlou":"wglou";switch(L){case"tlou":F.pos=l(G[I].do,F.pos,!q);break;case"xglou":Q=Y=void 0;var B=G[I],Y=F,Z=q,rt=B.dm,Q=Y.path,tt=rt.length-1,nt=B.do[0].pos;switch(B.do[0].type){case"ins":nt<Q[tt]&&!e?B.do[0].ao==="mvn"||(Q[tt]=Q[tt]+B.do[0].len):nt===Q[tt]&&(B.do[0].ao==="sn"?(Y.pos>B.do[0].target||Y.pos==B.do[0].target&&Z)&&(Y.pos,B.do[0].target,Q[tt]=Q[tt]+1,Y.pos=Y.pos-B.do[0].target):B.do[0].ao==="mvn"?Q[Q.length]=0:B.do[0].ao==="in"?Q[tt]=Q[tt]+1:B.do[0].ao);break;case"del":nt<Q[tt]&&!e?B.do[0].ao==="mvn"&&B.do[0].pxs&&B.do[0].pxs==="s"||(Q[tt]=Q[tt]-B.do[0].len):nt===Q[tt]&&(B.do[0].ao==="mvn"?B.do[0].pxs&&B.do[0].pxs==="s"?(Q=Q.slice(0,Q.length-1),Y.path=Q):0<Q[tt]&&(Q[tt]=Q[tt]-B.do[0].len):B.do[0].ao==="mn"?0<Q[tt]&&(Q[tt]=Q[tt]-1,Y.pos=Y.pos+B.do[0].target):B.do[0].ao==="rn"?0<Q[tt]&&(Q[tt]=Q[tt]-1,Y.pos=0):B.do[0].ao);break;default:B.do[0].type}}}},this.ep=E,this.issp=D,this.ndmn=M,this.dmn=$,this.ndsn=O,this.dsn=N,this.at=function(G){J=G},this.sn=function(G){K=G},this.mn=function(G){P=G},this.mvn=function(G){U=G},this.sen=function(G){V=G}}},{}],548:[function(t,f,r){var n=t("../../../codox-shared/src/com/log").ins,e=t("../../../codox-shared/src/com/util").logClone,s=t("pako"),i=0;f.exports={hso:function(l,o){l.to,i=l.to,(a=l).so.length,(c=s.inflate(a.so,{to:"string"})).length,a.so=c,n(l.so);var a=l.so,c=o,u=(l=c.gqj(),o=c.gcm(),c.cdm),h=c.rsce;n(a),a=JSON.parse(a),l?(l=c.dtf.c2d,a.ops=l(a.ops)):o&&(a=a.cr),u.h2(a),h("smsync")},sof:function(l){return!!(l.context&&l.context.rto!==null&&l.context.rto<i)&&(l.context.rto,l.context.sid,l.cmd?(l.cmd.t==5&&(l.context.CAID=!1),!1):(l.context.rto,l.context.sid,e(l),!0))}}},{"../../../codox-shared/src/com/log":218,"../../../codox-shared/src/com/util":219,pako:705}],549:[function(t,f,r){f.exports={smVer:1,clientVer:"5.0"}},{}],550:[function(t,f,r){var n=t("@babel/runtime/helpers/interopRequireDefault"),e=(Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,n(t("@babel/runtime/helpers/classCallCheck"))),s=(n=n(t("@babel/runtime/helpers/createClass")),t("uuid"));function i(){(0,e.default)(this,i),this.id=(0,s.v4)()}(0,n.default)(i,[{key:"next",get:function(){return this.id=(0,s.v4)(),"codox-block-"+this.id}}]),t=new i,r.default=t},{"@babel/runtime/helpers/classCallCheck":557,"@babel/runtime/helpers/createClass":559,"@babel/runtime/helpers/interopRequireDefault":563,uuid:727}],551:[function(t,f,r){(function(n){(function(){var e=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/defineProperty"));function s(u,h){var p,m=Object.keys(u);return Object.getOwnPropertySymbols&&(p=Object.getOwnPropertySymbols(u),h&&(p=p.filter(function(b){return Object.getOwnPropertyDescriptor(u,b).enumerable})),m.push.apply(m,p)),m}function i(u){for(var h=1;h<arguments.length;h++){var p=arguments[h]!=null?arguments[h]:{};h%2?s(Object(p),!0).forEach(function(m){(0,e.default)(u,m,p[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(m){Object.defineProperty(u,m,Object.getOwnPropertyDescriptor(p,m))})}return u}function l(){return(65536*(1+Math.random())|0).toString(16).substring(1)}t("extend");var o=t("../env").isProd,a=t("util"),c="data:application/json;base64,";f.exports={isArray:function(u){return Object.prototype.toString.call(u)=="[object Array]"},jsonEscape:function(u){return u.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")},getStyle:function(u,h){var p,m,b=(u.ownerDocument||document).defaultView;return b&&b.getComputedStyle?(h=h.replace(/([A-Z])/g,"-$1").toLowerCase(),b.getComputedStyle(u,null).getPropertyValue(h)):u.currentStyle?(h=h.replace(/\-(\w)/g,function(_,v){return v.toUpperCase()}),b=u.currentStyle[h],/^\d+(em|pt|%|ex)?$/i.test(b)?(h=b,p=u.style.left,m=u.runtimeStyle.left,u.runtimeStyle.left=u.currentStyle.left,u.style.left=h||0,h=u.style.pixelLeft+"px",u.style.left=p,u.runtimeStyle.left=m,h):b):void 0},keyBy:function(u,h){return(u||[]).reduce(function(p,m){return i(i({},p),{},(0,e.default)({},h?m[h]:m,m))},{})},splitComment:function(u){var h=document.createElement("div");return h.innerHTML=u,u=function(p){for(var m=[],b=0;b<p.childNodes.length;b++){var _=p.childNodes[b];_.nodeType,_.innerHTML,_.data,_.nodeType===8&&_.data.includes("tinycomment")&&m.push(_)}return m}(h),u.length,u.length?((u=u[0]).remove(),{comment:u,doc:h.innerHTML}):{comment:null,doc:h.innerHTML}},mergeComment:function(u){var h=document.createElement("div");return h.innerHTML=u.doc,u.comment&&h.appendChild(u.comment),h.innerHTML},extractComment:function(u){if(!u||u.nodeType!==8)throw Error("[extractComment] did not receive a valid comment node");var h=(u=u.data).indexOf(c)+29,p=u.substr(0,h);return u=u.substr(h),{header:p,commentJSON:JSON.parse(n.from(u,"base64").toString("utf8"))}},buildComment:function(u){h=JSON.stringify(u.commentJSON);var h=n.from(h,"utf8").toString("base64");return u="".concat(u.header).concat(h),document.createComment(u)},isTinycomment:function(u){var h=document.createElement("div");return h.innerHTML=u,h.childNodes[0].nodeType==8},createDOMComment:function(u){return document.createComment(u)},rand4:l,guid:function(){return l()+l()+"-"+l()+"-"+l()+"-"+l()+"-"+l()+l()+l()},deepCopy:function(u){return JSON.parse(JSON.stringify(u))},shallowCopy:function(u){return Object.assign({},u)},parsePos:function(u){return parseFloat(u,10)||0},extendClass:function(u,h){u.prototype=Object.create(h.prototype),Object.defineProperty(u.prototype,"constructor",{enumerable:!1,value:u,writable:!0}),u.prototype.super=function(){for(var p=arguments.length,m=new Array(p),b=0;b<p;b++)m[b]=arguments[b];h.call.apply(h,[this].concat(m))}},clearTimer:function(u){u!==void 0&&clearTimeout(u)},printOpList:function(u){var h="";if(u.length===0)return"[]";for(var p=0;p<u[0].op.length;p++)h=h+p+": = "+JSON.stringify(u[0].op[p])+`
|
|
197
|
+
`;return h},getTabId:function(){return window.sessionStorage?window.sessionStorage.getItem("_cdxTabId"):null},clone:function(u){try{return JSON.parse(JSON.stringify(u))}catch(h){o||console.error(h)}},ins:function(u){return a.inspect(u,{colors:!0,depth:null})}}}).call(this)}).call(this,t("buffer").Buffer)},{"../env":527,"@babel/runtime/helpers/defineProperty":560,"@babel/runtime/helpers/interopRequireDefault":563,buffer:372,extend:577,util:423}],552:[function(t,f,r){Object.defineProperty(r,"__esModule",{value:!0}),r.selectors=r.normalizeNodes=r.normalizeComment=r.normalizeClasses=r.normalizeAttributes=r.classes=void 0,r.selectors={tinymce:[{selector:"span",attr:"data-mce-annotation-uid"}],froala:[{selector:"img",attr:"src",attrMatch:"blob"}]},r.classes={tinymce:["tox-comment--active"],froala:["fr-selected-cell","fr-cell-fixed"]},r.normalizeComment=function(n){var e=document.createElement("div");e.innerHTML=n;for(var s=0;s<e.childNodes.length;s++){var i=e.childNodes[s];i.nodeType===8&&(e.removeChild(i),s--)}return e.innerHTML},r.normalizeClasses=function(n,e){var s=document.createElement("div");return s.innerHTML=n,e.forEach(function(i){var l=s.getElementsByClassName(i);[].slice.call(l).forEach(function(o){o.outerHTML,o.classList.remove(i),o.classList.length===0&&o.removeAttribute("class"),o.outerHTML})}),s.innerHTML},r.normalizeAttributes=function(n,e){var s=document.createElement("div");return s.innerHTML=n,s.innerHTML,e.forEach(function(i){var l="".concat(i.selector,"[").concat(i.attr,"]");s.querySelectorAll(l).forEach(function(o){(!i.attrMatch||-1<o.getAttribute(i.attr).indexOf(i.attrMatch))&&o.removeAttribute(i.attr)})}),s.innerHTML},r.normalizeNodes=function(n,e){var s=document.createElement("div");return s.innerHTML=n,e.forEach(function(i){var l="".concat(i.selector,"[").concat(i.attr,"]");s.querySelectorAll(l).forEach(function(o){(!i.attrMatch||-1<o.getAttribute(i.attr).indexOf(i.attrMatch))&&o.remove()})}),s.innerHTML}},{}],553:[function(t,f,r){arguments[4][1][0].apply(r,arguments)},{dup:1}],554:[function(t,f,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],555:[function(t,f,r){arguments[4][3][0].apply(r,arguments)},{"./arrayLikeToArray.js":553,dup:3}],556:[function(t,f,r){arguments[4][4][0].apply(r,arguments)},{dup:4}],557:[function(t,f,r){arguments[4][5][0].apply(r,arguments)},{dup:5}],558:[function(t,f,r){arguments[4][6][0].apply(r,arguments)},{"./isNativeReflectConstruct.js":565,"./setPrototypeOf.js":571,dup:6}],559:[function(t,f,r){arguments[4][7][0].apply(r,arguments)},{dup:7}],560:[function(t,f,r){arguments[4][8][0].apply(r,arguments)},{dup:8}],561:[function(t,f,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],562:[function(t,f,r){arguments[4][10][0].apply(r,arguments)},{"./setPrototypeOf.js":571,dup:10}],563:[function(t,f,r){arguments[4][11][0].apply(r,arguments)},{dup:11}],564:[function(t,f,r){arguments[4][12][0].apply(r,arguments)},{dup:12}],565:[function(t,f,r){arguments[4][13][0].apply(r,arguments)},{dup:13}],566:[function(t,f,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],567:[function(t,f,r){arguments[4][15][0].apply(r,arguments)},{dup:15}],568:[function(t,f,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],569:[function(t,f,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],570:[function(t,f,r){arguments[4][18][0].apply(r,arguments)},{"./assertThisInitialized.js":556,"./typeof.js":574,dup:18}],571:[function(t,f,r){arguments[4][19][0].apply(r,arguments)},{dup:19}],572:[function(t,f,r){arguments[4][20][0].apply(r,arguments)},{"./arrayWithHoles.js":554,"./iterableToArrayLimit.js":567,"./nonIterableRest.js":568,"./unsupportedIterableToArray.js":575,dup:20}],573:[function(t,f,r){arguments[4][21][0].apply(r,arguments)},{"./arrayWithoutHoles.js":555,"./iterableToArray.js":566,"./nonIterableSpread.js":569,"./unsupportedIterableToArray.js":575,dup:21}],574:[function(t,f,r){arguments[4][22][0].apply(r,arguments)},{dup:22}],575:[function(t,f,r){arguments[4][23][0].apply(r,arguments)},{"./arrayLikeToArray.js":553,dup:23}],576:[function(t,f,r){arguments[4][24][0].apply(r,arguments)},{"./construct.js":558,"./getPrototypeOf.js":561,"./isNativeFunction.js":564,"./setPrototypeOf.js":571,dup:24}],577:[function(t,f,r){arguments[4][174][0].apply(r,arguments)},{dup:174}],578:[function(t,f,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],579:[function(t,f,r){var n=-1,e=1,s=0;function i(_,v,w,x){if(_===v)return _?[[s,_]]:[];if(w!=null&&(w=function(k,D,N){var O=typeof N=="number"?{index:N,length:0}:N.oldRange,R=(N=typeof N=="number"?null:N.newRange,k.length),A=D.length;if(O.length===0&&(N===null||N.length===0)){var z=O.index,H=k.slice(0,z),$=k.slice(z),M=N?N.index:null,J=z+A-R;if((M===null||M===J)&&!(J<0||A<J)){var K=D.slice(0,J),P=D.slice(J);if(P===$){var U=Math.min(z,J),V=H.slice(0,U);if(V===(q=K.slice(0,U)))return m(V,H.slice(U),K.slice(U),$)}}if((M===null||M===z)&&(J=z,K=D.slice(0,J),P=D.slice(J),K===H)){var G=Math.min(R-J,A-J),F=$.slice($.length-G);if(F===(T=P.slice(P.length-G)))return m(H,$.slice(0,$.length-G),P.slice(0,P.length-G),F)}}if(0<O.length&&N&&N.length===0&&(V=k.slice(0,O.index),F=k.slice(O.index+O.length),!(A<(U=V.length)+(G=F.length)))){var q=D.slice(0,U),T=D.slice(A-G);if(V===q&&F===T)return m(V,k.slice(U,R-G),D.slice(U,A-G),F)}return null}(_,v,w),w))return w;w=o(_,v);var S=_.substring(0,w),E=(w=a(_=_.substring(w),v=v.substring(w)),_.substring(_.length-w));return _=function(k,D){if(!k)return[[e,D]];if(!D)return[[n,k]];var N,O,R=k.length>D.length?k:D,A=k.length>D.length?D:k,z=R.indexOf(A);return z!==-1?(R=[[e,R.substring(0,z)],[s,A],[e,R.substring(z+A.length)]],k.length>D.length&&(R[0][0]=R[2][0]=n),R):A.length===1?[[n,k],[e,D]]:(z=function(H,$){var M=H.length>$.length?H:$,J=H.length>$.length?$:H;if(M.length<4||2*J.length<M.length)return null;function K(q,T,I){for(var L,B,Y,Z,rt=q.substring(I,I+Math.floor(q.length/4)),Q=-1,tt="";(Q=T.indexOf(rt,Q+1))!==-1;){var nt=o(q.substring(I),T.substring(Q)),et=a(q.substring(0,I),T.substring(0,Q));tt.length<et+nt&&(tt=T.substring(Q-et,Q)+T.substring(Q,Q+nt),L=q.substring(0,I-et),B=q.substring(I+nt),Y=T.substring(0,Q-et),Z=T.substring(Q+nt))}return 2*tt.length>=q.length?[L,B,Y,Z,tt]:null}var P,U,V,G,F=K(M,J,Math.ceil(M.length/4));return J=K(M,J,Math.ceil(M.length/2)),F||J?(M=!J||F&&F[4].length>J[4].length?F:J,H.length>$.length?(P=M[0],U=M[1],V=M[2],G=M[3]):(V=M[0],G=M[1],P=M[2],U=M[3]),[P,U,V,G,F=M[4]]):null}(k,D),z?(R=z[0],A=z[1],O=z[2],N=z[3],z=z[4],R=i(R,O),O=i(A,N),R.concat([[s,z]],O)):function(H,$){for(var M=H.length,J=$.length,K=Math.ceil((M+J)/2),P=K,U=2*K,V=new Array(U),G=new Array(U),F=0;F<U;F++)V[F]=-1,G[F]=-1;V[P+1]=0,G[P+1]=0;for(var q=M-J,T=q%2!=0,I=0,L=0,B=0,Y=0,Z=0;Z<K;Z++){for(var rt=-Z+I;rt<=Z-L;rt+=2){for(var Q=P+rt,tt=(gt=rt===-Z||rt!==Z&&V[Q-1]<V[Q+1]?V[Q+1]:V[Q-1]+1)-rt;gt<M&&tt<J&&H.charAt(gt)===$.charAt(tt);)gt++,tt++;if(V[Q]=gt,M<gt)L+=2;else if(J<tt)I+=2;else if(T){var nt;if(0<=(at=P+q-rt)&&at<U&&G[at]!==-1&&(nt=M-G[at])<=gt)return l(H,$,gt,tt)}}for(var et=-Z+B;et<=Z-Y;et+=2){for(var at=P+et,ct=(nt=et===-Z||et!==Z&&G[at-1]<G[at+1]?G[at+1]:G[at-1]+1)-et;nt<M&&ct<J&&H.charAt(M-nt-1)===$.charAt(J-ct-1);)nt++,ct++;if(G[at]=nt,M<nt)Y+=2;else if(J<ct)B+=2;else if(!T&&0<=(Q=P+q-et)&&Q<U&&V[Q]!==-1){var gt=V[Q];if(tt=P+gt-Q,(nt=M-nt)<=gt)return l(H,$,gt,tt)}}}return[[n,H],[e,$]]}(k,D))}(_=_.substring(0,_.length-w),v=v.substring(0,v.length-w)),S&&_.unshift([s,S]),E&&_.push([s,E]),function k(D,N){D.push([s,""]);for(var O=0,R=0,A=0,z="",H="";O<D.length;)if(O<D.length-1&&!D[O][1])D.splice(O,1);else switch(D[O][0]){case e:A++,H+=D[O][1],O++;break;case n:R++,z+=D[O][1],O++;break;case s:var $,M,J=O-A-R-1;if(N&&(0<=J&&p(D[J][1])&&(M=D[J][1].slice(-1),D[J][1]=D[J][1].slice(0,-1),z=M+z,H=M+H,D[J][1]||(D.splice(J,1),O--,D[$=J-1]&&D[$][0]===e&&(A++,H=D[$][1]+H,$--),D[$]&&D[$][0]===n&&(R++,z=D[$][1]+z,$--),J=$)),h(D[O][1])&&(M=D[O][1].charAt(0),D[O][1]=D[O][1].slice(1),z+=M,H+=M)),O<D.length-1&&!D[O][1]){D.splice(O,1);break}(0<z.length||0<H.length)&&(0<z.length&&0<H.length&&(($=o(H,z))!==0&&(0<=J?D[J][1]+=H.substring(0,$):(D.splice(0,0,[s,H.substring(0,$)]),O++),H=H.substring($),z=z.substring($)),($=a(H,z))!==0&&(D[O][1]=H.substring(H.length-$)+D[O][1],H=H.substring(0,H.length-$),z=z.substring(0,z.length-$))),J=A+R,z.length===0&&H.length===0?(D.splice(O-J,J),O-=J):O=z.length===0?(D.splice(O-J,J,[e,H]),O-J+1):H.length===0?(D.splice(O-J,J,[n,z]),O-J+1):(D.splice(O-J,J,[n,z],[e,H]),O-J+2)),O!==0&&D[O-1][0]===s?(D[O-1][1]+=D[O][1],D.splice(O,1)):O++,R=A=0,H=z=""}D[D.length-1][1]===""&&D.pop();var K=!1;for(O=1;O<D.length-1;)D[O-1][0]===s&&D[O+1][0]===s&&(D[O][1].substring(D[O][1].length-D[O-1][1].length)===D[O-1][1]?(D[O][1]=D[O-1][1]+D[O][1].substring(0,D[O][1].length-D[O-1][1].length),D[O+1][1]=D[O-1][1]+D[O+1][1],D.splice(O-1,1),K=!0):D[O][1].substring(0,D[O+1][1].length)==D[O+1][1]&&(D[O-1][1]+=D[O+1][1],D[O][1]=D[O][1].substring(D[O+1][1].length)+D[O+1][1],D.splice(O+1,1),K=!0)),O++;K&&k(D,N)}(_,x),_}function l(_,v,w,x){var S=_.substring(0,w),E=v.substring(0,x);return _=_.substring(w),w=v.substring(x),v=i(S,E),x=i(_,w),v.concat(x)}function o(_,v){if(!_||!v||_.charAt(0)!==v.charAt(0))return 0;for(var w=0,x=Math.min(_.length,v.length),S=x,E=0;w<S;)_.substring(E,S)==v.substring(E,S)?E=w=S:x=S,S=Math.floor((x-w)/2+w);return c(_.charCodeAt(S-1))&&S--,S}function a(_,v){if(!_||!v||_.slice(-1)!==v.slice(-1))return 0;for(var w=0,x=Math.min(_.length,v.length),S=x,E=0;w<S;)_.substring(_.length-S,_.length-E)==v.substring(v.length-S,v.length-E)?E=w=S:x=S,S=Math.floor((x-w)/2+w);return u(_.charCodeAt(_.length-S))&&S--,S}function c(_){return 55296<=_&&_<=56319}function u(_){return 56320<=_&&_<=57343}function h(_){return u(_.charCodeAt(0))}function p(_){return c(_.charCodeAt(_.length-1))}function m(_,v,w,x){if(p(_)||h(x))return null;for(var S=[[s,_],[n,v],[e,w],[s,x]],E=[],k=0;k<S.length;k++)0<S[k][1].length&&E.push(S[k]);return E}function b(_,v,w){return i(_,v,w,!0)}b.INSERT=e,b.DELETE=n,b.EQUAL=s,f.exports=b},{}],580:[function(t,f,r){(function(n){(function(){var e="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",l="[object Boolean]",o="[object Date]",a="[object Function]",c="[object GeneratorFunction]",u="[object Map]",h="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",_="[object Set]",v="[object String]",w="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",k="[object Float32Array]",D="[object Float64Array]",N="[object Int8Array]",O="[object Int16Array]",R="[object Int32Array]",A="[object Uint8Array]",z="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",M=/\w*$/,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,P={},U=(P[i]=P["[object Array]"]=P[S]=P[E]=P[l]=P[o]=P[k]=P[D]=P[N]=P[O]=P[R]=P[u]=P[h]=P[p]=P[b]=P[_]=P[v]=P[w]=P[A]=P[z]=P[H]=P[$]=!0,P["[object Error]"]=P[a]=P[x]=!1,typeof n=="object"&&n&&n.Object===Object&&n),V=typeof self=="object"&&self&&self.Object===Object&&self,G=(U=U||V||Function("return this")(),(G=(V=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f)&&G.exports===V);function F(bt,ft){return bt.set(ft[0],ft[1]),bt}function q(bt,ft){return bt.add(ft),bt}function T(bt,ft,xt,Bt){var ce=-1,Ce=bt?bt.length:0;for(Bt&&Ce&&(xt=bt[++ce]);++ce<Ce;)xt=ft(xt,bt[ce],ce,bt);return xt}function I(bt){var ft=!1;if(bt!=null&&typeof bt.toString!="function")try{ft=!!(bt+"")}catch{}return ft}function L(bt){var ft=-1,xt=Array(bt.size);return bt.forEach(function(Bt,ce){xt[++ft]=[ce,Bt]}),xt}function B(bt,ft){return function(xt){return bt(ft(xt))}}function Y(bt){var ft=-1,xt=Array(bt.size);return bt.forEach(function(Bt){xt[++ft]=Bt}),xt}V=Array.prototype;var Z=Function.prototype,rt=Object.prototype,Q=U["__core-js_shared__"],tt=(Q=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"",nt=Z.toString,et=rt.hasOwnProperty,at=rt.toString,ct=RegExp("^"+nt.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gt=(Q=G?U.Buffer:void 0,Z=U.Symbol,U.Uint8Array),wt=B(Object.getPrototypeOf,Object),St=Object.create,Mt=rt.propertyIsEnumerable,Lt=V.splice,Pt=(G=Object.getOwnPropertySymbols,V=Q?Q.isBuffer:void 0,B(Object.keys,Object)),yt=(Q=ze(U,"DataView"),ze(U,"Map")),jt=ze(U,"Promise"),At=ze(U,"Set"),It=(U=ze(U,"WeakMap"),ze(Object,"create")),Ot=Tt(Q),Et=Tt(yt),Ct=Tt(jt),Nt=Tt(At),ht=Tt(U),dt=(Z=Z?Z.prototype:void 0)?Z.valueOf:void 0;function Ft(bt){var ft=-1,xt=bt?bt.length:0;for(this.clear();++ft<xt;){var Bt=bt[ft];this.set(Bt[0],Bt[1])}}function Jt(bt){var ft=-1,xt=bt?bt.length:0;for(this.clear();++ft<xt;){var Bt=bt[ft];this.set(Bt[0],Bt[1])}}function Xt(bt){var ft=-1,xt=bt?bt.length:0;for(this.clear();++ft<xt;){var Bt=bt[ft];this.set(Bt[0],Bt[1])}}function Qt(bt){this.__data__=new Jt(bt)}function ve(bt,ft){var xt,Bt,ce,Ce,Te=de(bt)||function(be){return function(pt){return pt&&typeof pt=="object"}(be)&&we(be)}(xt=bt)&&et.call(xt,"callee")&&(!Mt.call(xt,"callee")||at.call(xt)==i)?function(be,pt){for(var Dt=-1,$t=Array(be);++Dt<be;)$t[Dt]=pt(Dt);return $t}(bt.length,String):[],Ne=Te.length,Ge=!!Ne;for(Bt in bt)!ft&&!et.call(bt,Bt)||Ge&&(Bt=="length"||(ce=Bt,(Ce=(Ce=Ne)==null?s:Ce)&&(typeof ce=="number"||K.test(ce))&&-1<ce&&ce%1==0&&ce<Ce))||Te.push(Bt);return Te}function kt(bt,ft,xt){var Bt=bt[ft];et.call(bt,ft)&&ae(Bt,xt)&&(xt!==void 0||ft in bt)||(bt[ft]=xt)}function ee(bt,ft){for(var xt=bt.length;xt--;)if(ae(bt[xt][0],ft))return xt;return-1}function pe(bt,ft,xt,Bt,ce,Ce,Te){var Ne;if((Ne=Bt?Ce?Bt(bt,ce,Ce,Te):Bt(bt):Ne)!==void 0)return Ne;if(!Ut(bt))return bt;if(ce=de(bt)){if(Ne=function(Yt){var me=Yt.length,Ee=Yt.constructor(me);return me&&typeof Yt[0]=="string"&&et.call(Yt,"index")&&(Ee.index=Yt.index,Ee.input=Yt.input),Ee}(bt),!ft){var Ge=bt,be=Ne,pt=-1,Dt=Ge.length;for(be=be||Array(Dt);++pt<Dt;)be[pt]=Ge[pt];return be}}else{var $t,qt,Wt=He(bt),oe=Wt==a||Wt==c;if(Oe(bt))return $t=bt,(qt=ft)?$t.slice():(qt=new $t.constructor($t.length),$t.copy(qt),qt);if(Wt==p||Wt==i||oe&&!Ce){if(I(bt))return Ce?bt:{};if(Ne=typeof($t=oe?{}:bt).constructor!="function"||hn($t)?{}:function(Yt){return Ut(Yt)?St(Yt):{}}(wt($t)),!ft)return oe=qt=bt,oe=(lt=Ne)&&Fe(oe,se(oe),lt),Fe(qt,Ie(qt),oe)}else{if(!P[Wt])return Ce?bt:{};Ne=function(Yt,me,Ee,Ue){var Ae=Yt.constructor;switch(me){case S:return Le(Yt);case l:case o:return new Ae(+Yt);case E:return function(We,nn){return nn=nn?Le(We.buffer):We.buffer,new We.constructor(nn,We.byteOffset,We.byteLength)}(Yt,Ue);case k:case D:case N:case O:case R:case A:case z:case H:case $:return function(We,nn){return nn=nn?Le(We.buffer):We.buffer,new We.constructor(nn,We.byteOffset,We.length)}(Yt,Ue);case u:return function(We,nn,cn){return T(nn?cn(L(We),!0):L(We),F,new We.constructor)}(Yt,Ue,Ee);case h:case v:return new Ae(Yt);case b:return function(We){var nn=new We.constructor(We.source,M.exec(We));return nn.lastIndex=We.lastIndex,nn}(Yt);case _:return function(We,nn,cn){return T(nn?cn(Y(We),!0):Y(We),q,new We.constructor)}(Yt,Ue,Ee);case w:return function(We){return dt?Object(dt.call(We)):{}}(Yt)}}(bt,Wt,pe,ft)}}var X,lt=(Te=Te||new Qt).get(bt);if(lt)return lt;Te.set(bt,Ne);for(var vt=(X=ce?X:xt?function(Yt,me,Ee){return me=me(Yt),de(Yt)?me:function(Ue,Ae){for(var We=-1,nn=Ae.length,cn=Ue.length;++We<nn;)Ue[cn+We]=Ae[We];return Ue}(me,Ee(Yt))}(bt,se,Ie):se(bt))||bt,Vt=function(Yt,me){X&&(Yt=bt[me=Yt]),kt(Ne,me,pe(Yt,ft,xt,Bt,me,bt,Te))},te=-1,Zt=vt?vt.length:0;++te<Zt&&Vt(vt[te],te)!==!1;);return Ne}function Le(bt){var ft=new bt.constructor(bt.byteLength);return new gt(ft).set(new gt(bt)),ft}function Fe(bt,ft,xt,Bt){xt=xt||{};for(var ce=-1,Ce=ft.length;++ce<Ce;){var Te=ft[ce],Ne=Bt?Bt(xt[Te],bt[Te],Te,xt,bt):void 0;kt(xt,Te,Ne===void 0?bt[Te]:Ne)}return xt}function qe(bt,ft){var xt,Bt;return bt=bt.__data__,((Bt=typeof(xt=ft))=="string"||Bt=="number"||Bt=="symbol"||Bt=="boolean"?xt!=="__proto__":xt===null)?bt[typeof ft=="string"?"string":"hash"]:bt.map}function ze(bt,ft){return function(xt){if(Ut(xt)&&(!tt||!(tt in xt)))return(Rt(xt)||I(xt)?ct:J).test(Tt(xt))}(bt=bt==null?void 0:bt[ft])?bt:void 0}Ft.prototype.clear=function(){this.__data__=It?It(null):{}},Ft.prototype.delete=function(bt){return this.has(bt)&&delete this.__data__[bt]},Ft.prototype.get=function(bt){var ft,xt=this.__data__;return It?(ft=xt[bt])===e?void 0:ft:et.call(xt,bt)?xt[bt]:void 0},Ft.prototype.has=function(bt){var ft=this.__data__;return It?ft[bt]!==void 0:et.call(ft,bt)},Ft.prototype.set=function(bt,ft){return this.__data__[bt]=It&&ft===void 0?e:ft,this},Jt.prototype.clear=function(){this.__data__=[]},Jt.prototype.delete=function(bt){var ft=this.__data__;return!((bt=ee(ft,bt))<0||(bt==ft.length-1?ft.pop():Lt.call(ft,bt,1),0))},Jt.prototype.get=function(bt){var ft=this.__data__;return(bt=ee(ft,bt))<0?void 0:ft[bt][1]},Jt.prototype.has=function(bt){return-1<ee(this.__data__,bt)},Jt.prototype.set=function(bt,ft){var xt=this.__data__,Bt=ee(xt,bt);return Bt<0?xt.push([bt,ft]):xt[Bt][1]=ft,this},Xt.prototype.clear=function(){this.__data__={hash:new Ft,map:new(yt||Jt),string:new Ft}},Xt.prototype.delete=function(bt){return qe(this,bt).delete(bt)},Xt.prototype.get=function(bt){return qe(this,bt).get(bt)},Xt.prototype.has=function(bt){return qe(this,bt).has(bt)},Xt.prototype.set=function(bt,ft){return qe(this,bt).set(bt,ft),this},Qt.prototype.clear=function(){this.__data__=new Jt},Qt.prototype.delete=function(bt){return this.__data__.delete(bt)},Qt.prototype.get=function(bt){return this.__data__.get(bt)},Qt.prototype.has=function(bt){return this.__data__.has(bt)},Qt.prototype.set=function(bt,ft){var xt=this.__data__;if(xt instanceof Jt){var Bt=xt.__data__;if(!yt||Bt.length<199)return Bt.push([bt,ft]),this;xt=this.__data__=new Xt(Bt)}return xt.set(bt,ft),this};var Ie=G?B(G,Object):function(){return[]},He=function(bt){return at.call(bt)};function hn(bt){var ft=bt&&bt.constructor;return bt===(typeof ft=="function"&&ft.prototype||rt)}function Tt(bt){if(bt!=null){try{return nt.call(bt)}catch{}try{return bt+""}catch{}}return""}function ae(bt,ft){return bt===ft||bt!=bt&&ft!=ft}(Q&&He(new Q(new ArrayBuffer(1)))!=E||yt&&He(new yt)!=u||jt&&He(jt.resolve())!=m||At&&He(new At)!=_||U&&He(new U)!=x)&&(He=function(bt){var ft=at.call(bt);if(bt=(bt=ft==p?bt.constructor:void 0)?Tt(bt):void 0)switch(bt){case Ot:return E;case Et:return u;case Ct:return m;case Nt:return _;case ht:return x}return ft});var de=Array.isArray;function we(bt){return bt!=null&&typeof(ft=bt.length)=="number"&&-1<ft&&ft%1==0&&ft<=s&&!Rt(bt);var ft}var Oe=V||function(){return!1};function Rt(bt){return(bt=Ut(bt)?at.call(bt):"")==a||bt==c}function Ut(bt){var ft=typeof bt;return bt&&(ft=="object"||ft=="function")}function se(bt){return(we(bt)?ve:function(ft){if(!hn(ft))return Pt(ft);var xt,Bt=[];for(xt in Object(ft))et.call(ft,xt)&&xt!="constructor"&&Bt.push(xt);return Bt})(bt)}f.exports=function(bt){return pe(bt,!0,!0)}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],581:[function(t,f,r){(function(n){(function(){var e="__lodash_hash_undefined__",s=1,i=2,l=9007199254740991,o="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",p="[object Error]",m="[object Function]",b="[object GeneratorFunction]",_="[object Map]",v="[object Number]",w="[object Null]",x="[object Object]",S="[object Promise]",E="[object Proxy]",k="[object RegExp]",D="[object Set]",N="[object String]",O="[object Undefined]",R="[object WeakMap]",A="[object ArrayBuffer]",z="[object DataView]",H=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,M={},J=(M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[o]=M[a]=M[A]=M[u]=M[z]=M[h]=M[p]=M[m]=M[_]=M[v]=M[x]=M[k]=M[D]=M[N]=M[R]=!1,typeof n=="object"&&n&&n.Object===Object&&n),K=typeof self=="object"&&self&&self.Object===Object&&self,P=(K=J||K||Function("return this")(),(gt=(gt=(q=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f)&>.exports===q)&&J.process);function U(ft){var xt=-1,Bt=Array(ft.size);return ft.forEach(function(ce,Ce){Bt[++xt]=[Ce,ce]}),Bt}function V(ft){var xt=-1,Bt=Array(ft.size);return ft.forEach(function(ce){Bt[++xt]=ce}),Bt}J=(q=function(){try{return P&&P.binding&&P.binding("util")}catch{}}())&&q.isTypedArray;var G,F,q=Array.prototype,T=Function.prototype,I=Object.prototype,L=K["__core-js_shared__"],B=T.toString,Y=I.hasOwnProperty,Z=(T=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",rt=I.toString,Q=RegExp("^"+B.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tt=(L=gt?K.Buffer:void 0,T=K.Symbol,K.Uint8Array),nt=I.propertyIsEnumerable,et=q.splice,at=T?T.toStringTag:void 0,ct=Object.getOwnPropertySymbols,gt=L?L.isBuffer:void 0,wt=(G=Object.keys,F=Object,function(ft){return G(F(ft))}),St=(q=Fe(K,"DataView"),Fe(K,"Map")),Mt=(L=Fe(K,"Promise"),Fe(K,"Set")),Lt=(K=Fe(K,"WeakMap"),Fe(Object,"create")),Pt=Ie(q),yt=Ie(St),jt=Ie(L),At=Ie(Mt),It=Ie(K),Ot=(T=T?T.prototype:void 0)?T.valueOf:void 0;function Et(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.clear();++xt<Bt;){var ce=ft[xt];this.set(ce[0],ce[1])}}function Ct(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.clear();++xt<Bt;){var ce=ft[xt];this.set(ce[0],ce[1])}}function Nt(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.clear();++xt<Bt;){var ce=ft[xt];this.set(ce[0],ce[1])}}function ht(ft){var xt=-1,Bt=ft==null?0:ft.length;for(this.__data__=new Nt;++xt<Bt;)this.add(ft[xt])}function dt(ft){ft=this.__data__=new Ct(ft),this.size=ft.size}function Ft(ft,xt){var Bt,ce,Ce,Te=Tt(ft),Ne=!Te&&hn(ft),Ge=!Te&&!Ne&&ae(ft),be=!Te&&!Ne&&!Ge&&se(ft),pt=Te||Ne||Ge||be,Dt=pt?function(qt,Wt){for(var oe=-1,X=Array(qt);++oe<qt;)X[oe]=Wt(oe);return X}(ft.length,String):[],$t=Dt.length;for(Bt in ft)!xt&&!Y.call(ft,Bt)||pt&&(Bt=="length"||Ge&&(Bt=="offset"||Bt=="parent")||be&&(Bt=="buffer"||Bt=="byteLength"||Bt=="byteOffset")||(ce=Bt,(Ce=(Ce=$t)==null?l:Ce)&&(typeof ce=="number"||$.test(ce))&&-1<ce&&ce%1==0&&ce<Ce))||Dt.push(Bt);return Dt}function Jt(ft,xt){for(var Bt=ft.length;Bt--;)if(He(ft[Bt][0],xt))return Bt;return-1}function Xt(ft){if(ft==null)return ft===void 0?O:w;if(at&&at in Object(ft)){var xt=ft,Bt=Y.call(xt,at),ce=xt[at];try{var Ce=!(xt[at]=void 0)}catch{}var Te=rt.call(xt);return Ce&&(Bt?xt[at]=ce:delete xt[at]),Te}return rt.call(ft)}function Qt(ft){return Rt(ft)&&Xt(ft)==o}function ve(ft,xt,Bt,ce,Ce){if(ft===xt)return!0;if(ft==null||xt==null||!Rt(ft)&&!Rt(xt))return ft!=ft&&xt!=xt;var Te=ve,Ne=Tt(ft),Ge=Tt(xt),be=Ne?a:ze(ft),pt=(Ge=Ge?a:ze(xt),(be=be==o?x:be)==x),Dt=(Ge=Ge==o?x:Ge)==x;if((Ge=be==Ge)&&ae(ft)){if(!ae(xt))return!1;pt=!(Ne=!0)}if(Ge&&!pt){if(Ce=Ce||new dt,Ne||se(ft))return ee(ft,xt,Bt,ce,Te,Ce);var $t=ft,qt=xt,Wt=Bt,oe=ce,X=Te,lt=Ce;switch(be){case z:if($t.byteLength!=qt.byteLength||$t.byteOffset!=qt.byteOffset)return!1;$t=$t.buffer,qt=qt.buffer;case A:return!($t.byteLength!=qt.byteLength||!X(new tt($t),new tt(qt)));case u:case h:case v:return He(+$t,+qt);case p:return $t.name==qt.name&&$t.message==qt.message;case k:case N:return $t==qt+"";case _:var vt=U;case D:var Vt=Wt&s;return vt=vt||V,!($t.size!=qt.size&&!Vt)&&((Vt=lt.get($t))?Vt==qt:(Wt|=i,lt.set($t,qt),Vt=ee(vt($t),vt(qt),Wt,oe,X,lt),lt.delete($t),Vt));case"[object Symbol]":if(Ot)return Ot.call($t)==Ot.call(qt)}return!1}if(!(Bt&s)&&(Ne=pt&&Y.call(ft,"__wrapped__"),be=Dt&&Y.call(xt,"__wrapped__"),Ne||be))return Te(pt=Ne?ft.value():ft,Dt=be?xt.value():xt,Bt,ce,Ce=Ce||new dt);if(Ge){var te=ft,Zt=xt,Yt=Bt,me=ce,Ee=Te,Ue=Ce=Ce||new dt,Ae=Yt&s,We=pe(te),nn=We.length;if(nn!=(Ne=pe(Zt).length)&&!Ae)return!1;for(var cn=nn;cn--;){var An=We[cn];if(!(Ae?An in Zt:Y.call(Zt,An)))return!1}if((Ne=Ue.get(te))&&Ue.get(Zt))return Ne==Zt;for(var un=!0,bn=(Ue.set(te,Zt),Ue.set(Zt,te),Ae);++cn<nn;){var Nn,Ln=te[An=We[cn]],er=Zt[An];if(!((Nn=me?Ae?me(er,Ln,An,Zt,te,Ue):me(Ln,er,An,te,Zt,Ue):Nn)===void 0?Ln===er||Ee(Ln,er,Yt,me,Ue):Nn)){un=!1;break}bn=bn||An=="constructor"}return un&&!bn&&(Ne=te.constructor)!=(be=Zt.constructor)&&"constructor"in te&&"constructor"in Zt&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof be=="function"&&be instanceof be)&&(un=!1),Ue.delete(te),Ue.delete(Zt),un}return!1}function kt(ft){if(Bt=typeof(Bt=(xt=ft)&&xt.constructor)=="function"&&Bt.prototype||I,xt!==Bt)return wt(ft);var xt,Bt,ce,Ce=[];for(ce in Object(ft))Y.call(ft,ce)&&ce!="constructor"&&Ce.push(ce);return Ce}function ee(ft,xt,Bt,ce,Ce,Te){var Ne=Bt&s,Ge=ft.length,be=xt.length;if(Ge!=be&&!(Ne&&Ge<be))return!1;if((be=Te.get(ft))&&Te.get(xt))return be==xt;var pt=-1,Dt=!0,$t=Bt&i?new ht:void 0;for(Te.set(ft,xt),Te.set(xt,ft);++pt<Ge;){var qt,Wt=ft[pt],oe=xt[pt];if((qt=ce?Ne?ce(oe,Wt,pt,xt,ft,Te):ce(Wt,oe,pt,ft,xt,Te):qt)!==void 0){if(qt)continue;Dt=!1;break}if($t){if(!function(X,lt){for(var vt=-1,Vt=X==null?0:X.length;++vt<Vt;)if(lt(X[vt],vt))return 1}(xt,function(X,lt){return!$t.has(lt)&&(Wt===X||Ce(Wt,X,Bt,ce,Te))&&$t.push(lt)})){Dt=!1;break}}else if(Wt!==oe&&!Ce(Wt,oe,Bt,ce,Te)){Dt=!1;break}}return Te.delete(ft),Te.delete(xt),Dt}function pe(ft){var xt=bt,Bt=qe;if(xt=xt(ft),Tt(ft))return xt;for(var ce=xt,Ce=Bt(ft),Te=-1,Ne=Ce.length,Ge=ce.length;++Te<Ne;)ce[Ge+Te]=Ce[Te];return ce}function Le(ft,xt){var Bt,ce;return ft=ft.__data__,((ce=typeof(Bt=xt))=="string"||ce=="number"||ce=="symbol"||ce=="boolean"?Bt!=="__proto__":Bt===null)?ft[typeof xt=="string"?"string":"hash"]:ft.map}function Fe(ft,xt){return function(Bt){if(Oe(Bt)&&(!Z||!(Z in Bt)))return(de(Bt)?Q:H).test(Ie(Bt))}(ft=ft==null?void 0:ft[xt])?ft:void 0}Et.prototype.clear=function(){this.__data__=Lt?Lt(null):{},this.size=0},Et.prototype.delete=function(ft){return ft=this.has(ft)&&delete this.__data__[ft],this.size-=ft?1:0,ft},Et.prototype.get=function(ft){var xt,Bt=this.__data__;return Lt?(xt=Bt[ft])===e?void 0:xt:Y.call(Bt,ft)?Bt[ft]:void 0},Et.prototype.has=function(ft){var xt=this.__data__;return Lt?xt[ft]!==void 0:Y.call(xt,ft)},Et.prototype.set=function(ft,xt){var Bt=this.__data__;return this.size+=this.has(ft)?0:1,Bt[ft]=Lt&&xt===void 0?e:xt,this},Ct.prototype.clear=function(){this.__data__=[],this.size=0},Ct.prototype.delete=function(ft){var xt=this.__data__;return!((ft=Jt(xt,ft))<0||(ft==xt.length-1?xt.pop():et.call(xt,ft,1),--this.size,0))},Ct.prototype.get=function(ft){var xt=this.__data__;return(ft=Jt(xt,ft))<0?void 0:xt[ft][1]},Ct.prototype.has=function(ft){return-1<Jt(this.__data__,ft)},Ct.prototype.set=function(ft,xt){var Bt=this.__data__,ce=Jt(Bt,ft);return ce<0?(++this.size,Bt.push([ft,xt])):Bt[ce][1]=xt,this},Nt.prototype.clear=function(){this.size=0,this.__data__={hash:new Et,map:new(St||Ct),string:new Et}},Nt.prototype.delete=function(ft){return ft=Le(this,ft).delete(ft),this.size-=ft?1:0,ft},Nt.prototype.get=function(ft){return Le(this,ft).get(ft)},Nt.prototype.has=function(ft){return Le(this,ft).has(ft)},Nt.prototype.set=function(ft,xt){var Bt=Le(this,ft),ce=Bt.size;return Bt.set(ft,xt),this.size+=Bt.size==ce?0:1,this},ht.prototype.add=ht.prototype.push=function(ft){return this.__data__.set(ft,e),this},ht.prototype.has=function(ft){return this.__data__.has(ft)},dt.prototype.clear=function(){this.__data__=new Ct,this.size=0},dt.prototype.delete=function(ft){var xt=this.__data__;return ft=xt.delete(ft),this.size=xt.size,ft},dt.prototype.get=function(ft){return this.__data__.get(ft)},dt.prototype.has=function(ft){return this.__data__.has(ft)},dt.prototype.set=function(ft,xt){var Bt=this.__data__;if(Bt instanceof Ct){var ce=Bt.__data__;if(!St||ce.length<199)return ce.push([ft,xt]),this.size=++Bt.size,this;Bt=this.__data__=new Nt(ce)}return Bt.set(ft,xt),this.size=Bt.size,this};var qe=ct?function(ft){if(ft==null)return[];ft=Object(ft);for(var xt=ct(ft),Bt=function(be){return nt.call(ft,be)},ce=-1,Ce=xt==null?0:xt.length,Te=0,Ne=[];++ce<Ce;){var Ge=xt[ce];Bt(Ge)&&(Ne[Te++]=Ge)}return Ne}:function(){return[]},ze=Xt;function Ie(ft){if(ft!=null){try{return B.call(ft)}catch{}try{return ft+""}catch{}}return""}function He(ft,xt){return ft===xt||ft!=ft&&xt!=xt}(q&&ze(new q(new ArrayBuffer(1)))!=z||St&&ze(new St)!=_||L&&ze(L.resolve())!=S||Mt&&ze(new Mt)!=D||K&&ze(new K)!=R)&&(ze=function(ft){var xt=Xt(ft);if(ft=(ft=xt==x?ft.constructor:void 0)?Ie(ft):"")switch(ft){case Pt:return z;case yt:return _;case jt:return S;case At:return D;case It:return R}return xt});var hn=Qt(function(){return arguments}())?Qt:function(ft){return Rt(ft)&&Y.call(ft,"callee")&&!nt.call(ft,"callee")},Tt=Array.isArray,ae=gt||function(){return!1};function de(ft){if(Oe(ft))return(ft=Xt(ft))==m||ft==b||ft==c||ft==E}function we(ft){return typeof ft=="number"&&-1<ft&&ft%1==0&&ft<=l}function Oe(ft){var xt=typeof ft;return ft!=null&&(xt=="object"||xt=="function")}function Rt(ft){return ft!=null&&typeof ft=="object"}var Ut,se=J?(Ut=J,function(ft){return Ut(ft)}):function(ft){return Rt(ft)&&we(ft.length)&&!!M[Xt(ft)]};function bt(ft){return((xt=ft)!=null&&we(xt.length)&&!de(xt)?Ft:kt)(ft);var xt}f.exports=function(ft,xt){return ve(ft,xt)}}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],582:[function(t,f,r){t=t("./_getNative")(t("./_root"),"DataView"),f.exports=t},{"./_getNative":637,"./_root":672}],583:[function(t,f,r){var n=t("./_hashClear"),e=t("./_hashDelete"),s=t("./_hashGet"),i=t("./_hashHas");function l(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var u=o[a];this.set(u[0],u[1])}}t=t("./_hashSet"),l.prototype.clear=n,l.prototype.delete=e,l.prototype.get=s,l.prototype.has=i,l.prototype.set=t,f.exports=l},{"./_hashClear":643,"./_hashDelete":644,"./_hashGet":645,"./_hashHas":646,"./_hashSet":647}],584:[function(t,f,r){var n=t("./_listCacheClear"),e=t("./_listCacheDelete"),s=t("./_listCacheGet"),i=t("./_listCacheHas");function l(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var u=o[a];this.set(u[0],u[1])}}t=t("./_listCacheSet"),l.prototype.clear=n,l.prototype.delete=e,l.prototype.get=s,l.prototype.has=i,l.prototype.set=t,f.exports=l},{"./_listCacheClear":654,"./_listCacheDelete":655,"./_listCacheGet":656,"./_listCacheHas":657,"./_listCacheSet":658}],585:[function(t,f,r){t=t("./_getNative")(t("./_root"),"Map"),f.exports=t},{"./_getNative":637,"./_root":672}],586:[function(t,f,r){var n=t("./_mapCacheClear"),e=t("./_mapCacheDelete"),s=t("./_mapCacheGet"),i=t("./_mapCacheHas");function l(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var u=o[a];this.set(u[0],u[1])}}t=t("./_mapCacheSet"),l.prototype.clear=n,l.prototype.delete=e,l.prototype.get=s,l.prototype.has=i,l.prototype.set=t,f.exports=l},{"./_mapCacheClear":659,"./_mapCacheDelete":660,"./_mapCacheGet":661,"./_mapCacheHas":662,"./_mapCacheSet":663}],587:[function(t,f,r){t=t("./_getNative")(t("./_root"),"Promise"),f.exports=t},{"./_getNative":637,"./_root":672}],588:[function(t,f,r){t=t("./_getNative")(t("./_root"),"Set"),f.exports=t},{"./_getNative":637,"./_root":672}],589:[function(t,f,r){var n=t("./_MapCache"),e=t("./_setCacheAdd");function s(i){var l=-1,o=i==null?0:i.length;for(this.__data__=new n;++l<o;)this.add(i[l])}t=t("./_setCacheHas"),s.prototype.add=s.prototype.push=e,s.prototype.has=t,f.exports=s},{"./_MapCache":586,"./_setCacheAdd":673,"./_setCacheHas":674}],590:[function(t,f,r){var n=t("./_ListCache"),e=t("./_stackClear"),s=t("./_stackDelete"),i=t("./_stackGet"),l=t("./_stackHas");function o(a){a=this.__data__=new n(a),this.size=a.size}t=t("./_stackSet"),o.prototype.clear=e,o.prototype.delete=s,o.prototype.get=i,o.prototype.has=l,o.prototype.set=t,f.exports=o},{"./_ListCache":584,"./_stackClear":676,"./_stackDelete":677,"./_stackGet":678,"./_stackHas":679,"./_stackSet":680}],591:[function(t,f,r){t=t("./_root").Symbol,f.exports=t},{"./_root":672}],592:[function(t,f,r){t=t("./_root").Uint8Array,f.exports=t},{"./_root":672}],593:[function(t,f,r){t=t("./_getNative")(t("./_root"),"WeakMap"),f.exports=t},{"./_getNative":637,"./_root":672}],594:[function(t,f,r){f.exports=function(n,e,s,i){for(var l=-1,o=n==null?0:n.length;++l<o;){var a=n[l];e(i,a,s(a),n)}return i}},{}],595:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=n==null?0:n.length,l=0,o=[];++s<i;){var a=n[s];e(a,s,n)&&(o[l++]=a)}return o}},{}],596:[function(t,f,r){var n=t("./_baseTimes"),e=t("./isArguments"),s=t("./isArray"),i=t("./isBuffer"),l=t("./_isIndex"),o=t("./isTypedArray"),a=Object.prototype.hasOwnProperty;f.exports=function(c,u){var h,p=s(c),m=!p&&e(c),b=!p&&!m&&i(c),_=!p&&!m&&!b&&o(c),v=p||m||b||_,w=v?n(c.length,String):[],x=w.length;for(h in c)!u&&!a.call(c,h)||v&&(h=="length"||b&&(h=="offset"||h=="parent")||_&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||l(h,x))||w.push(h);return w}},{"./_baseTimes":621,"./_isIndex":648,"./isArguments":688,"./isArray":689,"./isBuffer":691,"./isTypedArray":697}],597:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=n==null?0:n.length,l=Array(i);++s<i;)l[s]=e(n[s],s,n);return l}},{}],598:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=e.length,l=n.length;++s<i;)n[l+s]=e[s];return n}},{}],599:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=n==null?0:n.length;++s<i;)if(e(n[s],s,n))return!0;return!1}},{}],600:[function(t,f,r){var n=t("./eq");f.exports=function(e,s){for(var i=e.length;i--;)if(n(e[i][0],s))return i;return-1}},{"./eq":684}],601:[function(t,f,r){var n=t("./_baseEach");f.exports=function(e,s,i,l){return n(e,function(o,a,c){s(l,o,i(o),c)}),l}},{"./_baseEach":602}],602:[function(t,f,r){var n=t("./_baseForOwn");t=t("./_createBaseEach")(n),f.exports=t},{"./_baseForOwn":604,"./_createBaseEach":628}],603:[function(t,f,r){t=t("./_createBaseFor")(),f.exports=t},{"./_createBaseFor":629}],604:[function(t,f,r){var n=t("./_baseFor"),e=t("./keys");f.exports=function(s,i){return s&&n(s,i,e)}},{"./_baseFor":603,"./keys":698}],605:[function(t,f,r){var n=t("./_castPath"),e=t("./_toKey");f.exports=function(s,i){for(var l=0,o=(i=n(i,s)).length;s!=null&&l<o;)s=s[e(i[l++])];return l&&l==o?s:void 0}},{"./_castPath":625,"./_toKey":682}],606:[function(t,f,r){var n=t("./_arrayPush"),e=t("./isArray");f.exports=function(s,i,l){return i=i(s),e(s)?i:n(i,l(s))}},{"./_arrayPush":598,"./isArray":689}],607:[function(t,f,r){var n=t("./_Symbol"),e=t("./_getRawTag"),s=t("./_objectToString"),i=n?n.toStringTag:void 0;f.exports=function(l){return l==null?l===void 0?"[object Undefined]":"[object Null]":(i&&i in Object(l)?e:s)(l)}},{"./_Symbol":591,"./_getRawTag":638,"./_objectToString":670}],608:[function(t,f,r){f.exports=function(n,e){return n!=null&&e in Object(n)}},{}],609:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isObjectLike");f.exports=function(s){return e(s)&&n(s)=="[object Arguments]"}},{"./_baseGetTag":607,"./isObjectLike":695}],610:[function(t,f,r){var n=t("./_baseIsEqualDeep"),e=t("./isObjectLike");f.exports=function s(i,l,o,a,c){return i===l||(i==null||l==null||!e(i)&&!e(l)?i!=i&&l!=l:n(i,l,o,a,s,c))}},{"./_baseIsEqualDeep":611,"./isObjectLike":695}],611:[function(t,f,r){var n=t("./_Stack"),e=t("./_equalArrays"),s=t("./_equalByTag"),i=t("./_equalObjects"),l=t("./_getTag"),o=t("./isArray"),a=t("./isBuffer"),c=t("./isTypedArray"),u="[object Arguments]",h="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;f.exports=function(b,_,v,w,x,S){var E=o(b),k=o(_),D=E?h:l(b),N=(k=k?h:l(_),(D=D==u?p:D)==p),O=(k=k==u?p:k)==p;if((k=D==k)&&a(b)){if(!a(_))return!1;N=!(E=!0)}return k&&!N?(S=S||new n,E||c(b)?e(b,_,v,w,x,S):s(b,_,D,v,w,x,S)):1&v||(E=N&&m.call(b,"__wrapped__"),D=O&&m.call(_,"__wrapped__"),!E&&!D)?!!k&&(S=S||new n,i(b,_,v,w,x,S)):x(E?b.value():b,D?_.value():_,v,w,S=S||new n)}},{"./_Stack":590,"./_equalArrays":630,"./_equalByTag":631,"./_equalObjects":632,"./_getTag":640,"./isArray":689,"./isBuffer":691,"./isTypedArray":697}],612:[function(t,f,r){var n=t("./_Stack"),e=t("./_baseIsEqual");f.exports=function(s,i,l,o){var a=l.length,c=a,u=!o;if(s==null)return!c;for(s=Object(s);a--;){var h=l[a];if(u&&h[2]?h[1]!==s[h[0]]:!(h[0]in s))return!1}for(;++a<c;){var p=(h=l[a])[0],m=s[p],b=h[1];if(u&&h[2]){if(m===void 0&&!(p in s))return!1}else{var _,v=new n;if(!((_=o?o(m,b,p,s,i,v):_)===void 0?e(b,m,3,o,v):_))return!1}}return!0}},{"./_Stack":590,"./_baseIsEqual":610}],613:[function(t,f,r){var n=t("./isFunction"),e=t("./_isMasked"),s=t("./isObject"),i=t("./_toSource"),l=/^\[object .+?Constructor\]$/,o=(t=Function.prototype,Object.prototype),a=(t=t.toString,o=o.hasOwnProperty,RegExp("^"+t.call(o).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"));f.exports=function(c){return!(!s(c)||e(c))&&(n(c)?a:l).test(i(c))}},{"./_isMasked":651,"./_toSource":683,"./isFunction":692,"./isObject":694}],614:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isLength"),s=t("./isObjectLike"),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,f.exports=function(l){return s(l)&&e(l.length)&&!!i[n(l)]}},{"./_baseGetTag":607,"./isLength":693,"./isObjectLike":695}],615:[function(t,f,r){var n=t("./_baseMatches"),e=t("./_baseMatchesProperty"),s=t("./identity"),i=t("./isArray"),l=t("./property");f.exports=function(o){return typeof o=="function"?o:o==null?s:typeof o=="object"?i(o)?e(o[0],o[1]):n(o):l(o)}},{"./_baseMatches":617,"./_baseMatchesProperty":618,"./identity":687,"./isArray":689,"./property":701}],616:[function(t,f,r){var n=t("./_isPrototype"),e=t("./_nativeKeys"),s=Object.prototype.hasOwnProperty;f.exports=function(i){if(!n(i))return e(i);var l,o=[];for(l in Object(i))s.call(i,l)&&l!="constructor"&&o.push(l);return o}},{"./_isPrototype":652,"./_nativeKeys":668}],617:[function(t,f,r){var n=t("./_baseIsMatch"),e=t("./_getMatchData"),s=t("./_matchesStrictComparable");f.exports=function(i){var l=e(i);return l.length==1&&l[0][2]?s(l[0][0],l[0][1]):function(o){return o===i||n(o,i,l)}}},{"./_baseIsMatch":612,"./_getMatchData":636,"./_matchesStrictComparable":665}],618:[function(t,f,r){var n=t("./_baseIsEqual"),e=t("./get"),s=t("./hasIn"),i=t("./_isKey"),l=t("./_isStrictComparable"),o=t("./_matchesStrictComparable"),a=t("./_toKey");f.exports=function(c,u){return i(c)&&l(u)?o(a(c),u):function(h){var p=e(h,c);return p===void 0&&p===u?s(h,c):n(u,p,3)}}},{"./_baseIsEqual":610,"./_isKey":649,"./_isStrictComparable":653,"./_matchesStrictComparable":665,"./_toKey":682,"./get":685,"./hasIn":686}],619:[function(t,f,r){f.exports=function(n){return function(e){return e==null?void 0:e[n]}}},{}],620:[function(t,f,r){var n=t("./_baseGet");f.exports=function(e){return function(s){return n(s,e)}}},{"./_baseGet":605}],621:[function(t,f,r){f.exports=function(n,e){for(var s=-1,i=Array(n);++s<n;)i[s]=e(s);return i}},{}],622:[function(t,f,r){var n=t("./_Symbol"),e=t("./_arrayMap"),s=t("./isArray"),i=t("./isSymbol"),l=(t=n?n.prototype:void 0)?t.toString:void 0;f.exports=function o(a){if(typeof a=="string")return a;if(s(a))return e(a,o)+"";if(i(a))return l?l.call(a):"";var c=a+"";return c=="0"&&1/a==-1/0?"-0":c}},{"./_Symbol":591,"./_arrayMap":597,"./isArray":689,"./isSymbol":696}],623:[function(t,f,r){f.exports=function(n){return function(e){return n(e)}}},{}],624:[function(t,f,r){f.exports=function(n,e){return n.has(e)}},{}],625:[function(t,f,r){var n=t("./isArray"),e=t("./_isKey"),s=t("./_stringToPath"),i=t("./toString");f.exports=function(l,o){return n(l)?l:e(l,o)?[l]:s(i(l))}},{"./_isKey":649,"./_stringToPath":681,"./isArray":689,"./toString":704}],626:[function(t,f,r){t=t("./_root")["__core-js_shared__"],f.exports=t},{"./_root":672}],627:[function(t,f,r){var n=t("./_arrayAggregator"),e=t("./_baseAggregator"),s=t("./_baseIteratee"),i=t("./isArray");f.exports=function(l,o){return function(a,c){var u=i(a)?n:e,h=o?o():{};return u(a,l,s(c,2),h)}}},{"./_arrayAggregator":594,"./_baseAggregator":601,"./_baseIteratee":615,"./isArray":689}],628:[function(t,f,r){var n=t("./isArrayLike");f.exports=function(e,s){return function(i,l){if(i==null)return i;if(!n(i))return e(i,l);for(var o=i.length,a=s?o:-1,c=Object(i);(s?a--:++a<o)&&l(c[a],a,c)!==!1;);return i}}},{"./isArrayLike":690}],629:[function(t,f,r){f.exports=function(n){return function(e,s,i){for(var l=-1,o=Object(e),a=i(e),c=a.length;c--;){var u=a[n?c:++l];if(s(o[u],u,o)===!1)break}return e}}},{}],630:[function(t,f,r){var n=t("./_SetCache"),e=t("./_arraySome"),s=t("./_cacheHas");f.exports=function(i,l,o,a,c,u){var h=1&o,p=i.length;if(p!=(m=l.length)&&!(h&&p<m))return!1;var m=u.get(i),b=u.get(l);if(m&&b)return m==l&&b==i;var _=-1,v=!0,w=2&o?new n:void 0;for(u.set(i,l),u.set(l,i);++_<p;){var x,S=i[_],E=l[_];if((x=a?h?a(E,S,_,l,i,u):a(S,E,_,i,l,u):x)!==void 0){if(x)continue;v=!1;break}if(w){if(!e(l,function(k,D){if(!s(w,D)&&(S===k||c(S,k,o,a,u)))return w.push(D)})){v=!1;break}}else if(S!==E&&!c(S,E,o,a,u)){v=!1;break}}return u.delete(i),u.delete(l),v}},{"./_SetCache":589,"./_arraySome":599,"./_cacheHas":624}],631:[function(t,f,r){var n=t("./_Symbol"),e=t("./_Uint8Array"),s=t("./eq"),i=t("./_equalArrays"),l=t("./_mapToArray"),o=t("./_setToArray"),a=(t=n?n.prototype:void 0)?t.valueOf:void 0;f.exports=function(c,u,h,p,m,b,_){switch(h){case"[object DataView]":if(c.byteLength!=u.byteLength||c.byteOffset!=u.byteOffset)return!1;c=c.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(c.byteLength!=u.byteLength||!b(new e(c),new e(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return s(+c,+u);case"[object Error]":return c.name==u.name&&c.message==u.message;case"[object RegExp]":case"[object String]":return c==u+"";case"[object Map]":var v=l;case"[object Set]":if(v=v||o,c.size!=u.size&&!(1&p))return!1;var w=_.get(c);return w?w==u:(p|=2,_.set(c,u),w=i(v(c),v(u),p,m,b,_),_.delete(c),w);case"[object Symbol]":if(a)return a.call(c)==a.call(u)}return!1}},{"./_Symbol":591,"./_Uint8Array":592,"./_equalArrays":630,"./_mapToArray":664,"./_setToArray":675,"./eq":684}],632:[function(t,f,r){var n=t("./_getAllKeys"),e=Object.prototype.hasOwnProperty;f.exports=function(s,i,l,o,a,c){var u=1&l,h=n(s),p=h.length;if(p!=n(i).length&&!u)return!1;for(var m=p;m--;){var b=h[m];if(!(u?b in i:e.call(i,b)))return!1}var _=c.get(s),v=c.get(i);if(_&&v)return _==i&&v==s;for(var w=!0,x=(c.set(s,i),c.set(i,s),u);++m<p;){var S,E=s[b=h[m]],k=i[b];if(!((S=o?u?o(k,E,b,i,s,c):o(E,k,b,s,i,c):S)===void 0?E===k||a(E,k,l,o,c):S)){w=!1;break}x=x||b=="constructor"}return w&&!x&&(_=s.constructor)!=(v=i.constructor)&&"constructor"in s&&"constructor"in i&&!(typeof _=="function"&&_ instanceof _&&typeof v=="function"&&v instanceof v)&&(w=!1),c.delete(s),c.delete(i),w}},{"./_getAllKeys":634}],633:[function(t,f,r){(function(n){(function(){var e=typeof n=="object"&&n&&n.Object===Object&&n;f.exports=e}).call(this)}).call(this,g.g!==void 0?g.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],634:[function(t,f,r){var n=t("./_baseGetAllKeys"),e=t("./_getSymbols"),s=t("./keys");f.exports=function(i){return n(i,s,e)}},{"./_baseGetAllKeys":606,"./_getSymbols":639,"./keys":698}],635:[function(t,f,r){var n=t("./_isKeyable");f.exports=function(e,s){return e=e.__data__,n(s)?e[typeof s=="string"?"string":"hash"]:e.map}},{"./_isKeyable":650}],636:[function(t,f,r){var n=t("./_isStrictComparable"),e=t("./keys");f.exports=function(s){for(var i=e(s),l=i.length;l--;){var o=i[l],a=s[o];i[l]=[o,a,n(a)]}return i}},{"./_isStrictComparable":653,"./keys":698}],637:[function(t,f,r){var n=t("./_baseIsNative"),e=t("./_getValue");f.exports=function(s,i){return s=e(s,i),n(s)?s:void 0}},{"./_baseIsNative":613,"./_getValue":641}],638:[function(t,f,r){t=t("./_Symbol");var n=Object.prototype,e=n.hasOwnProperty,s=n.toString,i=t?t.toStringTag:void 0;f.exports=function(l){var o=e.call(l,i),a=l[i];try{var c=!(l[i]=void 0)}catch{}var u=s.call(l);return c&&(o?l[i]=a:delete l[i]),u}},{"./_Symbol":591}],639:[function(t,f,r){var n=t("./_arrayFilter"),e=(t=t("./stubArray"),Object.prototype.propertyIsEnumerable),s=Object.getOwnPropertySymbols;f.exports=s?function(i){return i==null?[]:(i=Object(i),n(s(i),function(l){return e.call(i,l)}))}:t},{"./_arrayFilter":595,"./stubArray":702}],640:[function(t,f,r){var n=t("./_DataView"),e=t("./_Map"),s=t("./_Promise"),i=t("./_Set"),l=t("./_WeakMap"),o=t("./_baseGetTag"),a=t("./_toSource"),c="[object Map]",u="[object Promise]",h="[object Set]",p="[object WeakMap]",m="[object DataView]",b=a(n),_=a(e),v=a(s),w=a(i),x=a(l);t=o,(n&&t(new n(new ArrayBuffer(1)))!=m||e&&t(new e)!=c||s&&t(s.resolve())!=u||i&&t(new i)!=h||l&&t(new l)!=p)&&(t=function(S){var E=o(S);if(S=(S=E=="[object Object]"?S.constructor:void 0)?a(S):"")switch(S){case b:return m;case _:return c;case v:return u;case w:return h;case x:return p}return E}),f.exports=t},{"./_DataView":582,"./_Map":585,"./_Promise":587,"./_Set":588,"./_WeakMap":593,"./_baseGetTag":607,"./_toSource":683}],641:[function(t,f,r){f.exports=function(n,e){return n==null?void 0:n[e]}},{}],642:[function(t,f,r){var n=t("./_castPath"),e=t("./isArguments"),s=t("./isArray"),i=t("./_isIndex"),l=t("./isLength"),o=t("./_toKey");f.exports=function(a,c,u){for(var h=-1,p=(c=n(c,a)).length,m=!1;++h<p;){var b=o(c[h]);if(!(m=a!=null&&u(a,b)))break;a=a[b]}return m||++h!=p?m:!!(p=a==null?0:a.length)&&l(p)&&i(b,p)&&(s(a)||e(a))}},{"./_castPath":625,"./_isIndex":648,"./_toKey":682,"./isArguments":688,"./isArray":689,"./isLength":693}],643:[function(t,f,r){var n=t("./_nativeCreate");f.exports=function(){this.__data__=n?n(null):{},this.size=0}},{"./_nativeCreate":667}],644:[function(t,f,r){f.exports=function(n){return n=this.has(n)&&delete this.__data__[n],this.size-=n?1:0,n}},{}],645:[function(t,f,r){var n=t("./_nativeCreate"),e=Object.prototype.hasOwnProperty;f.exports=function(s){var i,l=this.__data__;return n?(i=l[s])==="__lodash_hash_undefined__"?void 0:i:e.call(l,s)?l[s]:void 0}},{"./_nativeCreate":667}],646:[function(t,f,r){var n=t("./_nativeCreate"),e=Object.prototype.hasOwnProperty;f.exports=function(s){var i=this.__data__;return n?i[s]!==void 0:e.call(i,s)}},{"./_nativeCreate":667}],647:[function(t,f,r){var n=t("./_nativeCreate");f.exports=function(e,s){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&s===void 0?"__lodash_hash_undefined__":s,this}},{"./_nativeCreate":667}],648:[function(t,f,r){var n=/^(?:0|[1-9]\d*)$/;f.exports=function(e,s){var i=typeof e;return!!(s=s??9007199254740991)&&(i=="number"||i!="symbol"&&n.test(e))&&-1<e&&e%1==0&&e<s}},{}],649:[function(t,f,r){var n=t("./isArray"),e=t("./isSymbol"),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;f.exports=function(l,o){if(n(l))return!1;var a=typeof l;return!(a!="number"&&a!="symbol"&&a!="boolean"&&l!=null&&!e(l))||i.test(l)||!s.test(l)||o!=null&&l in Object(o)}},{"./isArray":689,"./isSymbol":696}],650:[function(t,f,r){f.exports=function(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}},{}],651:[function(t,f,r){t=t("./_coreJsData");var n=(t=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";f.exports=function(e){return!!n&&n in e}},{"./_coreJsData":626}],652:[function(t,f,r){var n=Object.prototype;f.exports=function(e){var s=e&&e.constructor;return e===(typeof s=="function"&&s.prototype||n)}},{}],653:[function(t,f,r){var n=t("./isObject");f.exports=function(e){return e==e&&!n(e)}},{"./isObject":694}],654:[function(t,f,r){f.exports=function(){this.__data__=[],this.size=0}},{}],655:[function(t,f,r){var n=t("./_assocIndexOf"),e=Array.prototype.splice;f.exports=function(s){var i=this.__data__;return!((s=n(i,s))<0||(s==i.length-1?i.pop():e.call(i,s,1),--this.size,0))}},{"./_assocIndexOf":600}],656:[function(t,f,r){var n=t("./_assocIndexOf");f.exports=function(e){var s=this.__data__;return(e=n(s,e))<0?void 0:s[e][1]}},{"./_assocIndexOf":600}],657:[function(t,f,r){var n=t("./_assocIndexOf");f.exports=function(e){return-1<n(this.__data__,e)}},{"./_assocIndexOf":600}],658:[function(t,f,r){var n=t("./_assocIndexOf");f.exports=function(e,s){var i=this.__data__,l=n(i,e);return l<0?(++this.size,i.push([e,s])):i[l][1]=s,this}},{"./_assocIndexOf":600}],659:[function(t,f,r){var n=t("./_Hash"),e=t("./_ListCache"),s=t("./_Map");f.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||e),string:new n}}},{"./_Hash":583,"./_ListCache":584,"./_Map":585}],660:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e){return e=n(this,e).delete(e),this.size-=e?1:0,e}},{"./_getMapData":635}],661:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e){return n(this,e).get(e)}},{"./_getMapData":635}],662:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e){return n(this,e).has(e)}},{"./_getMapData":635}],663:[function(t,f,r){var n=t("./_getMapData");f.exports=function(e,s){var i=n(this,e),l=i.size;return i.set(e,s),this.size+=i.size==l?0:1,this}},{"./_getMapData":635}],664:[function(t,f,r){f.exports=function(n){var e=-1,s=Array(n.size);return n.forEach(function(i,l){s[++e]=[l,i]}),s}},{}],665:[function(t,f,r){f.exports=function(n,e){return function(s){return s!=null&&s[n]===e&&(e!==void 0||n in Object(s))}}},{}],666:[function(t,f,r){var n=t("./memoize");f.exports=function(e){var s=(e=n(e,function(i){return s.size===500&&s.clear(),i})).cache;return e}},{"./memoize":699}],667:[function(t,f,r){t=t("./_getNative")(Object,"create"),f.exports=t},{"./_getNative":637}],668:[function(t,f,r){t=t("./_overArg")(Object.keys,Object),f.exports=t},{"./_overArg":671}],669:[function(t,f,r){t=t("./_freeGlobal");var n=(r=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f,e=n&&n.exports===r&&t.process;r=function(){try{return n&&n.require&&n.require("util").types||e&&e.binding&&e.binding("util")}catch{}}(),f.exports=r},{"./_freeGlobal":633}],670:[function(t,f,r){var n=Object.prototype.toString;f.exports=function(e){return n.call(e)}},{}],671:[function(t,f,r){f.exports=function(n,e){return function(s){return n(e(s))}}},{}],672:[function(t,f,r){t=t("./_freeGlobal");var n=typeof self=="object"&&self&&self.Object===Object&&self;t=t||n||Function("return this")(),f.exports=t},{"./_freeGlobal":633}],673:[function(t,f,r){f.exports=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this}},{}],674:[function(t,f,r){f.exports=function(n){return this.__data__.has(n)}},{}],675:[function(t,f,r){f.exports=function(n){var e=-1,s=Array(n.size);return n.forEach(function(i){s[++e]=i}),s}},{}],676:[function(t,f,r){var n=t("./_ListCache");f.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":584}],677:[function(t,f,r){f.exports=function(n){var e=this.__data__;return n=e.delete(n),this.size=e.size,n}},{}],678:[function(t,f,r){f.exports=function(n){return this.__data__.get(n)}},{}],679:[function(t,f,r){f.exports=function(n){return this.__data__.has(n)}},{}],680:[function(t,f,r){var n=t("./_ListCache"),e=t("./_Map"),s=t("./_MapCache");f.exports=function(i,l){var o=this.__data__;if(o instanceof n){var a=o.__data__;if(!e||a.length<199)return a.push([i,l]),this.size=++o.size,this;o=this.__data__=new s(a)}return o.set(i,l),this.size=o.size,this}},{"./_ListCache":584,"./_Map":585,"./_MapCache":586}],681:[function(t,f,r){t=t("./_memoizeCapped");var n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g;t=t(function(s){var i=[];return s.charCodeAt(0)===46&&i.push(""),s.replace(n,function(l,o,a,c){i.push(a?c.replace(e,"$1"):o||l)}),i}),f.exports=t},{"./_memoizeCapped":666}],682:[function(t,f,r){var n=t("./isSymbol");f.exports=function(e){if(typeof e=="string"||n(e))return e;var s=e+"";return s=="0"&&1/e==-1/0?"-0":s}},{"./isSymbol":696}],683:[function(t,f,r){var n=Function.prototype.toString;f.exports=function(e){if(e!=null){try{return n.call(e)}catch{}try{return e+""}catch{}}return""}},{}],684:[function(t,f,r){f.exports=function(n,e){return n===e||n!=n&&e!=e}},{}],685:[function(t,f,r){var n=t("./_baseGet");f.exports=function(e,s,i){return(e=e==null?void 0:n(e,s))===void 0?i:e}},{"./_baseGet":605}],686:[function(t,f,r){var n=t("./_baseHasIn"),e=t("./_hasPath");f.exports=function(s,i){return s!=null&&e(s,i,n)}},{"./_baseHasIn":608,"./_hasPath":642}],687:[function(t,f,r){f.exports=function(n){return n}},{}],688:[function(t,f,r){var n=t("./_baseIsArguments"),e=t("./isObjectLike"),s=(t=Object.prototype).hasOwnProperty,i=t.propertyIsEnumerable;t=n(function(){return arguments}())?n:function(l){return e(l)&&s.call(l,"callee")&&!i.call(l,"callee")},f.exports=t},{"./_baseIsArguments":609,"./isObjectLike":695}],689:[function(t,f,r){var n=Array.isArray;f.exports=n},{}],690:[function(t,f,r){var n=t("./isFunction"),e=t("./isLength");f.exports=function(s){return s!=null&&e(s.length)&&!n(s)}},{"./isFunction":692,"./isLength":693}],691:[function(t,f,r){var n,e=t("./_root");t=t("./stubFalse"),r=(n=(n=(r=typeof r=="object"&&r&&!r.nodeType&&r)&&typeof f=="object"&&f&&!f.nodeType&&f)&&n.exports===r?e.Buffer:void 0)?n.isBuffer:void 0,f.exports=r||t},{"./_root":672,"./stubFalse":703}],692:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isObject");f.exports=function(s){return!!e(s)&&((s=n(s))=="[object Function]"||s=="[object GeneratorFunction]"||s=="[object AsyncFunction]"||s=="[object Proxy]")}},{"./_baseGetTag":607,"./isObject":694}],693:[function(t,f,r){f.exports=function(n){return typeof n=="number"&&-1<n&&n%1==0&&n<=9007199254740991}},{}],694:[function(t,f,r){f.exports=function(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}},{}],695:[function(t,f,r){f.exports=function(n){return n!=null&&typeof n=="object"}},{}],696:[function(t,f,r){var n=t("./_baseGetTag"),e=t("./isObjectLike");f.exports=function(s){return typeof s=="symbol"||e(s)&&n(s)=="[object Symbol]"}},{"./_baseGetTag":607,"./isObjectLike":695}],697:[function(t,f,r){var n=t("./_baseIsTypedArray"),e=t("./_baseUnary");e=(t=(t=t("./_nodeUtil"))&&t.isTypedArray)?e(t):n,f.exports=e},{"./_baseIsTypedArray":614,"./_baseUnary":623,"./_nodeUtil":669}],698:[function(t,f,r){var n=t("./_arrayLikeKeys"),e=t("./_baseKeys"),s=t("./isArrayLike");f.exports=function(i){return(s(i)?n:e)(i)}},{"./_arrayLikeKeys":596,"./_baseKeys":616,"./isArrayLike":690}],699:[function(t,f,r){var n=t("./_MapCache");function e(s,i){if(typeof s!="function"||i!=null&&typeof i!="function")throw new TypeError("Expected a function");function l(){var o=arguments,a=i?i.apply(this,o):o[0],c=l.cache;return c.has(a)?c.get(a):(o=s.apply(this,o),l.cache=c.set(a,o)||c,o)}return l.cache=new(e.Cache||n),l}e.Cache=n,f.exports=e},{"./_MapCache":586}],700:[function(t,f,r){t=t("./_createAggregator")(function(n,e,s){n[s?0:1].push(e)},function(){return[[],[]]}),f.exports=t},{"./_createAggregator":627}],701:[function(t,f,r){var n=t("./_baseProperty"),e=t("./_basePropertyDeep"),s=t("./_isKey"),i=t("./_toKey");f.exports=function(l){return s(l)?n(i(l)):e(l)}},{"./_baseProperty":619,"./_basePropertyDeep":620,"./_isKey":649,"./_toKey":682}],702:[function(t,f,r){f.exports=function(){return[]}},{}],703:[function(t,f,r){f.exports=function(){return!1}},{}],704:[function(t,f,r){var n=t("./_baseToString");f.exports=function(e){return e==null?"":n(e)}},{"./_baseToString":622}],705:[function(t,f,r){arguments[4][194][0].apply(r,arguments)},{"./lib/deflate":706,"./lib/inflate":707,"./lib/utils/common":708,"./lib/zlib/constants":711,dup:194}],706:[function(t,f,r){arguments[4][195][0].apply(r,arguments)},{"./utils/common":708,"./utils/strings":709,"./zlib/deflate":713,"./zlib/messages":718,"./zlib/zstream":720,dup:195}],707:[function(t,f,r){arguments[4][196][0].apply(r,arguments)},{"./utils/common":708,"./utils/strings":709,"./zlib/constants":711,"./zlib/gzheader":714,"./zlib/inflate":716,"./zlib/messages":718,"./zlib/zstream":720,dup:196}],708:[function(t,f,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],709:[function(t,f,r){arguments[4][198][0].apply(r,arguments)},{"./common":708,dup:198}],710:[function(t,f,r){arguments[4][199][0].apply(r,arguments)},{dup:199}],711:[function(t,f,r){arguments[4][200][0].apply(r,arguments)},{dup:200}],712:[function(t,f,r){arguments[4][201][0].apply(r,arguments)},{dup:201}],713:[function(t,f,r){arguments[4][202][0].apply(r,arguments)},{"../utils/common":708,"./adler32":710,"./crc32":712,"./messages":718,"./trees":719,dup:202}],714:[function(t,f,r){arguments[4][203][0].apply(r,arguments)},{dup:203}],715:[function(t,f,r){arguments[4][204][0].apply(r,arguments)},{dup:204}],716:[function(t,f,r){arguments[4][205][0].apply(r,arguments)},{"../utils/common":708,"./adler32":710,"./crc32":712,"./inffast":715,"./inftrees":717,dup:205}],717:[function(t,f,r){arguments[4][206][0].apply(r,arguments)},{"../utils/common":708,dup:206}],718:[function(t,f,r){arguments[4][207][0].apply(r,arguments)},{dup:207}],719:[function(t,f,r){arguments[4][208][0].apply(r,arguments)},{"../utils/common":708,dup:208}],720:[function(t,f,r){arguments[4][209][0].apply(r,arguments)},{dup:209}],721:[function(t,f,r){var n,e=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e(t("lodash.clonedeep"))),i=e(t("lodash.isequal"));(e=n=n||{}).compose=function(l,o,a){typeof(l=l===void 0?{}:l)!="object"&&(l={});var c,u=s.default(o=typeof(o=o===void 0?{}:o)!="object"?{}:o);for(c in a||(u=Object.keys(u).reduce(function(h,p){return u[p]!=null&&(h[p]=u[p]),h},{})),l)l[c]!==void 0&&o[c]===void 0&&(u[c]=l[c]);return 0<Object.keys(u).length?u:void 0},e.diff=function(l,o){typeof(l=l===void 0?{}:l)!="object"&&(l={}),typeof(o=o===void 0?{}:o)!="object"&&(o={});var a=Object.keys(l).concat(Object.keys(o)).reduce(function(c,u){return i.default(l[u],o[u])||(c[u]=o[u]===void 0?null:o[u]),c},{});return 0<Object.keys(a).length?a:void 0},e.invert=function(l,o){o===void 0&&(o={}),l=(l=l===void 0?{}:l)||{};var a=Object.keys(o).reduce(function(c,u){return o[u]!==l[u]&&l[u]!==void 0&&(c[u]=o[u]),c},{});return Object.keys(l).reduce(function(c,u){return l[u]!==o[u]&&o[u]===void 0&&(c[u]=null),c},a)},e.transform=function(l,o,a){return a===void 0&&(a=!1),typeof l!="object"?o:typeof o=="object"?a?(a=Object.keys(o).reduce(function(c,u){return l[u]===void 0&&(c[u]=o[u]),c},{}),0<Object.keys(a).length?a:void 0):o:void 0},r.default=n},{"lodash.clonedeep":580,"lodash.isequal":581}],722:[function(t,f,r){var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},e=n(t("fast-diff")),s=n(t("lodash.clonedeep")),i=n(t("lodash.isequal")),l=n(t("./AttributeMap")),o=n(t("./Op")),a=String.fromCharCode(0);function c(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]}c.prototype.insert=function(u,h){var p={};return typeof u=="string"&&u.length===0?this:(p.insert=u,h!=null&&typeof h=="object"&&0<Object.keys(h).length&&(p.attributes=h),this.push(p))},c.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},c.prototype.retain=function(u,h){return u<=0?this:(u={retain:u},h!=null&&typeof h=="object"&&0<Object.keys(h).length&&(u.attributes=h),this.push(u))},c.prototype.push=function(u){var h=this.ops.length,p=this.ops[h-1];if(u=s.default(u),typeof p=="object"){if(typeof u.delete=="number"&&typeof p.delete=="number")return this.ops[h-1]={delete:p.delete+u.delete},this;if(typeof p.delete=="number"&&u.insert!=null&&typeof(p=this.ops[--h-1])!="object")return this.ops.unshift(u),this;if(i.default(u.attributes,p.attributes)){if(typeof u.insert=="string"&&typeof p.insert=="string")return this.ops[h-1]={insert:p.insert+u.insert},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof p.retain=="number")return this.ops[h-1]={retain:p.retain+u.retain},typeof u.attributes=="object"&&(this.ops[h-1].attributes=u.attributes),this}}return h===this.ops.length?this.ops.push(u):this.ops.splice(h,0,u),this},c.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},c.prototype.filter=function(u){return this.ops.filter(u)},c.prototype.forEach=function(u){this.ops.forEach(u)},c.prototype.map=function(u){return this.ops.map(u)},c.prototype.partition=function(u){var h=[],p=[];return this.forEach(function(m){(u(m)?h:p).push(m)}),[h,p]},c.prototype.reduce=function(u,h){return this.ops.reduce(u,h)},c.prototype.changeLength=function(){return this.reduce(function(u,h){return h.insert?u+o.default.length(h):h.delete?u-h.delete:u},0)},c.prototype.length=function(){return this.reduce(function(u,h){return u+o.default.length(h)},0)},c.prototype.slice=function(u,h){u===void 0&&(u=0),h===void 0&&(h=1/0);for(var p=[],m=o.default.iterator(this.ops),b=0;b<h&&m.hasNext();){var _=void 0;b<u?_=m.next(u-b):(_=m.next(h-b),p.push(_)),b+=o.default.length(_)}return new c(p)},c.prototype.compose=function(u){var h=o.default.iterator(this.ops),p=o.default.iterator(u.ops),m=[];if((u=p.peek())!=null&&typeof u.retain=="number"&&u.attributes==null){for(var b=u.retain;h.peekType()==="insert"&&h.peekLength()<=b;)b-=h.peekLength(),m.push(h.next());0<u.retain-b&&p.next(u.retain-b)}for(var _=new c(m);h.hasNext()||p.hasNext();)if(p.peekType()==="insert")_.push(p.next());else if(h.peekType()==="delete")_.push(h.next());else{var v=Math.min(h.peekLength(),p.peekLength()),w=h.next(v),x=p.next(v);if(typeof x.retain=="number"){var S={};if(typeof w.retain=="number"?S.retain=v:S.insert=w.insert,(v=l.default.compose(w.attributes,x.attributes,typeof w.retain=="number"))&&(S.attributes=v),_.push(S),!p.hasNext()&&i.default(_.ops[_.ops.length-1],S))return v=new c(h.rest()),_.concat(v).chop()}else typeof x.delete=="number"&&typeof w.retain=="number"&&_.push(x)}return _.chop()},c.prototype.concat=function(u){var h=new c(this.ops.slice());return 0<u.ops.length&&(h.push(u.ops[0]),h.ops=h.ops.concat(u.ops.slice(1))),h},c.prototype.diff=function(u,h){if(this.ops===u.ops)return new c;var p=[this,u].map(function(v){return v.map(function(w){if(w.insert!=null)return typeof w.insert=="string"?w.insert:a;throw new Error("diff() called "+(v===u?"on":"with")+" non-document")}).join("")}),m=new c,b=(p=e.default(p[0],p[1],h),o.default.iterator(this.ops)),_=o.default.iterator(u.ops);return p.forEach(function(v){for(var w=v[1].length;0<w;){var x=0;switch(v[0]){case e.default.INSERT:x=Math.min(_.peekLength(),w),m.push(_.next(x));break;case e.default.DELETE:x=Math.min(w,b.peekLength()),b.next(x),m.delete(x);break;case e.default.EQUAL:x=Math.min(b.peekLength(),_.peekLength(),w);var S=b.next(x),E=_.next(x);i.default(S.insert,E.insert)?m.retain(x,l.default.diff(S.attributes,E.attributes)):m.push(E).delete(x)}w-=x}}),m.chop()},c.prototype.eachLine=function(u,h){h===void 0&&(h=`
|
|
198
|
+
`);for(var p=o.default.iterator(this.ops),m=new c,b=0;p.hasNext();){if(p.peekType()!=="insert")return;var _=p.peek(),v=o.default.length(_)-p.peekLength();if((_=typeof _.insert=="string"?_.insert.indexOf(h,v)-v:-1)<0)m.push(p.next());else if(0<_)m.push(p.next(_));else{if(u(m,p.next(1).attributes||{},b)===!1)return;b+=1,m=new c}}0<m.length()&&u(m,{},b)},c.prototype.invert=function(u){var h=new c;return this.reduce(function(p,m){if(m.insert)h.delete(o.default.length(m));else{if(m.retain&&m.attributes==null)return h.retain(m.retain),p+m.retain;var b;if(m.delete||m.retain&&m.attributes)return b=m.delete||m.retain,u.slice(p,p+b).forEach(function(_){m.delete?h.push(_):m.retain&&m.attributes&&h.retain(o.default.length(_),l.default.invert(m.attributes,_.attributes))}),p+b}return p},0),h.chop()},c.prototype.transform=function(u,h){if(h=!!(h=h!==void 0&&h),typeof u=="number")return this.transformPosition(u,h);for(var p,m,b,_=o.default.iterator(this.ops),v=o.default.iterator(u.ops),w=new c;_.hasNext()||v.hasNext();)_.peekType()!=="insert"||!h&&v.peekType()==="insert"?v.peekType()==="insert"?w.push(v.next()):(p=Math.min(_.peekLength(),v.peekLength()),m=_.next(p),b=v.next(p),m.delete||(b.delete?w.push(b):w.retain(p,l.default.transform(m.attributes,b.attributes,h)))):w.retain(o.default.length(_.next()));return w.chop()},c.prototype.transformPosition=function(u,h){h=!!(h=h!==void 0&&h);for(var p=o.default.iterator(this.ops),m=0;p.hasNext()&&m<=u;){var b=p.peekLength(),_=p.peekType();p.next(),_==="delete"?u-=Math.min(b,u-m):(_==="insert"&&(m<u||!h)&&(u+=b),m+=b)}return u},c.Op=o.default,c.AttributeMap=l.default,f.exports=c},{"./AttributeMap":721,"./Op":724,"fast-diff":579,"lodash.clonedeep":580,"lodash.isequal":581}],723:[function(t,f,r){var n=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=(Object.defineProperty(r,"__esModule",{value:!0}),n(t("./Op")));function s(i){this.ops=i,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(i){i=i||1/0;var l,o,a=this.ops[this.index];return a?(l=this.offset,(o=e.default.length(a))-l<=i?(i=o-l,this.index+=1,this.offset=0):this.offset+=i,typeof a.delete=="number"?{delete:i}:(o={},a.attributes&&(o.attributes=a.attributes),typeof a.retain=="number"?o.retain=i:typeof a.insert=="string"?o.insert=a.insert.substr(l,i):o.insert=a.insert,o)):{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?e.default.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},s.prototype.rest=function(){var i,l,o,a;return this.hasNext()?this.offset===0?this.ops.slice(this.index):(i=this.offset,l=this.index,o=this.next(),a=this.ops.slice(this.index),this.offset=i,this.index=l,[o].concat(a)):[]},r.default=s},{"./Op":724}],724:[function(t,f,r){var n,e=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},s=(Object.defineProperty(r,"__esModule",{value:!0}),e(t("./Iterator")));(e=n=n||{}).iterator=function(i){return new s.default(i)},e.length=function(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1},r.default=n},{"./Iterator":723}],725:[function(t,f,r){var n;n=function(){var e="object",s="function",i="undefined",l=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],o=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],a=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],c=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u(L,B){var Y=typeof L[B];return Y==s||!(Y!=e||!L[B])||Y=="unknown"}function h(L,B){return!(typeof L[B]!=e||!L[B])}function p(L,B){return typeof L[B]!=i}function m(L){return function(B,Y){for(var Z=Y.length;Z--;)if(!L(B,Y[Z]))return!1;return!0}}var b=m(u),_=m(h),v=m(p);function w(L){return L&&b(L,c)&&v(L,a)}function x(L){return h(L,"body")?L.body:L.getElementsByTagName("body")[0]}var S,E,k,D={},N=typeof window!=i&&typeof document!=i,O={isHostMethod:u,isHostObject:h,isHostProperty:p,areHostMethods:b,areHostObjects:_,areHostProperties:v,isTextRange:w,getBody:x,forEach:[].forEach?function(L,B){L.forEach(B)}:function(L,B){for(var Y=0,Z=L.length;Y<Z;++Y)B(L[Y],Y)}},R={version:"1.3.1",initialized:!1,isBrowser:N,supported:!0,util:O,features:{},modules:D,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==i||rangyAutoInitialize}};function A(L){typeof console!=i&&u(console,"log")&&console.log(L)}function z(L,B){(N&&B?alert:A)(L)}function H(L){R.initialized=!0,R.supported=!1,z("Rangy is not supported in this environment. Reason: "+L,R.config.alertOnFail)}if(R.fail=H,R.warn=function(L){z("Rangy warning: "+L,R.config.alertOnWarn)},{}.hasOwnProperty?(O.extend=S=function(L,B,Y){var Z,rt,Q;for(Q in B)B.hasOwnProperty(Q)&&(Z=L[Q],rt=B[Q],Y&&Z!==null&&typeof Z=="object"&&rt!==null&&typeof rt=="object"&&S(Z,rt,!0),L[Q]=rt);return B.hasOwnProperty("toString")&&(L.toString=B.toString),L},O.createOptions=function(L,B){var Y={};return S(Y,B),L&&S(Y,L),Y}):H("hasOwnProperty not supported"),N||H("Rangy can only run in a browser"),N){var $=((_=document.createElement("div")).appendChild(document.createElement("span")),[].slice);try{$.call(_.childNodes,0)[0].nodeType==1&&(E=function(L){return $.call(L,0)})}catch{}}O.toArray=E=E||function(L){for(var B=[],Y=0,Z=L.length;Y<Z;++Y)B[Y]=L[Y];return B},N&&(u(document,"addEventListener")?k=function(L,B,Y){L.addEventListener(B,Y,!1)}:u(document,"attachEvent")?k=function(L,B,Y){L.attachEvent("on"+B,Y)}:H("Document does not have required addEventListener or attachEvent method"),O.addListener=k);var M=[];function J(L){return L.message||L.description||String(L)}function K(){if(N&&!R.initialized){var L,B,Y,Z=!1,rt=!1,Q=(u(document,"createRange")&&(L=document.createRange(),b(L,o)&&v(L,l)&&(Z=!0)),x(document));if(Q&&Q.nodeName.toLowerCase()=="body")if(Q&&u(Q,"createTextRange")&&w(L=Q.createTextRange())&&(rt=!0),Z||rt){for(Y in R.initialized=!0,R.features={implementsDomRange:Z,implementsTextRange:rt},D)(B=D[Y])instanceof G&&B.init(B,R);for(var tt=0,nt=M.length;tt<nt;++tt)try{M[tt](R)}catch(et){A("Rangy init listener threw an exception. Continuing. Detail: "+J(et))}}else H("Neither Range nor TextRange are available");else H("No body element found")}}function P(L,B,Y){Y&&(L+=" in module "+Y.name),R.warn("DEPRECATED: "+L+" is deprecated. Please use "+B+" instead.")}function U(L,B,Y,Z){L[B]=function(){return P(B,Y,Z),L[Y].apply(L,O.toArray(arguments))}}O.deprecationNotice=P,O.createAliasForDeprecatedMethod=U,R.init=K,R.addInitListener=function(L){R.initialized?L(R):M.push(L)};var V=[];function G(L,B,Y){this.name=L,this.dependencies=B,this.initialized=!1,this.supported=!1,this.initializer=Y}function F(L,B,Y){return B=new G(L,B,function(Z){if(!Z.initialized){Z.initialized=!0;try{Y(R,Z),Z.supported=!0}catch(rt){A("Module '"+L+"' failed to load: "+J(rt)),rt.stack&&A(rt.stack)}}}),D[L]=B}function q(){}function T(L){I||(I=!0,!R.initialized&&R.config.autoInitialize&&K())}R.addShimListener=function(L){V.push(L)},N&&(R.shim=R.createMissingNativeApi=function(L){L=L||window,K();for(var B=0,Y=V.length;B<Y;++B)V[B](L)},U(R,"createMissingNativeApi","shim")),G.prototype={init:function(){for(var L,B,Y=this.dependencies||[],Z=0,rt=Y.length;Z<rt;++Z){if(B=Y[Z],!((L=D[B])&&L instanceof G))throw new Error("required module '"+B+"' not found");if(L.init(),!L.supported)throw new Error("required module '"+B+"' not supported")}this.initializer(this)},fail:function(L){throw this.initialized=!0,this.supported=!1,new Error(L)},warn:function(L){R.warn("Module "+this.name+": "+L)},deprecationNotice:function(L,B){R.warn("DEPRECATED: "+L+" in module "+this.name+" is deprecated. Please use "+B+" instead")},createError:function(L){return new Error("Error in Rangy "+this.name+" module: "+L)}},R.createModule=function(L){var B,Y=F(L,Y=arguments.length==2?(B=arguments[1],[]):(B=arguments[2],arguments[1]),B);R.initialized&&R.supported&&Y.init()},R.createCoreModule=function(L,B,Y){F(L,B,Y)},R.RangePrototype=q,R.rangePrototype=new q,R.selectionPrototype=new function(){},R.createCoreModule("DomUtil",[],function(L,B){function Y(ht,dt){for(var Ft=ht.length;Ft--;)if(ht[Ft]===dt)return!0;return!1}var Z,rt,Q,tt="undefined",nt=L.util,et=nt.getBody,at=(nt.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||B.fail("document missing a Node creation method"),nt.isHostMethod(document,"getElementsByTagName")||B.fail("document missing getElementsByTagName method"),document.createElement("div"));function ct(ht){for(var dt=0;ht=ht.previousSibling;)++dt;return dt}function gt(ht,dt){for(var Ft=[],Jt=ht;Jt;Jt=Jt.parentNode)Ft.push(Jt);for(Jt=dt;Jt;Jt=Jt.parentNode)if(Y(Ft,Jt))return Jt;return null}function wt(ht,dt,Ft){for(var Jt=Ft?dt:dt.parentNode;Jt;){if(Jt===ht)return!0;Jt=Jt.parentNode}return!1}function St(ht,dt,Ft){for(var Jt,Xt=Ft?ht:ht.parentNode;Xt;){if((Jt=Xt.parentNode)===dt)return Xt;Xt=Jt}return null}function Mt(ht){return(ht=ht.nodeType)==3||ht==4||ht==8}function Lt(ht,dt){var Ft=dt.nextSibling;return dt=dt.parentNode,Ft?dt.insertBefore(ht,Ft):dt.appendChild(ht),ht}function Pt(ht){if(ht.nodeType==9)return ht;if(typeof ht.ownerDocument!=tt)return ht.ownerDocument;if(typeof ht.document!=tt)return ht.document;if(ht.parentNode)return Pt(ht.parentNode);throw B.createError("getDocument: no document found for node")}function yt(ht){if(typeof(ht=Pt(ht)).defaultView!=tt)return ht.defaultView;if(typeof ht.parentWindow!=tt)return ht.parentWindow;throw B.createError("Cannot get a window object for node")}function jt(ht){if(typeof ht.contentDocument!=tt)return ht.contentDocument;if(typeof ht.contentWindow!=tt)return ht.contentWindow.document;throw B.createError("getIframeDocument: No Document object found for iframe element")}function At(ht){return ht&&nt.isHostMethod(ht,"setTimeout")&&nt.isHostObject(ht,"document")}function It(ht){try{return ht.parentNode,!1}catch{return!0}}function Ot(ht){return ht?Z&&It(ht)?"[Broken node]":Mt(ht)?'"'+ht.data+'"':ht.nodeType==1?(dt=ht.id?' id="'+ht.id+'"':"","<"+ht.nodeName+dt+">[index:"+ct(ht)+",length:"+ht.childNodes.length+"]["+(ht.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"):ht.nodeName:"[No node]";var dt}function Et(ht){this.root=ht,this._next=ht}function Ct(ht,dt){this.node=ht,this.offset=dt}function Nt(ht){this.code=this[ht],this.codeName=ht,this.message="DOMException: "+this.codeName}nt.areHostMethods(at,["insertBefore","appendChild","cloneNode"])||B.fail("Incomplete Element implementation"),nt.isHostProperty(at,"innerHTML")||B.fail("Element is missing innerHTML property"),at=document.createTextNode("test"),nt.areHostMethods(at,["splitText","deleteData","insertData","appendData","cloneNode"])||B.fail("Incomplete Text Node implementation"),(at=document.createElement("b")).innerHTML="1",rt=at.firstChild,at.innerHTML="<br />",Z=It(rt),L.features.crashyTextNodes=Z,typeof window.getComputedStyle!=tt?Q=function(ht,dt){return yt(ht).getComputedStyle(ht,null)[dt]}:typeof document.documentElement.currentStyle!=tt?Q=function(ht,dt){return ht.currentStyle?ht.currentStyle[dt]:""}:B.fail("No means of obtaining computed style properties found"),Et.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var ht,dt,Ft=this._current=this._next;if(this._current)if(ht=Ft.firstChild)this._next=ht;else{for(dt=null;Ft!==this.root&&!(dt=Ft.nextSibling);)Ft=Ft.parentNode;this._next=dt}return this._current},detach:function(){this._current=this._next=this.root=null}},Ct.prototype={equals:function(ht){return!!ht&&this.node===ht.node&&this.offset==ht.offset},inspect:function(){return"[DomPosition("+Ot(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},(Nt.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24}).toString=function(){return this.message},L.dom={arrayContains:Y,isHtmlNamespace:function(ht){return typeof ht.namespaceURI==tt||(ht=ht.namespaceURI)===null||ht=="http://www.w3.org/1999/xhtml"},parentElement:function(ht){return(ht=ht.parentNode).nodeType==1?ht:null},getNodeIndex:ct,getNodeLength:function(ht){switch(ht.nodeType){case 7:case 10:return 0;case 3:case 8:return ht.length;default:return ht.childNodes.length}},getCommonAncestor:gt,isAncestorOf:wt,isOrIsAncestorOf:function(ht,dt){return wt(ht,dt,!0)},getClosestAncestorIn:St,isCharacterDataNode:Mt,isTextOrCommentNode:function(ht){return!!ht&&((ht=ht.nodeType)==3||ht==8)},insertAfter:Lt,splitDataNode:function(ht,dt,Ft){var Jt=ht.cloneNode(!1);if(Jt.deleteData(0,dt),ht.deleteData(dt,ht.length-dt),Lt(Jt,ht),Ft)for(var Xt,Qt=0;Xt=Ft[Qt++];)Xt.node==ht&&Xt.offset>dt?(Xt.node=Jt,Xt.offset-=dt):Xt.node==ht.parentNode&&Xt.offset>ct(ht)&&++Xt.offset;return Jt},getDocument:Pt,getWindow:yt,getIframeWindow:function(ht){if(typeof ht.contentWindow!=tt)return ht.contentWindow;if(typeof ht.contentDocument!=tt)return ht.contentDocument.defaultView;throw B.createError("getIframeWindow: No Window object found for iframe element")},getIframeDocument:jt,getBody:et,isWindow:At,getContentDocument:function(ht,dt,Ft){var Jt;if(ht?nt.isHostProperty(ht,"nodeType")?Jt=(ht.nodeType==1&&ht.tagName.toLowerCase()=="iframe"?jt:Pt)(ht):At(ht)&&(Jt=ht.document):Jt=document,Jt)return Jt;throw dt.createError(Ft+"(): Parameter must be a Window object or DOM node")},getRootContainer:function(ht){for(var dt;dt=ht.parentNode;)ht=dt;return ht},comparePoints:function(ht,dt,Ft,Jt){var Xt,Qt,ve,kt;if(ht==Ft)return dt===Jt?0:dt<Jt?-1:1;if(Xt=St(Ft,ht,!0))return dt<=ct(Xt)?-1:1;if(Xt=St(ht,Ft,!0))return ct(Xt)<Jt?-1:1;if(!(dt=gt(ht,Ft)))throw new Error("comparePoints error: nodes have no common ancestor");if((Qt=ht===dt?dt:St(ht,dt,!0))===(ve=Ft===dt?dt:St(Ft,dt,!0)))throw B.createError("comparePoints got to case 4 and childA and childB are the same!");for(kt=dt.firstChild;kt;){if(kt===Qt)return-1;if(kt===ve)return 1;kt=kt.nextSibling}},isBrokenNode:It,inspectNode:Ot,getComputedStyleProperty:Q,createTestElement:function(ht,dt,Ft){var Jt=et(ht);return(ht=ht.createElement("div")).contentEditable=""+!!Ft,dt&&(ht.innerHTML=dt),(Ft=Jt.firstChild)?Jt.insertBefore(ht,Ft):Jt.appendChild(ht),ht},removeNode:function(ht){return ht.parentNode.removeChild(ht)},fragmentFromNodeChildren:function(ht){for(var dt,Ft=Pt(ht).createDocumentFragment();dt=ht.firstChild;)Ft.appendChild(dt);return Ft},createIterator:function(ht){return new Et(ht)},DomPosition:Ct},L.DOMException=Nt}),R.createCoreModule("DomRange",["DomUtil"],function(L,B){var Y=L.dom,Z=L.util,rt=Y.DomPosition,Q=L.DOMException,tt=Y.isCharacterDataNode,nt=Y.getNodeIndex,et=Y.isOrIsAncestorOf,at=Y.getDocument,ct=Y.comparePoints,gt=Y.splitDataNode,wt=Y.getClosestAncestorIn,St=Y.getNodeLength,Mt=Y.arrayContains,Lt=Y.getRootContainer,Pt=L.features.crashyTextNodes,yt=Y.removeNode;function jt(X,lt){return X.nodeType!=3&&(et(X,lt.startContainer)||et(X,lt.endContainer))}function At(X){return X.document||at(X.startContainer)}function It(X){return new rt(X.parentNode,nt(X))}function Ot(X){return new rt(X.parentNode,nt(X)+1)}function Et(X,lt,vt){var Vt=X.nodeType==11?X.firstChild:X;return tt(lt)?vt==lt.length?Y.insertAfter(X,lt):lt.parentNode.insertBefore(X,vt==0?lt:gt(lt,vt)):vt>=lt.childNodes.length?lt.appendChild(X):lt.insertBefore(X,lt.childNodes[vt]),Vt}function Ct(X,lt,vt){if(Oe(X),Oe(lt),At(lt)!=At(X))throw new Q("WRONG_DOCUMENT_ERR");var Vt=ct(X.startContainer,X.startOffset,lt.endContainer,lt.endOffset);return X=ct(X.endContainer,X.endOffset,lt.startContainer,lt.startOffset),vt?Vt<=0&&0<=X:Vt<0&&0<X}function Nt(X,lt,vt){var Vt,te,Zt,Yt;for(vt=vt||{stop:!1};Zt=X.next();)if(X.isPartiallySelectedSubtree()){if(lt(Zt)===!1)return void(vt.stop=!0);if(Nt(Yt=X.getSubtreeIterator(),lt,vt),Yt.detach(),vt.stop)return}else for(Vt=Y.createIterator(Zt);te=Vt.next();)if(lt(te)===!1)return void(vt.stop=!0)}function ht(X){for(var lt;X.next();)X.isPartiallySelectedSubtree()?(ht(lt=X.getSubtreeIterator()),lt.detach()):X.remove()}function dt(X){for(var lt,vt,Vt=At(X.range).createDocumentFragment();lt=X.next();){if(X.isPartiallySelectedSubtree()?(lt=lt.cloneNode(!1),vt=X.getSubtreeIterator(),lt.appendChild(dt(vt)),vt.detach()):X.remove(),lt.nodeType==10)throw new Q("HIERARCHY_REQUEST_ERR");Vt.appendChild(lt)}return Vt}function Ft(X){return"["+(X.getName===void 0?"Range":X.getName())+"("+Y.inspectNode(X.startContainer)+":"+X.startOffset+", "+Y.inspectNode(X.endContainer)+":"+X.endOffset+")]"}function Jt(X,lt){this.range=X,this.clonePartiallySelectedTextNodes=lt,X.collapsed||(this.sc=X.startContainer,this.so=X.startOffset,this.ec=X.endContainer,this.eo=X.endOffset,lt=X.commonAncestorContainer,this.sc===this.ec&&tt(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==lt||tt(this.sc)?wt(this.sc,lt,!0):this.sc.childNodes[this.so],this._last=this.ec!==lt||tt(this.ec)?wt(this.ec,lt,!0):this.ec.childNodes[this.eo-1]))}Jt.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var X=this._current=this._next;return X&&(this._next=X!==this._last?X.nextSibling:null,tt(X)&&this.clonePartiallySelectedTextNodes&&(X===this.ec&&(X=X.cloneNode(!0)).deleteData(this.eo,X.length-this.eo),this._current===this.sc&&(X=X.cloneNode(!0)).deleteData(0,this.so))),X},remove:function(){var X,lt,vt=this._current;!tt(vt)||vt!==this.sc&&vt!==this.ec?vt.parentNode&&yt(vt):(X=vt===this.sc?this.so:0)!=(lt=vt===this.ec?this.eo:vt.length)&&vt.deleteData(X,lt-X)},isPartiallySelectedSubtree:function(){return jt(this._current,this.range)},getSubtreeIterator:function(){var X,lt,vt,Vt,te,Zt;return this.isSingleCharacterDataNode?(X=this.range.cloneRange()).collapse(!1):(X=new oe(At(this.range)),lt=this._current,Vt=0,Zt=St(te=vt=lt),et(lt,this.sc)&&(vt=this.sc,Vt=this.so),et(lt,this.ec)&&(te=this.ec,Zt=this.eo),Wt(X,vt,Vt,te,Zt)),new Jt(X,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var Xt=[1,3,4,5,7,8,10],Qt=[2,9,11],ve=[1,3,4,5,7,8,10,11],kt=[1,3,4,5,7,8];function ee(X){return function(lt,vt){for(var Vt,te=vt?lt:lt.parentNode;te;){if(Vt=te.nodeType,Mt(X,Vt))return te;te=te.parentNode}return null}}var pe=ee([9,11]),Le=ee([5,6,10,12]),Fe=ee([6,10,12]),qe=ee([1]);function ze(X,lt){if(Fe(X,lt))throw new Q("INVALID_NODE_TYPE_ERR")}function Ie(X,lt){if(!Mt(lt,X.nodeType))throw new Q("INVALID_NODE_TYPE_ERR")}function He(X,lt){if(lt<0||lt>(tt(X)?X:X.childNodes).length)throw new Q("INDEX_SIZE_ERR")}function hn(X,lt){if(pe(X,!0)!==pe(lt,!0))throw new Q("WRONG_DOCUMENT_ERR")}function Tt(X){if(Le(X,!0))throw new Q("NO_MODIFICATION_ALLOWED_ERR")}function ae(X,lt){if(!X)throw new Q(lt)}function de(X,lt){return lt<=(tt(X)?X:X.childNodes).length}function we(X){return!!X.startContainer&&!!X.endContainer&&!(Pt&&(Y.isBrokenNode(X.startContainer)||Y.isBrokenNode(X.endContainer)))&&Lt(X.startContainer)==Lt(X.endContainer)&&de(X.startContainer,X.startOffset)&&de(X.endContainer,X.endOffset)}function Oe(X){if(!we(X))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+X.inspect()+")")}var Rt=document.createElement("style"),Ut=!1;try{Rt.innerHTML="<b>x</b>",Ut=Rt.firstChild.nodeType==3}catch{}function se(X,lt){Oe(X);var vt=X.startContainer,Vt=X.startOffset,te=X.endContainer,Zt=X.endOffset,Yt=vt===te;tt(te)&&0<Zt&&Zt<te.length&>(te,Zt,lt),tt(vt)&&0<Vt&&Vt<vt.length&&(vt=gt(vt,Vt,lt),Yt?(Zt-=Vt,te=vt):te==vt.parentNode&&Zt>=nt(vt)&&Zt++,Vt=0),X.setStartAndEnd(vt,Vt,te,Zt)}function bt(X){Oe(X);var lt=X.commonAncestorContainer.parentNode.cloneNode(!1);return lt.appendChild(X.cloneContents()),lt.innerHTML}L.features.htmlParsingConforms=Ut;var ft=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],xt=0,Bt=1,ce=2,Ce=3,Te=0,Ne=1,Ge=2,be=3;function pt(X){X.START_TO_START=xt,X.START_TO_END=Bt,X.END_TO_END=ce,X.END_TO_START=Ce,X.NODE_BEFORE=Te,X.NODE_AFTER=Ne,X.NODE_BEFORE_AND_AFTER=Ge,X.NODE_INSIDE=be}function Dt(X){pt(X),pt(X.prototype)}function $t(X,lt){return function(){Oe(this);var vt=this.startContainer,Vt=this.startOffset,te=this.commonAncestorContainer,Zt=new Jt(this,!0);return vt!==te&&(vt=(te=Ot(wt(vt,te,!0))).node,Vt=te.offset),Nt(Zt,Tt),Zt.reset(),te=X(Zt),Zt.detach(),lt(this,vt,Vt,vt,Vt),te}}function qt(X,lt){function vt(Yt,me){return function(Ee){Ie(Ee,Xt),Ie(Lt(Ee),Qt),Ee=(Yt?It:Ot)(Ee),(me?Vt:te)(this,Ee.node,Ee.offset)}}function Vt(Yt,me,Ee){var Ue=Yt.endContainer,Ae=Yt.endOffset;me===Yt.startContainer&&Ee===Yt.startOffset||(Lt(me)==Lt(Ue)&&ct(me,Ee,Ue,Ae)!=1||(Ue=me,Ae=Ee),lt(Yt,me,Ee,Ue,Ae))}function te(Yt,me,Ee){var Ue=Yt.startContainer,Ae=Yt.startOffset;me===Yt.endContainer&&Ee===Yt.endOffset||(Lt(me)==Lt(Ue)&&ct(me,Ee,Ue,Ae)!=-1||(Ue=me,Ae=Ee),lt(Yt,Ue,Ae,me,Ee))}function Zt(){}Zt.prototype=L.rangePrototype,X.prototype=new Zt,Z.extend(X.prototype,{setStart:function(Yt,me){ze(Yt,!0),He(Yt,me),Vt(this,Yt,me)},setEnd:function(Yt,me){ze(Yt,!0),He(Yt,me),te(this,Yt,me)},setStartAndEnd:function(){var Yt=arguments,me=Yt[0],Ee=Yt[1],Ue=me,Ae=Ee;switch(Yt.length){case 3:Ae=Yt[2];break;case 4:Ue=Yt[2],Ae=Yt[3]}ze(me,!0),He(me,Ee),ze(Ue,!0),He(Ue,Ae),lt(this,me,Ee,Ue,Ae)},setBoundary:function(Yt,me,Ee){this["set"+(Ee?"Start":"End")](Yt,me)},setStartBefore:vt(!0,!0),setStartAfter:vt(!1,!0),setEndBefore:vt(!0,!1),setEndAfter:vt(!1,!1),collapse:function(Yt){Oe(this),Yt?lt(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):lt(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(Yt){ze(Yt,!0),lt(this,Yt,0,Yt,St(Yt))},selectNode:function(Yt){ze(Yt,!1),Ie(Yt,Xt);var me=It(Yt);Yt=Ot(Yt),lt(this,me.node,me.offset,Yt.node,Yt.offset)},extractContents:$t(dt,lt),deleteContents:$t(ht,lt),canSurroundContents:function(){Oe(this),Tt(this.startContainer),Tt(this.endContainer);var Yt=new Jt(this,!0),me=Yt._first&&jt(Yt._first,this)||Yt._last&&jt(Yt._last,this);return Yt.detach(),!me},splitBoundaries:function(){se(this)},splitBoundariesPreservingPositions:function(Yt){se(this,Yt)},normalizeBoundaries:function(){function Yt(un){var bn=un.nextSibling;bn&&bn.nodeType==un.nodeType&&(cn=(nn=un).length,un.appendData(bn.data),yt(bn))}function me(un){var bn,Nn=un.previousSibling;Nn&&Nn.nodeType==un.nodeType&&(bn=(Ae=un).length,We=Nn.length,un.insertData(0,Nn.data),yt(Nn),Ae==nn?(cn+=We,nn=Ae):nn==un.parentNode&&(Nn=nt(un),cn==Nn?(nn=un,cn=bn):Nn<cn&&cn--))}Oe(this);var Ee,Ue,Ae=this.startContainer,We=this.startOffset,nn=this.endContainer,cn=this.endOffset,An=!0;tt(nn)?cn==nn.length?Yt(nn):cn==0&&(Ee=nn.previousSibling)&&Ee.nodeType==nn.nodeType&&(cn=Ee.length,Ae==nn&&(An=!1),Ee.appendData(nn.data),yt(nn),nn=Ee):(0<cn&&(Ue=nn.childNodes[cn-1])&&tt(Ue)&&Yt(Ue),An=!this.collapsed),An?tt(Ae)?We==0?me(Ae):We==Ae.length&&(Ee=Ae.nextSibling)&&Ee.nodeType==Ae.nodeType&&(nn==Ee&&(cn+=(nn=Ae).length),Ae.appendData(Ee.data),yt(Ee)):We<Ae.childNodes.length&&(Ue=Ae.childNodes[We])&&tt(Ue)&&me(Ue):(Ae=nn,We=cn),lt(this,Ae,We,nn,cn)},collapseToPoint:function(Yt,me){ze(Yt,!0),He(Yt,me),this.setStartAndEnd(Yt,me)},parentElement:function(){return Oe(this),this.commonAncestorContainer?qe(this.commonAncestorContainer,!0):null}}),Dt(X)}function Wt(X,lt,vt,Vt,te){X.startContainer=lt,X.startOffset=vt,X.endContainer=Vt,X.endOffset=te,X.document=Y.getDocument(lt),(vt=X).collapsed=vt.startContainer===vt.endContainer&&vt.startOffset===vt.endOffset,vt.commonAncestorContainer=vt.collapsed?vt.startContainer:Y.getCommonAncestor(vt.startContainer,vt.endContainer)}function oe(X){Wt(this,X,0,X,0)}Z.extend(L.rangePrototype,{compareBoundaryPoints:function(X,lt){Oe(this),hn(this.startContainer,lt.startContainer);var vt=X==Ce||X==xt?"start":"end",Vt=(X=X==Bt||X==xt?"start":"end",this[vt+"Container"]),te=(vt=this[vt+"Offset"],lt[X+"Container"]);return lt=lt[X+"Offset"],ct(Vt,vt,te,lt)},insertNode:function(X){if(Oe(this),Ie(X,ve),Tt(this.startContainer),et(X,this.startContainer))throw new Q("HIERARCHY_REQUEST_ERR");X=Et(X,this.startContainer,this.startOffset),this.setStartBefore(X)},cloneContents:function(){if(Oe(this),this.collapsed)return At(this).createDocumentFragment();if(this.startContainer===this.endContainer&&tt(this.startContainer))return(lt=this.startContainer.cloneNode(!0)).data=lt.data.slice(this.startOffset,this.endOffset),(X=At(this).createDocumentFragment()).appendChild(lt),X;var X=new Jt(this,!0),lt=function vt(Vt){for(var te,Zt,Yt=At(Vt.range).createDocumentFragment();te=Vt.next();){if(Zt=Vt.isPartiallySelectedSubtree(),te=te.cloneNode(!Zt),Zt&&(Zt=Vt.getSubtreeIterator(),te.appendChild(vt(Zt)),Zt.detach()),te.nodeType==10)throw new Q("HIERARCHY_REQUEST_ERR");Yt.appendChild(te)}return Yt}(X);return X.detach(),lt},canSurroundContents:function(){Oe(this),Tt(this.startContainer),Tt(this.endContainer);var X=new Jt(this,!0),lt=X._first&&jt(X._first,this)||X._last&&jt(X._last,this);return X.detach(),!lt},surroundContents:function(X){if(Ie(X,kt),!this.canSurroundContents())throw new Q("INVALID_STATE_ERR");var lt=this.extractContents();if(X.hasChildNodes())for(;X.lastChild;)X.removeChild(X.lastChild);Et(X,this.startContainer,this.startOffset),X.appendChild(lt),this.selectNode(X)},cloneRange:function(){Oe(this);for(var X,lt=new oe(At(this)),vt=ft.length;vt--;)lt[X=ft[vt]]=this[X];return lt},toString:function(){Oe(this);var X,lt=this.startContainer;return lt===this.endContainer&&tt(lt)?lt.nodeType==3||lt.nodeType==4?lt.data.slice(this.startOffset,this.endOffset):"":(X=[],Nt(lt=new Jt(this,!0),function(vt){vt.nodeType!=3&&vt.nodeType!=4||X.push(vt.data)}),lt.detach(),X.join(""))},compareNode:function(X){Oe(this);var lt=X.parentNode;if(X=nt(X),!lt)throw new Q("NOT_FOUND_ERR");var vt=this.comparePoint(lt,X);return lt=this.comparePoint(lt,X+1),vt<0?0<lt?Ge:Te:0<lt?Ne:be},comparePoint:function(X,lt){return Oe(this),ae(X,"HIERARCHY_REQUEST_ERR"),hn(X,this.startContainer),ct(X,lt,this.startContainer,this.startOffset)<0?-1:0<ct(X,lt,this.endContainer,this.endOffset)?1:0},createContextualFragment:Ut?function(X){var lt=this.startContainer,vt=at(lt);if(!lt)throw new Q("INVALID_STATE_ERR");var Vt=null;return lt.nodeType==1?Vt=lt:tt(lt)&&(Vt=Y.parentElement(lt)),(Vt=Vt===null||Vt.nodeName=="HTML"&&Y.isHtmlNamespace(at(Vt).documentElement)&&Y.isHtmlNamespace(Vt)?vt.createElement("body"):Vt.cloneNode(!1)).innerHTML=X,Y.fragmentFromNodeChildren(Vt)}:function(X){var lt=At(this).createElement("body");return lt.innerHTML=X,Y.fragmentFromNodeChildren(lt)},toHtml:function(){return bt(this)},intersectsNode:function(X,lt){if(Oe(this),Lt(X)!=Lt(this.startContainer))return!1;var vt=X.parentNode;if(X=nt(X),!vt)return!0;var Vt=ct(vt,X,this.endContainer,this.endOffset);return vt=ct(vt,X+1,this.startContainer,this.startOffset),lt?Vt<=0&&0<=vt:Vt<0&&0<vt},isPointInRange:function(X,lt){return Oe(this),ae(X,"HIERARCHY_REQUEST_ERR"),hn(X,this.startContainer),0<=ct(X,lt,this.startContainer,this.startOffset)&&ct(X,lt,this.endContainer,this.endOffset)<=0},intersectsRange:function(X){return Ct(this,X,!1)},intersectsOrTouchesRange:function(X){return Ct(this,X,!0)},intersection:function(X){var lt,vt,Vt;return this.intersectsRange(X)?(lt=ct(this.startContainer,this.startOffset,X.startContainer,X.startOffset),vt=ct(this.endContainer,this.endOffset,X.endContainer,X.endOffset),Vt=this.cloneRange(),lt==-1&&Vt.setStart(X.startContainer,X.startOffset),vt==1&&Vt.setEnd(X.endContainer,X.endOffset),Vt):null},union:function(X){var lt;if(this.intersectsOrTouchesRange(X))return lt=this.cloneRange(),ct(X.startContainer,X.startOffset,this.startContainer,this.startOffset)==-1&<.setStart(X.startContainer,X.startOffset),ct(X.endContainer,X.endOffset,this.endContainer,this.endOffset)==1&<.setEnd(X.endContainer,X.endOffset),lt;throw new Q("Ranges do not intersect")},containsNode:function(X,lt){return lt?this.intersectsNode(X,!1):this.compareNode(X)==be},containsNodeContents:function(X){return 0<=this.comparePoint(X,0)&&this.comparePoint(X,St(X))<=0},containsRange:function(X){var lt=this.intersection(X);return lt!==null&&X.equals(lt)},containsNodeText:function(X){var lt=this.cloneRange(),vt=(lt.selectNode(X),lt.getNodes([3]));return 0<vt.length?(lt.setStart(vt[0],0),vt=vt.pop(),lt.setEnd(vt,vt.length),this.containsRange(lt)):this.containsNodeContents(X)},getNodes:function(X,lt){return Oe(this),vt=this,Vt=lt,Zt=!(!(lt=X)||!lt.length),Yt=!!Vt,Zt&&(te=new RegExp("^("+lt.join("|")+")$")),Nt(new Jt(vt,!(me=[])),function(Ee){var Ue;Zt&&!te.test(Ee.nodeType)||Yt&&!Vt(Ee)||Ee==(Ue=vt.startContainer)&&tt(Ue)&&vt.startOffset==Ue.length||Ee==(Ue=vt.endContainer)&&tt(Ue)&&vt.endOffset==0||me.push(Ee)}),me;var vt,Vt,te,Zt,Yt,me},getDocument:function(){return At(this)},collapseBefore:function(X){this.setEndBefore(X),this.collapse(!1)},collapseAfter:function(X){this.setStartAfter(X),this.collapse(!0)},getBookmark:function(X){var lt=At(this),vt=L.createRange(lt),Vt=0,te=0;return X=X||Y.getBody(lt),vt.selectNodeContents(X),(lt=this.intersection(vt))&&(vt.setEnd(lt.startContainer,lt.startOffset),te=(Vt=vt.toString().length)+lt.toString().length),{start:Vt,end:te,containerNode:X}},moveToBookmark:function(X){for(var lt,vt,Vt,te,Zt=X.containerNode,Yt=0,me=(this.setStart(Zt,0),this.collapse(!0),[Zt]),Ee=!1,Ue=!1;!Ue&&(lt=me.pop());)if(lt.nodeType==3)vt=Yt+lt.length,!Ee&&X.start>=Yt&&X.start<=vt&&(this.setStart(lt,X.start-Yt),Ee=!0),Ee&&X.end>=Yt&&X.end<=vt&&(this.setEnd(lt,X.end-Yt),Ue=!0),Yt=vt;else for(Vt=(te=lt.childNodes).length;Vt--;)me.push(te[Vt])},getName:function(){return"DomRange"},equals:function(X){return oe.rangesEqual(this,X)},isValid:function(){return we(this)},inspect:function(){return Ft(this)},detach:function(){}}),qt(oe,Wt),Z.extend(oe,{rangeProperties:ft,RangeIterator:Jt,copyComparisonConstants:Dt,createPrototypeRange:qt,inspect:Ft,toHtml:bt,getRangeDocument:At,rangesEqual:function(X,lt){return X.startContainer===lt.startContainer&&X.startOffset===lt.startOffset&&X.endContainer===lt.endContainer&&X.endOffset===lt.endOffset}}),L.DomRange=oe}),R.createCoreModule("WrappedRange",["DomRange"],function(L,B){var Y,Z,rt,Q,tt=L.dom,nt=L.util,et=tt.DomPosition,at=L.DomRange,ct=tt.getBody,gt=tt.getContentDocument,wt=tt.isCharacterDataNode;if(L.features.implementsDomRange){let It=function(Ot){for(var Et,Ct=Mt.length;Ct--;)Ot[Et=Mt[Ct]]=Ot.nativeRange[Et];Ot.collapsed=Ot.startContainer===Ot.endContainer&&Ot.startOffset===Ot.endOffset};var St,Mt=at.rangeProperties;at.createPrototypeRange(Y=function(Ot){if(!Ot)throw B.createError("WrappedRange: Range must be specified");this.nativeRange=Ot,It(this)},function(Ot,Et,Ct,Nt,ht){var dt=Ot.startContainer!==Et||Ot.startOffset!=Ct,Ft=Ot.endContainer!==Nt||Ot.endOffset!=ht,Jt=!Ot.equals(Ot.nativeRange);(dt||Ft||Jt)&&(Ot.setEnd(Nt,ht),Ot.setStart(Et,Ct))}),(St=Y.prototype).selectNode=function(Ot){this.nativeRange.selectNode(Ot),It(this)},St.cloneContents=function(){return this.nativeRange.cloneContents()},St.surroundContents=function(Ot){this.nativeRange.surroundContents(Ot),It(this)},St.collapse=function(Ot){this.nativeRange.collapse(Ot),It(this)},St.cloneRange=function(){return new Y(this.nativeRange.cloneRange())},St.refresh=function(){It(this)},St.toString=function(){return this.nativeRange.toString()};var Lt=document.createTextNode("test"),Pt=(ct(document).appendChild(Lt),document.createRange());Pt.setStart(Lt,0),Pt.setEnd(Lt,0);try{Pt.setStart(Lt,1),St.setStart=function(Ot,Et){this.nativeRange.setStart(Ot,Et),It(this)},St.setEnd=function(Ot,Et){this.nativeRange.setEnd(Ot,Et),It(this)},yt=function(Ot){return function(Et){this.nativeRange[Ot](Et),It(this)}}}catch{St.setStart=function(Et,Ct){try{this.nativeRange.setStart(Et,Ct)}catch{this.nativeRange.setEnd(Et,Ct),this.nativeRange.setStart(Et,Ct)}It(this)},St.setEnd=function(Et,Ct){try{this.nativeRange.setEnd(Et,Ct)}catch{this.nativeRange.setStart(Et,Ct),this.nativeRange.setEnd(Et,Ct)}It(this)},yt=function(Et,Ct){return function(Nt){try{this.nativeRange[Et](Nt)}catch{this.nativeRange[Ct](Nt),this.nativeRange[Et](Nt)}It(this)}}}St.setStartBefore=yt("setStartBefore","setEndBefore"),St.setStartAfter=yt("setStartAfter","setEndAfter"),St.setEndBefore=yt("setEndBefore","setStartBefore"),St.setEndAfter=yt("setEndAfter","setStartAfter"),St.selectNodeContents=function(Ot){this.setStartAndEnd(Ot,0,tt.getNodeLength(Ot))},Pt.selectNodeContents(Lt),Pt.setEnd(Lt,3);var yt=document.createRange();yt.selectNodeContents(Lt),yt.setEnd(Lt,4),yt.setStart(Lt,2),Pt.compareBoundaryPoints(Pt.START_TO_END,yt)==-1&&Pt.compareBoundaryPoints(Pt.END_TO_START,yt)==1?St.compareBoundaryPoints=function(Ot,Et){return Ot==(Et=Et.nativeRange||Et).START_TO_END?Ot=Et.END_TO_START:Ot==Et.END_TO_START&&(Ot=Et.START_TO_END),this.nativeRange.compareBoundaryPoints(Ot,Et)}:St.compareBoundaryPoints=function(Ot,Et){return this.nativeRange.compareBoundaryPoints(Ot,Et.nativeRange||Et)},(yt=document.createElement("div")).innerHTML="123";var jt=yt.firstChild,At=ct(document);At.appendChild(yt),Pt.setStart(jt,1),Pt.setEnd(jt,2),Pt.deleteContents(),jt.data=="13"&&(St.deleteContents=function(){this.nativeRange.deleteContents(),It(this)},St.extractContents=function(){var Ot=this.nativeRange.extractContents();return It(this),Ot}),At.removeChild(yt),At=null,nt.isHostMethod(Pt,"createContextualFragment")&&(St.createContextualFragment=function(Ot){return this.nativeRange.createContextualFragment(Ot)}),ct(document).removeChild(Lt),St.getName=function(){return"WrappedRange"},L.WrappedRange=Y,L.createNativeRange=function(Ot){return(Ot=gt(Ot,B,"createNativeRange")).createRange()}}L.features.implementsTextRange&&(Z=function(It,Ot,Et,Ct,Nt){var ht=It.duplicate(),dt=(ht.collapse(Et),ht.parentElement());if(!(dt=tt.isOrIsAncestorOf(Ot,dt)?dt:Ot).canHaveHTML)return{boundaryPosition:Ot=new et(dt.parentNode,tt.getNodeIndex(dt)),nodeInfo:{nodeIndex:Ot.offset,containerElement:Ot.node}};var Ft=tt.getDocument(dt).createElement("span");Ft.parentNode&&tt.removeNode(Ft);for(var Jt,Xt,Qt=Et?"StartToStart":"StartToEnd",ve=Nt&&Nt.containerElement==dt?Nt.nodeIndex:0,kt=dt.childNodes.length,ee=kt,pe=ee;pe==kt?dt.appendChild(Ft):dt.insertBefore(Ft,dt.childNodes[pe]),ht.moveToElementText(Ft),(Jt=ht.compareEndPoints(Qt,It))!=0&&ve!=ee;){if(Jt==-1){if(ee==ve+1)break;ve=pe}else ee=ee==ve+1?ve:pe;pe=Math.floor((ve+ee)/2),dt.removeChild(Ft)}if(Ot=Ft.nextSibling,Jt==-1&&Ot&&wt(Ot)){if(ht.setEndPoint(Et?"EndToStart":"EndToEnd",It),/[\r\n]/.test(Ot.data))for(var Le=ht.duplicate(),Fe=(Nt=Le.text.replace(/\r\n/g,"\r").length,Le.moveStart("character",Nt));(Jt=Le.compareEndPoints("StartToEnd",Le))==-1;)Fe++,Le.moveStart("character",1);else Fe=ht.text.length;Xt=new et(Ot,Fe)}else Nt=(Ct||!Et)&&Ft.previousSibling,Xt=(Ot=(Ct||Et)&&Ft.nextSibling)&&wt(Ot)?new et(Ot,0):Nt&&wt(Nt)?new et(Nt,Nt.data.length):new et(dt,tt.getNodeIndex(Ft));return tt.removeNode(Ft),{boundaryPosition:Xt,nodeInfo:{nodeIndex:pe,containerElement:dt}}},rt=function(It,Ot){var Et,Ct=It.offset,Nt=tt.getDocument(It.node),ht=ct(Nt).createTextRange(),dt=wt(It.node),Ft=dt?(Et=It.node).parentNode:(Et=Ct<(Ft=It.node.childNodes).length?Ft[Ct]:null,It.node);return(It=Nt.createElement("span")).innerHTML="&#feff;",Et?Ft.insertBefore(It,Et):Ft.appendChild(It),ht.moveToElementText(It),ht.collapse(!Ot),Ft.removeChild(It),dt&&ht[Ot?"moveStart":"moveEnd"]("character",Ct),ht},((jt=function(It){this.textRange=It,this.refresh()}).prototype=new at(document)).refresh=function(){Ot=(Et=this.textRange).parentElement(),(Nt=Et.duplicate()).collapse(!0),Ct=Nt.parentElement(),(Nt=Et.duplicate()).collapse(!1),Et=Nt.parentElement();var It,Ot,Et,Ct=(Nt=Ct==Et?Ct:tt.getCommonAncestor(Ct,Et))==Ot?Nt:tt.getCommonAncestor(Ot,Nt),Nt=(Et=this.textRange).compareEndPoints("StartToEnd",Et)==0?It=Z(this.textRange,Ct,!0,!0).boundaryPosition:(It=(Ot=Z(this.textRange,Ct,!0,!1)).boundaryPosition,Z(this.textRange,Ct,!1,!1,Ot.nodeInfo).boundaryPosition);this.setStart(It.node,It.offset),this.setEnd(Nt.node,Nt.offset)},jt.prototype.getName=function(){return"WrappedTextRange"},at.copyComparisonConstants(jt),jt.rangeToTextRange=Q=function(It){var Ot,Et;return It.collapsed?rt(new et(It.startContainer,It.startOffset),!0):(Ot=rt(new et(It.startContainer,It.startOffset),!0),Et=rt(new et(It.endContainer,It.endOffset),!1),(It=ct(at.getRangeDocument(It)).createTextRange()).setEndPoint("StartToStart",Ot),It.setEndPoint("EndToEnd",Et),It)},jt.prototype.toTextRange=function(){return Q(this)},L.WrappedTextRange=jt,L.features.implementsDomRange&&!L.config.preferTextRange||((yt=Function("return this;")()).Range===void 0&&(yt.Range=jt),L.createNativeRange=function(It){return It=gt(It,B,"createNativeRange"),ct(It).createTextRange()},L.WrappedRange=jt)),L.createRange=function(It){return It=gt(It,B,"createRange"),new L.WrappedRange(L.createNativeRange(It))},L.createRangyRange=function(It){return It=gt(It,B,"createRangyRange"),new at(It)},nt.createAliasForDeprecatedMethod(L,"createIframeRange","createRange"),nt.createAliasForDeprecatedMethod(L,"createIframeRangyRange","createRangyRange"),L.addShimListener(function(It){var Ot=It.document;Ot.createRange===void 0&&(Ot.createRange=function(){return L.createRange(Ot)}),Ot=null})}),R.createCoreModule("WrappedSelection",["DomRange","WrappedRange"],function(L,B){L.config.checkSelectionRanges=!0;var Y,Z,rt="number",Q=L.dom,tt=L.util,nt=tt.isHostMethod,et=L.DomRange,at=L.WrappedRange,ct=L.DOMException,gt=Q.DomPosition,wt=L.features,St="Control",Mt=Q.getDocument,Lt=Q.getBody,Pt=et.rangesEqual;function yt(X){return typeof X=="string"?/^backward(s)?$/i.test(X):!!X}function jt(X,lt){return X?Q.isWindow(X)?X:X instanceof xt?X.win:(X=Q.getContentDocument(X,B,lt),Q.getWindow(X)):window}function At(X){return jt(X,"getDocSelection").document.selection}function It(X){return!!X.anchorNode&&Q.comparePoints(X.anchorNode,X.anchorOffset,X.focusNode,X.focusOffset)==1}var Ot=nt(window,"getSelection"),Et=tt.isHostObject(document,"selection"),Ct=(wt.implementsWinGetSelection=Ot,(wt.implementsDocSelection=Et)&&(!Ot||L.config.preferTextRange));if(Ct)Y=At,L.isSelectionValid=function(X){var lt=(X=jt(X,"isSelectionValid").document).selection;return lt.type!="None"||Mt(lt.createRange().parentElement())==X};else{if(!Ot)return B.fail("Neither document.selection or window.getSelection() detected."),!1;Y=function(X){return jt(X,"getWinSelection").getSelection()},L.isSelectionValid=function(){return!0}}if(!(Ot=(L.getNativeSelection=Y)()))return B.fail("Native selection was null (possibly issue 138?)"),!1;var Nt=L.createNativeRange(document),ht=Lt(document),dt=tt.areHostProperties(Ot,["anchorNode","focusNode","anchorOffset","focusOffset"]),Ft=(wt.selectionHasAnchorAndFocus=dt,nt(Ot,"extend")),Jt=(wt.selectionHasExtend=Ft,nt(Ot,"setBaseAndExtent")),Xt=(wt.selectionHasSetBaseAndExtent=Jt,typeof Ot.rangeCount==rt),Qt=(wt.selectionHasRangeCount=Xt,!1),ve=!0,kt=Ft?function(X,lt){var vt=et.getRangeDocument(lt);(vt=L.createRange(vt)).collapseToPoint(lt.endContainer,lt.endOffset),X.addRange(Oe(vt)),X.extend(lt.startContainer,lt.startOffset)}:null;if(tt.areHostMethods(Ot,["addRange","getRangeAt","removeAllRanges"])&&typeof Ot.rangeCount==rt&&wt.implementsDomRange){var ee=window.getSelection();if(ee){for(var pe=ee.rangeCount,Le=1<pe,Fe=[],qe=It(ee),ze=0;ze<pe;++ze)Fe[ze]=ee.getRangeAt(ze);var Ie=Q.createTestElement(document,"",!1),He=Ie.appendChild(document.createTextNode(" "));for((be=document.createRange()).setStart(He,1),be.collapse(!0),ee.removeAllRanges(),ee.addRange(be),ve=ee.rangeCount==1,ee.removeAllRanges(),Le||(Le=window.navigator.appVersion.match(/Chrome\/(.*?) /),Qt=!(Le&&36<=parseInt(Le[1]))&&(Le=be.cloneRange(),be.setStart(He,0),Le.setEnd(He,3),Le.setStart(He,2),ee.addRange(be),ee.addRange(Le),ee.rangeCount==2)),Q.removeNode(Ie),ee.removeAllRanges(),ze=0;ze<pe;++ze)ze==0&&qe?kt?kt(ee,Fe[ze]):(L.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),ee.addRange(Fe[ze])):ee.addRange(Fe[ze])}}wt.selectionSupportsMultipleRanges=Qt,wt.collapsedNonEditableSelectionsSupported=ve;var hn,Tt=!1;function ae(X,lt,vt){var Vt=vt?"end":"start";vt=vt?"start":"end",X.anchorNode=lt[Vt+"Container"],X.anchorOffset=lt[Vt+"Offset"],X.focusNode=lt[vt+"Container"],X.focusOffset=lt[vt+"Offset"]}function de(X){X.anchorNode=X.focusNode=null,X.anchorOffset=X.focusOffset=0,X.rangeCount=0,X.isCollapsed=!0,X._ranges.length=0,we(X)}function we(X){X.type=X.rangeCount==0?"None":Z(X)?"Caret":"Range"}function Oe(X){var lt;return X instanceof et?((lt=L.createNativeRange(X.getDocument())).setEnd(X.endContainer,X.endOffset),lt.setStart(X.startContainer,X.startOffset)):X instanceof at?lt=X.nativeRange:wt.implementsDomRange&&X instanceof Q.getWindow(X.startContainer).Range&&(lt=X),lt}function Rt(X){var lt=X.getNodes();if(function(vt){if(vt.length&&vt[0].nodeType==1){for(var Vt=1,te=vt.length;Vt<te;++Vt)if(!Q.isAncestorOf(vt[0],vt[Vt]))return;return 1}}(lt))return lt[0];throw B.createError("getSingleElementFromRange: range "+X.inspect()+" did not consist of a single element")}function Ut(X){return X&&X.text!==void 0}function se(X,lt){lt=new at(lt),X._ranges=[lt],ae(X,lt,!1),X.rangeCount=1,X.isCollapsed=lt.collapsed,we(X)}function bt(X){if(X._ranges.length=0,X.docSelection.type=="None")de(X);else{var lt=X.docSelection.createRange();if(Ut(lt))se(X,lt);else{X.rangeCount=lt.length;for(var vt,Vt=Mt(lt.item(0)),te=0;te<X.rangeCount;++te)(vt=L.createRange(Vt)).selectNode(lt.item(te)),X._ranges.push(vt);X.isCollapsed=X.rangeCount==1&&X._ranges[0].collapsed,ae(X,X._ranges[X.rangeCount-1],!1),we(X)}}}function ft(X,lt){for(var vt=X.docSelection.createRange(),Vt=(lt=Rt(lt),Mt(vt.item(0))),te=Lt(Vt).createControlRange(),Zt=0,Yt=vt.length;Zt<Yt;++Zt)te.add(vt.item(Zt));try{te.add(lt)}catch{throw B.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}te.select(),bt(X)}function xt(X,lt,vt){this.nativeSelection=X,this.docSelection=lt,this._ranges=[],this.win=vt,this.refresh()}function Bt(X){X.win=X.anchorNode=X.focusNode=X._ranges=null,X.rangeCount=X.anchorOffset=X.focusOffset=0,X.detached=!0,we(X)}ht&&nt(ht,"createControlRange")&&(He=ht.createControlRange(),tt.areHostProperties(He,["item","add"])&&(Tt=!0)),wt.implementsControlRange=Tt,Z=dt?function(X){return X.anchorNode===X.focusNode&&X.anchorOffset===X.focusOffset}:function(X){return!!X.rangeCount&&X.getRangeAt(X.rangeCount-1).collapsed},nt(Ot,"getRangeAt")?hn=function(X,lt){try{return X.getRangeAt(lt)}catch{return null}}:dt&&(hn=function(X){var lt=Mt(X.anchorNode);return(lt=L.createRange(lt)).setStartAndEnd(X.anchorNode,X.anchorOffset,X.focusNode,X.focusOffset),lt.collapsed!==this.isCollapsed&<.setStartAndEnd(X.focusNode,X.focusOffset,X.anchorNode,X.anchorOffset),lt}),xt.prototype=L.selectionPrototype;var ce=[];function Ce(X,lt){for(var vt,Vt,te=ce.length;te--;)if(Vt=(vt=ce[te]).selection,lt=="deleteAll")Bt(Vt);else if(vt.win==X)return lt=="delete"?(ce.splice(te,1),!0):Vt;return lt=="deleteAll"&&(ce.length=0),null}function Te(X){if(X&&X instanceof xt)return X.refresh(),X;var lt=Ce(X=jt(X,"getNativeSelection")),vt=Y(X),Vt=Et?At(X):null;return lt?(lt.nativeSelection=vt,lt.docSelection=Vt,lt.refresh()):(lt=new xt(vt,Vt,X),ce.push({win:X,selection:lt})),lt}L.getSelection=Te,tt.createAliasForDeprecatedMethod(L,"getIframeSelection","getSelection");var Ne,Ge,be=xt.prototype;function pt(X,lt){for(var vt,Vt=Mt(lt[0].startContainer),te=Lt(Vt).createControlRange(),Zt=0,Yt=lt.length;Zt<Yt;++Zt){vt=Rt(lt[Zt]);try{te.add(vt)}catch{throw B.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}te.select(),bt(X)}if(!Ct&&dt&&tt.areHostMethods(Ot,["removeAllRanges","addRange"])){let X=function(lt,vt){kt(lt.nativeSelection,vt),lt.refresh()};be.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),de(this)},be.addRange=Xt?function(lt,vt){if(Tt&&Et&&this.docSelection.type==St)ft(this,lt);else if(yt(vt)&&Ft)X(this,lt);else{vt=Qt?this.rangeCount:(this.removeAllRanges(),0);var Vt=Oe(lt).cloneRange();try{this.nativeSelection.addRange(Vt)}catch{}this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==vt+1?(L.config.checkSelectionRanges&&(Vt=hn(this.nativeSelection,this.rangeCount-1))&&!Pt(Vt,lt)&&(lt=new at(Vt)),this._ranges[this.rangeCount-1]=lt,ae(this,lt,Ge(this.nativeSelection)),this.isCollapsed=Z(this),we(this)):this.refresh()}}:function(lt,vt){yt(vt)&&Ft?X(this,lt):(this.nativeSelection.addRange(Oe(lt)),this.refresh())},be.setRanges=function(lt){if(Tt&&Et&&1<lt.length)pt(this,lt);else{this.removeAllRanges();for(var vt=0,Vt=lt.length;vt<Vt;++vt)this.addRange(lt[vt])}}}else{if(!(nt(Ot,"empty")&&nt(Nt,"select")&&Tt&&Ct))return B.fail("No means of selecting a Range or TextRange was found"),!1;be.removeAllRanges=function(){try{var X,lt;this.docSelection.empty(),this.docSelection.type!="None"&&(this.anchorNode?X=Mt(this.anchorNode):this.docSelection.type==St&&(lt=this.docSelection.createRange()).length&&(X=Mt(lt.item(0))),X&&(Lt(X).createTextRange().select(),this.docSelection.empty()))}catch{}de(this)},be.addRange=function(X){this.docSelection.type==St?ft(this,X):(L.WrappedTextRange.rangeToTextRange(X).select(),this._ranges[0]=X,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,ae(this,X,!1),we(this))},be.setRanges=function(X){this.removeAllRanges();var lt=X.length;1<lt?pt(this,X):lt&&this.addRange(X[0])}}if(be.getRangeAt=function(X){if(X<0||X>=this.rangeCount)throw new ct("INDEX_SIZE_ERR");return this._ranges[X].cloneRange()},Ct)Ne=function(X){var lt;L.isSelectionValid(X.win)?lt=X.docSelection.createRange():(lt=Lt(X.win.document).createTextRange()).collapse(!0),X.docSelection.type==St?bt(X):Ut(lt)?se(X,lt):de(X)};else if(nt(Ot,"getRangeAt")&&typeof Ot.rangeCount==rt)Ne=function(X){if(Tt&&Et&&X.docSelection.type==St)bt(X);else if(X._ranges.length=X.rangeCount=X.nativeSelection.rangeCount,X.rangeCount){for(var lt=0,vt=X.rangeCount;lt<vt;++lt)X._ranges[lt]=new L.WrappedRange(X.nativeSelection.getRangeAt(lt));ae(X,X._ranges[X.rangeCount-1],Ge(X.nativeSelection)),X.isCollapsed=Z(X),we(X)}else de(X)};else{if(!dt||typeof Ot.isCollapsed!="boolean"||typeof Nt.collapsed!="boolean"||!wt.implementsDomRange)return B.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;Ne=function(X){var lt,vt=X.nativeSelection;vt.anchorNode?(vt=hn(vt,0),X._ranges=[vt],X.rangeCount=1,lt=(vt=X).nativeSelection,vt.anchorNode=lt.anchorNode,vt.anchorOffset=lt.anchorOffset,vt.focusNode=lt.focusNode,vt.focusOffset=lt.focusOffset,X.isCollapsed=Z(X),we(X)):de(X)}}function Dt(X,lt){var vt=X.getAllRanges();X.removeAllRanges();for(var Vt=0,te=vt.length;Vt<te;++Vt)Pt(lt,vt[Vt])||X.addRange(vt[Vt]);X.rangeCount||de(X)}function $t(X,lt){if(X.win.document!=Mt(lt))throw new ct("WRONG_DOCUMENT_ERR")}function qt(X,lt){if(lt<0||lt>(Q.isCharacterDataNode(X)?X:X.childNodes).length)throw new ct("INDEX_SIZE_ERR")}function Wt(X){return function(lt,vt){var Vt;this.rangeCount?(Vt=this.getRangeAt(0))["set"+(X?"Start":"End")](lt,vt):(Vt=L.createRange(this.win.document)).setStartAndEnd(lt,vt),this.setSingleRange(Vt,this.isBackward())}}function oe(X){var lt=[],vt=new gt(X.anchorNode,X.anchorOffset),Vt=new gt(X.focusNode,X.focusOffset),te=typeof X.getName=="function"?X.getName():"Selection";if(X.rangeCount!==void 0)for(var Zt=0,Yt=X.rangeCount;Zt<Yt;++Zt)lt[Zt]=et.inspect(X.getRangeAt(Zt));return"["+te+"(Ranges: "+lt.join(", ")+")(anchor: "+vt.inspect()+", focus: "+Vt.inspect()+"]"}be.refresh=function(X){var lt=X?this._ranges.slice(0):null,vt=this.anchorNode,Vt=this.anchorOffset;if(Ne(this),X){var te=lt.length;if(te!=this._ranges.length||this.anchorNode!=vt||this.anchorOffset!=Vt)return!0;for(;te--;)if(!Pt(lt[te],this._ranges[te]))return!0;return!1}},be.removeRange=Tt&&Et?function(X){if(this.docSelection.type==St){for(var lt=this.docSelection.createRange(),vt=Rt(X),Vt=Mt(lt.item(0)),te=Lt(Vt).createControlRange(),Zt=!1,Yt=0,me=lt.length;Yt<me;++Yt)lt.item(Yt)!==vt||Zt?te.add(lt.item(Yt)):Zt=!0;te.select(),bt(this)}else Dt(this,X)}:function(X){Dt(this,X)},!Ct&&dt&&wt.implementsDomRange?(Ge=It,be.isBackward=function(){return Ge(this)}):Ge=be.isBackward=function(){return!1},be.isBackwards=be.isBackward,be.toString=function(){for(var X=[],lt=0,vt=this.rangeCount;lt<vt;++lt)X[lt]=""+this._ranges[lt];return X.join("")},be.collapse=function(X,lt){$t(this,X);var vt=L.createRange(X);vt.collapseToPoint(X,lt),this.setSingleRange(vt),this.isCollapsed=!0},be.collapseToStart=function(){if(!this.rangeCount)throw new ct("INVALID_STATE_ERR");var X=this._ranges[0];this.collapse(X.startContainer,X.startOffset)},be.collapseToEnd=function(){if(!this.rangeCount)throw new ct("INVALID_STATE_ERR");var X=this._ranges[this.rangeCount-1];this.collapse(X.endContainer,X.endOffset)},be.selectAllChildren=function(X){$t(this,X);var lt=L.createRange(X);lt.selectNodeContents(X),this.setSingleRange(lt)},Jt?be.setBaseAndExtent=function(X,lt,vt,Vt){this.nativeSelection.setBaseAndExtent(X,lt,vt,Vt),this.refresh()}:Ft&&(be.setBaseAndExtent=function(X,lt,vt,Vt){qt(X,lt),qt(vt,Vt),$t(this,X),$t(this,vt);var te=L.createRange(node),Zt=Q.comparePoints(X,lt,vt,Vt)==-1;Zt?te.setStartAndEnd(vt,Vt,X,lt):te.setStartAndEnd(X,lt,vt,Vt),this.setSingleRange(te,Zt)}),be.deleteFromDocument=function(){if(Tt&&Et&&this.docSelection.type==St){for(var X,lt=this.docSelection.createRange();lt.length;)X=lt.item(0),lt.remove(X),Q.removeNode(X);this.refresh()}else if(this.rangeCount){var vt=this.getAllRanges();if(vt.length){this.removeAllRanges();for(var Vt=0,te=vt.length;Vt<te;++Vt)vt[Vt].deleteContents();this.addRange(vt[te-1])}}},be.eachRange=function(X,lt){for(var vt=0,Vt=this._ranges.length;vt<Vt;++vt)if(X(this.getRangeAt(vt)))return lt},be.getAllRanges=function(){var X=[];return this.eachRange(function(lt){X.push(lt)}),X},be.setSingleRange=function(X,lt){this.removeAllRanges(),this.addRange(X,lt)},be.callMethodOnEachRange=function(X,lt){var vt=[];return this.eachRange(function(Vt){vt.push(Vt[X].apply(Vt,lt||[]))}),vt},be.setStart=Wt(!0),be.setEnd=Wt(!1),L.rangePrototype.select=function(X){Te(this.getDocument()).setSingleRange(this,X)},be.changeEachRange=function(X){var lt=[],vt=this.isBackward();this.eachRange(function(Vt){X(Vt),lt.push(Vt)}),this.removeAllRanges(),vt&<.length==1?this.addRange(lt[0],"backward"):this.setRanges(lt)},be.containsNode=function(X,lt){return this.eachRange(function(vt){return vt.containsNode(X,lt)},!0)||!1},be.getBookmark=function(X){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[X])}},be.moveToBookmark=function(X){for(var lt,vt,Vt=[],te=0;lt=X.rangeBookmarks[te++];)(vt=L.createRange(this.win)).moveToBookmark(lt),Vt.push(vt);X.backward?this.setSingleRange(Vt[0],"backward"):this.setRanges(Vt)},be.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},be.restoreRanges=function(X){this.removeAllRanges();for(var lt,vt=0;lt=X.ranges[vt];++vt)this.addRange(lt,X.backward&&vt==0)},be.toHtml=function(){var X=[];return this.eachRange(function(lt){X.push(et.toHtml(lt))}),X.join("")},wt.implementsTextRange&&(be.getNativeTextRange=function(){if(X=this.docSelection){var X=X.createRange();if(Ut(X))return X;throw B.createError("getNativeTextRange: selection is a control selection")}if(0<this.rangeCount)return L.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw B.createError("getNativeTextRange: selection contains no range")}),be.getName=function(){return"WrappedSelection"},be.inspect=function(){return oe(this)},be.detach=function(){Ce(this.win,"delete"),Bt(this)},xt.detachAll=function(){Ce(null,"deleteAll")},xt.inspect=oe,xt.isDirectionBackward=yt,L.Selection=xt,L.selectionPrototype=be,L.addShimListener(function(X){X.getSelection===void 0&&(X.getSelection=function(){return Te(X)}),X=null})});var I=!1;return N&&(document.readyState=="complete"?T():(u(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",T,!1),k(window,"load",T))),R},f!==void 0&&typeof r=="object"?f.exports=n():this.rangy=n()},{}],726:[function(t,f,r){var n;n=function(e){return e.createModule("SaveRestore",["WrappedSelection"],function(s,i){var l=s.dom,o=l.removeNode,a=s.Selection.isDirectionBackward,c="\uFEFF";function u(S,E){return(E||document).getElementById(S)}function h(S,E){var k="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),D=l.getDocument(S.startContainer);return(S=S.cloneRange()).collapse(E),(E=D.createElement("span")).id=k,E.style.lineHeight="0",E.style.display="none",E.className="rangySelectionBoundary",E.appendChild(D.createTextNode(c)),S.insertNode(E),E}function p(S,E,k,D){(k=u(k,S))?(E[D?"setStartBefore":"setEndBefore"](k),o(k)):i.warn("Marker element has been removed. Cannot restore selection.")}function m(S,E){return E.compareBoundaryPoints(S.START_TO_START,S)}function b(S,E){var k,D=s.DomRange.getRangeDocument(S),N=S.toString();return E=a(E),S.collapsed?{document:D,markerId:(k=h(S,!1)).id,collapsed:!0}:(k=h(S,!1),{document:D,startMarkerId:h(S,!0).id,endMarkerId:k.id,collapsed:!1,backward:E,toString:function(){return"original text: '"+N+"', new text: '"+S.toString()+"'"}})}function _(S,E){var k,D,N=S.document,O=(E===void 0&&(E=!0),s.createRange(N));return S.collapsed?(k=u(S.markerId,N))?(k.style.display="inline",(D=k.previousSibling)&&D.nodeType==3?(o(k),O.collapseToPoint(D,D.length)):(O.collapseBefore(k),o(k))):i.warn("Marker element has been removed. Cannot restore selection."):(p(N,O,S.startMarkerId,!0),p(N,O,S.endMarkerId,!1)),E&&O.normalizeBoundaries(),O}function v(S,E){var k,D,N=[],O=a(E);(S=S.slice(0)).sort(m);for(var R=0,A=S.length;R<A;++R)N[R]=b(S[R],O);for(R=A-1;0<=R;--R)k=S[R],D=s.DomRange.getRangeDocument(k),k.collapsed?k.collapseAfter(u(N[R].markerId,D)):(k.setEndBefore(u(N[R].endMarkerId,D)),k.setStartAfter(u(N[R].startMarkerId,D)));return N}function w(S){for(var E=[],k=S.length-1;0<=k;k--)E[k]=_(S[k],!0);return E}function x(S,E){(E=u(E,S))&&o(E)}s.util.extend(s,{saveRange:b,restoreRange:_,saveRanges:v,restoreRanges:w,saveSelection:function(S){if(!s.isSelectionValid(S))return i.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var E=s.getSelection(S),k=E.getAllRanges(),D=k.length==1&&E.isBackward(),N=v(k,D);return D?E.setSingleRange(k[0],D):E.setRanges(k),{win:S,rangeInfos:N,restored:!1}},restoreSelection:function(S,E){var k,D,N;S.restored||(k=S.rangeInfos,D=s.getSelection(S.win),N=w(k),k.length==1&&E&&s.features.selectionHasExtend&&k[0].backward?(D.removeAllRanges(),D.addRange(N[0],!0)):D.setRanges(N),S.restored=!0)},removeMarkerElement:x,removeMarkers:function(S){for(var E,k=S.rangeInfos,D=0,N=k.length;D<N;++D)(E=k[D]).collapsed?x(S.doc,E.markerId):(x(S.doc,E.startMarkerId),x(S.doc,E.endMarkerId))}})}),e},f!==void 0&&typeof r=="object"?f.exports=n(t("rangy")):n(this.rangy)},{rangy:725}],727:[function(t,f,r){arguments[4][424][0].apply(r,arguments)},{"./v1":730,"./v4":731,dup:424}],728:[function(t,f,r){arguments[4][425][0].apply(r,arguments)},{dup:425}],729:[function(t,f,r){arguments[4][426][0].apply(r,arguments)},{dup:426}],730:[function(t,f,r){arguments[4][427][0].apply(r,arguments)},{"./lib/bytesToUuid":728,"./lib/rng":729,dup:427}],731:[function(t,f,r){arguments[4][428][0].apply(r,arguments)},{"./lib/bytesToUuid":728,"./lib/rng":729,dup:428}],732:[function(t,f,r){f.exports={name:"@codoxhq/wave-core",version:"2.3.4-rc.41",main:"dist/index.js",directories:{test:"tests"},scripts:{test:"jest --watch",prod:"webpack --config ./webpack.config.js --mode=production","prod-dsm":"webpack --config ./webpack.dsm.config.js --mode=production","bump:prerelease":"npm version prerelease --preid=rc","bump:patch":"npm version patch","bump:minor":"npm version minor","bump:major":"npm version major","bump:rc":"npm version prerelease --preid=rc",version:""},repository:{type:"git",url:"git+https://github.com/davidnus/wave.git"},author:"nuser",license:"SEE LICENSE IN LICENSE.md",bugs:{url:"https://github.com/davidnus/wave/issues"},browserify:{transform:[["babelify",{presets:["@babel/preset-env"],plugins:["@babel/plugin-syntax-dynamic-import"]}]]},dependencies:{"crypto-js":"^3.1.9-1","deep-equal":"^1.0.1",extend:"^3.0.2","fast-deep-equal":"^3.1.3",pako:"^1.0.3","quill-delta":"^4.2.2",rangy:"^1.3.0",webworkify:"^1.5.0"},devDependencies:{"@babel/preset-env":"^7.13.15","@babel/runtime":"^7.9.6","ansi-colors":"^4.1.1","babel-eslint":"^10.1.0",babelify:"^10.0.0",browserify:"^17.0.0",chai:"^4.2.0","clean-webpack-plugin":"^4.0.0-alpha.0",dateformat:"^2.2.0",del:"^6.0.0",eslint:"^8.9.0","eslint-config-google":"^0.14.0","eslint-plugin-babel":"^5.3.1","eslint-plugin-jest":"^26.1.1",gulp:"^4.0.2","gulp-bump":"^3.2.0","gulp-concat":"^2.6.1","gulp-cond":"^1.0.0","gulp-eslint":"^6.0.0","gulp-header":"^2.0.9","gulp-insert":"^0.5.0","gulp-rename":"^2.0.0","gulp-replace":"^1.1.3","gulp-sourcemaps":"^3.0.0","gulp-streamify":"^1.0.2","gulp-uglify":"^3.0.2","gulp-util":"^3.0.8",jest:"^25.1.0",mocha:"^7.1.2",uglifyify:"^5.0.2","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0",watchify:"^4.0.0",webpack:"^5.35.0","webpack-cli":"^4.6.0"},homepage:"https://github.com/davidnus/wave#readme",description:""}},{}]},{},[448])(448)},191:(y,d,g)=>{g.d(d,{A:()=>e});var t=g(379),f=g.n(t),r=g(364),n=g.n(r)()(f());n.push([y.id,`/**
|
|
199
199
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
200
200
|
*
|
|
201
201
|
* This source code is licensed under the MIT license found in the
|
|
@@ -1389,7 +1389,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1389
1389
|
display: none !important;
|
|
1390
1390
|
}
|
|
1391
1391
|
`,""]);const e=n},269:(y,d,g)=>{const t=g(962),f={};for(const e of Object.keys(t))f[t[e]]=e;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};y.exports=r;for(const e of Object.keys(r)){if(!("channels"in r[e]))throw new Error("missing channels property: "+e);if(!("labels"in r[e]))throw new Error("missing channel labels property: "+e);if(r[e].labels.length!==r[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:s,labels:i}=r[e];delete r[e].channels,delete r[e].labels,Object.defineProperty(r[e],"channels",{value:s}),Object.defineProperty(r[e],"labels",{value:i})}function n(e,s){return(e[0]-s[0])**2+(e[1]-s[1])**2+(e[2]-s[2])**2}r.rgb.hsl=function(e){const s=e[0]/255,i=e[1]/255,l=e[2]/255,o=Math.min(s,i,l),a=Math.max(s,i,l),c=a-o;let u,h;a===o?u=0:s===a?u=(i-l)/c:i===a?u=2+(l-s)/c:l===a&&(u=4+(s-i)/c),u=Math.min(60*u,360),u<0&&(u+=360);const p=(o+a)/2;return h=a===o?0:p<=.5?c/(a+o):c/(2-a-o),[u,100*h,100*p]},r.rgb.hsv=function(e){let s,i,l,o,a;const c=e[0]/255,u=e[1]/255,h=e[2]/255,p=Math.max(c,u,h),m=p-Math.min(c,u,h),b=function(_){return(p-_)/6/m+.5};return m===0?(o=0,a=0):(a=m/p,s=b(c),i=b(u),l=b(h),c===p?o=l-i:u===p?o=1/3+s-l:h===p&&(o=2/3+i-s),o<0?o+=1:o>1&&(o-=1)),[360*o,100*a,100*p]},r.rgb.hwb=function(e){const s=e[0],i=e[1];let l=e[2];const o=r.rgb.hsl(e)[0],a=1/255*Math.min(s,Math.min(i,l));return l=1-1/255*Math.max(s,Math.max(i,l)),[o,100*a,100*l]},r.rgb.cmyk=function(e){const s=e[0]/255,i=e[1]/255,l=e[2]/255,o=Math.min(1-s,1-i,1-l);return[100*((1-s-o)/(1-o)||0),100*((1-i-o)/(1-o)||0),100*((1-l-o)/(1-o)||0),100*o]},r.rgb.keyword=function(e){const s=f[e];if(s)return s;let i,l=1/0;for(const o of Object.keys(t)){const a=n(e,t[o]);a<l&&(l=a,i=o)}return i},r.keyword.rgb=function(e){return t[e]},r.rgb.xyz=function(e){let s=e[0]/255,i=e[1]/255,l=e[2]/255;return s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92,[100*(.4124*s+.3576*i+.1805*l),100*(.2126*s+.7152*i+.0722*l),100*(.0193*s+.1192*i+.9505*l)]},r.rgb.lab=function(e){const s=r.rgb.xyz(e);let i=s[0],l=s[1],o=s[2];return i/=95.047,l/=100,o/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,[116*l-16,500*(i-l),200*(l-o)]},r.hsl.rgb=function(e){const s=e[0]/360,i=e[1]/100,l=e[2]/100;let o,a,c;if(i===0)return c=255*l,[c,c,c];o=l<.5?l*(1+i):l+i-l*i;const u=2*l-o,h=[0,0,0];for(let p=0;p<3;p++)a=s+1/3*-(p-1),a<0&&a++,a>1&&a--,c=6*a<1?u+6*(o-u)*a:2*a<1?o:3*a<2?u+(o-u)*(2/3-a)*6:u,h[p]=255*c;return h},r.hsl.hsv=function(e){const s=e[0];let i=e[1]/100,l=e[2]/100,o=i;const a=Math.max(l,.01);return l*=2,i*=l<=1?l:2-l,o*=a<=1?a:2-a,[s,100*(l===0?2*o/(a+o):2*i/(l+i)),(l+i)/2*100]},r.hsv.rgb=function(e){const s=e[0]/60,i=e[1]/100;let l=e[2]/100;const o=Math.floor(s)%6,a=s-Math.floor(s),c=255*l*(1-i),u=255*l*(1-i*a),h=255*l*(1-i*(1-a));switch(l*=255,o){case 0:return[l,h,c];case 1:return[u,l,c];case 2:return[c,l,h];case 3:return[c,u,l];case 4:return[h,c,l];case 5:return[l,c,u]}},r.hsv.hsl=function(e){const s=e[0],i=e[1]/100,l=e[2]/100,o=Math.max(l,.01);let a,c;c=(2-i)*l;const u=(2-i)*o;return a=i*o,a/=u<=1?u:2-u,a=a||0,c/=2,[s,100*a,100*c]},r.hwb.rgb=function(e){const s=e[0]/360;let i=e[1]/100,l=e[2]/100;const o=i+l;let a;o>1&&(i/=o,l/=o);const c=Math.floor(6*s),u=1-l;a=6*s-c,1&c&&(a=1-a);const h=i+a*(u-i);let p,m,b;switch(c){default:case 6:case 0:p=u,m=h,b=i;break;case 1:p=h,m=u,b=i;break;case 2:p=i,m=u,b=h;break;case 3:p=i,m=h,b=u;break;case 4:p=h,m=i,b=u;break;case 5:p=u,m=i,b=h}return[255*p,255*m,255*b]},r.cmyk.rgb=function(e){const s=e[0]/100,i=e[1]/100,l=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,s*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o)),255*(1-Math.min(1,l*(1-o)+o))]},r.xyz.rgb=function(e){const s=e[0]/100,i=e[1]/100,l=e[2]/100;let o,a,c;return o=3.2406*s+-1.5372*i+-.4986*l,a=-.9689*s+1.8758*i+.0415*l,c=.0557*s+-.204*i+1.057*l,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,c=c>.0031308?1.055*c**(1/2.4)-.055:12.92*c,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),c=Math.min(Math.max(0,c),1),[255*o,255*a,255*c]},r.xyz.lab=function(e){let s=e[0],i=e[1],l=e[2];return s/=95.047,i/=100,l/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,[116*i-16,500*(s-i),200*(i-l)]},r.lab.xyz=function(e){let s,i,l;i=(e[0]+16)/116,s=e[1]/500+i,l=i-e[2]/200;const o=i**3,a=s**3,c=l**3;return i=o>.008856?o:(i-16/116)/7.787,s=a>.008856?a:(s-16/116)/7.787,l=c>.008856?c:(l-16/116)/7.787,s*=95.047,i*=100,l*=108.883,[s,i,l]},r.lab.lch=function(e){const s=e[0],i=e[1],l=e[2];let o;return o=360*Math.atan2(l,i)/2/Math.PI,o<0&&(o+=360),[s,Math.sqrt(i*i+l*l),o]},r.lch.lab=function(e){const s=e[0],i=e[1],l=e[2]/360*2*Math.PI;return[s,i*Math.cos(l),i*Math.sin(l)]},r.rgb.ansi16=function(e,s=null){const[i,l,o]=e;let a=s===null?r.rgb.hsv(e)[2]:s;if(a=Math.round(a/50),a===0)return 30;let c=30+(Math.round(o/255)<<2|Math.round(l/255)<<1|Math.round(i/255));return a===2&&(c+=60),c},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){const s=e[0],i=e[1],l=e[2];return s===i&&i===l?s<8?16:s>248?231:Math.round((s-8)/247*24)+232:16+36*Math.round(s/255*5)+6*Math.round(i/255*5)+Math.round(l/255*5)},r.ansi16.rgb=function(e){let s=e%10;if(s===0||s===7)return e>50&&(s+=3.5),s=s/10.5*255,[s,s,s];const i=.5*(1+~~(e>50));return[(1&s)*i*255,(s>>1&1)*i*255,(s>>2&1)*i*255]},r.ansi256.rgb=function(e){if(e>=232){const i=10*(e-232)+8;return[i,i,i]}let s;return e-=16,[Math.floor(e/36)/5*255,Math.floor((s=e%36)/6)/5*255,s%6/5*255]},r.rgb.hex=function(e){const s=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(s.length)+s},r.hex.rgb=function(e){const s=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!s)return[0,0,0];let i=s[0];s[0].length===3&&(i=i.split("").map(o=>o+o).join(""));const l=parseInt(i,16);return[l>>16&255,l>>8&255,255&l]},r.rgb.hcg=function(e){const s=e[0]/255,i=e[1]/255,l=e[2]/255,o=Math.max(Math.max(s,i),l),a=Math.min(Math.min(s,i),l),c=o-a;let u,h;return u=c<1?a/(1-c):0,h=c<=0?0:o===s?(i-l)/c%6:o===i?2+(l-s)/c:4+(s-i)/c,h/=6,h%=1,[360*h,100*c,100*u]},r.hsl.hcg=function(e){const s=e[1]/100,i=e[2]/100,l=i<.5?2*s*i:2*s*(1-i);let o=0;return l<1&&(o=(i-.5*l)/(1-l)),[e[0],100*l,100*o]},r.hsv.hcg=function(e){const s=e[1]/100,i=e[2]/100,l=s*i;let o=0;return l<1&&(o=(i-l)/(1-l)),[e[0],100*l,100*o]},r.hcg.rgb=function(e){const s=e[0]/360,i=e[1]/100,l=e[2]/100;if(i===0)return[255*l,255*l,255*l];const o=[0,0,0],a=s%1*6,c=a%1,u=1-c;let h=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=c,o[2]=0;break;case 1:o[0]=u,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=c;break;case 3:o[0]=0,o[1]=u,o[2]=1;break;case 4:o[0]=c,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=u}return h=(1-i)*l,[255*(i*o[0]+h),255*(i*o[1]+h),255*(i*o[2]+h)]},r.hcg.hsv=function(e){const s=e[1]/100,i=s+e[2]/100*(1-s);let l=0;return i>0&&(l=s/i),[e[0],100*l,100*i]},r.hcg.hsl=function(e){const s=e[1]/100,i=e[2]/100*(1-s)+.5*s;let l=0;return i>0&&i<.5?l=s/(2*i):i>=.5&&i<1&&(l=s/(2*(1-i))),[e[0],100*l,100*i]},r.hcg.hwb=function(e){const s=e[1]/100,i=s+e[2]/100*(1-s);return[e[0],100*(i-s),100*(1-i)]},r.hwb.hcg=function(e){const s=e[1]/100,i=1-e[2]/100,l=i-s;let o=0;return l<1&&(o=(i-l)/(1-l)),[e[0],100*l,100*o]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=function(e){return[0,0,e[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){const s=255&Math.round(e[0]/100*255),i=((s<<16)+(s<<8)+s).toString(16).toUpperCase();return"000000".substring(i.length)+i},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},256:(y,d,g)=>{const t=g(269),f=g(273),r={};Object.keys(t).forEach(n=>{r[n]={},Object.defineProperty(r[n],"channels",{value:t[n].channels}),Object.defineProperty(r[n],"labels",{value:t[n].labels});const e=f(n);Object.keys(e).forEach(s=>{const i=e[s];r[n][s]=function(l){const o=function(...a){const c=a[0];if(c==null)return c;c.length>1&&(a=c);const u=l(a);if(typeof u=="object")for(let h=u.length,p=0;p<h;p++)u[p]=Math.round(u[p]);return u};return"conversion"in l&&(o.conversion=l.conversion),o}(i),r[n][s].raw=function(l){const o=function(...a){const c=a[0];return c==null?c:(c.length>1&&(a=c),l(a))};return"conversion"in l&&(o.conversion=l.conversion),o}(i)})}),y.exports=r},273:(y,d,g)=>{const t=g(269);function f(n,e){return function(s){return e(n(s))}}function r(n,e){const s=[e[n].parent,n];let i=t[e[n].parent][n],l=e[n].parent;for(;e[l].parent;)s.unshift(e[l].parent),i=f(t[e[l].parent][l],i),l=e[l].parent;return i.conversion=s,i}y.exports=function(n){const e=function(l){const o=function(){const c={},u=Object.keys(t);for(let h=u.length,p=0;p<h;p++)c[u[p]]={distance:-1,parent:null};return c}(),a=[l];for(o[l].distance=0;a.length;){const c=a.pop(),u=Object.keys(t[c]);for(let h=u.length,p=0;p<h;p++){const m=u[p],b=o[m];b.distance===-1&&(b.distance=o[c].distance+1,b.parent=c,a.unshift(m))}}return o}(n),s={},i=Object.keys(e);for(let l=i.length,o=0;o<l;o++){const a=i[o];e[a].parent!==null&&(s[a]=r(a,e))}return s}},962:y=>{y.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},364:y=>{y.exports=function(d){var g=[];return g.toString=function(){return this.map(function(t){var f="",r=t[5]!==void 0;return t[4]&&(f+="@supports (".concat(t[4],") {")),t[2]&&(f+="@media ".concat(t[2]," {")),r&&(f+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),f+=d(t),r&&(f+="}"),t[2]&&(f+="}"),t[4]&&(f+="}"),f}).join("")},g.i=function(t,f,r,n,e){typeof t=="string"&&(t=[[null,t,void 0]]);var s={};if(r)for(var i=0;i<this.length;i++){var l=this[i][0];l!=null&&(s[l]=!0)}for(var o=0;o<t.length;o++){var a=[].concat(t[o]);r&&s[a[0]]||(e!==void 0&&(a[5]===void 0||(a[1]="@layer".concat(a[5].length>0?" ".concat(a[5]):""," {").concat(a[1],"}")),a[5]=e),f&&(a[2]&&(a[1]="@media ".concat(a[2]," {").concat(a[1],"}")),a[2]=f),n&&(a[4]?(a[1]="@supports (".concat(a[4],") {").concat(a[1],"}"),a[4]=n):a[4]="".concat(n)),g.push(a))}},g}},379:y=>{y.exports=function(d){return d[1]}},186:y=>{var d=[];function g(r){for(var n=-1,e=0;e<d.length;e++)if(d[e].identifier===r){n=e;break}return n}function t(r,n){for(var e={},s=[],i=0;i<r.length;i++){var l=r[i],o=n.base?l[0]+n.base:l[0],a=e[o]||0,c="".concat(o," ").concat(a);e[o]=a+1;var u=g(c),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(u!==-1)d[u].references++,d[u].updater(h);else{var p=f(h,n);n.byIndex=i,d.splice(i,0,{identifier:c,updater:p,references:1})}s.push(c)}return s}function f(r,n){var e=n.domAPI(n);return e.update(r),function(s){if(s){if(s.css===r.css&&s.media===r.media&&s.sourceMap===r.sourceMap&&s.supports===r.supports&&s.layer===r.layer)return;e.update(r=s)}else e.remove()}}y.exports=function(r,n){var e=t(r=r||[],n=n||{});return function(s){s=s||[];for(var i=0;i<e.length;i++){var l=g(e[i]);d[l].references--}for(var o=t(s,n),a=0;a<e.length;a++){var c=g(e[a]);d[c].references===0&&(d[c].updater(),d.splice(c,1))}e=o}}},433:y=>{var d={};y.exports=function(g,t){var f=function(r){if(d[r]===void 0){var n=document.querySelector(r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch{n=null}d[r]=n}return d[r]}(g);if(!f)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");f.appendChild(t)}},990:y=>{y.exports=function(d){var g=document.createElement("style");return d.setAttributes(g,d.attributes),d.insert(g,d.options),g}},626:(y,d,g)=>{y.exports=function(t){var f=g.nc;f&&t.setAttribute("nonce",f)}},155:y=>{y.exports=function(d){if(typeof document>"u")return{update:function(){},remove:function(){}};var g=d.insertStyleElement(d);return{update:function(t){(function(f,r,n){var e="";n.supports&&(e+="@supports (".concat(n.supports,") {")),n.media&&(e+="@media ".concat(n.media," {"));var s=n.layer!==void 0;s&&(e+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),e+=n.css,s&&(e+="}"),n.media&&(e+="}"),n.supports&&(e+="}");var i=n.sourceMap;i&&typeof btoa<"u"&&(e+=`
|
|
1392
|
-
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),r.styleTagTransform(e,f,r.options)})(g,d,t)},remove:function(){(function(t){if(t.parentNode===null)return!1;t.parentNode.removeChild(t)})(g)}}}},827:y=>{y.exports=function(d,g){if(g.styleSheet)g.styleSheet.cssText=d;else{for(;g.firstChild;)g.removeChild(g.firstChild);g.appendChild(document.createTextNode(d))}}}},qm={};function rn(y){var d=qm[y];if(d!==void 0)return d.exports;var g=qm[y]={id:y,exports:{}};return u_[y](g,g.exports,rn),g.exports}rn.n=y=>{var d=y&&y.__esModule?()=>y.default:()=>y;return rn.d(d,{a:d}),d},rn.d=(y,d)=>{for(var g in d)rn.o(d,g)&&!rn.o(y,g)&&Object.defineProperty(y,g,{enumerable:!0,get:d[g]})},rn.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),rn.o=(y,d)=>Object.prototype.hasOwnProperty.call(y,d),rn.nc=void 0;var Ii={};rn.d(Ii,{yy:()=>tw,_U:()=>cS,a8:()=>kS,Vs:()=>CS,Cn:()=>Lf,gK:()=>Cw,vv:()=>qx});var d_=y=>{var d={};return rn.d(d,y),d};const ye=d_({$addUpdateTag:()=>uv,$createNodeSelection:()=>gf,$createParagraphNode:()=>Qn,$createRangeSelection:()=>hf,$getNodeByKey:()=>Hn,$getRoot:()=>Dn,$getSelection:()=>je,$isDecoratorNode:()=>On,$isElementNode:()=>he,$isLineBreakNode:()=>fa,$isNodeSelection:()=>Yr,$isParagraphNode:()=>ma,$isRangeSelection:()=>_e,$isTextNode:()=>Pe,$nodesOfType:()=>Hh,$setSelection:()=>or,CAN_REDO_COMMAND:()=>Qa,CAN_UNDO_COMMAND:()=>Xa,CLEAR_EDITOR_COMMAND:()=>Sd,COMMAND_PRIORITY_CRITICAL:()=>Zr,COMMAND_PRIORITY_EDITOR:()=>an,CUT_COMMAND:()=>gl,DecoratorNode:()=>Dg,ElementNode:()=>Eo,KEY_BACKSPACE_COMMAND:()=>fl,KEY_DELETE_COMMAND:()=>pl,KEY_ESCAPE_COMMAND:()=>Cc,LineBreakNode:()=>as,PASTE_COMMAND:()=>ll,ParagraphNode:()=>ga,REDO_COMMAND:()=>ul,RootNode:()=>cs,TextNode:()=>ki,UNDO_COMMAND:()=>cl,createCommand:()=>bd,createEditor:()=>Fg});var f_=y=>{var d={};return rn.d(d,y),d};const p_=f_({$isLinkNode:()=>N1});var h_=y=>{var d={};return rn.d(d,y),d};const Qr=h_({$createMarkNode:()=>su,$getMarkIDs:()=>R1,$isMarkNode:()=>ya,$unwrapMarkNode:()=>P1,$wrapSelectionInMarkNode:()=>I1,MarkNode:()=>Of});var g_=y=>{var d={};return rn.d(d,y),d};const En=g_({$createTableCellNode:()=>hs,$createTableRowNode:()=>lu,$createTableSelection:()=>uu,$getTableColumnIndexFromTableCellNode:()=>z1,$isTableCellNode:()=>on,$isTableNode:()=>Jn,$isTableRowNode:()=>Mr,$isTableSelection:()=>Xn,TableCellNode:()=>Oo,TableNode:()=>To,TableRowNode:()=>ba}),m_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jm={randomUUID:m_};let pu;const y_=new Uint8Array(16);function b_(){if(!pu&&(pu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pu(y_)}const pr=[];for(let y=0;y<256;++y)pr.push((y+256).toString(16).slice(1));function v_(y,d=0){return pr[y[d+0]]+pr[y[d+1]]+pr[y[d+2]]+pr[y[d+3]]+"-"+pr[y[d+4]]+pr[y[d+5]]+"-"+pr[y[d+6]]+pr[y[d+7]]+"-"+pr[y[d+8]]+pr[y[d+9]]+"-"+pr[y[d+10]]+pr[y[d+11]]+pr[y[d+12]]+pr[y[d+13]]+pr[y[d+14]]+pr[y[d+15]]}function __(y,d,g){if(Jm.randomUUID&&!d&&!y)return Jm.randomUUID();const t=(y=y||{}).random||(y.rng||b_)();if(t[6]=15&t[6]|64,t[8]=63&t[8]|128,d){g=g||0;for(let f=0;f<16;++f)d[g+f]=t[f];return d}return v_(t)}const x_=__;let w_=()=>{},Ml=function(){return w_};const S_=Ml(),C_=Ml(),E_=Ml(),k_=Ml(),O_=Ml(),T_={log:S_,info:C_,warn:k_,debug:E_,error:O_},le=T_,j_=[y=>y.hasFormat("bold")&&"bold",y=>y.hasFormat("code")&&"code",y=>y.hasFormat("italic")&&"italic",y=>y.hasFormat("strikethrough")&&"strikethrough",y=>y.hasFormat("subscript")&&"subscript",y=>y.hasFormat("superscript")&&"superscript",y=>y.hasFormat("underline")&&"underline"],Wm={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},A_={center:2,end:6,justify:4,left:1,right:3,start:5};function N_(y){if(!y||!y.length)return 0;let d=y.split(",");if(d=d.map(t=>t.trim()),d.length===1&&!Wm[d[0]])return y;let g=0;for(const t of d){const f=Wm[t];f&&(g^=f)}return g}function P_(y){return y?j_.map(d=>d(y)).filter(Boolean).join(","):""}function I_(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return y&&A_[y]||0}function Dl(y){return`__${y}`}function Rf(y){return y.split("__")[1]||""}class R_{constructor(){this.subscribers={}}on(d,g){d&&g&&(this.subscribers[d]||(this.subscribers[d]=[]),this.subscribers[d].push(g))}emit(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.subscribers[d]&&this.subscribers[d].length)for(const t of this.subscribers[d])typeof t=="function"&&t(g)}clear(){this.subscribers={}}}const Vm=R_,Xr={historic:"historic",historyMerge:"history-merge",historyPush:"history-push"},M_={paste:"application/x-lexical-editor",drag:"application/x-lexical-drag",dragBlock:"application/x-lexical-drag-block",plainText:"text/plain"},$r={created:"created",updated:"updated",destroyed:"destroyed"},Ri={text:"text",element:"element",whitelist:["text","element"]},vr={mouseover:"mouseover",mouseout:"mouseout",mousemove:"mousemove",keypress:"keypress",keyup:"keyup",resize:"resize",scroll:"scroll"},Km=[vr.mousemove,vr.mouseover,vr.mouseout],hu={text:"text",linebreak:"linebreak",horizontalrule:"horizontalrule"},Mf={local:"local",remote:"remote"},_a={editorState:"editorState",root:"root"},Mi={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1},Ll="codox_comments_change",Gm={horizontalrule:["table","image","inline-image","sticky"],"page-break":["image","inline-image","table","sticky"],"collapsible-container":["table","image","inline-image","collapsible-container","sticky"],"layout-container":["table","image","inline-image","layout-container","sticky"],image:["image","inline-image","sticky"],"inline-image":["image","inline-image","sticky"],table:["image","inline-image","table","sticky"],poll:["image","inline-image","sticky"],excalidraw:["image","inline-image","sticky"]},D_="Invalid state - forbidden content nesting found",Ym={local:"local",remote:"remote"};function Zm(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function Qm(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?Zm(Object(g),!0).forEach(function(t){L_(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):Zm(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function L_(y,d,g){return(d=B_(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function B_(y){var d=F_(y,"string");return typeof d=="symbol"?d:d+""}function F_(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}class $e{static equalSelectionsJSON(d,g){return!((d||g)&&(d&&!g||g&&!d||d.anchor.codoxId.toString()!==g.anchor.codoxId.toString()||d.anchor.offset!==g.anchor.offset||d.focus.codoxId.toString()!==g.focus.codoxId.toString()||d.focus.offset!==g.focus.offset))}static getNodeAncestorsList(d){return d.getParents()}static getAllNodeLeaves(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(hw(d))return g.push(d),g;let t=d.getChildren();if(!t.length)return g;for(const f of t)g=$e.getAllNodeLeaves(f,g);return g}static splitCodoxIdPathIntoMainAndNested(d){let g=d.findIndex(f=>f===_a.editorState),t=g+1;return{mainPath:d.slice(0,g),nestedPath:d.slice(t+1)}}static getCodoxIdAndOffsetFromRootNode(d,g){let t=d.getChildren()[g];return{codoxIdArray:t&&t.codoxId?[t.codoxId]:[],offset:0}}static isNestedSelectionJSON(d){return!!d&&!(!d.anchor.codoxId.includes(_a.editorState)||!d.focus.codoxId.includes(_a.editorState))}static lexicalToJSONNested(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],f=$e.lexicalToJSON(d);if(!f)return null;let r=[...t,g,_a.editorState,_a.root];return f.anchor.codoxId=[...r,...f.anchor.codoxId],f.focus.codoxId=[...r,...f.focus.codoxId],f}static getNestedSelectionJSONFromMainSelectionJSON(d){let g={nestedSelectionJSON:null,nestedEditor:null},{mainPath:t,nestedPath:f}=$e.splitCodoxIdPathIntoMainAndNested(d.anchor.codoxId),{mainPath:r,nestedPath:n}=$e.splitCodoxIdPathIntoMainAndNested(d.focus.codoxId);t.toString()===r.toString()||le.debug("[getNestedSelectionJSONFromMainSelectionJSON]: Nested selection main path part must point to same node in main editor: ",{anchorCodoxIds:d.anchor.codoxId,mainAnchorPath:t,nestedAnchorPath:f,focusCodoxIds:d.focus.codoxId,mainFocusPath:r,nestedFocusPath:n});let e=t,s=e[e.length-1],i=e[e.length-2],l=Tn.get(i);if(!l){let c=e[e.length-3];if(c){let u=Tn.get(c);u&&(l=u.getChildren().find(h=>h.codoxDId===i))}}if(!l)return le.debug("[getNestedSelectionJSONFromMainSelectionJSON]: Lexical node with nested editor not found in codox nodes map - selection will be dropped",{jsonSelection:d,targetNodeCodoxId:i}),g;let o=Dl(s),a=l[o];return xe.isLexicalEditorInstance(a)?(g.nestedSelectionJSON=Qm(Qm({},d),{},{anchor:{codoxId:f,offset:d.anchor.offset},focus:{codoxId:n,offset:d.focus.offset}}),g.nestedEditor=a,g):(le.debug("[getNestedSelectionJSONFromMainSelectionJSON]: Found nested editor is not LexicalEditor instance",{jsonSelection:d,targetLexicalNode:l,targetLexicalNodeAttrName:o,nestedEditorCandidate:a}),g)}static getNodeAncestorsCodoxIds(d){let g=[],t=$e.getNodeAncestorsList(d);if(t.length===1&&t[0].__type==="root")return g.push(d.codoxId),g;for(let f=t.length-2;f>=0;f--){let r=t[f];r.codoxId&&g.push(r.codoxId)}return d.codoxId&&d.getChildren&&g.push(d.codoxId),g}static getParentOffsetOutOfNodeOffset(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(arguments.length>2&&arguments[2]!==void 0&&arguments[2]){if(d.getChildrenSize&&d.getChildrenSize()===0||g===0&&d.codoxId)return g;let n=g,e=[];if(d.codoxId)e=d.getChildren();else{const i=d.getParents().find(o=>!!o.codoxId);let l=!1;for(const o of i.getChildren()){if(o.__key===d.__key&&(l=!!g&&(zl(o)||Fl(o)),!l))break;if(Fi(o))e.push(o),n+=o.getTextContentSize();else if(Cn(o))e.push(o),n++;else{let a=$e.getAllNodeLeaves(o),c=a.reduce((u,h)=>(Fi(h)?u+=h.getTextContentSize():Cn(h)&&u++,u),0);e.push(...a),n+=c}if(l)break}}let s=0;for(const i of e){if(n<=0)break;let l=0;l=Cn(i)?1:i.getTextContentSize(),s+=l,Cn(i)?n--:n-=l}return s}let t=d.getParents().find(n=>!!n.codoxId);if(!t)return g;let f=[];for(const n of t.getChildren())if(Fi(n)||Cn(n))f.push(n);else{let e=$e.getAllNodeLeaves(n);f.push(...e)}if(f.length===1&&f[0].__key===d.__key)return g;let r=0;for(const n of f){if(n.__key===d.__key){r+=g;break}let e=0;e=Cn(n)?1:n.getTextContentSize(),r+=e}return r}static lexicalToJSON(d){if(!d)return null;let g=[],t=0,f=[],r=0,n="",e=0,s=!0;if((0,ye.$isRangeSelection)(d)){let i=(0,ye.$getNodeByKey)(d.anchor.key);if(Sa(i)){let{codoxIdArray:o,offset:a}=$e.getCodoxIdAndOffsetFromRootNode(i,d.anchor.offset);g=o,t=a}else{if((0,En.$isTableCellNode)(i)){let c=i.getFirstChild();c&&Cs(c)&&(i=c)}g=$e.getNodeAncestorsCodoxIds(i);const o=d.anchor.offset,a=d.anchor.type===Ri.element;t=$e.getParentOffsetOutOfNodeOffset(i,o,a,"anchor")}let l=(0,ye.$getNodeByKey)(d.focus.key);if(Sa(l)){let{codoxIdArray:o,offset:a}=$e.getCodoxIdAndOffsetFromRootNode(l,d.focus.offset);f=o,r=a}else{if((0,En.$isTableCellNode)(l)){let c=l.getFirstChild();c&&Cs(c)&&(l=c)}f=$e.getNodeAncestorsCodoxIds(l);const o=d.focus.offset,a=d.focus.type===Ri.element;r=$e.getParentOffsetOutOfNodeOffset(l,o,a,"focus")}n=d.style,e=d.format,s=d.dirty}else if((0,ye.$isNodeSelection)(d)){let i=d.getNodes();if(!i.length)return null;let l=i[0],o=i[i.length-1],a=(0,ye.$createRangeSelection)();a.anchor.set(l.getKey(),0,Ri.element),a.focus.set(o.getKey(),0,Ri.element);let c=a.isBackward();g=$e.getNodeAncestorsCodoxIds(l),f=$e.getNodeAncestorsCodoxIds(o);let u=c?1:0,h=c?0:1;t=$e.getParentOffsetOutOfNodeOffset(l,u),r=$e.getParentOffsetOutOfNodeOffset(o,h)}else if((0,En.$isTableSelection)(d)){t=r=null;let i=(0,ye.$getNodeByKey)(d.anchor.key),l=(0,ye.$getNodeByKey)(d.focus.key);g=$e.getNodeAncestorsCodoxIds(i),f=$e.getNodeAncestorsCodoxIds(l)}return{anchor:{codoxId:g,offset:t},focus:{codoxId:f,offset:r},style:n,format:e,dirty:s}}static createTableSelection(d,g){if(!Es(d)||!Es(g))return le.warn("[createTableSelection] invalid anchor/focus nodes - must be one of table nodes: ",{anchorNode:d,focusNode:g}),null;let t=(0,En.$isTableNode)(d)?d:d.getParents().find(r=>(0,En.$isTableNode)(r)),f=(0,En.$createTableSelection)();return f.set(t.getKey(),d.getKey(),g.getKey()),f}static createNodeSelection(d,g){if(g||(g=d),!Cn(d)||!Cn(g))return le.warn("[createNodeSelection] invalid anchor/focus - must be decorators: ",{anchorNode:d,focusNode:g}),null;let t=(0,ye.$createNodeSelection)(),f=d.getNodesBetween(g),r=f.filter(n=>Cn(n));return f.length!==r.length?(le.warn("[createNodeSelection] nodes list contains unexpected nodes: ",{allNodes:f,decoratorNodes:r}),null):(r.forEach(n=>{t.add(n.__key)}),t)}static findClosestParentElementNode(d){if(!d)return null;let g=d.getParent();return g?Cs(g)?g:$e.findClosestParentElementNode(g):null}static createRangeSelection(d,g,t,f,r,n){if(!(arguments.length>6&&arguments[6]!==void 0&&arguments[6])){if(!(Fn(d)||Cs(d)||(le.warn("[createRangeSelection] anchor node is not text or element node - finding closest parent element node "),d=$e.findClosestParentElementNode(d))))return le.warn("[createRangeSelection] unable to find anchor closest parent element node - dropping to null"),null;if(!(Fn(g)||Cs(g)||(le.warn("[createRangeSelection] focus node is not text or element node - finding closest parent element node "),g=$e.findClosestParentElementNode(g))))return le.warn("[createRangeSelection] unable to find focus closest parent element node - dropping to null"),null}let e=(0,ye.$createRangeSelection)();e.format=r,e.setStyle(n);let s=Fn(d)?Ri.text:Ri.element,i=Fn(g)?Ri.text:Ri.element;return e.anchor.set(d.getKey(),t,s),e.focus.set(g.getKey(),f,i),e.dirty=!1,e}static getSelectedCandidateFromParentChildren(d,g){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2],f=null,r=g;if(g===0){const n=d.getFirstChild();f=Fn(n)?n:d}else{let n=d.getChildren(),e=[];for(let i of n)if(Fi(i)||Cn(i))e.push(i);else{let l=$e.getAllNodeLeaves(i);e.push(...l)}let s=g;for(let i of e)if(Fi(i)||Cn(i)){let l=Cn(i)?1:i.getTextContentSize();if(s<=l){if(Jf(i)){let o=i.getNextSibling();o&&Fn(o)?(f=o,r=0):(f=d,r=i.getPreviousSiblings().length+1);break}Cn(i)&&(t||(s=0)),f=i,r=s;break}s-=l}if(!f){const i=d.getLastChild();Fn(i)?(f=i,r=i.getTextContentSize()):(f=d,r=d.getChildrenSize())}}return{candidate:f,candidateOffset:r}}static getSelectedParentAndOffset(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=d.getParent(),f=d.getPreviousSiblings().length+1;return(Es(t)||!Cn(d)&&Sa(t))&&(t=d,f=g),{parent:t,parentOffset:f}}static JSONToLexical(d){if(le.debug("[JSONToLexical]: ",{selectionJson:d}),!d)return null;let{anchor:{codoxId:g,offset:t},focus:{codoxId:f,offset:r},format:n,style:e}=d,s=!g.length,i=null;if(s)i=(0,ye.$getRoot)();else{let M=g[g.length-1];i=M?Tn.get(M):null}let l=!f.length,o=null;if(l)o=(0,ye.$getRoot)();else{let M=f[f.length-1];o=M?Tn.get(M):null}if(!i||!o)return le.debug(" [JSONToLexical] anchorNode or focusNode not found in lexical nodes - selection will be dropped to null: ",{anchorParentNode:i,focusParentNode:o,anchorOffset:t,focusOffset:r,selectionJson:d}),null;if(i&&!i.isAttached()||o&&!o.isAttached())return le.debug("[JSONToLexical] anchorNode or focusNode is no longer attached to editor - marked for GC: ",{anchorParentNode:i,focusParentNode:o,isAnchorNodeAttached:i.isAttached(),isFocusParentNodeAttached:o.isAttached()}),null;if(Es(i)&&Es(o)&&t===null&&r===null)return $e.createTableSelection(i,o);if(Cn(i)&&Cn(o)&&t!==r)return $e.createNodeSelection(i,o);if(Cn(i)&&Cn(o)&&t===r&&S0(i)&&S0(o)){let M=(0,ye.$getRoot)(),J=M.getChildren(),K=J.findIndex(U=>U.getKey()===i.getKey()),P=J.findIndex(U=>U.getKey()===o.getKey());return $e.createRangeSelection(M,M,K,P,n,e)}let a,c,u,h,p=!!i.getChildrenSize,m=!!o.getChildrenSize,b=p&&i.getChildrenSize()===0,_=m&&o.getChildrenSize()===0;if(b&&_)return $e.createRangeSelection(i,o,t,r,n,e);let v=p&&i.getChildrenSize()>0,w=m&&o.getChildrenSize()>0;if(v){let{candidate:M,candidateOffset:J}=$e.getSelectedCandidateFromParentChildren(i,t);a=M,u=J}else{let{parent:M,parentOffset:J}=$e.getSelectedParentAndOffset(i,t);a=M,u=J}if(w){let{candidate:M,candidateOffset:J}=$e.getSelectedCandidateFromParentChildren(o,r,!0);c=M,h=J}else{let{parent:M,parentOffset:J}=$e.getSelectedParentAndOffset(o,r);c=M,h=J}if(!a||!c)return null;let x=Fn(a),S=Fn(c),E=Cn(a),k=Cn(c),D=i.getKey()===o.getKey(),N=D&&r-t==1,O=D&&r===t&&a.getKey()===c.getKey(),R=t!==r,A=a.getKey()===c.getKey();if(E&&k&&O){let M=a.getNextSibling();if(M&&Fn(M))return $e.createRangeSelection(M,M,0,0,n,e);if(M&&(0,ye.$isParagraphNode)(M))return $e.createNodeSelection(a,c);let{parent:J,parentOffset:K}=$e.getSelectedParentAndOffset(a);return $e.createRangeSelection(J,J,K,K,n,e)}let z=$e.createRangeSelection(a,c,u,h,n,e,!0),H=z.isBackward(),$=z.getNodes();if(E&&k&&!A){if(N)return $e.createNodeSelection(c);if($.every(M=>Cn(M)))return $e.createNodeSelection(a,c);{let M,J,K,P,U=a.getNextSibling();if(U&&Fn(U))M=U,K=0;else{let{parent:G,parentOffset:F}=$e.getSelectedParentAndOffset(a);M=G,K=F}let V=c.getNextSibling();if(V&&Fn(V))J=V,P=0;else{let{parent:G,parentOffset:F}=$e.getSelectedParentAndOffset(c);J=G,P=F}return $e.createRangeSelection(M,J,K,P,n,e)}}if(x&&S&&R)if(H){let M=h===c.getTextContentSize(),J=c.getNextSibling();if(M&&J&&Fn(J))return $e.createRangeSelection(a,J,u,0,n,e)}else{let M=u===a.getTextContentSize(),J=a.getNextSibling();if(M&&J&&Fn(J))return $e.createRangeSelection(J,c,0,h,n,e)}if(R&&!E&&k){if(N)return $e.createNodeSelection(c);let[M,...J]=$,K=J.every(U=>Cn(U));if(Fn(M)&&u===M.getTextContentSize()&&K)return $e.createNodeSelection(J[0],c);let P=c.getNextSibling();if(Fn(a)&&a.getTextContentSize()===u&&!H){let U=a.getNextSibling();U&&Fn(U)&&(a=U,u=0)}if(P&&Fn(P))return $e.createRangeSelection(a,P,u,0,n,e);{let{parent:U,parentOffset:V}=$e.getSelectedParentAndOffset(c);return $e.createRangeSelection(a,U,u,V,n,e)}}if(R&&E&&!k){let[M,...J]=$,K=J.every(U=>Cn(U));if(Fn(M)&&h===M.getTextContentSize()&&K)return $e.createNodeSelection(a,J[0]);let P=a.getNextSibling();if(P&&Fn(P))return $e.createRangeSelection(P,c,0,h,n,e);{let{parent:U,parentOffset:V}=$e.getSelectedParentAndOffset(a);return $e.createRangeSelection(U,c,V,h,n,e)}}return $e.createRangeSelection(a,c,u,h,n,e)}}var z_=y=>{var d={};return rn.d(d,y),d};const Gt=z_({Fragment:()=>Yn.Fragment,createContext:()=>Yn.createContext,createElement:()=>Yn.createElement,forwardRef:()=>Yn.forwardRef,useCallback:()=>Yn.useCallback,useContext:()=>Yn.useContext,useEffect:()=>Yn.useEffect,useImperativeHandle:()=>Yn.useImperativeHandle,useLayoutEffect:()=>Yn.useLayoutEffect,useMemo:()=>Yn.useMemo,useRef:()=>Yn.useRef,useState:()=>Yn.useState});function Xm(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function t0(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?Xm(Object(g),!0).forEach(function(t){U_(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):Xm(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function U_(y,d,g){return(d=$_(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function $_(y){var d=H_(y,"string");return typeof d=="symbol"?d:d+""}function H_(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const Df="comments_change";class q_ extends Vm{constructor(){super(),this.initialCommentThreads=[],this.commentThreads=[],this.dataTypes={comment:"comment",thread:"thread"},this.ID_PREFIX="codox",this.relatedNodeKeys={},this.activeThreadIds={},this._uiRefreshTriggered=!1}_triggerUIRefresh(){this._uiRefreshTriggered||(this._uiRefreshTriggered=!0,Promise.resolve().then(()=>{le.debug("[_triggerUIRefresh] emitted"),this.emit(Df),this._uiRefreshTriggered=!1}))}_copyThreads(d){return[...d]}_getActiveCommentThreads(){return this.commentThreads.filter(d=>!!this.activeThreadIds[d.codoxId])}_setCommentThreads(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.commentThreads=[...d],[...d],this._triggerUIRefresh()}clear(){this.resetComments(),super.clear()}gcInternalStates(){this.relatedNodeKeys={},this.activeThreadIds={}}resetComments(){this.gcInternalStates(),this._setCommentThreads([])}getAllComments(){return this.commentThreads}setAllComments(d){Array.isArray(d)?this._setCommentThreads(d):le.warn("[setAllComments]: incomming comments are not array: ",{newCommentThreads:d})}addRelatedNodeKey(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!Array.isArray(g)||!g.length)return;let f=g.filter(r=>typeof r=="string"&&r.startsWith(this.ID_PREFIX));if(f.length){if(t)for(let r of f)this.activeThreadIds[r]?this.activeThreadIds[r].add(d):this.activeThreadIds[r]=new Set([d]);else if(this.relatedNodeKeys[d]){let r=[...this.relatedNodeKeys[d]],n=f,e=n.length>r.length,s=r.length>n.length;e?n.filter(i=>!r.includes(i)).forEach(i=>{this.activeThreadIds[i].add(d)}):s&&r.filter(i=>!n.includes(i)).forEach(i=>{this.activeThreadIds[i].size>1?this.activeThreadIds[i].delete(d):delete this.activeThreadIds[i]})}this.relatedNodeKeys[d]=f,this._triggerUIRefresh()}}removeRelatedNodeKey(d){if(this.relatedNodeKeys[d]){let g=this.relatedNodeKeys[d];le.debug("[CodoxComments][removeRelatedNodeKey]: ",{nodeKey:d,threadIds:g,activeThreads:this.activeThreadIds}),g.forEach(t=>{this.activeThreadIds[t]&&(this.activeThreadIds[t].size>1?this.activeThreadIds[t].delete(d):delete this.activeThreadIds[t])}),delete this.relatedNodeKeys[d],this._triggerUIRefresh()}}createCommentId(){return`${this.ID_PREFIX}-${qf()}`}createNewCommentObj(d){let{content:g,author:t,codoxId:f,timeStamp:r}=d;return{author:t,content:g,codoxId:f||this.createCommentId(),timeStamp:r,type:this.dataTypes.comment}}createNewThreadObj(d){let{quote:g,comments:t,codoxId:f}=d;return{comments:t,codoxId:f||this.createCommentId(),quote:g,type:this.dataTypes.thread}}addCommentThread(d){let g=[...this.commentThreads,d];this._setCommentThreads(g)}addComment(d,g){let t=this.commentThreads.map(f=>{if(f.codoxId===d){let r=t0({},f);return r.comments=[...r.comments,g],r}return f});this._setCommentThreads(t)}removeCommentThread(d){}removeComment(d,g){le.debug("[CodoxComments][removeCommentFromPlugin]: ",{commentId:g,threadId:d});let t=this.commentThreads.map(f=>{if(f.codoxId===d){let r=t0({},f);return r.comments=r.comments.filter(n=>n.codoxId!==g),r}return f});this._setCommentThreads(t)}gcAbandonedNodeKeys(d){let g=Object.keys(this.relatedNodeKeys);for(let t of g)d.has(t)||this.removeRelatedNodeKey(t)}refreshComments(){this._triggerUIRefresh()}setInitialComments(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Array.isArray(d)&&(le.debug("[CodoxComments][setInitialComments]: ",[...d]),this.initialCommentThreads=[...d])}activateInitialComments(d){this.setAllComments(this.initialCommentThreads),console.log("COMMENTS: ",{initComments:[...this.initialCommentThreads]}),d.getEditorState().read(()=>{let g=(0,ye.$nodesOfType)(Qr.MarkNode);for(let t of g)console.log("COMMENTS: ",{node:t}),this.addRelatedNodeKey(t.__key,t.__ids,!0)}),console.log("IVAN: ",{self:this}),this.initialCommentThreads=[]}initialCommentsExist(){return!!this.initialCommentThreads.length}}const Sn=new q_;function J_(){let y=Sn._getActiveCommentThreads.bind(Sn);const[d,g]=(0,Gt.useState)(y());return(0,Gt.useEffect)(()=>{Sn.on(Df,()=>{let t=y();le.log(`[useCodoxComments] "${Df}" event: `,t),g(t)})},[]),d}const Lf=(0,ye.createCommand)("INSERT_COMMENT");var W_=y=>{var d={};return rn.d(d,y),d};const vs=W_({mergeRegister:()=>ko,registerNestedElementResolver:()=>t1});var V_=rn(967),Zo=rn.n(V_),K_=Object.getOwnPropertyNames,G_=Object.getOwnPropertySymbols,Y_=Object.prototype.hasOwnProperty;function e0(y,d){return function(g,t,f){return y(g,t,f)&&d(g,t,f)}}function gu(y){return function(d,g,t){if(!d||!g||typeof d!="object"||typeof g!="object")return y(d,g,t);var f=t.cache,r=f.get(d),n=f.get(g);if(r&&n)return r===g&&n===d;f.set(d,g),f.set(g,d);var e=y(d,g,t);return f.delete(d),f.delete(g),e}}function n0(y){return K_(y).concat(G_(y))}var r0=Object.hasOwn||function(y,d){return Y_.call(y,d)};function _s(y,d){return y||d?y===d:y===d||y!=y&&d!=d}var o0="_owner",i0=Object.getOwnPropertyDescriptor,a0=Object.keys;function Z_(y,d,g){var t=y.length;if(d.length!==t)return!1;for(;t-- >0;)if(!g.equals(y[t],d[t],t,t,y,d,g))return!1;return!0}function Q_(y,d){return _s(y.getTime(),d.getTime())}function s0(y,d,g){if(y.size!==d.size)return!1;for(var t,f,r={},n=y.entries(),e=0;(t=n.next())&&!t.done;){for(var s=d.entries(),i=!1,l=0;(f=s.next())&&!f.done;){var o=t.value,a=o[0],c=o[1],u=f.value,h=u[0],p=u[1];i||r[l]||!(i=g.equals(a,h,e,l,y,d,g)&&g.equals(c,p,a,h,y,d,g))||(r[l]=!0),l++}if(!i)return!1;e++}return!0}function X_(y,d,g){var t,f=a0(y),r=f.length;if(a0(d).length!==r)return!1;for(;r-- >0;)if((t=f[r])===o0&&(y.$$typeof||d.$$typeof)&&y.$$typeof!==d.$$typeof||!r0(d,t)||!g.equals(y[t],d[t],t,t,y,d,g))return!1;return!0}function Bl(y,d,g){var t,f,r,n=n0(y),e=n.length;if(n0(d).length!==e)return!1;for(;e-- >0;)if((t=n[e])===o0&&(y.$$typeof||d.$$typeof)&&y.$$typeof!==d.$$typeof||!r0(d,t)||!g.equals(y[t],d[t],t,t,y,d,g)||(f=i0(y,t),r=i0(d,t),(f||r)&&(!f||!r||f.configurable!==r.configurable||f.enumerable!==r.enumerable||f.writable!==r.writable)))return!1;return!0}function tx(y,d){return _s(y.valueOf(),d.valueOf())}function ex(y,d){return y.source===d.source&&y.flags===d.flags}function l0(y,d,g){if(y.size!==d.size)return!1;for(var t,f,r={},n=y.values();(t=n.next())&&!t.done;){for(var e=d.values(),s=!1,i=0;(f=e.next())&&!f.done;)s||r[i]||!(s=g.equals(t.value,f.value,t.value,f.value,y,d,g))||(r[i]=!0),i++;if(!s)return!1}return!0}function nx(y,d){var g=y.length;if(d.length!==g)return!1;for(;g-- >0;)if(y[g]!==d[g])return!1;return!0}var rx="[object Arguments]",ox="[object Boolean]",ix="[object Date]",ax="[object Map]",sx="[object Number]",lx="[object Object]",cx="[object RegExp]",ux="[object Set]",dx="[object String]",fx=Array.isArray,c0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,u0=Object.assign,px=Object.prototype.toString.call.bind(Object.prototype.toString);function hx(y){var d=y.areArraysEqual,g=y.areDatesEqual,t=y.areMapsEqual,f=y.areObjectsEqual,r=y.arePrimitiveWrappersEqual,n=y.areRegExpsEqual,e=y.areSetsEqual,s=y.areTypedArraysEqual;return function(i,l,o){if(i===l)return!0;if(i==null||l==null||typeof i!="object"||typeof l!="object")return i!=i&&l!=l;var a=i.constructor;if(a!==l.constructor)return!1;if(a===Object)return f(i,l,o);if(fx(i))return d(i,l,o);if(c0!=null&&c0(i))return s(i,l,o);if(a===Date)return g(i,l,o);if(a===RegExp)return n(i,l,o);if(a===Map)return t(i,l,o);if(a===Set)return e(i,l,o);var c=px(i);return c===ix?g(i,l,o):c===cx?n(i,l,o):c===ax?t(i,l,o):c===ux?e(i,l,o):c===lx?typeof i.then!="function"&&typeof l.then!="function"&&f(i,l,o):c===rx?f(i,l,o):(c===ox||c===sx||c===dx)&&r(i,l,o)}}function gx(y){var d=y.circular,g=y.createCustomConfig,t=y.strict,f={areArraysEqual:t?Bl:Z_,areDatesEqual:Q_,areMapsEqual:t?e0(s0,Bl):s0,areObjectsEqual:t?Bl:X_,arePrimitiveWrappersEqual:tx,areRegExpsEqual:ex,areSetsEqual:t?e0(l0,Bl):l0,areTypedArraysEqual:t?Bl:nx};if(g&&(f=u0({},f,g(f))),d){var r=gu(f.areArraysEqual),n=gu(f.areMapsEqual),e=gu(f.areObjectsEqual),s=gu(f.areSetsEqual);f=u0({},f,{areArraysEqual:r,areMapsEqual:n,areObjectsEqual:e,areSetsEqual:s})}return f}function mx(y){return function(d,g,t,f,r,n,e){return y(d,g,e)}}function yx(y){var d=y.circular,g=y.comparator,t=y.createState,f=y.equals,r=y.strict;if(t)return function(e,s){var i=t(),l=i.cache,o=l===void 0?d?new WeakMap:void 0:l,a=i.meta;return g(e,s,{cache:o,equals:f,meta:a,strict:r})};if(d)return function(e,s){return g(e,s,{cache:new WeakMap,equals:f,meta:void 0,strict:r})};var n={cache:void 0,equals:f,meta:void 0,strict:r};return function(e,s){return g(e,s,n)}}var Bf=Di();Di({strict:!0}),Di({circular:!0}),Di({circular:!0,strict:!0}),Di({createInternalComparator:function(){return _s}}),Di({strict:!0,createInternalComparator:function(){return _s}}),Di({circular:!0,createInternalComparator:function(){return _s}}),Di({circular:!0,createInternalComparator:function(){return _s},strict:!0});function Di(y){y===void 0&&(y={});var d=y.circular,g=d!==void 0&&d,t=y.createInternalComparator,f=y.createState,r=y.strict,n=r!==void 0&&r,e=hx(gx(y));return yx({circular:g,comparator:e,createState:f,equals:t?t(e):mx(e),strict:n})}var bx=rn(256),vx=rn.n(bx),_x=y=>{var d={};return rn.d(d,y),d};const xa=_x({$getSelectionStyleValueForProperty:()=>Yg,$patchStyleText:()=>Gg,createDOMRange:()=>qv,createRectsFromDOMRange:()=>Jv});class mu{static composeLexicalDOMNodeKeyAttrName(d){return`__lexicalKey_${d._key}`}static extractLexicalKeyFromLexicalDOMNodeKeyAttr(d){return d.split("__lexicalKey_")[1]||""}static extractSelectionUserId(d){return d.meta.author.id}static createRemoteSelectionColors(d){const g={caretColor:d,highlightColor:"",tooltipBGColor:""};if(d.startsWith("rgb")){let t=d,[f]=t.split(")");g.highlightColor=`${f},0.3)`,g.tooltipBGColor=`${f},0.85)`}else if(d.startsWith("#"))g.highlightColor=`${d}${Math.floor(76.5).toString(16).padStart(2,0)}`,g.tooltipBGColor=`${d}${Math.floor(216.75).toString(16).padStart(2,0)}`;else{const[t,f,r]=vx().keyword.rgb(d);g.highlightColor=`rgb(${t},${f}, ${r},0.3)`,g.tooltipBGColor=`rgb(${t},${f}, ${r},0.85)`}return g}static formatRemoteSelectionUsername(d){let g=d;return g=g.trim(),g.length>=17?`${g.substring(0,14)}...`:g}static isMousePositionWithinElementCords(d,g){return d.clientX>=g.x-5&&d.clientX<=g.x+g.width+5&&d.clientY>=g.y-5&&d.clientY<=g.y+g.height+5}static createDOMRange(d,g,t,f,r){return(0,xa.createDOMRange)(d,g,t,f,r)}static createRectsFromDOMRange(d,g){let{keepFullWidthRects:t=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const f=d.getRootElement();if(f===null)return[];const r=f.getBoundingClientRect(),n=getComputedStyle(f),e=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=Array.from(g.getClientRects());let i=a=>s.splice(a,1),l=new Set;for(let a=0;a<s.length;a++){let c=s[a],u=s[a-1];if(!c||!u)continue;let h=`${(o=c).top}_${o.left}_${o.width}_${o.height}`;if(l.has(h))i(a--);else if(l.add(h),c.top===u.top&&c.height===u.height&&c.left-(u.left+u.width)<5){let p=DOMRect.fromRect({x:u.x,y:u.y,width:u.width+c.width,height:u.height});s[a-1]=p,i(a--)}else c.width+e!==r.width||t?u.top<=c.top&&u.bottom>=c.bottom&&u.left<=c.left&&u.right>=c.right&&i(a--):i(a--)}var o;return s}static getEmptyRootRect(d){let g=d.getRootElement(),t=g.getBoundingClientRect();const f=getComputedStyle(g),r=parseFloat(f.paddingLeft),n=parseFloat(f.paddingTop),e=parseFloat(f.paddingBottom);return[new DOMRect(t.x+r,t.y+n,0,t.height-e-n)]}}_c(mu,"remoteSelectionClassName","codox_remote_selection"),_c(mu,"remoteSelectionRect","codox_remote_selection_rect"),_c(mu,"tooltipAnimations",{hideAtOnce:"codox_hide_tooltip 0s linear 0s forwards",hideWithDelay:"codox_hide_tooltip 0s linear 2s forwards",showAtOnce:"codox_show_tooltip 0s linear 0s forwards",unset:"unset"});const tr=mu;function d0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function xx(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?d0(Object(g),!0).forEach(function(t){wx(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):d0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function wx(y,d,g){return(d=Sx(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function Sx(y){var d=Cx(y,"string");return typeof d=="symbol"?d:d+""}function Cx(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}class Dr{static _logInvalid(d,g,t){for(var f=arguments.length,r=new Array(f>3?f-3:0),n=3;n<f;n++)r[n-3]=arguments[n];le.warn("[JSON SELECTION VALIDATION]: ",xx({selectBelongsTo:d||"not provided",reason:g,jsonSelection:t},r))}static _isObject(d){return typeof d=="object"&&!Array.isArray(d)}static _validateSelectionSide(d){let{type:g,side:t,sideName:f,fullSelection:r}=d;if(!Dr._isObject(t))return Dr._logInvalid(g,`selection.${f} must be object`,r),!1;let n=t.codoxId;if(!Array.isArray(n))return Dr._logInvalid(g,`selection.${f}.codoxId must be array`,r),!1;if(n.length){let s=n.findIndex(l=>l===_a.editorState),i=s!==-1;for(let l=0;l<n.length;l++){if(i){if(l===s||l===s+2)continue;if(l===s+1&&n[l]!=="root")return Dr._logInvalid(g,`selection.${f}.codoxId path invalid: nested selection must include "editorState" and "root": [..."editorState", "root"...]`,r,Tn),!1;continue}let o=n[l];if(!Tn.has(o))return Dr._logInvalid(g,`selection.${f}.codoxId path invalid: node for id ${o} does not exist`,r,Tn),!1}}let e=t.offset;return typeof e=="number"||e===null?e>=0||e===null||(Dr._logInvalid(g,`selection.${f}.offset must be gte 0 or -1`,r),!1):(Dr._logInvalid(g,`selection.${f}.offset must be number or null`,r),!1)}static validateJSONSelection(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(d===null)return!0;if(!d)return Dr._logInvalid(g,"invalid json selection data type",d),!1;if(!Dr._isObject(d))return Dr._logInvalid(g,"json selection must be object",d),!1;let{anchor:t,focus:f}=d;return!!Dr._validateSelectionSide({type:g,side:t,sideName:"anchor",fullSelection:d})&&!!Dr._validateSelectionSide({type:g,side:f,sideName:"focus",fullSelection:d})}}const Ff=Dr;var Ex=rn(186),Qo=rn.n(Ex),kx=rn(155),Xo=rn.n(kx),Ox=rn(433),ti=rn.n(Ox),Tx=rn(626),ei=rn.n(Tx),jx=rn(990),ni=rn.n(jx),Ax=rn(827),ri=rn.n(Ax),yu=rn(500),xs={};xs.styleTagTransform=ri(),xs.setAttributes=ei(),xs.insert=ti().bind(null,"head"),xs.domAPI=Xo(),xs.insertStyleElement=ni(),Qo()(yu.A,xs),yu.A&&yu.A.locals&&yu.A.locals;class Nx{constructor(){_c(this,"paintSingleRemoteSelection",d=>{let{editor:g,selectionJSON:t,lexicalSelection:f,selectedNodes:r,isBackward:n}=d;this.activeEditorsKeys[g._key]||(this.activeEditorsKeys[g._key]=g._key);const e=tr.extractSelectionUserId(t),s=tr.formatRemoteSelectionUsername(t.meta.author.name),i=tr.createRemoteSelectionColors(t.meta.color);let l=null,o=null,a=0,c=0;(0,ye.$isNodeSelection)(f)?(l=r[0],o=r[r.length-1],a=0,c=1):(l=g._editorState._nodeMap.get(f.anchor.key),o=g._editorState._nodeMap.get(f.focus.key),a=f.anchor.offset,c=f.focus.offset);let u=(0,En.$isTableSelection)(f),h=(0,ye.$isNodeSelection)(f),p=(0,ye.$isRangeSelection)(f);for(let w of r)this.trackedNodesKeys.add(`${w.getKey()}__${g._key}`);r.length===1&&Jf(r[0])&&a===c&&c++;let m=null,b=[];if(u&&(0,En.$isTableCellNode)(l)&&(0,En.$isTableCellNode)(o)){let w=r.filter(x=>(0,En.$isTableCellNode)(x));for(let x of w)if(a=(0,En.$getTableColumnIndexFromTableCellNode)(x),c=(0,En.$getTableColumnIndexFromTableCellNode)(x)+1,l=x.getParent(),o=x.getParent(),m=tr.createDOMRange(g,l,a,o,c),m){let[S]=tr.createRectsFromDOMRange(g,m);b.push(S)}}else if(h){let w=f.getNodes();for(let x of w)if(m=tr.createDOMRange(g,x,0,x,1),m){let[S]=tr.createRectsFromDOMRange(g,m);b.push(S)}}else p&&(Sa(l)&&Sa(o)&&a===0&&c===0?b=tr.getEmptyRootRect(g):(m=tr.createDOMRange(g,l,a,o,c),m&&(b=tr.createRectsFromDOMRange(g,m,{keepFullWidthRects:!0}))));let _=null,v=document.createElement("span");v.classList.add(tr.remoteSelectionClassName),v.setAttribute("codox_remote_user",e),document.body.append(v),this.remoteSelectionDOMsMap[e]=v;for(let w=0;w<b.length;w++){let x=b[w];if(!x)continue;let S=w===0,E=w===b.length-1,k=x.width,D=x.height,N=x.top,O=x.left,R=n&&S||!n&&E,A=document.createElement("span");if(v.append(A),A.classList.add(tr.remoteSelectionRect),A.style.cssText=`
|
|
1392
|
+
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),r.styleTagTransform(e,f,r.options)})(g,d,t)},remove:function(){(function(t){if(t.parentNode===null)return!1;t.parentNode.removeChild(t)})(g)}}}},827:y=>{y.exports=function(d,g){if(g.styleSheet)g.styleSheet.cssText=d;else{for(;g.firstChild;)g.removeChild(g.firstChild);g.appendChild(document.createTextNode(d))}}}},Hm={};function rn(y){var d=Hm[y];if(d!==void 0)return d.exports;var g=Hm[y]={id:y,exports:{}};return u_[y](g,g.exports,rn),g.exports}rn.n=y=>{var d=y&&y.__esModule?()=>y.default:()=>y;return rn.d(d,{a:d}),d},rn.d=(y,d)=>{for(var g in d)rn.o(d,g)&&!rn.o(y,g)&&Object.defineProperty(y,g,{enumerable:!0,get:d[g]})},rn.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),rn.o=(y,d)=>Object.prototype.hasOwnProperty.call(y,d),rn.nc=void 0;var Ii={};rn.d(Ii,{yy:()=>tw,_U:()=>cS,a8:()=>kS,Vs:()=>CS,Cn:()=>Lf,gK:()=>Cw,vv:()=>qx});var d_=y=>{var d={};return rn.d(d,y),d};const ye=d_({$addUpdateTag:()=>uv,$createNodeSelection:()=>gf,$createParagraphNode:()=>Qn,$createRangeSelection:()=>hf,$getNodeByKey:()=>Hn,$getRoot:()=>Dn,$getSelection:()=>je,$isDecoratorNode:()=>On,$isElementNode:()=>he,$isLineBreakNode:()=>fa,$isNodeSelection:()=>Yr,$isParagraphNode:()=>ma,$isRangeSelection:()=>_e,$isTextNode:()=>Pe,$nodesOfType:()=>$h,$setSelection:()=>or,CAN_REDO_COMMAND:()=>Qa,CAN_UNDO_COMMAND:()=>Xa,CLEAR_EDITOR_COMMAND:()=>Sd,COMMAND_PRIORITY_CRITICAL:()=>Zr,COMMAND_PRIORITY_EDITOR:()=>an,CUT_COMMAND:()=>gl,DecoratorNode:()=>Mg,ElementNode:()=>Eo,KEY_BACKSPACE_COMMAND:()=>fl,KEY_DELETE_COMMAND:()=>pl,KEY_ESCAPE_COMMAND:()=>Cc,LineBreakNode:()=>as,PASTE_COMMAND:()=>ll,ParagraphNode:()=>ga,REDO_COMMAND:()=>ul,RootNode:()=>cs,TextNode:()=>ki,UNDO_COMMAND:()=>cl,createCommand:()=>bd,createEditor:()=>Bg});var f_=y=>{var d={};return rn.d(d,y),d};const p_=f_({$isLinkNode:()=>N1});var h_=y=>{var d={};return rn.d(d,y),d};const Qr=h_({$createMarkNode:()=>su,$getMarkIDs:()=>R1,$isMarkNode:()=>ya,$unwrapMarkNode:()=>P1,$wrapSelectionInMarkNode:()=>I1,MarkNode:()=>Of});var g_=y=>{var d={};return rn.d(d,y),d};const En=g_({$createTableCellNode:()=>hs,$createTableRowNode:()=>lu,$createTableSelection:()=>uu,$getTableColumnIndexFromTableCellNode:()=>z1,$isTableCellNode:()=>on,$isTableNode:()=>Jn,$isTableRowNode:()=>Mr,$isTableSelection:()=>Xn,TableCellNode:()=>Oo,TableNode:()=>To,TableRowNode:()=>ba}),m_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qm={randomUUID:m_};let pu;const y_=new Uint8Array(16);function b_(){if(!pu&&(pu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pu(y_)}const pr=[];for(let y=0;y<256;++y)pr.push((y+256).toString(16).slice(1));function v_(y,d=0){return pr[y[d+0]]+pr[y[d+1]]+pr[y[d+2]]+pr[y[d+3]]+"-"+pr[y[d+4]]+pr[y[d+5]]+"-"+pr[y[d+6]]+pr[y[d+7]]+"-"+pr[y[d+8]]+pr[y[d+9]]+"-"+pr[y[d+10]]+pr[y[d+11]]+pr[y[d+12]]+pr[y[d+13]]+pr[y[d+14]]+pr[y[d+15]]}function __(y,d,g){if(qm.randomUUID&&!d&&!y)return qm.randomUUID();const t=(y=y||{}).random||(y.rng||b_)();if(t[6]=15&t[6]|64,t[8]=63&t[8]|128,d){g=g||0;for(let f=0;f<16;++f)d[g+f]=t[f];return d}return v_(t)}const x_=__;let w_=()=>{},Ml=function(){return w_};const S_=Ml(),C_=Ml(),E_=Ml(),k_=Ml(),O_=Ml(),T_={log:S_,info:C_,warn:k_,debug:E_,error:O_},le=T_,j_=[y=>y.hasFormat("bold")&&"bold",y=>y.hasFormat("code")&&"code",y=>y.hasFormat("italic")&&"italic",y=>y.hasFormat("strikethrough")&&"strikethrough",y=>y.hasFormat("subscript")&&"subscript",y=>y.hasFormat("superscript")&&"superscript",y=>y.hasFormat("underline")&&"underline"],Jm={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},A_={center:2,end:6,justify:4,left:1,right:3,start:5};function N_(y){if(!y||!y.length)return 0;let d=y.split(",");if(d=d.map(t=>t.trim()),d.length===1&&!Jm[d[0]])return y;let g=0;for(const t of d){const f=Jm[t];f&&(g^=f)}return g}function P_(y){return y?j_.map(d=>d(y)).filter(Boolean).join(","):""}function I_(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return y&&A_[y]||0}function Dl(y){return`__${y}`}function Rf(y){return y.split("__")[1]||""}class R_{constructor(){this.subscribers={}}on(d,g){d&&g&&(this.subscribers[d]||(this.subscribers[d]=[]),this.subscribers[d].push(g))}emit(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.subscribers[d]&&this.subscribers[d].length)for(const t of this.subscribers[d])typeof t=="function"&&t(g)}clear(){this.subscribers={}}}const Wm=R_,Xr={historic:"historic",historyMerge:"history-merge",historyPush:"history-push"},M_={paste:"application/x-lexical-editor",drag:"application/x-lexical-drag",dragBlock:"application/x-lexical-drag-block",plainText:"text/plain"},$r={created:"created",updated:"updated",destroyed:"destroyed"},Ri={text:"text",element:"element",whitelist:["text","element"]},vr={mouseover:"mouseover",mouseout:"mouseout",mousemove:"mousemove",keypress:"keypress",keyup:"keyup",resize:"resize",scroll:"scroll"},Vm=[vr.mousemove,vr.mouseover,vr.mouseout],hu={text:"text",linebreak:"linebreak",horizontalrule:"horizontalrule"},Mf={local:"local",remote:"remote"},_a={editorState:"editorState",root:"root"},Mi={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1},Ll="codox_comments_change",Km={horizontalrule:["table","image","inline-image","sticky"],"page-break":["image","inline-image","table","sticky"],"collapsible-container":["table","image","inline-image","collapsible-container","sticky"],"layout-container":["table","image","inline-image","layout-container","sticky"],image:["image","inline-image","sticky"],"inline-image":["image","inline-image","sticky"],table:["image","inline-image","table","sticky"],poll:["image","inline-image","sticky"],excalidraw:["image","inline-image","sticky"]},D_="Invalid state - forbidden content nesting found",Gm={local:"local",remote:"remote"};function Ym(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function Zm(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?Ym(Object(g),!0).forEach(function(t){L_(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):Ym(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function L_(y,d,g){return(d=B_(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function B_(y){var d=F_(y,"string");return typeof d=="symbol"?d:d+""}function F_(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}class $e{static equalSelectionsJSON(d,g){return!((d||g)&&(d&&!g||g&&!d||d.anchor.codoxId.toString()!==g.anchor.codoxId.toString()||d.anchor.offset!==g.anchor.offset||d.focus.codoxId.toString()!==g.focus.codoxId.toString()||d.focus.offset!==g.focus.offset))}static getNodeAncestorsList(d){return d.getParents()}static getAllNodeLeaves(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(hw(d))return g.push(d),g;let t=d.getChildren();if(!t.length)return g;for(const f of t)g=$e.getAllNodeLeaves(f,g);return g}static splitCodoxIdPathIntoMainAndNested(d){let g=d.findIndex(f=>f===_a.editorState),t=g+1;return{mainPath:d.slice(0,g),nestedPath:d.slice(t+1)}}static getCodoxIdAndOffsetFromRootNode(d,g){let t=d.getChildren()[g];return{codoxIdArray:t&&t.codoxId?[t.codoxId]:[],offset:0}}static isNestedSelectionJSON(d){return!!d&&!(!d.anchor.codoxId.includes(_a.editorState)||!d.focus.codoxId.includes(_a.editorState))}static lexicalToJSONNested(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],f=$e.lexicalToJSON(d);if(!f)return null;let r=[...t,g,_a.editorState,_a.root];return f.anchor.codoxId=[...r,...f.anchor.codoxId],f.focus.codoxId=[...r,...f.focus.codoxId],f}static getNestedSelectionJSONFromMainSelectionJSON(d){let g={nestedSelectionJSON:null,nestedEditor:null},{mainPath:t,nestedPath:f}=$e.splitCodoxIdPathIntoMainAndNested(d.anchor.codoxId),{mainPath:r,nestedPath:n}=$e.splitCodoxIdPathIntoMainAndNested(d.focus.codoxId);t.toString()===r.toString()||le.debug("[getNestedSelectionJSONFromMainSelectionJSON]: Nested selection main path part must point to same node in main editor: ",{anchorCodoxIds:d.anchor.codoxId,mainAnchorPath:t,nestedAnchorPath:f,focusCodoxIds:d.focus.codoxId,mainFocusPath:r,nestedFocusPath:n});let e=t,s=e[e.length-1],i=e[e.length-2],l=Tn.get(i);if(!l){let c=e[e.length-3];if(c){let u=Tn.get(c);u&&(l=u.getChildren().find(h=>h.codoxDId===i))}}if(!l)return le.debug("[getNestedSelectionJSONFromMainSelectionJSON]: Lexical node with nested editor not found in codox nodes map - selection will be dropped",{jsonSelection:d,targetNodeCodoxId:i}),g;let o=Dl(s),a=l[o];return xe.isLexicalEditorInstance(a)?(g.nestedSelectionJSON=Zm(Zm({},d),{},{anchor:{codoxId:f,offset:d.anchor.offset},focus:{codoxId:n,offset:d.focus.offset}}),g.nestedEditor=a,g):(le.debug("[getNestedSelectionJSONFromMainSelectionJSON]: Found nested editor is not LexicalEditor instance",{jsonSelection:d,targetLexicalNode:l,targetLexicalNodeAttrName:o,nestedEditorCandidate:a}),g)}static getNodeAncestorsCodoxIds(d){let g=[],t=$e.getNodeAncestorsList(d);if(t.length===1&&t[0].__type==="root")return g.push(d.codoxId),g;for(let f=t.length-2;f>=0;f--){let r=t[f];r.codoxId&&g.push(r.codoxId)}return d.codoxId&&d.getChildren&&g.push(d.codoxId),g}static getParentOffsetOutOfNodeOffset(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(arguments.length>2&&arguments[2]!==void 0&&arguments[2]){if(d.getChildrenSize&&d.getChildrenSize()===0||g===0&&d.codoxId)return g;let n=g,e=[];if(d.codoxId)e=d.getChildren();else{const i=d.getParents().find(o=>!!o.codoxId);let l=!1;for(const o of i.getChildren()){if(o.__key===d.__key&&(l=!!g&&(zl(o)||Fl(o)),!l))break;if(Fi(o))e.push(o),n+=o.getTextContentSize();else if(Cn(o))e.push(o),n++;else{let a=$e.getAllNodeLeaves(o),c=a.reduce((u,h)=>(Fi(h)?u+=h.getTextContentSize():Cn(h)&&u++,u),0);e.push(...a),n+=c}if(l)break}}let s=0;for(const i of e){if(n<=0)break;let l=0;l=Cn(i)?1:i.getTextContentSize(),s+=l,Cn(i)?n--:n-=l}return s}let t=d.getParents().find(n=>!!n.codoxId);if(!t)return g;let f=[];for(const n of t.getChildren())if(Fi(n)||Cn(n))f.push(n);else{let e=$e.getAllNodeLeaves(n);f.push(...e)}if(f.length===1&&f[0].__key===d.__key)return g;let r=0;for(const n of f){if(n.__key===d.__key){r+=g;break}let e=0;e=Cn(n)?1:n.getTextContentSize(),r+=e}return r}static lexicalToJSON(d){if(!d)return null;let g=[],t=0,f=[],r=0,n="",e=0,s=!0;if((0,ye.$isRangeSelection)(d)){let i=(0,ye.$getNodeByKey)(d.anchor.key);if(Sa(i)){let{codoxIdArray:o,offset:a}=$e.getCodoxIdAndOffsetFromRootNode(i,d.anchor.offset);g=o,t=a}else{if((0,En.$isTableCellNode)(i)){let c=i.getFirstChild();c&&Cs(c)&&(i=c)}g=$e.getNodeAncestorsCodoxIds(i);const o=d.anchor.offset,a=d.anchor.type===Ri.element;t=$e.getParentOffsetOutOfNodeOffset(i,o,a,"anchor")}let l=(0,ye.$getNodeByKey)(d.focus.key);if(Sa(l)){let{codoxIdArray:o,offset:a}=$e.getCodoxIdAndOffsetFromRootNode(l,d.focus.offset);f=o,r=a}else{if((0,En.$isTableCellNode)(l)){let c=l.getFirstChild();c&&Cs(c)&&(l=c)}f=$e.getNodeAncestorsCodoxIds(l);const o=d.focus.offset,a=d.focus.type===Ri.element;r=$e.getParentOffsetOutOfNodeOffset(l,o,a,"focus")}n=d.style,e=d.format,s=d.dirty}else if((0,ye.$isNodeSelection)(d)){let i=d.getNodes();if(!i.length)return null;let l=i[0],o=i[i.length-1],a=(0,ye.$createRangeSelection)();a.anchor.set(l.getKey(),0,Ri.element),a.focus.set(o.getKey(),0,Ri.element);let c=a.isBackward();g=$e.getNodeAncestorsCodoxIds(l),f=$e.getNodeAncestorsCodoxIds(o);let u=c?1:0,h=c?0:1;t=$e.getParentOffsetOutOfNodeOffset(l,u),r=$e.getParentOffsetOutOfNodeOffset(o,h)}else if((0,En.$isTableSelection)(d)){t=r=null;let i=(0,ye.$getNodeByKey)(d.anchor.key),l=(0,ye.$getNodeByKey)(d.focus.key);g=$e.getNodeAncestorsCodoxIds(i),f=$e.getNodeAncestorsCodoxIds(l)}return{anchor:{codoxId:g,offset:t},focus:{codoxId:f,offset:r},style:n,format:e,dirty:s}}static createTableSelection(d,g){if(!Es(d)||!Es(g))return le.warn("[createTableSelection] invalid anchor/focus nodes - must be one of table nodes: ",{anchorNode:d,focusNode:g}),null;let t=(0,En.$isTableNode)(d)?d:d.getParents().find(r=>(0,En.$isTableNode)(r)),f=(0,En.$createTableSelection)();return f.set(t.getKey(),d.getKey(),g.getKey()),f}static createNodeSelection(d,g){if(g||(g=d),!Cn(d)||!Cn(g))return le.warn("[createNodeSelection] invalid anchor/focus - must be decorators: ",{anchorNode:d,focusNode:g}),null;let t=(0,ye.$createNodeSelection)(),f=d.getNodesBetween(g),r=f.filter(n=>Cn(n));return f.length!==r.length?(le.warn("[createNodeSelection] nodes list contains unexpected nodes: ",{allNodes:f,decoratorNodes:r}),null):(r.forEach(n=>{t.add(n.__key)}),t)}static findClosestParentElementNode(d){if(!d)return null;let g=d.getParent();return g?Cs(g)?g:$e.findClosestParentElementNode(g):null}static createRangeSelection(d,g,t,f,r,n){if(!(arguments.length>6&&arguments[6]!==void 0&&arguments[6])){if(!(Fn(d)||Cs(d)||(le.warn("[createRangeSelection] anchor node is not text or element node - finding closest parent element node "),d=$e.findClosestParentElementNode(d))))return le.warn("[createRangeSelection] unable to find anchor closest parent element node - dropping to null"),null;if(!(Fn(g)||Cs(g)||(le.warn("[createRangeSelection] focus node is not text or element node - finding closest parent element node "),g=$e.findClosestParentElementNode(g))))return le.warn("[createRangeSelection] unable to find focus closest parent element node - dropping to null"),null}let e=(0,ye.$createRangeSelection)();e.format=r,e.setStyle(n);let s=Fn(d)?Ri.text:Ri.element,i=Fn(g)?Ri.text:Ri.element;return e.anchor.set(d.getKey(),t,s),e.focus.set(g.getKey(),f,i),e.dirty=!1,e}static getSelectedCandidateFromParentChildren(d,g){let t=arguments.length>2&&arguments[2]!==void 0&&arguments[2],f=null,r=g;if(g===0){const n=d.getFirstChild();f=Fn(n)?n:d}else{let n=d.getChildren(),e=[];for(let i of n)if(Fi(i)||Cn(i))e.push(i);else{let l=$e.getAllNodeLeaves(i);e.push(...l)}let s=g;for(let i of e)if(Fi(i)||Cn(i)){let l=Cn(i)?1:i.getTextContentSize();if(s<=l){if(Jf(i)){let o=i.getNextSibling();o&&Fn(o)?(f=o,r=0):(f=d,r=i.getPreviousSiblings().length+1);break}Cn(i)&&(t||(s=0)),f=i,r=s;break}s-=l}if(!f){const i=d.getLastChild();Fn(i)?(f=i,r=i.getTextContentSize()):(f=d,r=d.getChildrenSize())}}return{candidate:f,candidateOffset:r}}static getSelectedParentAndOffset(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=d.getParent(),f=d.getPreviousSiblings().length+1;return(Es(t)||!Cn(d)&&Sa(t))&&(t=d,f=g),{parent:t,parentOffset:f}}static JSONToLexical(d){if(le.debug("[JSONToLexical]: ",{selectionJson:d}),!d)return null;let{anchor:{codoxId:g,offset:t},focus:{codoxId:f,offset:r},format:n,style:e}=d,s=!g.length,i=null;if(s)i=(0,ye.$getRoot)();else{let M=g[g.length-1];i=M?Tn.get(M):null}let l=!f.length,o=null;if(l)o=(0,ye.$getRoot)();else{let M=f[f.length-1];o=M?Tn.get(M):null}if(!i||!o)return le.debug(" [JSONToLexical] anchorNode or focusNode not found in lexical nodes - selection will be dropped to null: ",{anchorParentNode:i,focusParentNode:o,anchorOffset:t,focusOffset:r,selectionJson:d}),null;if(i&&!i.isAttached()||o&&!o.isAttached())return le.debug("[JSONToLexical] anchorNode or focusNode is no longer attached to editor - marked for GC: ",{anchorParentNode:i,focusParentNode:o,isAnchorNodeAttached:i.isAttached(),isFocusParentNodeAttached:o.isAttached()}),null;if(Es(i)&&Es(o)&&t===null&&r===null)return $e.createTableSelection(i,o);if(Cn(i)&&Cn(o)&&t!==r)return $e.createNodeSelection(i,o);if(Cn(i)&&Cn(o)&&t===r&&w0(i)&&w0(o)){let M=(0,ye.$getRoot)(),J=M.getChildren(),K=J.findIndex(U=>U.getKey()===i.getKey()),P=J.findIndex(U=>U.getKey()===o.getKey());return $e.createRangeSelection(M,M,K,P,n,e)}let a,c,u,h,p=!!i.getChildrenSize,m=!!o.getChildrenSize,b=p&&i.getChildrenSize()===0,_=m&&o.getChildrenSize()===0;if(b&&_)return $e.createRangeSelection(i,o,t,r,n,e);let v=p&&i.getChildrenSize()>0,w=m&&o.getChildrenSize()>0;if(v){let{candidate:M,candidateOffset:J}=$e.getSelectedCandidateFromParentChildren(i,t);a=M,u=J}else{let{parent:M,parentOffset:J}=$e.getSelectedParentAndOffset(i,t);a=M,u=J}if(w){let{candidate:M,candidateOffset:J}=$e.getSelectedCandidateFromParentChildren(o,r,!0);c=M,h=J}else{let{parent:M,parentOffset:J}=$e.getSelectedParentAndOffset(o,r);c=M,h=J}if(!a||!c)return null;let x=Fn(a),S=Fn(c),E=Cn(a),k=Cn(c),D=i.getKey()===o.getKey(),N=D&&r-t==1,O=D&&r===t&&a.getKey()===c.getKey(),R=t!==r,A=a.getKey()===c.getKey();if(E&&k&&O){let M=a.getNextSibling();if(M&&Fn(M))return $e.createRangeSelection(M,M,0,0,n,e);if(M&&(0,ye.$isParagraphNode)(M))return $e.createNodeSelection(a,c);let{parent:J,parentOffset:K}=$e.getSelectedParentAndOffset(a);return $e.createRangeSelection(J,J,K,K,n,e)}let z=$e.createRangeSelection(a,c,u,h,n,e,!0),H=z.isBackward(),$=z.getNodes();if(E&&k&&!A){if(N)return $e.createNodeSelection(c);if($.every(M=>Cn(M)))return $e.createNodeSelection(a,c);{let M,J,K,P,U=a.getNextSibling();if(U&&Fn(U))M=U,K=0;else{let{parent:G,parentOffset:F}=$e.getSelectedParentAndOffset(a);M=G,K=F}let V=c.getNextSibling();if(V&&Fn(V))J=V,P=0;else{let{parent:G,parentOffset:F}=$e.getSelectedParentAndOffset(c);J=G,P=F}return $e.createRangeSelection(M,J,K,P,n,e)}}if(x&&S&&R)if(H){let M=h===c.getTextContentSize(),J=c.getNextSibling();if(M&&J&&Fn(J))return $e.createRangeSelection(a,J,u,0,n,e)}else{let M=u===a.getTextContentSize(),J=a.getNextSibling();if(M&&J&&Fn(J))return $e.createRangeSelection(J,c,0,h,n,e)}if(R&&!E&&k){if(N)return $e.createNodeSelection(c);let[M,...J]=$,K=J.every(U=>Cn(U));if(Fn(M)&&u===M.getTextContentSize()&&K)return $e.createNodeSelection(J[0],c);let P=c.getNextSibling();if(Fn(a)&&a.getTextContentSize()===u&&!H){let U=a.getNextSibling();U&&Fn(U)&&(a=U,u=0)}if(P&&Fn(P))return $e.createRangeSelection(a,P,u,0,n,e);{let{parent:U,parentOffset:V}=$e.getSelectedParentAndOffset(c);return $e.createRangeSelection(a,U,u,V,n,e)}}if(R&&E&&!k){let[M,...J]=$,K=J.every(U=>Cn(U));if(Fn(M)&&h===M.getTextContentSize()&&K)return $e.createNodeSelection(a,J[0]);let P=a.getNextSibling();if(P&&Fn(P))return $e.createRangeSelection(P,c,0,h,n,e);{let{parent:U,parentOffset:V}=$e.getSelectedParentAndOffset(a);return $e.createRangeSelection(U,c,V,h,n,e)}}return $e.createRangeSelection(a,c,u,h,n,e)}}var z_=y=>{var d={};return rn.d(d,y),d};const Gt=z_({Fragment:()=>Yn.Fragment,createContext:()=>Yn.createContext,createElement:()=>Yn.createElement,forwardRef:()=>Yn.forwardRef,useCallback:()=>Yn.useCallback,useContext:()=>Yn.useContext,useEffect:()=>Yn.useEffect,useImperativeHandle:()=>Yn.useImperativeHandle,useLayoutEffect:()=>Yn.useLayoutEffect,useMemo:()=>Yn.useMemo,useRef:()=>Yn.useRef,useState:()=>Yn.useState});function Qm(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function Xm(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?Qm(Object(g),!0).forEach(function(t){U_(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):Qm(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function U_(y,d,g){return(d=$_(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function $_(y){var d=H_(y,"string");return typeof d=="symbol"?d:d+""}function H_(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const Df="comments_change";class q_ extends Wm{constructor(){super(),this.initialCommentThreads=[],this.commentThreads=[],this.dataTypes={comment:"comment",thread:"thread"},this.ID_PREFIX="codox",this.relatedNodeKeys={},this.activeThreadIds={},this._uiRefreshTriggered=!1}_triggerUIRefresh(){this._uiRefreshTriggered||(this._uiRefreshTriggered=!0,Promise.resolve().then(()=>{le.debug("[_triggerUIRefresh] emitted"),this.emit(Df),this._uiRefreshTriggered=!1}))}_copyThreads(d){return[...d]}_getActiveCommentThreads(){return this.commentThreads.filter(d=>!!this.activeThreadIds[d.codoxId])}_setCommentThreads(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.commentThreads=[...d],[...d],this._triggerUIRefresh()}clear(){this.resetComments(),super.clear()}gcInternalStates(){this.relatedNodeKeys={},this.activeThreadIds={}}resetComments(){this.gcInternalStates(),this._setCommentThreads([])}getAllComments(){return this.commentThreads}setAllComments(d){Array.isArray(d)?this._setCommentThreads(d):le.warn("[setAllComments]: incomming comments are not array: ",{newCommentThreads:d})}addRelatedNodeKey(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!Array.isArray(g)||!g.length)return;let f=g.filter(r=>typeof r=="string"&&r.startsWith(this.ID_PREFIX));if(f.length){if(t)for(let r of f)this.activeThreadIds[r]?this.activeThreadIds[r].add(d):this.activeThreadIds[r]=new Set([d]);else if(this.relatedNodeKeys[d]){let r=[...this.relatedNodeKeys[d]],n=f,e=n.length>r.length,s=r.length>n.length;e?n.filter(i=>!r.includes(i)).forEach(i=>{this.activeThreadIds[i].add(d)}):s&&r.filter(i=>!n.includes(i)).forEach(i=>{this.activeThreadIds[i].size>1?this.activeThreadIds[i].delete(d):delete this.activeThreadIds[i]})}this.relatedNodeKeys[d]=f,this._triggerUIRefresh()}}removeRelatedNodeKey(d){if(this.relatedNodeKeys[d]){let g=this.relatedNodeKeys[d];le.debug("[CodoxComments][removeRelatedNodeKey]: ",{nodeKey:d,threadIds:g,activeThreads:this.activeThreadIds}),g.forEach(t=>{this.activeThreadIds[t]&&(this.activeThreadIds[t].size>1?this.activeThreadIds[t].delete(d):delete this.activeThreadIds[t])}),delete this.relatedNodeKeys[d],this._triggerUIRefresh()}}createCommentId(){return`${this.ID_PREFIX}-${qf()}`}createNewCommentObj(d){let{content:g,author:t,codoxId:f,timeStamp:r}=d;return{author:t,content:g,codoxId:f||this.createCommentId(),timeStamp:r,type:this.dataTypes.comment}}createNewThreadObj(d){let{quote:g,comments:t,codoxId:f}=d;return{comments:t,codoxId:f||this.createCommentId(),quote:g,type:this.dataTypes.thread}}addCommentThread(d){let g=[...this.commentThreads,d];this._setCommentThreads(g)}addComment(d,g){let t=this.commentThreads.map(f=>{if(f.codoxId===d){let r=Xm({},f);return r.comments=[...r.comments,g],r}return f});this._setCommentThreads(t)}removeCommentThread(d){}removeComment(d,g){le.debug("[CodoxComments][removeCommentFromPlugin]: ",{commentId:g,threadId:d});let t=this.commentThreads.map(f=>{if(f.codoxId===d){let r=Xm({},f);return r.comments=r.comments.filter(n=>n.codoxId!==g),r}return f});this._setCommentThreads(t)}gcAbandonedNodeKeys(d){let g=Object.keys(this.relatedNodeKeys);for(let t of g)d.has(t)||this.removeRelatedNodeKey(t)}refreshComments(){this._triggerUIRefresh()}setInitialComments(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Array.isArray(d)&&(le.debug("[CodoxComments][setInitialComments]: ",[...d]),this.initialCommentThreads=[...d])}activateInitialComments(d){this.setAllComments(this.initialCommentThreads),console.log("COMMENTS: ",{initComments:[...this.initialCommentThreads]}),d.getEditorState().read(()=>{let g=(0,ye.$nodesOfType)(Qr.MarkNode);for(let t of g)console.log("COMMENTS: ",{node:t}),this.addRelatedNodeKey(t.__key,t.__ids,!0)}),console.log("IVAN: ",{self:this}),this.initialCommentThreads=[]}initialCommentsExist(){return!!this.initialCommentThreads.length}}const Sn=new q_;function J_(){let y=Sn._getActiveCommentThreads.bind(Sn);const[d,g]=(0,Gt.useState)(y());return(0,Gt.useEffect)(()=>{Sn.on(Df,()=>{let t=y();le.log(`[useCodoxComments] "${Df}" event: `,t),g(t)})},[]),d}const Lf=(0,ye.createCommand)("INSERT_COMMENT");var W_=y=>{var d={};return rn.d(d,y),d};const vs=W_({mergeRegister:()=>ko,registerNestedElementResolver:()=>t1});var V_=rn(967),Zo=rn.n(V_),K_=Object.getOwnPropertyNames,G_=Object.getOwnPropertySymbols,Y_=Object.prototype.hasOwnProperty;function t0(y,d){return function(g,t,f){return y(g,t,f)&&d(g,t,f)}}function gu(y){return function(d,g,t){if(!d||!g||typeof d!="object"||typeof g!="object")return y(d,g,t);var f=t.cache,r=f.get(d),n=f.get(g);if(r&&n)return r===g&&n===d;f.set(d,g),f.set(g,d);var e=y(d,g,t);return f.delete(d),f.delete(g),e}}function e0(y){return K_(y).concat(G_(y))}var n0=Object.hasOwn||function(y,d){return Y_.call(y,d)};function _s(y,d){return y||d?y===d:y===d||y!=y&&d!=d}var r0="_owner",o0=Object.getOwnPropertyDescriptor,i0=Object.keys;function Z_(y,d,g){var t=y.length;if(d.length!==t)return!1;for(;t-- >0;)if(!g.equals(y[t],d[t],t,t,y,d,g))return!1;return!0}function Q_(y,d){return _s(y.getTime(),d.getTime())}function a0(y,d,g){if(y.size!==d.size)return!1;for(var t,f,r={},n=y.entries(),e=0;(t=n.next())&&!t.done;){for(var s=d.entries(),i=!1,l=0;(f=s.next())&&!f.done;){var o=t.value,a=o[0],c=o[1],u=f.value,h=u[0],p=u[1];i||r[l]||!(i=g.equals(a,h,e,l,y,d,g)&&g.equals(c,p,a,h,y,d,g))||(r[l]=!0),l++}if(!i)return!1;e++}return!0}function X_(y,d,g){var t,f=i0(y),r=f.length;if(i0(d).length!==r)return!1;for(;r-- >0;)if((t=f[r])===r0&&(y.$$typeof||d.$$typeof)&&y.$$typeof!==d.$$typeof||!n0(d,t)||!g.equals(y[t],d[t],t,t,y,d,g))return!1;return!0}function Bl(y,d,g){var t,f,r,n=e0(y),e=n.length;if(e0(d).length!==e)return!1;for(;e-- >0;)if((t=n[e])===r0&&(y.$$typeof||d.$$typeof)&&y.$$typeof!==d.$$typeof||!n0(d,t)||!g.equals(y[t],d[t],t,t,y,d,g)||(f=o0(y,t),r=o0(d,t),(f||r)&&(!f||!r||f.configurable!==r.configurable||f.enumerable!==r.enumerable||f.writable!==r.writable)))return!1;return!0}function tx(y,d){return _s(y.valueOf(),d.valueOf())}function ex(y,d){return y.source===d.source&&y.flags===d.flags}function s0(y,d,g){if(y.size!==d.size)return!1;for(var t,f,r={},n=y.values();(t=n.next())&&!t.done;){for(var e=d.values(),s=!1,i=0;(f=e.next())&&!f.done;)s||r[i]||!(s=g.equals(t.value,f.value,t.value,f.value,y,d,g))||(r[i]=!0),i++;if(!s)return!1}return!0}function nx(y,d){var g=y.length;if(d.length!==g)return!1;for(;g-- >0;)if(y[g]!==d[g])return!1;return!0}var rx="[object Arguments]",ox="[object Boolean]",ix="[object Date]",ax="[object Map]",sx="[object Number]",lx="[object Object]",cx="[object RegExp]",ux="[object Set]",dx="[object String]",fx=Array.isArray,l0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,c0=Object.assign,px=Object.prototype.toString.call.bind(Object.prototype.toString);function hx(y){var d=y.areArraysEqual,g=y.areDatesEqual,t=y.areMapsEqual,f=y.areObjectsEqual,r=y.arePrimitiveWrappersEqual,n=y.areRegExpsEqual,e=y.areSetsEqual,s=y.areTypedArraysEqual;return function(i,l,o){if(i===l)return!0;if(i==null||l==null||typeof i!="object"||typeof l!="object")return i!=i&&l!=l;var a=i.constructor;if(a!==l.constructor)return!1;if(a===Object)return f(i,l,o);if(fx(i))return d(i,l,o);if(l0!=null&&l0(i))return s(i,l,o);if(a===Date)return g(i,l,o);if(a===RegExp)return n(i,l,o);if(a===Map)return t(i,l,o);if(a===Set)return e(i,l,o);var c=px(i);return c===ix?g(i,l,o):c===cx?n(i,l,o):c===ax?t(i,l,o):c===ux?e(i,l,o):c===lx?typeof i.then!="function"&&typeof l.then!="function"&&f(i,l,o):c===rx?f(i,l,o):(c===ox||c===sx||c===dx)&&r(i,l,o)}}function gx(y){var d=y.circular,g=y.createCustomConfig,t=y.strict,f={areArraysEqual:t?Bl:Z_,areDatesEqual:Q_,areMapsEqual:t?t0(a0,Bl):a0,areObjectsEqual:t?Bl:X_,arePrimitiveWrappersEqual:tx,areRegExpsEqual:ex,areSetsEqual:t?t0(s0,Bl):s0,areTypedArraysEqual:t?Bl:nx};if(g&&(f=c0({},f,g(f))),d){var r=gu(f.areArraysEqual),n=gu(f.areMapsEqual),e=gu(f.areObjectsEqual),s=gu(f.areSetsEqual);f=c0({},f,{areArraysEqual:r,areMapsEqual:n,areObjectsEqual:e,areSetsEqual:s})}return f}function mx(y){return function(d,g,t,f,r,n,e){return y(d,g,e)}}function yx(y){var d=y.circular,g=y.comparator,t=y.createState,f=y.equals,r=y.strict;if(t)return function(e,s){var i=t(),l=i.cache,o=l===void 0?d?new WeakMap:void 0:l,a=i.meta;return g(e,s,{cache:o,equals:f,meta:a,strict:r})};if(d)return function(e,s){return g(e,s,{cache:new WeakMap,equals:f,meta:void 0,strict:r})};var n={cache:void 0,equals:f,meta:void 0,strict:r};return function(e,s){return g(e,s,n)}}var Bf=Di();Di({strict:!0}),Di({circular:!0}),Di({circular:!0,strict:!0}),Di({createInternalComparator:function(){return _s}}),Di({strict:!0,createInternalComparator:function(){return _s}}),Di({circular:!0,createInternalComparator:function(){return _s}}),Di({circular:!0,createInternalComparator:function(){return _s},strict:!0});function Di(y){y===void 0&&(y={});var d=y.circular,g=d!==void 0&&d,t=y.createInternalComparator,f=y.createState,r=y.strict,n=r!==void 0&&r,e=hx(gx(y));return yx({circular:g,comparator:e,createState:f,equals:t?t(e):mx(e),strict:n})}var bx=rn(256),vx=rn.n(bx),_x=y=>{var d={};return rn.d(d,y),d};const xa=_x({$getSelectionStyleValueForProperty:()=>Gg,$patchStyleText:()=>Kg,createDOMRange:()=>qv,createRectsFromDOMRange:()=>Jv});class mu{static composeLexicalDOMNodeKeyAttrName(d){return`__lexicalKey_${d._key}`}static extractLexicalKeyFromLexicalDOMNodeKeyAttr(d){return d.split("__lexicalKey_")[1]||""}static extractSelectionUserId(d){return d.meta.author.id}static createRemoteSelectionColors(d){const g={caretColor:d,highlightColor:"",tooltipBGColor:""};if(d.startsWith("rgb")){let t=d,[f]=t.split(")");g.highlightColor=`${f},0.3)`,g.tooltipBGColor=`${f},0.85)`}else if(d.startsWith("#"))g.highlightColor=`${d}${Math.floor(76.5).toString(16).padStart(2,0)}`,g.tooltipBGColor=`${d}${Math.floor(216.75).toString(16).padStart(2,0)}`;else{const[t,f,r]=vx().keyword.rgb(d);g.highlightColor=`rgb(${t},${f}, ${r},0.3)`,g.tooltipBGColor=`rgb(${t},${f}, ${r},0.85)`}return g}static formatRemoteSelectionUsername(d){let g=d;return g=g.trim(),g.length>=17?`${g.substring(0,14)}...`:g}static isMousePositionWithinElementCords(d,g){return d.clientX>=g.x-5&&d.clientX<=g.x+g.width+5&&d.clientY>=g.y-5&&d.clientY<=g.y+g.height+5}static createDOMRange(d,g,t,f,r){return(0,xa.createDOMRange)(d,g,t,f,r)}static createRectsFromDOMRange(d,g){let{keepFullWidthRects:t=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const f=d.getRootElement();if(f===null)return[];const r=f.getBoundingClientRect(),n=getComputedStyle(f),e=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s=Array.from(g.getClientRects());let i=a=>s.splice(a,1),l=new Set;for(let a=0;a<s.length;a++){let c=s[a],u=s[a-1];if(!c||!u)continue;let h=`${(o=c).top}_${o.left}_${o.width}_${o.height}`;if(l.has(h))i(a--);else if(l.add(h),c.top===u.top&&c.height===u.height&&c.left-(u.left+u.width)<5){let p=DOMRect.fromRect({x:u.x,y:u.y,width:u.width+c.width,height:u.height});s[a-1]=p,i(a--)}else c.width+e!==r.width||t?u.top<=c.top&&u.bottom>=c.bottom&&u.left<=c.left&&u.right>=c.right&&i(a--):i(a--)}var o;return s}static getEmptyRootRect(d){let g=d.getRootElement(),t=g.getBoundingClientRect();const f=getComputedStyle(g),r=parseFloat(f.paddingLeft),n=parseFloat(f.paddingTop),e=parseFloat(f.paddingBottom);return[new DOMRect(t.x+r,t.y+n,0,t.height-e-n)]}}_c(mu,"remoteSelectionClassName","codox_remote_selection"),_c(mu,"remoteSelectionRect","codox_remote_selection_rect"),_c(mu,"tooltipAnimations",{hideAtOnce:"codox_hide_tooltip 0s linear 0s forwards",hideWithDelay:"codox_hide_tooltip 0s linear 2s forwards",showAtOnce:"codox_show_tooltip 0s linear 0s forwards",unset:"unset"});const tr=mu;function u0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function xx(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?u0(Object(g),!0).forEach(function(t){wx(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):u0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function wx(y,d,g){return(d=Sx(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function Sx(y){var d=Cx(y,"string");return typeof d=="symbol"?d:d+""}function Cx(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}class Dr{static _logInvalid(d,g,t){for(var f=arguments.length,r=new Array(f>3?f-3:0),n=3;n<f;n++)r[n-3]=arguments[n];le.warn("[JSON SELECTION VALIDATION]: ",xx({selectBelongsTo:d||"not provided",reason:g,jsonSelection:t},r))}static _isObject(d){return typeof d=="object"&&!Array.isArray(d)}static _validateSelectionSide(d){let{type:g,side:t,sideName:f,fullSelection:r}=d;if(!Dr._isObject(t))return Dr._logInvalid(g,`selection.${f} must be object`,r),!1;let n=t.codoxId;if(!Array.isArray(n))return Dr._logInvalid(g,`selection.${f}.codoxId must be array`,r),!1;if(n.length){let s=n.findIndex(l=>l===_a.editorState),i=s!==-1;for(let l=0;l<n.length;l++){if(i){if(l===s||l===s+2)continue;if(l===s+1&&n[l]!=="root")return Dr._logInvalid(g,`selection.${f}.codoxId path invalid: nested selection must include "editorState" and "root": [..."editorState", "root"...]`,r,Tn),!1;continue}let o=n[l];if(!Tn.has(o))return Dr._logInvalid(g,`selection.${f}.codoxId path invalid: node for id ${o} does not exist`,r,Tn),!1}}let e=t.offset;return typeof e=="number"||e===null?e>=0||e===null||(Dr._logInvalid(g,`selection.${f}.offset must be gte 0 or -1`,r),!1):(Dr._logInvalid(g,`selection.${f}.offset must be number or null`,r),!1)}static validateJSONSelection(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(d===null)return!0;if(!d)return Dr._logInvalid(g,"invalid json selection data type",d),!1;if(!Dr._isObject(d))return Dr._logInvalid(g,"json selection must be object",d),!1;let{anchor:t,focus:f}=d;return!!Dr._validateSelectionSide({type:g,side:t,sideName:"anchor",fullSelection:d})&&!!Dr._validateSelectionSide({type:g,side:f,sideName:"focus",fullSelection:d})}}const Ff=Dr;var Ex=rn(186),Qo=rn.n(Ex),kx=rn(155),Xo=rn.n(kx),Ox=rn(433),ti=rn.n(Ox),Tx=rn(626),ei=rn.n(Tx),jx=rn(990),ni=rn.n(jx),Ax=rn(827),ri=rn.n(Ax),yu=rn(500),xs={};xs.styleTagTransform=ri(),xs.setAttributes=ei(),xs.insert=ti().bind(null,"head"),xs.domAPI=Xo(),xs.insertStyleElement=ni(),Qo()(yu.A,xs),yu.A&&yu.A.locals&&yu.A.locals;class Nx{constructor(){_c(this,"paintSingleRemoteSelection",d=>{let{editor:g,selectionJSON:t,lexicalSelection:f,selectedNodes:r,isBackward:n}=d;this.activeEditorsKeys[g._key]||(this.activeEditorsKeys[g._key]=g._key);const e=tr.extractSelectionUserId(t),s=tr.formatRemoteSelectionUsername(t.meta.author.name),i=tr.createRemoteSelectionColors(t.meta.color);let l=null,o=null,a=0,c=0;(0,ye.$isNodeSelection)(f)?(l=r[0],o=r[r.length-1],a=0,c=1):(l=g._editorState._nodeMap.get(f.anchor.key),o=g._editorState._nodeMap.get(f.focus.key),a=f.anchor.offset,c=f.focus.offset);let u=(0,En.$isTableSelection)(f),h=(0,ye.$isNodeSelection)(f),p=(0,ye.$isRangeSelection)(f);for(let w of r)this.trackedNodesKeys.add(`${w.getKey()}__${g._key}`);r.length===1&&Jf(r[0])&&a===c&&c++;let m=null,b=[];if(u&&(0,En.$isTableCellNode)(l)&&(0,En.$isTableCellNode)(o)){let w=r.filter(x=>(0,En.$isTableCellNode)(x));for(let x of w)if(a=(0,En.$getTableColumnIndexFromTableCellNode)(x),c=(0,En.$getTableColumnIndexFromTableCellNode)(x)+1,l=x.getParent(),o=x.getParent(),m=tr.createDOMRange(g,l,a,o,c),m){let[S]=tr.createRectsFromDOMRange(g,m);b.push(S)}}else if(h){let w=f.getNodes();for(let x of w)if(m=tr.createDOMRange(g,x,0,x,1),m){let[S]=tr.createRectsFromDOMRange(g,m);b.push(S)}}else p&&(Sa(l)&&Sa(o)&&a===0&&c===0?b=tr.getEmptyRootRect(g):(m=tr.createDOMRange(g,l,a,o,c),m&&(b=tr.createRectsFromDOMRange(g,m,{keepFullWidthRects:!0}))));let _=null,v=document.createElement("span");v.classList.add(tr.remoteSelectionClassName),v.setAttribute("codox_remote_user",e),document.body.append(v),this.remoteSelectionDOMsMap[e]=v;for(let w=0;w<b.length;w++){let x=b[w];if(!x)continue;let S=w===0,E=w===b.length-1,k=x.width,D=x.height,N=x.top,O=x.left,R=n&&S||!n&&E,A=document.createElement("span");if(v.append(A),A.classList.add(tr.remoteSelectionRect),A.style.cssText=`
|
|
1393
1393
|
display: block;
|
|
1394
1394
|
pointer-events: none;
|
|
1395
1395
|
user-select: none;
|
|
@@ -1426,5 +1426,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1426
1426
|
animation: ${this.isEditingInProgress?tr.tooltipAnimations.hideAtOnce:tr.tooltipAnimations.hideWithDelay};
|
|
1427
1427
|
left: ${n?"0px":"100%"};
|
|
1428
1428
|
z-index: 10;
|
|
1429
|
-
`,A.append(H),_=H}!R&&x.width<1&&r.length>1&&(A.style.width="3px")}b.forEach(w=>{this.hoverList.push([w,_,e])})});this.remoteSelections=[],this.isEditingInProgress=!1,this.hoverList=[],this.trackedNodesKeys=new Set,this.remoteSelectionDOMsMap={},this.activeEditorsKeys={},this.keyboardBindedListener=this._keyboardEventsListener.bind(this),this.mouseBindedListener=this._mouseEventsListener.bind(this),this.resizeBindedListener=this._resizeEventListener.bind(this),this.hideInUI=!1}_mouseEventsListener(d){let g=!1,t=d.target,f=!1,r=3;for(;r&&t;){if(t.__codox_track){g=!0;break}if(t.__lexicalEditor){g=!0,f=!0;break}t=t.parentNode,r--}if(!g)return;let n=null;for(let i in this.activeEditorsKeys){if(t[`__lexicalKey_${i}`]){n=i;break}t.__lexicalEditor&&(n=t.__lexicalEditor._key)}if(!n)return;let e=f?"root":t[`__lexicalKey_${n}`];if(!e||!this.trackedNodesKeys.has(`${e}__${n}`))return;let s=new Set;for(let i=0;i<this.hoverList.length;i++){let l=this.hoverList[i],[o,a,c]=l;if(s.has(c))continue;let u=tr.isMousePositionWithinElementCords(d,o);d.type===vr.mouseover&&u&&(a.style.animation=this.isEditingInProgress?tr.tooltipAnimations.hideAtOnce:tr.tooltipAnimations.showAtOnce,s.add(c)),d.type===vr.mouseout&&(a.style.animation=tr.tooltipAnimations.hideWithDelay,s.add(c)),d.type===vr.mousemove&&u&&(a.style.animation=this.isEditingInProgress?tr.tooltipAnimations.hideAtOnce:tr.tooltipAnimations.showAtOnce,s.add(c))}}_keyboardEventsListener(d){d.type===vr.keypress&&(this.isEditingInProgress||(this.isEditingInProgress=!0)),d.type===vr.keyup&&this.isEditingInProgress&&(this.isEditingInProgress=!1)}_resizeEventListener(d){xe.mainEditorExists()&&this.paintRemoteSelections(this.remoteSelections)}mount(){window.addEventListener(vr.keypress,this.keyboardBindedListener),window.addEventListener(vr.keyup,this.keyboardBindedListener),window.addEventListener(vr.resize,this.resizeBindedListener),window.addEventListener(vr.scroll,this.resizeBindedListener);for(const d of Km)window.addEventListener(d,this.mouseBindedListener)}unmount(){window.removeEventListener(vr.keypress,this.keyboardBindedListener),window.removeEventListener(vr.keyup,this.keyboardBindedListener),window.removeEventListener(vr.resize,this.resizeBindedListener),window.removeEventListener(vr.scroll,this.resizeBindedListener);for(const d of Km)window.removeEventListener(d,this.mouseBindedListener);this.gcPrevPaintedRemoteSelections()}shouldUpdateRemoteSelections(){return!0}gcPrevPaintedRemoteSelections(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let g in this.remoteSelectionDOMsMap)this.remoteSelectionDOMsMap[g].remove();this.hoverList=[],this.trackedNodesKeys=new Set,this.remoteSelections=d||[],this.remoteSelectionDOMsMap={},this.activeEditorsKeys={}}paintRemoteSelections(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.gcPrevPaintedRemoteSelections(d);let g=xe.getMainEditorState();g.read&&g.read(()=>{for(let t of this.remoteSelections)if(Ff.validateJSONSelection(t,Mf.remote))if($e.isNestedSelectionJSON(t)){let{nestedSelectionJSON:f,nestedEditor:r}=$e.getNestedSelectionJSONFromMainSelectionJSON(t);if(!r)continue;r.getEditorState().read(()=>{let n=$e.JSONToLexical(f);if(n)try{this.paintSingleRemoteSelection({editor:r,selectionJSON:t,lexicalSelection:n,selectedNodes:n.getNodes(),isBackward:n.isBackward()})}catch(e){le.warn("[PAINT REMOTE SELECTION] failed for nested editor - ",{error:e,nestedSelectionJSON:f,fullSelection:t,lexicalSelection:n})}else le.error("DEBUGGER: [paintRemoteSelections] nested selection from json to lexical is null: ",{selection:t,nestedSelectionJSON:f,lexicalSelection:n})})}else{let f=$e.JSONToLexical(t);if(!f){le.error("DEBUGGER: [paintRemoteSelections] selection from json to lexical is null: ",{selection:t,lexicalSelection:f});continue}try{this.paintSingleRemoteSelection({editor:xe.getMainEditor(),selectionJSON:t,lexicalSelection:f,selectedNodes:f.getNodes(),isBackward:f.isBackward()})}catch(r){le.warn("[PAINT REMOTE SELECTION] failed - ",{error:r,fullSelection:t,lexicalSelection:f})}}})}updateRemoteSelections(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";this.shouldUpdateRemoteSelections(d)&&(le.log("[updateRemoteSelections] "+g,{newRemoteSelections:d}),Promise.resolve().then(()=>{this.paintRemoteSelections(d),this.hideInUI&&this.hideRemoteSelectionsFromUI()}))}clear(){this.gcPrevPaintedRemoteSelections()}getCurrentRemoteSelections(){return this.remoteSelections}hideRemoteSelectionsFromUI(){this.hideInUI||(this.hideInUI=!0);const d=document.querySelectorAll(".codox_remote_selection");for(let g of d)g.classList.add("hidden_codox_remote_selection")}showHiddenRemoteSelectionsInUI(){this.hideInUI=!1;const d=document.querySelectorAll(".hidden_codox_remote_selection");for(let g of d)g.classList.remove("hidden_codox_remote_selection")}}const go=new Nx;function Px(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).findIndex(y=>y===_a.editorState)}function bu(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,g=xe.getMainEditorNodesClassesMap();const{klass:t}=g.get(y.type)||{};if(!t)return;const f=t.importJSON(y);if(y.children&&y.children.length)for(const r of y.children)bu(r,f);return d&&d.getChildrenSize&&d.splice(d.getChildrenSize(),0,[f]),f}function vu(y){if(y.getChildren)for(let d of y.getChildren())vu(d);y.remove()}function f0(y){y.__parent=null,y.__next=null,y.__prev=null}function p0(y,d){return!!xe.isLexicalEditorInstance(y)&&!(typeof d!="object"||!d.editorState||(y.update(()=>{try{let g=(0,ye.$getSelection)();const t=y.parseEditorState(d.editorState);if(t.isEmpty())return(0,ye.$getRoot)().clear(),!0;(0,ye.$setSelection)(g),y.setEditorState(t)}catch(g){le.error("[stateUpdates][updateNestedEditorState] update nested state and selection error: ",g)}}),0))}function Ix(y,d){let g=d;for(const t of y)g=g[t];return g}function wa(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],t=null,f=Ix(y,g?d:xe.getMainEditorState().toJSON());return f&&(t=Sa(f)?(0,ye.$getRoot)():Tn.get(f.codoxId)),t||le.debug("[WARNING][getLexicalNodeByPathOutOfJSONState] lexical node not found: ",{jsonNode:f,lexicalNode:t,pathArray:y,currentStateJSON:xe.getMainEditorState().toJSON(),newStateJSON:d,codoxNodes:Tn.nodesToArray(),searchInNewState:g}),t||(g?t:wa(y,d,!0))}function h0(y){le.log("[applyFullLexicalStateReplace] clear current state and apply new");const d=(0,ye.$getRoot)();d.clear();let g=xe.getMainEditorNodesClassesMap();function t(f){const r=g.get(f.type).klass.importJSON(f);if(f.children)for(const n of f.children)r.append(t(n));return r}for(const f of y.root.children)d.append(t(f))}function Rx(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(d.length){le.log("[applyDeltasToLexicalState] Original Deltas: ",{newStateJSON:y,deltas:JSON.parse(JSON.stringify(d))});for(const g of d){let{p:t}=g;const f=t[t.length-1],r=f==="children",n=typeof f=="number",e=!n&&!r,s=Px(t),i=s!==-1,l=g.hasOwnProperty("lm")&&typeof g.lm=="number";if(t.length)if(i){let o=s-1,a=wa(t.slice(0,o),y);if(a){let c=t.slice(0,s),u=y;for(const p of c)u=u[p];let h=Dl(t[o]);p0(a.getWritable()[h],u)}}else{if(r){let o=g.oi;if(!o){le.warn("[applyDeltasToLexicalState][====WARNING====] SKIPPED. Delta oi attr expected for path",{delta:g});continue}if(o.some(c=>!(!c.hasOwnProperty("text")||typeof c.text=="string"))){le.warn("[applyDeltasToLexicalState][====WARNING====] SKIPPED. Delta oi children contain invalid text value",{delta:g});continue}t.length=t.length-1;let a=wa(t,y);if(!a)continue;if(o.some(c=>!!c.codoxDId)){try{a=a.getWritable()}catch(p){le.debug("[applyDeltasToLexicalState][shouldUpdateLeaves] getWritable error: ",{err:p,delta:g,fullStateJSON:y});continue}let c={};for(let p of a.getChildren())p.codoxDId?c[p.codoxDId]=p:vu(p);let u=[],h=["codoxDId","codoxId","__key","__parent","__prev","__next"];for(let p=0;p<o.length;p++){let m=o[p],b=p===0,_=p===o.length-1,v=null,w=p>=0?u[p-1]:null;if(m.codoxDId){let x=c[m.codoxDId];if(x){x=x.getWritable();let S=bu(m);if(le.debug("[DELTA_DECORATOR_UPDATE]: ",{exisingDecorator:x,tmpDecorator:S}),!S){le.debug("[DELTA_DECORATOR_UPDATE] UPADATE SKIPPED: ",{exisingDecorator:x,tmpDecorator:S});continue}for(let E in S)if(S.hasOwnProperty(E)&&!h.includes(E))if(xe.isLexicalEditorInstance(S[E])){let k={editorState:S[E].getEditorState().toJSON()};p0(x[E],k)}else{let k=Rf(E),D=m[k];if(D===x[E]||!m.hasOwnProperty(k))continue;let N=D!==void 0&&S[E]!==D?D:S[E];k!=="height"&&k!=="width"||S[E]==="inherit"&&D===0&&(N=S[E]),x[E]=N}S.remove(),f0(x),v=x,delete c[m.codoxDId]}}v||(v=bu(m),v.codoxDId&&v.__type==="excalidraw"&&v.__data==="[]"&&(v.__data="{}")),v=v.getWritable(),u.push(v),v.__parent=a.__key,b?(a.__first=v.__key,v.__prev=null,_&&(a.__last=v.__key)):_?(a.__last=v.__key,v.__next=null,v.__prev=w.__key,w.__next=v.__key):(v.__prev=w.__key,w.__next=v.__key),a.__size=u.length}for(let p in c){let m=c[p];m=m.getWritable(),f0(m),vu(m),delete c[p]}}else{let c=o.map(u=>bu(u));a.splice(0,a.getChildrenSize(),c)}}if(n){if(g.ld){const o=g.ld,a=Tn.get(o.codoxId);a.getChildrenSize&&a.getChildrenSize()?vu(a):a.remove()}if(g.li){let o=xe.getMainEditorNodesClassesMap();const a=g.li,c=o.get(a.type).klass.importJSON(a);if(t.length===1&&t[0]==="root")(0,ye.$getRoot)().splice(0,0,[c]);else{const u=t[t.length-1];t.length=t.length-2;let h=wa(t,y);h&&h.splice(u,0,[c])}if(a.children&&a.children.length){let u=function(h,p){const m=o.get(h.type).klass.importJSON(h);if(p.splice(p.getChildrenSize(),0,[m]),h.children&&h.children.length)for(const b of h.children)u(b,m)};for(const h of a.children)u(h,c)}}if(g.oi||g.od){let{p:o,oi:a,od:c}=g,u=wa(o,y);if(u)try{let h=u.getWritable();if(a){let p=Object.keys(a);for(let m of p)h[Dl(m)]=a[m]}if(c){let p=Object.keys(c);for(let m of p)delete h[Dl(m)]}}catch(h){le.debug("[applyDeltasToLexicalState][delta oi/od] getWritable error: ",{err:h,delta:g})}}if(l){let{p:o,lm:a}=g,c=o[o.length-1],u=a,h=u<c,p=wa(o,y);if(p){let m=p.getParent().getChildren(),b=m[c],_=m[u];h?_.insertBefore(b):_.insertAfter(b)}}}if(e){const o=t[t.length-1];let a=Dl(o);t.length=t.length-1;let c,u=wa(t,y);if(!u){le.error("Missing node when update node attr from delta: ",{path:t,delta:g,fullStateJSON:y,currentEditorState:xe.getMainEditorState().toJSON()});continue}try{c=u.getWritable()}catch(p){le.debug("[applyDeltasToLexicalState][shouldUpdateBlockAttr] getWritable error: ",{err:p,delta:g})}if(!c)continue;let h=g.oi;if(o==="format"&&(h=I_(h)),o==="direction"&&(u.hasOwnProperty(a)||(a="__dir")),!c.hasOwnProperty(a)){let p=Object.keys(c);for(let m of p){let b=Rf(m);if(o.startsWith(b)){a=m;break}}}c[a]=h}}else if(g.oi&&g.oi.root)return h0(g.oi)}}else le.log("[applyDeltasToLexicalState] stop, no deltas: ",d)}function Mx(y){let d=y.clipboardData.getData(M_.paste),g=!1;try{d=JSON.parse(d),typeof d=="object"&&d.nodes&&Array.isArray(d.nodes)&&(g=!0)}catch{return!1}if(!g)return!1;if(g){Tn.clearPastedIds();const t=f=>{if(f.codoxId&&Tn.addPastedId(f.codoxId),f.children&&f.children.length)for(const r of f.children)t(r)};for(const f of d.nodes)t(f)}return!1}var Dx=y=>{var d={};return rn.d(d,y),d};const g0=Dx({useCollaborationContext:()=>K1});var Lx=y=>{var d={};return rn.d(d,y),d};const Li=Lx({LexicalComposerContext:()=>xf,useLexicalComposerContext:()=>Tr});class m0{constructor(){this.blacklist=Object.keys(Gm).reduce((d,g)=>{let t=Gm[g];return d[g]=t.reduce((f,r)=>(f[r]=r,f),{}),d},{}),this._isBlacklistedFound=!1,this._clientCallback=null}_shouldSkipNode(d){return d instanceof ye.TextNode||d instanceof ye.ParagraphNode||d instanceof ye.RootNode}setClientCallback(d){this._clientCallback=d}removeClientCallback(){this._clientCallback=null}invokeClientCallback(){this._clientCallback&&this._clientCallback()}trackBlacklisted(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0;if(zf||g!==$r.created||this._isBlacklistedFound||!d||!d.__type||this._shouldSkipNode(d))return;let f=t||xe.getMainEditorState(),r=d.__type,n=this.blacklist[r];n&&f.read(()=>{let e=d.getParent();for(;e!==null;){let s=e?e.__type:null;if(!s)return;if(n[s])return le.warn("[ContentNestingsWatcher][trackBlacklisted] FOUND: ",{targetNode:d,targetType:r,parent:e,parentType:s,mutationType:g}),void(this._isBlacklistedFound=!0);e=e.getParent()}})}trackBlacklistedInNestedEditor(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>3?arguments[3]:void 0;if(g!==$r.created||this._isBlacklistedFound||this._shouldSkipNode(d))return;let f=t.__type,r=d.__type;if(!f||!r)return;let n=this.blacklist[r];n&&n[f]&&(this._isBlacklistedFound=!0,le.warn("[ContentNestingsWatcher][trackBlacklistedInNestedEditor] FOUND: ",{targetNode:d,targetType:r,rootNode:t,rootType:f,mutationType:g}))}isBlacklistedFound(){let d=this._isBlacklistedFound;return d&&(this._isBlacklistedFound=!1),d}}const Bx=new m0,Bi=Bx,Fx=["editorState","prevEditorState","dirtyElements","dirtyLeaves"];function zx(y,d){if(y==null)return{};var g,t,f=Ux(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function Ux(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}class $x{constructor(){this.nestedEditorsListenersMap={}}_createNestedEditorUpdatesListener(d,g){let t=!1;return function(f){let{editorState:r,prevEditorState:n,dirtyElements:e,dirtyLeaves:s}=f,i=(zx(f,Fx),xe.getMainEditor()),l=xe.getMainEditorState(),o=r.toJSON(),a=n.toJSON(),c=Bf(o,a),u=r._selection,h=n._selection,p=!1,m=null,b=xe.isOnlySelectionChanged(e,s),_=d[g];if(le.debug("[NESTED EDITOR LISTENER] invoked: ",{lexicalNode:d,key:d.__key,onlySelectionChanged:b,newEditorStateJSON:o,prevEditorStateJSON:a,isSameState:c,lexicalSelection:u,prevLexicalSelection:h,mainDirtyLeaves:i._dirtyLeaves.size,mainDirtyElements:i._dirtyElements.size,nestedDirtyLeaves:_._dirtyLeaves.size,nestedDirtyElements:_._dirtyElements.size,nestedEditorKey:_._key}),Bi.isBlacklistedFound())return t=!0,le.debug("[NESTED EDITOR LISTENER] BLACKLISTED FOUND - revert to prev state"),xe.scanLexicalNodeForNestedEditorAttribute(d)?(_.update(()=>{try{const v=_.parseEditorState(a);if(v.isEmpty())return(0,ye.$getRoot)().clear(),!0;_.setEditorState(v)}catch(v){le.error("[NESTED EDITOR LISTENER] BLACKLISTED FOUND - ROLLBACK ERROR: ",v)}}),void Bi.invokeClientCallback()):void 0;if(t)t=!1;else{if(d.codoxId||d.codoxDId){let v=null;l.read(()=>{v=$e.getNodeAncestorsCodoxIds(d),!d.codoxId&&d.codoxDId&&v.push(d.codoxDId)}),r.read(()=>{let w=Rf(g),x=$e.lexicalToJSONNested(u,w,v);m=xe.getCurrentNestedSelectionJSON(),p=$e.equalSelectionsJSON(m,x),p||xe.setNestedSelectionJSON(x)})}c&&p||i.update(()=>{try{le.debug("[NESTED EDITOR LISTENER] MARKING DIRTY TO TRIGGER UPDATE",{mainTags:i._updateTags,nestedTags:_&&_._updateTags,isSameState:c,isSameSelection:p,onlyNestedSelectionChanged:b,mainDirtyLeaves:i._dirtyLeaves.size,mainDirtyElements:i._dirtyElements.size,nestedDirtyLeaves:_._dirtyLeaves.size,nestedDirtyElements:_._dirtyElements.size,lexicalNode:d,lexicalSelection:u,prevLexicalSelection:h,mainEditorTags:i._updateTags,mainEditorTagsSize:i._updateTags.size}),xe.addUpdateTag({fromNestedEditor:!0}),d.markDirty()}catch(v){le.error("[NESTED EDITOR LISTENER] MARKING DIRTY TO TRIGGER UPDATE - ERROR: ",v)}})}}}_isNestedEditorManaged(d){return!!this.nestedEditorsListenersMap[d]}gc(){for(let d in this.nestedEditorsListenersMap)if(!xe.getLexicalNodeByKey(d)){let g=this.nestedEditorsListenersMap[d];g&&g(),delete this.nestedEditorsListenersMap[d]}}manageNestedEditorInLexicalNode(d){if(this._isNestedEditorManaged(d.getKey()))return;let g=xe.scanLexicalNodeForNestedEditorAttribute(d);if(g){let t=d[g],f=this._createNestedEditorUpdatesListener(d,g),r=[];t._nodes.forEach((s,i,l)=>{let{klass:o}=s,a=t.registerMutationListener(o,c=>{for(let[u,h]of c)if(h===$r.created){let p=t.getEditorState()._nodeMap.get(u);p&&Bi.trackBlacklistedInNestedEditor(p,h,t.getEditorState(),d)}});r.push(a)});let n=(0,vs.mergeRegister)(t.registerUpdateListener(f),...r),e=d.getKey();this.nestedEditorsListenersMap[e]=n}}gcNestedEditorListenerInLexicalNode(d){let g=d.getKey(),t=this.nestedEditorsListenersMap[g];t&&(t(),delete this.nestedEditorsListenersMap[g])}manageNestedEditorInClonedLexicalNode(d,g){let t=d.getKey();t!==g.getKey()&&this._isNestedEditorManaged(t)&&(this.gcNestedEditorListenerInLexicalNode(d),this.manageNestedEditorInLexicalNode(g))}setNestedEditorSelection(d){let{nestedSelectionJSON:g,nestedEditor:t}=$e.getNestedSelectionJSONFromMainSelectionJSON(d);if(!t)return!1;let f=!0;return t.update(()=>{try{let r=$e.JSONToLexical(g);(0,ye.$setSelection)(r),le.debug("[setNestedEditorSelection]: lexical nested selection: ",r)}catch(r){le.error("[setNestedEditorSelection] set nested selection error: ",r),f=!1}}),f}clearListeners(){for(let d in this.nestedEditorsListenersMap){let g=this.nestedEditorsListenersMap[d];g&&g(),delete this.nestedEditorsListenersMap[d]}}}const Hx=new $x,oi=Hx,qx=function(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];try{let g=(0,ye.createEditor)({namespace:"validation",nodes:[...d],onError:e=>{throw e},parentEditor:null});const t=new m0,f=g.parseEditorState(y);if(f.isEmpty())return;g.setEditorState(f);let r=g.getEditorState();const n=r._nodeMap[Symbol.iterator]();for(const e of n){let[s,i]=e;if(i&&(t.trackBlacklisted(i,$r.created,r),t.isBlacklistedFound()))throw new Error(D_)}}catch(g){throw g}};class Jx{constructor(){this.removeCandidateTableKeys=new Set,this.validateTableCandidateKeys=new Set,this.tableFixActions=[]}_scanForCellHeaderState(d,g,t,f){if(g.length<f)return null;let r,n=g.some(s=>s.__headerState===Mi.BOTH||s.__headerState===Mi.ROW),e=d.some((s,i)=>{if(s.__size<f)return!1;let l=s.getChildAtIndex(t);return!(!l||l.__headerState!==Mi.BOTH&&l.__headerState!==Mi.COLUMN)});return n&&e?r=Mi.BOTH:n&&!e?r=Mi.ROW:e&&!n&&(r=Mi.COLUMN),r}_isValidCellChildren(d){for(let g of d)if(Es(g)||!Cs(g)&&Cn(g))return!1;return!0}_createEmptyCell(){let d=(0,En.$createTableCellNode)();return d.append((0,ye.$createParagraphNode)()),d}_wrapInvalidCellChildrenIntoParagraph(d){let g=(0,ye.$createParagraphNode)().getWritable(),t=d.getChildren();(d=d.getWritable()).__first=g.__key,d.__last=g.__key,d.__size=1,g.__parent=d.__key,t.forEach((f,r)=>{(f=f.getWritable()).__parent=null,g.append(f)})}_createFixAction_APPEND_CELLS_TO_ROW(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - APPEND_CELLS_TO_ROW] invoked: ",{rowKey:d,numOfCellsToAppend:g});let t=(0,ye.$getNodeByKey)(d);for(;g;){let f=(0,En.$createTableCellNode)().append((0,ye.$createParagraphNode)());f.setRowSpan(1).setColSpan(1),t.append(f),g--}}}_createFixAction_ADD_PARAGRAPH_TO_EMPTY_CELL(d){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - ADD_PARAGRAPH_TO_EMPTY_CELL] invoked: ",{cellKey:d}),(0,ye.$getNodeByKey)(d).append((0,ye.$createParagraphNode)())}}_createFixAction_WRAP_CELL_CHILDREN_IN_PARAGRAPH(d){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - WRAP_CELL_CHILDREN_IN_PARAGRAPH] invoked: ",{cellKey:d});let g=(0,ye.$getNodeByKey)(d);this._wrapInvalidCellChildrenIntoParagraph(g)}}_createFixAction_ADD_ROW_CELL_TO_TABLE_NODE(d){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - ADD_ROW_CELL_TO_EMPTY_TABLE_NODE] invoked: ",{tableKey:d});let g=(0,ye.$getNodeByKey)(d),t=(0,En.$createTableRowNode)();t.append(this._createEmptyCell()),g.append(t)}}_createFixAction_ADD_CELL_TO_EMPTY_ROW_NODE(d,g){return()=>{for(g||(g=1);g;)(0,ye.$getNodeByKey)(d).append(this._createEmptyCell()),g--}}_createFixAction_WRAP_INVALID_ROW_NODE(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - WRAP_INVALID_ROW_NODE] invoked: ",{tableKey:d,rowKey:g});let t=(0,ye.$getNodeByKey)(d);if(!t)return;let f=(0,ye.$getNodeByKey)(g);if(!f)return;t=t.getWritable(),f=f.getWritable();let r=f.getPreviousSibling(),n=f.getNextSibling();f.__parent=null,f.__prev=null,f.__next=null;let e=(0,En.$createTableRowNode)();if((0,En.$isTableCellNode)(f))f.getChildren().length?this._isValidCellChildren()||this._wrapInvalidCellChildrenIntoParagraph(f):f.append((0,ye.$createParagraphNode)()),e.append(f);else{let s=this._isValidCellChildren([f]),i=(0,En.$createTableCellNode)();if(e.append(i),s)i.append(f);else{let l=(0,ye.$createParagraphNode)();l.append(f),i.append(l)}}e.__parent=t.__key,t.__first===f.__key&&(t.__first=e.__key),t.__last===f.__key&&(t.__last=e.__key),r&&(r=r.getWritable(),r.__next=e.__key,e.__prev=r.__key),n&&(n=n.getWritable(),n.__prev=e.__key,e.__next=n.__key)}}_createFixAction_WRAP_INVALID_CELL_NODE(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - WRAP_INVALID_CELL_NODE] invoked: ",{rowKey:d,cellKey:g});let t=(0,ye.$getNodeByKey)(d);if(!t)return;let f=(0,ye.$getNodeByKey)(g);if(f.remove(),f=(0,ye.$createParagraphNode)(),!f)return;t=t.getWritable(),f=f.getWritable();let r=f.getPreviousSibling(),n=f.getNextSibling(),e=(0,En.$createTableCellNode)();if(e.__parent=t.__key,t.__first===f.__key&&(t.__first=e.__key),t.__last===f.__key&&(t.__last=e.__key),r&&(r=r.getWritable(),r.__next=e.__key,e.__prev=r.__key),n&&(n=n.getWritable(),n.__prev=e.__key,e.__next=n.__key),f.__parent=null,f.__prev=null,f.__next=null,this._isValidCellChildren([f]))e.append(f);else{let s=(0,ye.$createParagraphNode)();s.append(f),e.append(s)}}}_createFixAction_APPLY_HEADER_STATE_TO_CELL(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - APPLY_HEADER_STATE_TO_CELL] invoked: ",{cellKey:d,headerStateToApply:g});let t=(0,ye.$getNodeByKey)(d);t&&(t=t.getWritable(),t.__headerState=g)}}clear(){this.removeCandidateTableKeys=new Set,this.validateTableCandidateKeys=new Set,this.tableFixActions=[]}tableRemoveEventListener(d){let g=xe.getMainEditorState()._selection;if(le.debug(`[${d}]`,{selection:g}),!(0,ye.$isRangeSelection)(g))return;let t=[];try{let f=xe.getLexicalNodeByKey(g.anchor.key),r=xe.getLexicalNodeByKey(g.focus.key);f&&r&&(t=g.isBackward()?r.getNodesBetween(f):f.getNodesBetween(r))}catch(f){le.warn("[TablesValidator][tableRemoveEventListener] get range selection nodes internal lexical error: ",f)}t.forEach(f=>{(0,En.$isTableNode)(f)&&this.removeCandidateTableKeys.add(f.__key)})}tableNodeRemoveListener(d){this.removeCandidateTableKeys.has(d)&&this.removeCandidateTableKeys.delete(d)}shouldGCRemovedTables(){return!!this.removeCandidateTableKeys.size}gcRemovedTables(){le.debug("[TablesValidator][gcRemovedTable] candidate table keys ",{tableKeys:this.removeCandidateTableKeys}),xe.getMainEditor().update(()=>{Array.from(this.removeCandidateTableKeys).forEach(d=>{let g=(0,ye.$getNodeByKey)(d);g&&g.remove()}),this.removeCandidateTableKeys.clear(),(0,ye.$addUpdateTag)(Xr.historic)})}tableUpdateListener(d){this.validateTableCandidateKeys.add(d)}tableRowNodeChangesListener(d){let g=arguments.length>1&&arguments[1]!==void 0&&arguments[1],t=xe.getLexicalNodeByKey(d);if(!t)return void(g&&le.debug("[TablesValidator][tableRowNodeChangesListener] no row node found in lexical: ",{tableRowNodeKey:d}));let f=t.__parent;f?this.validateTableCandidateKeys.add(f):le.debug("[tableRowNodeChangesListener] no parent table for row node found in lexical: ",{rowNode:t})}tableCellNodeChangesListener(d){let g=xe.getLexicalNodeByKey(d);if(!g||!g.__parent)return;let t=xe.getLexicalNodeByKey(g.__parent);t&&t.__parent&&this.validateTableCandidateKeys.add(t.__parent)}shouldValidateUpdatedTables(){return!!this.validateTableCandidateKeys.size}validateUpdatedTables(){let d=Array.from(this.validateTableCandidateKeys);return xe.getMainEditorState().read(()=>{for(let g of d){let t=xe.getLexicalNodeByKey(g);if(!t)continue;let f=t.getChildren();if(!f.length){this.tableFixActions.push(this._createFixAction_ADD_ROW_CELL_TO_TABLE_NODE(g));continue}let r=0;f.forEach(i=>{i.__size>r&&(r=i.__size)});let n=[],e=f.map((i,l)=>{if(!(0,En.$isTableRowNode)(i))return this.tableFixActions.push(this._createFixAction_WRAP_INVALID_ROW_NODE(g,i.__key)),"invalid_row_node";let o=i.getChildren();if(!o.length&&!n.length)return this.tableFixActions.push(this._createFixAction_ADD_CELL_TO_EMPTY_ROW_NODE(i.__key,r)),"empty_row_should_add_cell";if(!o.length&&n.length)return n=[],"empty_row_should_be_empty";let a=0;if(n.length){let u=[];n.forEach(h=>{let[p,m]=h;a+=m,p--,p&&u.push([p,m])}),n=[...u]}let c=o.map((u,h)=>{if(!(0,En.$isTableCellNode)(u))return this.tableFixActions.push(this._createFixAction_WRAP_INVALID_CELL_NODE(i.__key,u.__key)),a++,"invalid_cell_node_should_wrap_in_cell";let p,m=u.getChildren(),b=!m.length;if(b?this.tableFixActions.push(this._createFixAction_ADD_PARAGRAPH_TO_EMPTY_CELL(u.__key)):(p=this._isValidCellChildren(m),p||this.tableFixActions.push(this._createFixAction_WRAP_CELL_CHILDREN_IN_PARAGRAPH(u.__key))),u.__rowSpan>1){let _=u.__rowSpan,v=u.__colSpan;n.push([_-1,v])}if(a+=u.__colSpan,u.__headerState===Mi.NO_STATUS){let _=this._scanForCellHeaderState(f,o,h,r);_&&this.tableFixActions.push(this._createFixAction_APPLY_HEADER_STATE_TO_CELL(u.__key,_))}return{cellKey:u.__key,rowKey:i.__key,tableKey:g,colSpan:u.__colSpan,rowSpan:u.__rowSpan,headerState:u.__headerState,childrenAreValid:p,isEmptyCell:b}});if(a<r){let u=r-a;this.tableFixActions.push(this._createFixAction_APPEND_CELLS_TO_ROW(i.__key,u))}return{realRowLength:a,rowKey:i.__key,tableKey:g,cells:c}}),s=!this.tableFixActions.length;le[s?"debug":"warn"](`[TablesValidator][validateUpdatedTables] IS TABLE VALID: ${s}`,{tableNodeKey:g,tableValidationMatrix:e,requiredRowLength:r}),this.validateTableCandidateKeys.delete(g)}}),!this.tableFixActions.length}shouldFixTablesStructure(){return!!this.tableFixActions.length}fixTablesStructure(){if(!this.tableFixActions.length)return;let d=xe.getMainEditor();le.log("[TablesValidator][fixTablesStructure]: fix actions to apply - count: ",this.tableFixActions.length),d.update(()=>{for(let g of this.tableFixActions)g();this.tableFixActions=[],(0,ye.$addUpdateTag)(Xr.historic)})}ensureDocTablesAreValid(d){return this.shouldGCRemovedTables()?(le.warn("[TablesValidator][GARBAGE COLLECT TABLE NODES AFTER TABLE REMOVAL ATTEMPT]"),this.gcRemovedTables(),!1):!(this.shouldValidateUpdatedTables()&&(le.debug("[TablesValidator][shouldValidateUpdatedTables] invoked"),!this.validateUpdatedTables()))||(le.warn("[TablesValidator][shouldValidateUpdatedTables] INVALID LEXICAL TABLE(S) STRUCTURE FOUND - FIXING",{state:JSON.parse(JSON.stringify(d.toJSON()))}),this.fixTablesStructure(),!1)}}const jo=new Jx,Wx=["contentChanged"],Vx=["state","remoteSelection"];function y0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function ws(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?y0(Object(g),!0).forEach(function(t){Kx(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):y0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function Kx(y,d,g){return(d=Gx(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function Gx(y){var d=Yx(y,"string");return typeof d=="symbol"?d:d+""}function Yx(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function b0(y,d){if(y==null)return{};var g,t,f=Zx(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function Zx(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}const zf={DEBUG:!1,VERSION:"1.0.2",NAME:"@codoxhq/lexical-provider",SDKUI_SOURCE_PATH:"../../../sdkui/dist-production2/codox.bundle.js"}.LOCAL==="true";le.info("MODE: ","production");const Qx=y=>async()=>{const{state:d,timestamp:g}=await y();if(!xe.isValidJSONState(d))throw new Error("Invalid state received from fetchDocOnNetworkReconnect hook");const{commentThreads:t,root:f}=d,r={content:{comments:t,root:f},timestamp:g};return le.info("[decorateFetchOnReconnctHook] hook invoked: ",{returnObj:r}),r};let _u=0,ii=null,Uf=!1,mo={},$f={};const Xx=(0,Gt.forwardRef)((y,d)=>{let{onBlacklistedInsert:g}=y;const t=(0,Gt.useContext)(Li.LexicalComposerContext);if(!t)throw new Error("[CodoxCollabPlugin] CodoxCollabPlugin must be inited inside <LexicalComposer> component - LexicalComposerContext is missing");const[f]=(0,Li.useLexicalComposerContext)(),r=(0,g0.useCollaborationContext)();(0,Gt.useEffect)(()=>{if(le.debug("[INIT] lexical context check: ",{lexicalContext:t,editor:f}),!f)return;le.log("[useEffect][editor] Editor instance changed: ",{editor:f,key:f._key}),xe.setMainEditor(f),Tn.gcAbandonedNodes(),oi.gc(),jo.clear(),le.log("[useEffect][editor] subscribe to editor changes");const b=(0,vs.mergeRegister)(f.registerUpdateListener(h),f.registerCommand(ye.PASTE_COMMAND,Mx,ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.UNDO_COMMAND,()=>{xe.setUndoInvoked(!0)},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.REDO_COMMAND,()=>{xe.setRedoInvoked(!0)},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.KEY_DELETE_COMMAND,(v,w)=>{jo.tableRemoveEventListener("KEY_DELETE_COMMAND")},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.KEY_BACKSPACE_COMMAND,(v,w)=>{jo.tableRemoveEventListener("KEY_BACKSPACE_COMMAND")},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.CUT_COMMAND,(v,w)=>{jo.tableRemoveEventListener("CUT_COMMAND")},ye.COMMAND_PRIORITY_CRITICAL),...p());go.mount(),xe.alignStateSelectionJSONsFromLatestEditor(),le.debug("New editor mounted: ",{isCodoxStarted:xe.isCodoxStarted,codoxLexicalEditorManager:xe,nestedEditorsProcessor:oi});let _=f._onError;return f._onError=v=>{le.error("[ERROR HANDLER WRAPPER] error from editor: ",v),_&&_(v),u()},g&&Bi.setClientCallback(g),()=>{xe.getMainEditorKey()&&(le.debug("Unmount prev editor"),b(),xe.removeMainEditor(),go.unmount(),xe.clearJSONs(),Sn.clear(),jo.clear(),xe.isCodoxStarted&&(le.debug("EDITOR USE_EFFECT stopping codox"),n(),xe.setIsCodoxStarted(!1)),Bi.removeClientCallback())}},[f]);const n=()=>{xe.isCodoxStarted&&(le.log("[stopCodoxInstance] stopping codox"),xe.setIsCodoxStarted(!1),zf||Zo().stop(),xe.clearJSONs(),Tn.clearAll(),go.clear(),Sn.resetComments(),oi.clearListeners())},e=async b=>{le.debug("[startCodoxInstance] invoked"),Zo().createNewInstance(),le.debug("[startCodoxInstance] instance created");for(let O in $f)Zo().instance.on(O,$f[O]);if(le.debug("[startCodoxInstance] events subscribed"),mo=b,ii=mo.docId,!ii)return le.error("[startCodoxInstance] - start codox skipped - docId is missing",{docId:ii});let _=Sn.initialCommentsExist();le.debug("[startCodoxInstance] initCommentsExist: ",_),_&&(Sn.activateInitialComments(f,Tn),le.log("[activateInitialComments] "));let v=xe.getMainEditorState().toJSON();if(!xe.isValidJSONState(v))throw le.error("[startCodoxInstance] - start codox skipped - invalid init state",{docId:ii,initJSONState:v}),new Error("start codox skipped - invalid init state");le.log("[startCodoxInstance] starting codox with: ",{docId:ii,initJSONState:v,config:mo,codoxComments:Sn}),xe.currentContentStateJSON||xe.setCurrentContentStateJSON(v),xe.isCodoxStarted&&n();let{username:w,apiKey:x,getServerState:S,domain:E="",demo:k=!1,hooks:D}=mo;D&&D.fetchDocOnNetworkReconnect&&(D.fetchDocOnNetworkReconnect=Qx(D.fetchDocOnNetworkReconnect));const N=b0(D,Wx);await Zo().start(Zo().createConfig(ws(ws({},mo),{},{docId:ii,username:w,apiKey:x,domain:E,hooks:ws({syncState:l,getState:i,getServerState:async()=>await S(ii)},N),editorInstanceHooks:{getSelection:()=>xe.getCurrentActiveSelectionJSON(),setSelection:O=>o(O),getState:i,setState:O=>{const{root:R,comments:A}=O;le.info("DEBUG: EDITOR INSTANCE setState:",{fullState:O}),a({state:{root:R},selection:xe.getCurrentActiveSelectionJSON()},go.getCurrentRemoteSelections()),Sn.setAllComments(A)},enableEditor:()=>{xe.disableEditorReadOnlyMode()},disableEditor:()=>{xe.enableEditorReadOnlyMode(),go.updateRemoteSelections([])},getContent:()=>{let O=xe.composeFullStateWithRootAndComments();return le.info("[getContent]: ",O),{state:O}}},appServer:mo.appServer,demo:k}))),le.log("[startCodoxInstance] codox started - first sync invoking"),xe.setIsCodoxStarted(!0),r.clientID=mo.username,r.name=mo.username,c()},s=()=>{let b=xe.composeFullStateWithRootAndComments({directlyFromEditor:!0});e(b)},i=()=>({state:ws(ws({},xe.getMainEditorState().toJSON()),{},{comments:Sn.getAllComments()}),docId:ii}),l=b=>{if(!xe.isCodoxStarted)return;le.log("[SYNC_STATE]: Before sync payload = ",b);const _=Zo().sync({meta:b}),{state:v,remoteSelection:w=[]}=_,x=b0(_,Vx);if(le.log("[SYNC_STATE]: After sync",{state:v,remoteSelection:w,rest:x}),!v)return le.error("[SYNC_STATE] abort apply - synced state is not valid - restarting codox"),s();const S=v.state;le.log("[SYNC_STATE] synced state: ",{synced:JSON.parse(JSON.stringify(S))});let{stateFromSync:E,commentsFromSync:k}=xe.extractStateAndCommentsFromSynced(S);if(!xe.isValidJSONState(E.state))return le.error("[SYNC_STATE] - invalid state from sync - local update skipped - restarting codox",{contentState:E.state}),s();a(E,w),Sn.setAllComments(k)},o=b=>{if(!xe.isCodoxStarted||(le.log("[setLocalSelectionFromSync] synced selection: ",{syncedSelectionJSON:b}),!Ff.validateJSONSelection(b,Mf.local)))return;let _=xe.getCurrentActiveSelectionJSON();if($e.equalSelectionsJSON(_,b))return void le.log("[setLocalSelectionFromSync] STOP - local and synced selections are equal");let v=$e.isNestedSelectionJSON(b);f.update(()=>{le.log("[setLocalSelectionFromSync] json selection to apply: ",{syncedSelectionJSON:b});const w=$e.JSONToLexical(b);if(le.log("[setLocalSelectionFromSync] lexical selection to apply: ",w),v){let x=oi.setNestedEditorSelection(b);xe.setNestedSelectionJSON(x?b:null)}else(0,ye.$setSelection)(w),xe.setMainSelectionJSON(b);le.log("[setLocalSelectionFromSync] selection updated. latest selection: ",{latestSelectionJSON:xe.getCurrentActiveSelectionJSON()})})},a=function(){let{state:b,selection:_,stateReplace:v}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",S=xe.getCurrentContentStateJSON();le.log("[updateEditor] invoked: ",{currentContentStateJSON:JSON.parse(JSON.stringify(S)),newStateJSON:JSON.parse(JSON.stringify(b)),newSelectionJSON:_,remoteSelection:w,stateReplace:v,editor:f}),_===void 0&&le.error("SELECTION FROm SYNC IS UNDEFINED - will default prev selection",_);const E=Bf(S,b),k=$e.equalSelectionsJSON(xe.getCurrentActiveSelectionJSON(),_);f.update(()=>{if(xe.addUpdateTag({isSameState:E,isSameSelection:k,updateTag:x}),v)le.log("[updateEditor] invoke full stateReplace after sync"),h0(b),S=xe.setCurrentContentStateJSON(b),(0,ye.$addUpdateTag)("codox_sync_state_changes"),le.log("[updateEditor] state updated: ",S);else{le.log("[updateEditor] invoke deltas diff");let N=Zo().diff(S,b,{keyNames:{default:"codoxId"}});le.log("JSON_DIFF_ANALYSIS: ",{currentContentStateJSON:JSON.parse(JSON.stringify(S)),newStateJSON:b,deltas:N&&JSON.parse(JSON.stringify(N))}),N&&N.length&&(le.log("[updateEditor] apply deltas to lexical state"),Rx(b,N),S=xe.setCurrentContentStateJSON(b),(0,ye.$addUpdateTag)("codox_sync_state_changes"),le.log("[updateEditor] state updated: ",S))}let D=$e.isNestedSelectionJSON(_);if(Ff.validateJSONSelection(_,Mf.local)||(_=xe.getCurrentActiveSelectionJSON()),D){let N=oi.setNestedEditorSelection(_);xe.setNestedSelectionJSON(N?_:null),le.log("[updateEditor] nested selection updated",N?_:null)}else if(_!==void 0){const N=$e.JSONToLexical(_);le.log("[updateEditor] updated selection to apply: ",{isSameSelection:k,newSelectionJSON:_,lexicalSelection:N}),(0,ye.$setSelection)(N),xe.setMainSelectionJSON(_),le.log("[updateEditor] selection updated",_)}},{onUpdate:()=>{E||go.updateRemoteSelections(w,"from onUpdate hook")}}),E&&go.updateRemoteSelections(w,"from direct updateEditor")},c=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(!xe.isCodoxStarted)return;le.log("[invokeSync] SYNC INVOKED ",{upd_call_counter:b});let _=xe.composeFullStateWithRootAndComments();const v={docId:ii,state:{state:_,selection:xe.getCurrentActiveSelectionJSON()}};le.log("[codoxSync]: Before sync",{local:v,upd_call_counter:b}),le.log("[codoxSync]: Before sync state",JSON.parse(JSON.stringify(v.state)));let{state:w,remoteSelection:x=[],changes:S}=Zo().sync({state:v,meta:{}});if(le.log("[codoxSync]: After sync",{afterSyncState:JSON.parse(JSON.stringify(w)),remoteSelection:x,changes:S}),!w)return le.error("[codoxSync] abort apply - synced state is not valid - restarting codox "),s();const E=w.state;le.log("[codoxSync]: synced state: ",JSON.parse(JSON.stringify(E)),b);let{stateFromSync:k,commentsFromSync:D}=xe.extractStateAndCommentsFromSynced(E);if(!xe.isValidJSONState(k.state))return le.error("[invokeSync] - invalid state from sync - local update skipped - restarting codox",{contentState:k.state}),s();a(k,x),Sn.setAllComments(D)},u=()=>{le.warn("[rollbackStateDuringUpdateError] rollback invoked"),le.log("[rollbackStateDuringUpdateError] values: ",{prevState:xe.getPrevContentStateJSON(),currentState:xe.getCurrentContentStateJSON(),prevSelection:xe.getPrevMainSelectionJSON(),currentSelection:xe.getCurrentActiveSelectionJSON(),codoxComments:Sn});let b=xe.getPrevContentStateJSON(),_=xe.getPrevMainSelectionJSON();a({state:b,selection:_},go.getCurrentRemoteSelections(),Xr.historic);let v=xe.undoInvoked(),w=xe.redoInvoked();Sn.gcAbandonedNodeKeys(xe.getMainEditorState()._nodeMap),v&&f.dispatchCommand(ye.CAN_REDO_COMMAND,!1),w&&f.dispatchCommand(ye.CAN_UNDO_COMMAND,!1)},h=b=>{let{editorState:_,prevEditorState:v,tags:w,dirtyElements:x,dirtyLeaves:S}=b;if(Uf)return Uf=!1,void le.debug("[editorUpdatesListener] invoked blacklisted queued selection change - stop");if(Bi.isBlacklistedFound())return Uf=!0,le.warn("[editorUpdatesListener] BLACKLISTED CHANGES FOUND - revert back to prev state"),((V,G)=>{let F=null,q=null;G.read(()=>{F=$e.lexicalToJSON(G._selection),q=G.toJSON()});let T=null,I=null;V.read(()=>{let L=(0,ye.$getSelection)();I=$e.lexicalToJSON(L),T=V.toJSON()}),xe.setCurrentContentStateJSON(T),xe.setMainSelectionJSON(I),a({state:q,selection:F},go.getCurrentRemoteSelections(),Xr.historic),f.dispatchCommand(ye.CAN_REDO_COMMAND,!1),f.dispatchCommand(ye.CAN_UNDO_COMMAND,!1)})(_,v),void Bi.invokeClientCallback();if(!jo.ensureDocTablesAreValid(_))return;_u++,le.log("[editorUpdatesListener] invoked by lexical. call counter: ",{upd_call_counter:_u,isCodoxStarted:xe.isCodoxStarted});let E=xe.isOnlySelectionChanged(x,S),k=null,D=null,N=null,O=null,R=xe.getCurrentContentStateJSON(),A=w.has("codox_sync_state_changes"),z=w.has(Ll),H=xe.undoInvoked(),$=xe.redoInvoked(),M=xe.canUndo(),J=xe.canRedo();k=_.toJSON(),D=v.toJSON(),v.read(()=>{O=$e.lexicalToJSON(v._selection)}),_.read(()=>{let V=(0,ye.$getSelection)();N=$e.lexicalToJSON(V);let G=$e.JSONToLexical(N),F=V===null&&G===null||V.is(G);le.log("[editorUpdatesListener] new values: ",{newContentStateJSON:k,currentContentStateJSON:JSON.parse(JSON.stringify(R)),prevContentStateJSON:JSON.parse(JSON.stringify(D)),currentCommentsJSON:JSON.parse(JSON.stringify(Sn.getAllComments())),newSelectionJSON:JSON.parse(JSON.stringify(N)),currentMainSelectionJSON:JSON.parse(JSON.stringify(xe.getCurrentMainSelectionJSON())),currentNestedSelectionJSON:JSON.parse(JSON.stringify(xe.getCurrentNestedSelectionJSON())),currentActiveSelectionJSON:JSON.parse(JSON.stringify(xe.getCurrentActiveSelectionJSON())),lexicalSelection:V,convertedBackMainSelection:G,isMainSelectionConvertionCorrect:F,nodes:f._editorState._nodeMap,fullEditor:f,codoxNodesMap:Tn.toArray(),codoxComments:Sn,isUpdateFromSync:A,isUpdateFromComments:z,tags:w,onlySelectionChanged:E,undoInvoked:H,redoInvoked:$,canUndo:M,canRedo:J})});let K=Bf(R,k),P=$e.equalSelectionsJSON(xe.getCurrentActiveSelectionJSON(),N);le.log("[editorUpdatesListener] compares: ",{isStateSame:K,isSelectionSame:P});let U=K&&P&&!z;if(!K||z||A){let V=ws({},K?R:k),G=Sn.getAllComments();G.length&&(V.commentThreads=G);let F={source:A?Ym.remote:Ym.local,content:V};mo.hooks&&mo.hooks.contentChanged&&mo.hooks.contentChanged(F),Zo().instance.emit("content_changed",F)}if(U)le.log("[editorUpdatesListener] STOP - state and selection and comments are same ",_u);else if(xe.undoInvoked()&&xe.setUndoInvoked(!1),xe.redoInvoked()&&xe.setRedoInvoked(!1),xe.setCurrentContentStateJSON(k),xe.setPrevContentStateJSON(D),xe.setMainSelectionJSON(N),xe.setPrevMainSelectionJSON(O),zf){let V=xe.getCurrentActiveSelectionJSON();a({state:xe.getCurrentContentStateJSON(),selection:V},[])}else c(_u)},p=()=>{let b=[];return xe.getMainEditorNodesClassesMap().forEach((_,v,w)=>{let{klass:x}=_,S=f.registerMutationListener(x,E=>{for(let[k,D]of E){if(!$r[D])continue;const N=xe.getLexicalNodeByKey(k);if(D===$r.created&&N&&Bi.trackBlacklisted(N,D),x.name===En.TableNode.name&&(D===$r.destroyed?jo.tableNodeRemoveListener(k):jo.tableUpdateListener(k)),x.name===En.TableRowNode.name&&D!==$r.destroyed&&jo.tableRowNodeChangesListener(k,D===$r.updated),x.name===En.TableCellNode.name&&D===$r.updated&&jo.tableCellNodeChangesListener(k),x.name===Qr.MarkNode.name&&(le.debug("[MUTATION LISTENER] MARK node: ",{nodeKey:k,node:N,mutationType:D,codoxComments:Sn}),D===$r.destroyed?Sn.removeRelatedNodeKey(k):N&&Sn.addRelatedNodeKey(N.__key,N.__ids,D===$r.created)),N&&N.codoxId){if(D===$r.destroyed)return void(N.codoxId&&Tn.remove(N.codoxId));k0(N)||le.warn("[MutationListener Error] duplicating codoxId detected - such codoxId already exists in codoxNodesMap - updating node ref to latest: ",{mutationType:D,node:N}),Tn.add(N.codoxId,N)}}b.push(S)})}),b},m={start:e,stop:n,on:(b,_)=>{le.info(`Subscribing client to codox ${b} event`),$f[b]=_},cursor:{hide:()=>{go.hideRemoteSelectionsFromUI()},show:()=>{go.showHiddenRemoteSelectionsInUI()}},initComments:b=>{Sn.setInitialComments(b)}};return(0,Gt.useImperativeHandle)(d,()=>m),null}),tw=Xx,ew=["comments"];function v0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function Hf(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?v0(Object(g),!0).forEach(function(t){nw(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):v0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function nw(y,d,g){return(d=rw(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function rw(y){var d=ow(y,"string");return typeof d=="symbol"?d:d+""}function ow(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function iw(y,d){if(y==null)return{};var g,t,f=aw(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function aw(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}class sw extends Vm{constructor(){super(),this.mainEditor=null,this.mainEditorKey=null,this.currentContentStateJSON=null,this.currentMainSelectionJSON=null,this.currentNestedSelectionJSON=null,this._isCodoxStarted=!1,this.prevContentStateJSON=null,this.prevMainSelectionJSON=null,this._undoInvoked=!1,this._redoInvoked=!1,this._canUndo=!1,this._canRedo=!1}setCanUndo(d){this._canUndo=d}setCanRedo(d){this._canRedo=d}canUndo(){return this._canUndo}canRedo(){return this._canRedo}setUndoInvoked(d){this._undoInvoked=d}setRedoInvoked(d){this._redoInvoked=d}undoInvoked(){return this._undoInvoked}redoInvoked(){return this._redoInvoked}setIsCodoxStarted(){let d=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this._isCodoxStarted=d}get isCodoxStarted(){return this._isCodoxStarted}getMainEditorKey(){return this.mainEditorKey}setMainEditor(d){this.mainEditor=d,this.mainEditorKey=d._key}clearJSONs(){le.debug("[CodoxLexicalEditorManager][clearJSONs] invoked"),this.currentContentStateJSON=null,this.currentMainSelectionJSON=null,this.currentNestedSelectionJSON=null,this.prevContentStateJSON=null,this.prevMainSelectionJSON=null}removeMainEditor(){this.mainEditor=null,this.mainEditorKey=null,this._undoInvoked=!1,this._redoInvoked=!1,this._canUndo=!1,this._canRedo=!1,super.clear()}getMainEditor(){return this.mainEditor}alignStateSelectionJSONsFromLatestEditor(){this.getMainEditorState().read(()=>{this.setCurrentContentStateJSON(this.getMainEditorState().toJSON()),this.setMainSelectionJSON($e.lexicalToJSON((0,ye.$getSelection)()))})}mainEditorExists(){return!!this.mainEditor}getMainEditorState(){return this.mainEditor?this.mainEditor.getEditorState():{}}getMainEditorNodesClassesMap(){return this.mainEditor?this.mainEditor._nodes:new Map}getLexicalNodeByKey(d){return this.mainEditor?this.getMainEditorState()._nodeMap.get(d):null}isLexicalEditorInstance(d){return d&&typeof d=="object"&&!!d.setEditorState}setCurrentContentStateJSON(d){return this.currentContentStateJSON=d,this.currentContentStateJSON}getCurrentContentStateJSON(){return this.currentContentStateJSON}setPrevContentStateJSON(d){this.prevContentStateJSON=d}getPrevContentStateJSON(){return this.prevContentStateJSON}setMainSelectionJSON(d){this.currentMainSelectionJSON=d,this.currentMainSelectionJSON&&this.currentNestedSelectionJSON&&(this.currentNestedSelectionJSON=null)}setNestedSelectionJSON(d){this.currentNestedSelectionJSON=d,this.currentNestedSelectionJSON&&this.currentMainSelectionJSON&&(this.currentMainSelectionJSON=null)}getCurrentMainSelectionJSON(){return this.currentMainSelectionJSON}getCurrentNestedSelectionJSON(){return this.currentNestedSelectionJSON}getCurrentActiveSelectionJSON(){return!this.currentMainSelectionJSON&&this.currentNestedSelectionJSON?this.currentNestedSelectionJSON:this.currentMainSelectionJSON}clearSelectionJSON(){this.currentMainSelectionJSON=null,this.currentNestedSelectionJSON=null}setPrevMainSelectionJSON(d){this.prevMainSelectionJSON=d}getPrevMainSelectionJSON(){return this.prevMainSelectionJSON}extractStateAndCommentsFromSynced(d){let{state:{comments:g},selection:t,stateReplace:f}=d;return{stateFromSync:{state:Hf({},iw(d.state,ew)),selection:t,stateReplace:f},commentsFromSync:g}}composeFullStateWithRootAndComments(){let{directlyFromEditor:d=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Hf(Hf({},d?this.getMainEditorState().toJSON():this.currentContentStateJSON),{},{comments:Sn.getAllComments()})}isValidJSONState(d){let g=!1;try{if(!d)throw new Error("State is undefined");if(!d.root)throw new Error("State 'root' node is missing");let t=this.getMainEditorNodesClassesMap(),f=function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",e=r,s=t.get(e.type);if(!s)throw new Error(`Node with type "${e.type}" is not registered in editor`);let{klass:i}=s;if(n==="root"){let l=i.prototype instanceof ye.ElementNode,o=i.prototype instanceof ye.DecoratorNode;if(!l&&!o)throw new Error("State root node can have only element nodes as children")}if(e.children)for(let l of e.children)f(l,e.type)};f(d.root),g=!0}catch(t){le.error("[isValidJSONState] invalid state found: ",t.message),g=!1}return g}scanLexicalNodeForNestedEditorAttribute(d){for(let g in d){let t=d[g];if(this.isLexicalEditorInstance(t))return g}return""}isOnlySelectionChanged(d,g){return d.size===0&&g.size===0}addUpdateTag(){let{isSameState:d,isSameSelection:g,fromNestedEditor:t=!1,updateTag:f=""}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return f?(le.log(`[addUpdateTag] explicit add of tag "${f}" `),void(0,ye.$addUpdateTag)(f)):t?(le.log(`[addUpdateTag] add "${Xr.historic}" tag - change invoked by nested editor`),void(0,ye.$addUpdateTag)(Xr.historic)):void(d?(le.log(`[addUpdateTag] add "${Xr.historic}" tag - state is same`),(0,ye.$addUpdateTag)(Xr.historic)):(le.log(`[addUpdateTag] add "${Xr.historyMerge}" tag - state is different`),(0,ye.$addUpdateTag)(Xr.historyMerge)))}enableEditorReadOnlyMode(){this.mainEditor&&this.mainEditor.isEditable()&&this.mainEditor.setEditable(!1)}disableEditorReadOnlyMode(){this.mainEditor&&(this.mainEditor.isEditable()||this.mainEditor.setEditable(!0))}}const lw=new sw,xe=lw;class cw{constructor(){this._nodesMap=new Map,this._pastedNodesCodoxIds=new Set}get size(){return this._nodesMap.size}add(d,g){this._nodesMap.set(d,g)}get(d){return this._nodesMap.get(d)||null}remove(d){this._nodesMap.delete(d)}has(d){return this._nodesMap.has(d)}nodesToArray(){return Array.from(this._nodesMap.values())}keysToArray(){return Array.from(this._nodesMap.keys())}toArray(){return Array.from(this._nodesMap.entries())}addPastedId(d){this._pastedNodesCodoxIds.add(d)}removePastedId(d){this._pastedNodesCodoxIds.delete(d)}hasPastedId(d){return this._pastedNodesCodoxIds.has(d)}clearPastedIds(){this._pastedNodesCodoxIds.size>0&&this._pastedNodesCodoxIds.clear()}isEmptyPastedIds(){return this._pastedNodesCodoxIds.size===0}getPastedIdsSize(){return this._pastedNodesCodoxIds.size}clearAll(){this._nodesMap.clear(),this._pastedNodesCodoxIds.clear()}gcAbandonedNodes(){let d=xe.getMainEditorState();if(!d._nodeMap)return;let g=this.nodesToArray();for(let t of g)d._nodeMap.has(t.__key)||this.remove(t.codoxId)}}const uw=new cw,Tn=uw;function _0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function x0(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?_0(Object(g),!0).forEach(function(t){dw(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):_0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function dw(y,d,g){return(d=fw(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function fw(y){var d=pw(y,"string");return typeof d=="symbol"?d:d+""}function pw(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const qf=()=>x_(),w0=y=>typeof y=="number";function Ss(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const g=function(){for(var t=arguments.length,f=new Array(t),r=0;r<t;r++)f[r]=arguments[r];return y.apply(this,f)};return Object.defineProperty(g,"name",{value:d,writable:!0}),g}const Sa=y=>y.__type==="root"||y.type==="root",S0=y=>Sa(y.getParent()),Fn=y=>y.__type===hu.text||y.type===hu.text||y.hasOwnProperty("__text")||y.hasOwnProperty("text"),Cs=y=>(0,ye.$isElementNode)(y),Es=y=>(0,En.$isTableNode)(y)||(0,En.$isTableRowNode)(y)||(0,En.$isTableCellNode)(y),hw=y=>!y.getChildren,C0=y=>!!y.getChildren,Cn=y=>(0,ye.$isDecoratorNode)(y),Fl=y=>(0,p_.$isLinkNode)(y),zl=y=>y.__type==="mark"||y.type==="mark",Jf=y=>(0,ye.$isLineBreakNode)(y),Fi=y=>Fn(y)||Jf(y),Wf=y=>y.__type===hu.horizontalrule||y.type===hu.horizontalrule,E0=y=>{if(Fi(y)||Fl(y)||zl(y))return!1;if(!y.__parent||y.__parent==="root"||(0,ye.$isParagraphNode)(y))return!0;let d=y.getParent().getChildren();return d.length===1&&d[0].__key===y.__key?!((Cn(y)||Fl(y)||zl(y))&&!Wf(y)):!d.some(g=>{let t=Wf(g);return g.__key!==y.__key&&(Fi(g)||Cn(g)&&!t||Fl(g)||zl(g))})},k0=y=>{const d=Tn.get(y.codoxId);return!d||y.__key===d.__key},ks=function(y){const d=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||qf();y.codoxId=d,Tn.add(d,y)},O0=y=>{Tn.remove(y.codoxId),delete y.codoxId},gw=y=>{if(!C0(y)||!y.getChildrenSize())return;const d=y.getChildren();if(d.some(f=>!!(0,ye.$isParagraphNode)(f)))return;let g=!1,t=[];for(let f of d)(Fi(f)||Cn(f)||Fl(f)||zl(f))&&!g&&(Wf(f)||(g=!0)),(C0(f)||Cn(f))&&t.push(f);for(let f of t)g||f.codoxId?g&&f.codoxId&&(f=f.getWritable(),O0(f)):(f=f.getWritable(),ks(f))},mw=y=>{const d=x0({},y);for(const g in y)y[g]===void 0&&y.hasOwnProperty(g)&&delete d[g];return d},yw=y=>{const d=`__nativeCreateDOM_${y.name}`;y.prototype[d]=Ss(y.prototype.createDOM,d),y.prototype.createDOM=function(g,t){if(E0(this))if(this.codoxId){if(!k0(this)){let r=Tn.get(this.codoxId);r.__type===this.__type&&this.isAttached()&&!r.isAttached()?(le.warn("[createDOM][Non-unique codoxId] overwrite abandoned existing node with latest: ",{latestNode:this,existingNode:r}),Tn.add(this.codoxId,this)):ks(this)}}else ks(this);else this.codoxId&&O0(this);Cn(this)&&!this.codoxDId&&(this.codoxDId=qf()),oi.manageNestedEditorInLexicalNode(this);let f=this[d](g,t);return f.__codox_track=!0,f}},bw=y=>{const d=`__nativeUpdateDOM_${y.name}`;return y.prototype[d]=Ss(y.prototype.updateDOM,d),y.prototype.updateDOM=function(){const g=this[d](...arguments);return gw(this),g},y},vw=y=>{const d=`__nativeRemove_${y.name}`;return y.prototype[d]=Ss(y.prototype.remove,d),y.prototype.remove=function(){const g=this.codoxId;return g&&Tn.remove(g),oi.gcNestedEditorListenerInLexicalNode(this),this[d](...arguments)},y},_w=y=>{const d=`__nativeExportJSON_${y.name}`;y.prototype[d]=Ss(y.prototype.exportJSON,d),y.prototype.exportJSON=function(){const g=this[d]();return this.codoxId&&(g.codoxId=this.codoxId),this.codoxDId&&(g.codoxDId=this.codoxDId),Fn(this)&&w0(g.format)&&this.hasFormat&&(g.format=P_(this)),mw(g)}},xw=y=>{const d="__nativeImportJSON";y[d]=Ss(y.importJSON,d),y.importJSON=function(g){const t=x0({},g);Fn(t)&&!w0(t.format)&&(t.format=N_(t.format));const f=y[d](t);oi.manageNestedEditorInLexicalNode(f);const r=E0(f);return r&&t.codoxId&&(Tn.hasPastedId(t.codoxId)&&Tn.has(t.codoxId)?(Tn.removePastedId(t.codoxId),ks(f)):ks(f,t.codoxId)),r&&!f.codoxId&&ks(f),t.codoxDId&&(f.codoxDId=t.codoxDId),f}},ww=y=>{const d="__nativeClone";y[d]=Ss(y.clone,d),y.clone=function(g){const t=y[d](g);return g.codoxId&&(t.codoxId=g.codoxId),g.codoxDId&&(t.codoxDId=g.codoxDId),oi.manageNestedEditorInClonedLexicalNode(g,t),t}},Sw=y=>{let d=!1,g=!1,t=!1,f=!1;y.forEach(n=>{n.name===ye.TextNode.name?d=!0:n.name===ye.ParagraphNode.name?g=!0:n.name===ye.LineBreakNode.name?t=!0:n.name===Qr.MarkNode.name&&(f=!0)});let r=[];return d||r.push(ye.TextNode),g||r.push(ye.ParagraphNode),t||r.push(ye.LineBreakNode),f||r.push(Qr.MarkNode),r.length?[...r,...y]:y},Cw=function(){return Sw(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(y=>(y.hasOwnProperty("__isCodoxExtended")||(yw(y),bw(y),_w(y),vw(y),xw(y),ww(y),Object.defineProperty(y,"__isCodoxExtended",{value:!0,writable:!1})),y))};var xu=rn(777),Os={};Os.styleTagTransform=ri(),Os.setAttributes=ei(),Os.insert=ti().bind(null,"head"),Os.domAPI=Xo(),Os.insertStyleElement=ni(),Qo()(xu.A,Os),xu.A&&xu.A.locals&&xu.A.locals;var Ew=y=>{var d={};return rn.d(d,y),d};const kw=Ew({AutoFocusPlugin:()=>$g});var Ow=y=>{var d={};return rn.d(d,y),d};const Tw=Ow({ClearEditorPlugin:()=>Y1});var jw=y=>{var d={};return rn.d(d,y),d};const Aw=jw({LexicalComposer:()=>Ug});var Nw=y=>{var d={};return rn.d(d,y),d};const T0=Nw({default:()=>Q1});var Pw=y=>{var d={};return rn.d(d,y),d};const Iw=Pw({HistoryPlugin:()=>om});var Rw=y=>{var d={};return rn.d(d,y),d};const Mw=Rw({OnChangePlugin:()=>t_});var Dw=y=>{var d={};return rn.d(d,y),d};const Lw=Dw({PlainTextPlugin:()=>l_});var Bw=y=>{var d={};return rn.d(d,y),d};const j0=Bw({$isRootTextContentEmpty:()=>sm,$rootTextContent:()=>am});var Fw=y=>{var d={};return rn.d(d,y),d};const Ts=Fw({createPortal:()=>Tb.createPortal}),zw=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Uw=zw?Gt.useLayoutEffect:Gt.useEffect,A0=Uw;var wu=rn(253),js={};js.styleTagTransform=ri(),js.setAttributes=ei(),js.insert=ti().bind(null,"head"),js.domAPI=Xo(),js.insertStyleElement=ni(),Qo()(wu.A,js),wu.A&&wu.A.locals&&wu.A.locals;function $w(y){let{onClose:d,children:g,title:t,closeOnClickOutside:f}=y;const r=(0,Gt.useRef)(null);return(0,Gt.useEffect)(()=>{r.current!==null&&r.current.focus()},[]),(0,Gt.useEffect)(()=>{let n=null;const e=l=>{l.key==="Escape"&&d()},s=l=>{const o=l.target;r.current!==null&&!r.current.contains(o)&&f&&d()},i=r.current;return i!==null&&(n=i.parentElement,n!==null&&n.addEventListener("click",s)),window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e),n!==null&&(n==null||n.removeEventListener("click",s))}},[f,d]),Gt.createElement("div",{className:"Modal__overlay",role:"dialog"},Gt.createElement("div",{className:"Modal__modal",tabIndex:-1,ref:r},Gt.createElement("h2",{className:"Modal__title"},t),Gt.createElement("button",{className:"Modal__closeButton","aria-label":"Close modal",type:"button",onClick:d},"X"),Gt.createElement("div",{className:"Modal__content"},g)))}function Hw(y){let{onClose:d,children:g,title:t,closeOnClickOutside:f=!1}=y;return(0,Ts.createPortal)(Gt.createElement($w,{onClose:d,title:t,closeOnClickOutside:f},g),document.body)}function N0(){const[y,d]=(0,Gt.useState)(null),g=(0,Gt.useCallback)(()=>{d(null)},[]),t=(0,Gt.useMemo)(()=>{if(y===null)return null;const{title:r,content:n,closeOnClickOutside:e}=y;return Gt.createElement(Hw,{onClose:g,title:r,closeOnClickOutside:e},n)},[y,g]),f=(0,Gt.useCallback)(function(r,n){d({closeOnClickOutside:arguments.length>2&&arguments[2]!==void 0&&arguments[2],content:n(g),title:r})},[g]);return[t,f]}var Su=rn(191),As={};As.styleTagTransform=ri(),As.setAttributes=ei(),As.insert=ti().bind(null,"head"),As.domAPI=Xo(),As.insertStyleElement=ni(),Qo()(Su.A,As),Su.A&&Su.A.locals&&Su.A.locals;const qw={blockCursor:"CommentEditorTheme__blockCursor",characterLimit:"CommentEditorTheme__characterLimit",code:"CommentEditorTheme__code",codeHighlight:{atrule:"CommentEditorTheme__tokenAttr",attr:"CommentEditorTheme__tokenAttr",boolean:"CommentEditorTheme__tokenProperty",builtin:"CommentEditorTheme__tokenSelector",cdata:"CommentEditorTheme__tokenComment",char:"CommentEditorTheme__tokenSelector",class:"CommentEditorTheme__tokenFunction","class-name":"CommentEditorTheme__tokenFunction",comment:"CommentEditorTheme__tokenComment",constant:"CommentEditorTheme__tokenProperty",deleted:"CommentEditorTheme__tokenProperty",doctype:"CommentEditorTheme__tokenComment",entity:"CommentEditorTheme__tokenOperator",function:"CommentEditorTheme__tokenFunction",important:"CommentEditorTheme__tokenVariable",inserted:"CommentEditorTheme__tokenSelector",keyword:"CommentEditorTheme__tokenAttr",namespace:"CommentEditorTheme__tokenVariable",number:"CommentEditorTheme__tokenProperty",operator:"CommentEditorTheme__tokenOperator",prolog:"CommentEditorTheme__tokenComment",property:"CommentEditorTheme__tokenProperty",punctuation:"CommentEditorTheme__tokenPunctuation",regex:"CommentEditorTheme__tokenVariable",selector:"CommentEditorTheme__tokenSelector",string:"CommentEditorTheme__tokenSelector",symbol:"CommentEditorTheme__tokenProperty",tag:"CommentEditorTheme__tokenProperty",url:"CommentEditorTheme__tokenOperator",variable:"CommentEditorTheme__tokenVariable"},embedBlock:{base:"CommentEditorTheme__embedBlock",focus:"CommentEditorTheme__embedBlockFocus"},hashtag:"CommentEditorTheme__hashtag",heading:{h1:"CommentEditorTheme__h1",h2:"CommentEditorTheme__h2",h3:"CommentEditorTheme__h3",h4:"CommentEditorTheme__h4",h5:"CommentEditorTheme__h5",h6:"CommentEditorTheme__h6"},image:"editor-image",indent:"CommentEditorTheme__indent",inlineImage:"inline-editor-image",layoutContainer:"CommentEditorTheme__layoutContainer",layoutItem:"CommentEditorTheme__layoutItem",link:"CommentEditorTheme__link",list:{checklist:"CommentEditorTheme__checklist",listitem:"CommentEditorTheme__listItem",listitemChecked:"CommentEditorTheme__listItemChecked",listitemUnchecked:"CommentEditorTheme__listItemUnchecked",nested:{listitem:"CommentEditorTheme__nestedListItem"},olDepth:["CommentEditorTheme__ol1","CommentEditorTheme__ol2","CommentEditorTheme__ol3","CommentEditorTheme__ol4","CommentEditorTheme__ol5"],ul:"CommentEditorTheme__ul"},ltr:"CommentEditorTheme__ltr",mark:"CommentEditorTheme__mark",markOverlap:"CommentEditorTheme__markOverlap",paragraph:"CommentEditorTheme__paragraph",quote:"CommentEditorTheme__quote",rtl:"CommentEditorTheme__rtl",table:"CommentEditorTheme__table",tableCell:"CommentEditorTheme__tableCell",tableCellActionButton:"CommentEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"CommentEditorTheme__tableCellActionButtonContainer",tableCellEditing:"CommentEditorTheme__tableCellEditing",tableCellHeader:"CommentEditorTheme__tableCellHeader",tableCellPrimarySelected:"CommentEditorTheme__tableCellPrimarySelected",tableCellResizer:"CommentEditorTheme__tableCellResizer",tableCellSelected:"CommentEditorTheme__tableCellSelected",tableCellSortedIndicator:"CommentEditorTheme__tableCellSortedIndicator",tableResizeRuler:"CommentEditorTheme__tableCellResizeRuler",tableSelected:"CommentEditorTheme__tableSelected",tableSelection:"CommentEditorTheme__tableSelection",text:{bold:"CommentEditorTheme__textBold",code:"CommentEditorTheme__textCode",italic:"CommentEditorTheme__textItalic",strikethrough:"CommentEditorTheme__textStrikethrough",subscript:"CommentEditorTheme__textSubscript",superscript:"CommentEditorTheme__textSuperscript",underline:"CommentEditorTheme__textUnderline",underlineStrikethrough:"CommentEditorTheme__textUnderlineStrikethrough"}},Jw=qw;var Cu=rn(72),Ns={};Ns.styleTagTransform=ri(),Ns.setAttributes=ei(),Ns.insert=ti().bind(null,"head"),Ns.domAPI=Xo(),Ns.insertStyleElement=ni(),Qo()(Cu.A,Ns),Cu.A&&Cu.A.locals&&Cu.A.locals;function Ww(){for(var y=arguments.length,d=new Array(y),g=0;g<y;g++)d[g]=arguments[g];return d.filter(Boolean).join(" ")}function Vf(){return Vf=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var g=arguments[d];for(var t in g)({}).hasOwnProperty.call(g,t)&&(y[t]=g[t])}return y},Vf.apply(null,arguments)}function zi(y){let{"data-test-id":d,children:g,className:t,onClick:f,disabled:r,small:n,title:e}=y;return Gt.createElement("button",Vf({disabled:r,className:Ww("Button__root",r&&"Button__disabled",n&&"Button__small",t),onClick:f,title:e,"aria-label":e},d&&{"data-test-id":d}),g)}var Eu=rn(129),Ps={};Ps.styleTagTransform=ri(),Ps.setAttributes=ei(),Ps.insert=ti().bind(null,"head"),Ps.domAPI=Xo(),Ps.insertStyleElement=ni(),Qo()(Eu.A,Ps),Eu.A&&Eu.A.locals&&Eu.A.locals;var Vw=y=>{var d={};return rn.d(d,y),d};const Kw=Vw({ContentEditable:()=>Hg});function Gw(y){let{className:d}=y;return Gt.createElement(Kw.ContentEditable,{className:d||"ContentEditable__root"})}var ku=rn(457),Is={};Is.styleTagTransform=ri(),Is.setAttributes=ei(),Is.insert=ti().bind(null,"head"),Is.domAPI=Xo(),Is.insertStyleElement=ni(),Qo()(ku.A,Is),ku.A&&ku.A.locals&&ku.A.locals;function Yw(y){let{children:d,className:g}=y;return Gt.createElement("div",{className:g||"Placeholder__root"},d)}const Zw=T0.default.LexicalErrorBoundary||T0.default,Qw=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#050505",className:"codox-add-comment-right"},Gt.createElement("path",{d:"M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4.414A2 2 0 0 0 3 11.586l-2 2V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12.793a.5.5 0 0 0 .854.353l2.853-2.853A1 1 0 0 1 4.414 12H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"}),Gt.createElement("path",{d:"M3 3.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM3 6a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9A.5.5 0 0 1 3 6zm0 2.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5z"})),P0=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",className:"codox-remove-comment"},Gt.createElement("path",{d:"M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5ZM11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H2.506a.58.58 0 0 0-.01 0H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1h-.995a.59.59 0 0 0-.01 0H11Zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5h9.916Zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 1 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47ZM8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5Z"})),Xw=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"codox-add-comment"},Gt.createElement("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"})),tS=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"#0000008c",className:"codox-hide-show-comments"},Gt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 5.885v1.166a3.95 3.95 0 0 1-3.949 3.95H6.917a.748.748 0 0 0-.45.15l-1.345 1.007a.752.752 0 0 0-.032 1.181A2.933 2.933 0 0 0 6.95 14h2.716l2.534 1.901a.506.506 0 0 0 .524.047A.501.501 0 0 0 13 15.5V14h.051a2.949 2.949 0 0 0 2.95-2.949v-3.05a3.002 3.002 0 0 0-2.002-2.83.756.756 0 0 0-.999.714"}),Gt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.05 1H2.95A2.952 2.952 0 0 0 0 3.949v3.102A2.952 2.952 0 0 0 2.949 10H3v1.5a.502.502 0 0 0 .8.4L6.334 10H9.05A2.952 2.952 0 0 0 12 7.05V3.95A2.952 2.952 0 0 0 9.05 1"}));function I0(y,d,g){let t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:performance.now(),f=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return Sn.createNewCommentObj({content:y,author:d,codoxId:g,timeStamp:t,deleted:f})}function eS(y,d,g){return Sn.createNewThreadObj({quote:y,comments:d,codoxId:g})}function nS(y){let{anchorKey:d,editor:g,onAddComment:t}=y;const f=(0,Gt.useRef)(null),r=(0,Gt.useCallback)(()=>{const n=f.current,e=g.getRootElement(),s=g.getElementByKey(d);if(n!==null&&e!==null&&s!==null){const{right:i}=e.getBoundingClientRect(),{top:l}=s.getBoundingClientRect();n.style.left=i-20+"px",n.style.top=l-30+"px"}},[d,g]);return(0,Gt.useEffect)(()=>(window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[g,r]),A0(()=>{r()},[d,g,r]),Gt.createElement("div",{className:"CodoxCommentPlugin_AddCommentBox",ref:f},Gt.createElement("button",{className:"CodoxCommentPlugin_AddCommentBox_button",onClick:t},Gt.createElement(Qw,null)))}function rS(y){let{onEscape:d}=y;const[g]=(0,Li.useLexicalComposerContext)();return(0,Gt.useEffect)(()=>g.registerCommand(ye.KEY_ESCAPE_COMMAND,t=>d(t),2),[g,d]),null}function oS(y){let{editorRef:d}=y;const[g]=(0,Li.useLexicalComposerContext)();return typeof d=="function"?d(g):typeof d=="object"&&(d.current=g),null}function R0(y){let{className:d,autoFocus:g,onEscape:t,onChange:f,editorRef:r,placeholder:n="Type a comment...",onEditorClick:e=()=>{}}=y;const s={namespace:"Commenting",nodes:[],onError:i=>{throw i},theme:Jw};return Gt.createElement(Aw.LexicalComposer,{initialConfig:s},Gt.createElement("div",{className:"CodoxCommentPlugin_CommentInputBox_EditorContainer",onClick:e},Gt.createElement(Lw.PlainTextPlugin,{contentEditable:Gt.createElement(Gw,{className:d}),placeholder:Gt.createElement(Yw,null,n),ErrorBoundary:Zw}),Gt.createElement(Mw.OnChangePlugin,{onChange:f}),Gt.createElement(Iw.HistoryPlugin,null),g!==!1&&Gt.createElement(kw.AutoFocusPlugin,null),Gt.createElement(rS,{onEscape:t}),Gt.createElement(Tw.ClearEditorPlugin,null),r!==void 0&&Gt.createElement(oS,{editorRef:r})))}function M0(y,d){return(0,Gt.useCallback)((g,t)=>{g.read(()=>{y((0,j0.$rootTextContent)()),d(!(0,j0.$isRootTextContentEmpty)(t.isComposing(),!0))})},[d,y])}function iS(y){let{editor:d,cancelAddComment:g,submitAddComment:t}=y;const[f,r]=(0,Gt.useState)(""),[n,e]=(0,Gt.useState)(!1),s=(0,Gt.useRef)(null),i=(0,Gt.useMemo)(()=>({container:document.createElement("div"),elements:[]}),[]),l=(0,Gt.useRef)(null),o=B0(),a=(0,Gt.useCallback)(()=>{d.getEditorState().read(()=>{const u=(0,ye.$getSelection)();if((0,ye.$isRangeSelection)(u)){l.current=u.clone();const h=u.anchor,p=u.focus,m=(0,xa.createDOMRange)(d,h.getNode(),h.offset,p.getNode(),p.offset),b=s.current;if(m!==null&&b!==null){const{left:_,bottom:v,width:w}=m.getBoundingClientRect(),x=(0,xa.createRectsFromDOMRange)(d,m);let S=x.length===1?_+w/2-125:_-125;S<10&&(S=10),b.style.left=`${S}px`,b.style.top=`${v+20+(window.pageYOffset||document.documentElement.scrollTop)}px`;const E=x.length,{container:k}=i,D=i.elements,N=D.length;for(let O=0;O<E;O++){const R=x[O];let A=D[O];A===void 0&&(A=document.createElement("span"),D[O]=A,k.appendChild(A));const z="255, 212, 0",H=`position:absolute;top:${R.top+(window.pageYOffset||document.documentElement.scrollTop)}px;left:${R.left}px;height:${R.height}px;width:${R.width}px;background-color:rgba(${z}, 0.3);pointer-events:none;z-index:5;`;A.style.cssText=H}for(let O=N-1;O>=E;O--){const R=D[O];k.removeChild(R),D.pop()}}}})},[d,i]);A0(()=>{a();const u=i.container,h=document.body;if(h!==null)return h.appendChild(u),()=>{h.removeChild(u)}},[i.container,a]),(0,Gt.useEffect)(()=>(window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}),[a]);const c=M0(r,e);return Gt.createElement("div",{className:"CodoxCommentPlugin_CommentInputBox",ref:s},Gt.createElement(R0,{className:"CodoxCommentPlugin_CommentInputBox_Editor",onEscape:u=>(u.preventDefault(),g(),!0),onChange:c}),Gt.createElement("div",{className:"CodoxCommentPlugin_CommentInputBox_Buttons"},Gt.createElement(zi,{onClick:g,className:"CodoxCommentPlugin_CommentInputBox_Button"},"Cancel"),Gt.createElement(zi,{onClick:()=>{if(n){let u=d.getEditorState().read(()=>{const h=l.current;return h?h.getTextContent():""});u.length>100&&(u=u.slice(0,99)+"…"),t(eS(u,[I0(f,o)]),!0,void 0,l.current),l.current=null}},disabled:!n,className:"CodoxCommentPlugin_CommentInputBox_Button primary"},"Comment")))}function aS(y){let{submitAddComment:d,thread:g,placeholder:t}=y;const[f,r]=(0,Gt.useState)(""),[n,e]=(0,Gt.useState)(!1),s=(0,Gt.useRef)(null),i=B0(),l=M0(r,e);return Gt.createElement(Gt.Fragment,null,Gt.createElement(R0,{className:"CodoxCommentPlugin_CommentsPanel_Editor",autoFocus:!1,onEscape:()=>!0,onChange:l,editorRef:s,placeholder:t}),Gt.createElement(zi,{className:"CodoxCommentPlugin_CommentsPanel_SendButton",onClick:()=>{if(n){d(I0(f,i),!1,g);const o=s.current;o!==null&&o.dispatchCommand(ye.CLEAR_EDITOR_COMMAND,void 0)}},disabled:!n},Gt.createElement(Xw,null)))}function D0(y){let{commentOrThread:d,deleteCommentOrThread:g,onClose:t,thread:f}=y;return Gt.createElement(Gt.Fragment,null,"Are you sure you want to delete this ",d.type,"?",Gt.createElement("div",{className:"Modal__content"},Gt.createElement(zi,{onClick:()=>{g(d,f),t()}},"Delete")," ",Gt.createElement(zi,{onClick:()=>{t()}},"Cancel")))}function L0(y){let{comment:d,deleteComment:g,thread:t,rtf:f}=y;const r=Math.round((d.timeStamp-performance.now())/1e3),n=Math.round(r/60),[e,s]=N0();return Gt.createElement("li",{className:"CodoxCommentPlugin_CommentsPanel_List_Comment"},Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_List_Details"},Gt.createElement("span",{className:"CodoxCommentPlugin_CommentsPanel_List_Comment_Author"},d.author),Gt.createElement("span",{className:"CodoxCommentPlugin_CommentsPanel_List_Comment_Time"},"· ",r>-10?"Just now":f.format(n,"minute"))),Gt.createElement("p",{className:d.deleted?"CodoxCommentPlugin_CommentsPanel_DeletedComment":""},d.content),!d.deleted&&Gt.createElement(Gt.Fragment,null,Gt.createElement(zi,{onClick:()=>{s("Delete Comment",i=>Gt.createElement(D0,{commentOrThread:d,deleteCommentOrThread:g,thread:t,onClose:i}))},className:"CodoxCommentPlugin_CommentsPanel_List_DeleteButton"},Gt.createElement(P0,null)),e))}function sS(y){let{activeIDs:d,comments:g,deleteCommentOrThread:t,listRef:f,submitAddComment:r,markNodeMap:n}=y;const[e]=(0,Li.useLexicalComposerContext)(),[s,i]=(0,Gt.useState)(0),[l,o]=N0(),a=(0,Gt.useMemo)(()=>new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"short"}),[]);return(0,Gt.useEffect)(()=>{const c=setTimeout(()=>{i(s+1)},1e4);return()=>{clearTimeout(c)}},[s]),Gt.createElement("ul",{className:"CodoxCommentPlugin_CommentsPanel_List",ref:f},g.map(c=>{const u=c.codoxId;if(!u)return null;if(c.type==="thread"){const h=()=>{if(n.get(u)!==void 0&&(d===null||d.indexOf(u)===-1)){const p=document.activeElement;e.update(()=>{(0,ye.$setSelection)(null)},{onUpdate(){p!==null&&p.focus()}})}};return Gt.createElement("li",{key:u,onClick:h,className:`CodoxCommentPlugin_CommentsPanel_List_Thread ${n.has(u)?"interactive":""} ${d.indexOf(u)===-1?"":"active"}`},Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_QuoteBox"},Gt.createElement("blockquote",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_Quote"},"> ",Gt.createElement("span",null,c.quote)),Gt.createElement(zi,{onClick:()=>{o("Delete Thread",p=>Gt.createElement(D0,{commentOrThread:c,deleteCommentOrThread:t,onClose:p}))},className:"CodoxCommentPlugin_CommentsPanel_List_DeleteButton"},Gt.createElement(P0,null)),l),Gt.createElement("ul",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_Comments"},c.comments.map(p=>Gt.createElement(L0,{key:p.codoxId,comment:p,deleteComment:t,thread:c,rtf:a}))),Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_Editor"},Gt.createElement(aS,{submitAddComment:r,thread:c,placeholder:"Reply to comment..."})))}return Gt.createElement(L0,{key:u,comment:c,deleteComment:t,rtf:a})}))}function lS(y){let{activeIDs:d,deleteCommentOrThread:g,comments:t,submitAddComment:f,markNodeMap:r}=y;const n=(0,Gt.useRef)(null),e=t.length===0;return Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel"},Gt.createElement("h2",{className:"CodoxCommentPlugin_CommentsPanel_Heading"},"Comments"),e?Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_Empty"},"No Comments"):Gt.createElement(sS,{activeIDs:d,comments:t,deleteCommentOrThread:g,listRef:n,submitAddComment:f,markNodeMap:r}))}function B0(){const y=(0,g0.useCollaborationContext)(),{yjsDocMap:d,name:g}=y;return g||"Playground User"}function cS(y){const[d]=(0,Li.useLexicalComposerContext)(),g=J_(),t=(0,Gt.useMemo)(()=>new Map,[]),[f,r]=(0,Gt.useState)(),[n,e]=(0,Gt.useState)([]),[s,i]=(0,Gt.useState)(!1),[l,o]=(0,Gt.useState)(!1);(0,Gt.useEffect)(()=>{!g.length&&l?o(!1):g.length},[g]);const a=(0,Gt.useCallback)(()=>{d.update(()=>{const h=(0,ye.$getSelection)();h!==null&&(h.dirty=!0)}),i(!1)},[d]),c=(0,Gt.useCallback)((h,p)=>{if(h.type==="comment"){if(le.log("[deleteCommentOrThread]: type comment new values",{comment:h,thread:p,markNodeMap:t}),Sn.removeComment(p.codoxId,h.codoxId),!p)return;const m=p.codoxId,b=t.get(m);d.update(()=>{b?b.forEach((_,v)=>{const w=(0,ye.$getNodeByKey)(v);le.log("[deleteCommentOrThread]: type comment new values",{lexicalNode:w}),w&&w.markDirty()}):(0,ye.$getRoot)().markDirty(),(0,ye.$addUpdateTag)(Xr.historic),(0,ye.$addUpdateTag)(Ll)})}else{le.log("[deleteCommentOrThread]: type thread new values",{comment:h,markNodeMap:t});const m=p!==void 0?p.codoxId:h.codoxId,b=t.get(m);setTimeout(()=>{d.update(()=>{if(b)for(const _ of b){const v=(0,ye.$getNodeByKey)(_);le.log("[deleteCommentOrThread]: type thread new values",{node:v}),(0,Qr.$isMarkNode)(v)&&(v.deleteID(m),v.getIDs().length===0&&(0,Qr.$unwrapMarkNode)(v))}else(0,ye.$getRoot)().markDirty(),le.debug("[deleteCommentOrThread][refreshComments]");Sn.refreshComments(!0),(0,ye.$addUpdateTag)(Ll)})})}},[d,t]),u=(0,Gt.useCallback)((h,p,m,b)=>{if(le.log("[submitAddComment]: new values",{commentOrThread:h,isInlineComment:p,thread:m,markNodeMap:t}),m?Sn.addComment(m.codoxId,h):Sn.addCommentThread(h),p)d.update(()=>{if((0,ye.$isRangeSelection)(b)){const _=b.isBackward(),v=h.codoxId;(0,Qr.$wrapSelectionInMarkNode)(b,_,v),(0,ye.$addUpdateTag)(Ll)}}),i(!1);else if(!p&&m){const _=m.codoxId,v=t.get(_);if(!v)return void Sn.removeComment(m.codoxId,h.codoxId);d.update(()=>{v.forEach((w,x)=>{let S=(0,ye.$getNodeByKey)(x);S&&S.markDirty()}),(0,ye.$addUpdateTag)(Xr.historic),(0,ye.$addUpdateTag)(Ll)})}},[d]);return(0,Gt.useEffect)(()=>{const h=[];for(let p=0;p<n.length;p++){const m=n[p],b=t.get(m);if(b!==void 0)for(const _ of b){const v=d.getElementByKey(_);v!==null&&(v.classList.add("selected"),h.push(v),o(!0))}}return()=>{for(let p=0;p<h.length;p++)h[p].classList.remove("selected")}},[n,d,t]),(0,Gt.useEffect)(()=>{const h=new Map;return(0,vs.mergeRegister)((0,vs.registerNestedElementResolver)(d,Qr.MarkNode,p=>(0,Qr.$createMarkNode)(p.getIDs()),(p,m)=>{p.getIDs().forEach(b=>{m.addID(b)})}),d.registerMutationListener(Qr.MarkNode,p=>{d.getEditorState().read(()=>{for(const[m,b]of p){const _=(0,ye.$getNodeByKey)(m);let v=[];b==="destroyed"?v=h.get(m)||[]:(0,Qr.$isMarkNode)(_)&&(v=_.getIDs());for(let w=0;w<v.length;w++){const x=v[w];let S=t.get(x);h.set(m,v),b==="destroyed"?S!==void 0&&(S.delete(m),S.size===0&&t.delete(x)):(S===void 0&&(S=new Set,t.set(x,S)),S.has(m)||S.add(m))}}})}),d.registerUpdateListener(p=>{let{editorState:m,tags:b}=p;m.read(()=>{const _=(0,ye.$getSelection)();let v=!1,w=!1;if((0,ye.$isRangeSelection)(_)){const x=_.anchor.getNode();if((0,ye.$isTextNode)(x)){const S=(0,Qr.$getMarkIDs)(x,_.anchor.offset);S!==null&&(e(S),v=!0),_.isCollapsed()||(r(x.getKey()),w=!0)}}v||e(x=>x.length===0?x:[]),w||r(null),(0,ye.$isRangeSelection)(_)&&i(!1)})}),d.registerCommand(Lf,()=>{const p=window.getSelection();return p!==null&&p.removeAllRanges(),i(!0),!0},ye.COMMAND_PRIORITY_EDITOR))},[d,t]),Gt.createElement(Gt.Fragment,null,s&&(0,Ts.createPortal)(Gt.createElement(iS,{editor:d,cancelAddComment:a,submitAddComment:u}),document.body),f!=null&&!s&&(0,Ts.createPortal)(Gt.createElement(nS,{anchorKey:f,editor:d,onAddComment:()=>{d.dispatchCommand(Lf,void 0)}}),document.body),(0,Ts.createPortal)(Gt.createElement(zi,{className:"CodoxCommentPlugin_ShowCommentsButton "+(l?"active":""),onClick:()=>o(!l),title:l?"Hide Comments":"Show Comments"},Gt.createElement(tS,null)),document.body),l&&(0,Ts.createPortal)(Gt.createElement(lS,{comments:g,submitAddComment:u,deleteCommentOrThread:c,activeIDs:n,markNodeMap:t}),document.body))}var Ou=rn(766),Rs={};Rs.styleTagTransform=ri(),Rs.setAttributes=ei(),Rs.insert=ti().bind(null,"head"),Rs.domAPI=Xo(),Rs.insertStyleElement=ni(),Qo()(Ou.A,Rs),Ou.A&&Ou.A.locals&&Ou.A.locals;var Tu=rn(225),Ms={};Ms.styleTagTransform=ri(),Ms.setAttributes=ei(),Ms.insert=ti().bind(null,"head"),Ms.domAPI=Xo(),Ms.insertStyleElement=ni(),Qo()(Tu.A,Ms),Tu.A&&Tu.A.locals&&Tu.A.locals;function uS(y){let{label:d,value:g,onChange:t,placeholder:f="","data-test-id":r,type:n="text"}=y;return Gt.createElement("div",{className:"CodoxInput__wrapper"},Gt.createElement("label",{className:"CodoxInput__label"},d),Gt.createElement("input",{type:n,className:"CodoxInput__input",placeholder:f,value:g,onChange:e=>{t(e.target.value)},"data-test-id":r}))}function F0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function ju(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?F0(Object(g),!0).forEach(function(t){dS(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):F0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function dS(y,d,g){return(d=fS(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function fS(y){var d=pS(y,"string");return typeof d=="symbol"?d:d+""}function pS(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}let Ul=!1;const hS=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000000","#4a4a4a","#9b9b9b","#ffffff"],$l=214,z0=150;function gS(y){let{color:d,onChange:g}=y;const[t,f]=(0,Gt.useState)(Ds("hex",d)),[r,n]=(0,Gt.useState)(d),e=(0,Gt.useRef)(null),s=(0,Gt.useMemo)(()=>({x:t.hsv.s/100*$l,y:(100-t.hsv.v)/100*z0}),[t.hsv.s,t.hsv.v]),i=(0,Gt.useMemo)(()=>({x:t.hsv.h/360*$l}),[t.hsv]);return(0,Gt.useEffect)(()=>{e.current!==null&&g&&n(t.hex)},[t,g]),(0,Gt.useEffect)(()=>{if(d===void 0)return;const l=Ds("hex",d);f(l),n(l.hex)},[d]),Gt.createElement("div",{className:"codox-color-picker-wrapper",style:{width:$l},ref:e},Gt.createElement(uS,{label:"Hex",onChange:l=>{if(n(l),/^#[0-9A-Fa-f]{6}$/i.test(l)){const o=Ds("hex",l);f(o)}},value:r}),Gt.createElement("div",{className:"codox-color-picker-basic-color"},hS.map(l=>Gt.createElement("button",{className:l===t.hex?" active":"",key:l,style:{backgroundColor:l},onClick:()=>(o=>{n(o);let a=Ds("hex",o);f(a),g(a.hex,Ul)})(l)}))),Gt.createElement(U0,{className:"codox-color-picker-saturation",style:{backgroundColor:`hsl(${t.hsv.h}, 100%, 50%)`},onChange:l=>{let{x:o,y:a}=l;const c=Ds("hsv",ju(ju({},t.hsv),{},{s:o/$l*100,v:100-a/z0*100}));f(c),n(c.hex),g(c.hex,Ul)}},Gt.createElement("div",{className:"codox-color-picker-saturation_cursor",style:{backgroundColor:t.hex,left:s.x,top:s.y}})),Gt.createElement(U0,{className:"codox-color-picker-hue",onChange:l=>{let{x:o}=l;const a=Ds("hsv",ju(ju({},t.hsv),{},{h:o/$l*360}));f(a),n(a.hex),g(a.hex,Ul)}},Gt.createElement("div",{className:"codox-color-picker-hue_cursor",style:{backgroundColor:`hsl(${t.hsv.h}, 100%, 50%)`,left:i.x}})),Gt.createElement("div",{className:"codox-color-picker-color",style:{backgroundColor:t.hex}}))}function U0(y){let{className:d,style:g,onChange:t,children:f}=y;const r=(0,Gt.useRef)(null),n=(0,Gt.useRef)(!1),e=s=>{if(r.current){const{current:i}=r,{width:l,height:o,left:a,top:c}=i.getBoundingClientRect(),u=$0(s.clientX-a,l,0),h=$0(s.clientY-c,o,0);t({x:u,y:h})}};return Gt.createElement("div",{ref:r,className:d,style:g,onMouseDown:s=>{if(s.button!==0)return;e(s);const i=o=>{n.current=!0,Ul=!0,e(o)},l=o=>{n.current&&(Ul=!1),document.removeEventListener("mousemove",i,!1),document.removeEventListener("mouseup",l,!1),e(o),n.current=!1};document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",l,!1)}},f)}function $0(y,d,g){return y>d?d:y<g?g:y}function H0(y){if(!y.startsWith("#")){const d=document.createElement("canvas").getContext("2d");if(!d)throw new Error("2d context not supported or canvas already initialized");return d.fillStyle=y,d.fillStyle}return y.length===4||y.length===5?y=y.split("").map((d,g)=>g?d+d:"#").join(""):y.length===7||y.length===9?y:"#000000"}function q0(y){const d=(y.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(g,t,f,r)=>"#"+t+t+f+f+r+r).substring(1).match(/.{2}/g)||[]).map(g=>parseInt(g,16));return{b:d[2],g:d[1],r:d[0]}}function Kf(y){let{r:d,g,b:t}=y;d/=255,g/=255,t/=255;const f=Math.max(d,g,t),r=f-Math.min(d,g,t);return{h:r?60*(f===d?(g-t)/r+(g<t?6:0):f===g?2+(t-d)/r:4+(d-g)/r):0,s:f?r/f*100:0,v:100*f}}function mS(y){let{h:d,s:g,v:t}=y;g/=100,t/=100;const f=~~(d/60),r=d/60-f,n=t*(1-g),e=t*(1-g*r),s=t*(1-g*(1-r)),i=f%6,l=Math.round(255*[t,e,n,n,s,t][i]),o=Math.round(255*[s,t,t,e,n,n][i]);return{b:Math.round(255*[n,n,s,t,t,e][i]),g:o,r:l}}function J0(y){let{b:d,g,r:t}=y;return"#"+[t,g,d].map(f=>f.toString(16).padStart(2,"0")).join("")}function Ds(y,d){let g=H0("#121212"),t=q0(g),f=Kf(t);return y==="hex"?(g=H0(d),t=q0(g),f=Kf(t)):y==="rgb"?(t=d,g=J0(t),f=Kf(t)):y==="hsv"&&(f=d,t=mS(f),g=J0(t)),{hex:g,hsv:f,rgb:t}}const yS=Gt.createContext(null),W0=4;function bS(y){let{children:d,dropDownRef:g,onClose:t,dropdownClassName:f}=y;const[r,n]=(0,Gt.useState)(),[e,s]=(0,Gt.useState)(),i=(0,Gt.useCallback)(o=>{n(a=>a?[...a,o]:[o])},[n]),l=(0,Gt.useMemo)(()=>({registerItem:i}),[i]);return(0,Gt.useEffect)(()=>{r&&!e&&s(r[0]),e&&e.current&&e.current.focus()},[r,e]),Gt.createElement(yS.Provider,{value:l},Gt.createElement("div",{className:f,ref:g,onKeyDown:o=>{if(!r)return;const a=o.key;["Escape","ArrowUp","ArrowDown","Tab"].includes(a)&&o.preventDefault(),a==="Escape"||a==="Tab"?t():a==="ArrowUp"?s(c=>{if(!c)return r[0];const u=r.indexOf(c)-1;return r[u===-1?r.length-1:u]}):a==="ArrowDown"&&s(c=>c?r[r.indexOf(c)+1]:r[0])}},d))}function vS(y){let{disabled:d=!1,buttonLabel:g,buttonAriaLabel:t,buttonClassName:f,buttonIconClassName:r,children:n,stopCloseOnClickSelf:e,dropdownClassName:s,buttonLabelClassName:i,dropdownChevronClassName:l}=y;const o=(0,Gt.useRef)(null),a=(0,Gt.useRef)(null),[c,u]=(0,Gt.useState)(!1);return(0,Gt.useEffect)(()=>{const h=a.current,p=o.current;if(c&&h!==null&&p!==null){const{top:m,left:b}=h.getBoundingClientRect();p.style.top=`${m+h.offsetHeight+W0}px`,p.style.left=`${Math.min(b,window.innerWidth-p.offsetWidth-20)}px`}},[o,a,c]),(0,Gt.useEffect)(()=>{const h=a.current;if(h!==null&&c){const p=m=>{const b=m.target;e&&o.current&&o.current.contains(b)||h.contains(b)||u(!1)};return document.addEventListener("click",p),()=>{document.removeEventListener("click",p)}}},[o,a,c,e]),(0,Gt.useEffect)(()=>{const h=()=>{if(c){const p=a.current,m=o.current;if(p!==null&&m!==null){const{top:b}=p.getBoundingClientRect(),_=b+p.offsetHeight+W0;_!==m.getBoundingClientRect().top&&(m.style.top=`${_}px`)}}};return document.addEventListener("scroll",h),()=>{document.removeEventListener("scroll",h)}},[a,o,c]),Gt.createElement(Gt.Fragment,null,Gt.createElement("button",{type:"button",disabled:d,"aria-label":t||g,className:f,onClick:()=>u(!c),ref:a},r&&Gt.createElement("span",{className:r}),g&&Gt.createElement("span",{className:i},g),Gt.createElement("i",{className:l})),c&&(0,Ts.createPortal)(Gt.createElement(bS,{dropDownRef:o,onClose:()=>{u(!1),a&&a.current&&a.current.focus()},dropdownClassName:s},n),document.body))}const _S=["disabled","stopCloseOnClickSelf","color","onChange"];function Gf(){return Gf=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var g=arguments[d];for(var t in g)({}).hasOwnProperty.call(g,t)&&(y[t]=g[t])}return y},Gf.apply(null,arguments)}function xS(y,d){if(y==null)return{};var g,t,f=wS(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function wS(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}function V0(y){let{disabled:d=!1,stopCloseOnClickSelf:g=!0,color:t,onChange:f}=y,r=xS(y,_S);return Gt.createElement(vS,Gf({},r,{disabled:d,stopCloseOnClickSelf:g}),Gt.createElement(gS,{color:t,onChange:f}))}const SS=y=>{let{onColorChange:d,buttonClassName:g,buttonIconClassName:t,buttonAriaLabel:f,buttonLabel:r,dropdownClassName:n,buttonLabelClassName:e,dropdownChevronClassName:s}=y;const[i]=(0,Li.useLexicalComposerContext)(),[l,o]=(0,Gt.useState)(()=>i.isEditable()),[a,c]=(0,Gt.useState)("");(0,Gt.useEffect)(()=>(0,vs.mergeRegister)(i.registerEditableListener(h=>{o(h)}),i.registerUpdateListener(h=>{let{editorState:p}=h;p.read(()=>{const m=(0,ye.$getSelection)();if((0,ye.$isRangeSelection)(m)){let b=(0,xa.$getSelectionStyleValueForProperty)(m,"color");b!==a&&(c(b||""),d(b))}})})),[i]);const u=(0,Gt.useCallback)((h,p)=>{i.update(()=>{const m=(0,ye.$getSelection)();m!==null&&(0,xa.$patchStyleText)(m,{color:h})})},[i]);return Gt.createElement(V0,{disabled:!l,color:a,onChange:u,buttonClassName:g||"",buttonIconClassName:t||"",buttonAriaLabel:f||"",buttonLabel:r||"",dropdownClassName:n||"",buttonLabelClassName:e||"",dropdownChevronClassName:s||""})},CS=SS,ES=y=>{let{onColorChange:d,buttonClassName:g,buttonIconClassName:t,buttonAriaLabel:f,buttonLabel:r,dropdownClassName:n,buttonLabelClassName:e,dropdownChevronClassName:s}=y;const[i]=(0,Li.useLexicalComposerContext)(),[l,o]=(0,Gt.useState)(()=>i.isEditable()),[a,c]=(0,Gt.useState)("#fff");(0,Gt.useEffect)(()=>(0,vs.mergeRegister)(i.registerEditableListener(h=>{o(h)}),i.registerUpdateListener(h=>{let{editorState:p}=h;p.read(()=>{const m=(0,ye.$getSelection)();if((0,ye.$isRangeSelection)(m)){let b=(0,xa.$getSelectionStyleValueForProperty)(m,"background-color");b!==a&&(c(b||""),d(b))}})})),[i]);const u=(0,Gt.useCallback)((h,p)=>{i.update(()=>{const m=(0,ye.$getSelection)();m!==null&&(0,xa.$patchStyleText)(m,{"background-color":h})})},[i]);return Gt.createElement(V0,{disabled:!l,color:a,onChange:u,buttonClassName:g||"",buttonIconClassName:t||"",buttonAriaLabel:f||"",buttonLabel:r||"",dropdownClassName:n||"",buttonLabelClassName:e||"",dropdownChevronClassName:s||""})},kS=ES;var OS=Ii.yy;Ii._U,Ii.a8,Ii.Vs,Ii.Cn;var TS=Ii.gK,jS=Ii.vv;function AS(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Au=AS(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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 NS({hasCellMerge:y=!0,hasCellBackgroundColor:d=!0,hasTabHandler:g=!0}){const[t]=Tr();return Fe.useEffect(()=>(t.hasNodes([To,Oo,ba])||Au(10),ko(t.registerCommand(M1,({columns:f,rows:r,includeHeaders:n})=>{const e=Tm(Number(r),Number(f),n);tm(e);const s=e.getFirstDescendant();return Pe(s)&&s.select(),!0},an),t.registerNodeTransform(To,f=>{const[r]=jm(f,null,null),n=r.reduce((e,s)=>Math.max(e,s.length),0);for(let e=0;e<r.length;++e){const s=r[e].length;if(s===n)continue;const i=r[e][s-1].cell;for(let l=s;l<n;++l){const o=hs(0);o.append(Qn()),i!==null?i.insertAfter(o):em(i,o)}}}))),[t]),Fe.useEffect(()=>{const f=new Map,r=e=>{const s=e.getKey(),i=t.getElementByKey(s);if(i&&!f.has(s)){const l=q1(e,i,t,g);f.set(s,l)}};t.getEditorState().read(()=>{const e=Hh(To);for(const s of e)Jn(s)&&r(s)});const n=t.registerMutationListener(To,e=>{for(const[s,i]of e)if(i==="created")t.getEditorState().read(()=>{const l=Hn(s);Jn(l)&&r(l)});else if(i==="destroyed"){const l=f.get(s);l!==void 0&&(l.removeListeners(),f.delete(s))}});return()=>{n();for(const[,e]of f)e.removeListeners()}},[t,g]),Fe.useEffect(()=>{if(!y)return t.registerNodeTransform(Oo,f=>{if(f.getColSpan()>1||f.getRowSpan()>1){const[,,r]=ms(f),[n]=gs(r,f,f),e=n.length,s=n[0].length;let i=r.getFirstChild();Mr(i)||Au(175);const l=[];for(let o=0;o<e;o++){o!==0&&(i=i.getNextSibling(),Mr(i)||Au(175));let a=null;for(let c=0;c<s;c++){const u=n[o][c],h=u.cell;if(u.startRow===o&&u.startColumn===c)a=h,l.push(h);else if(h.getColSpan()>1||h.getRowSpan()>1){on(h)||Au(176);const p=hs(h.__headerState);a!==null?a.insertAfter(p):em(i,p)}}}for(const o of l)o.setColSpan(1),o.setRowSpan(1)}})},[t,y]),Fe.useEffect(()=>{if(!d)return t.registerNodeTransform(Oo,f=>{f.getBackgroundColor()!==null&&f.setBackgroundColor(null)})},[t,d,y]),null}const PS={code:"editor-code",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough",underline:"editor-text-underline",underlineStrikethrough:"editor-text-underlineStrikethrough"},table:"PlaygroundEditorTheme__table",tableAddColumns:"PlaygroundEditorTheme__tableAddColumns",tableAddRows:"PlaygroundEditorTheme__tableAddRows",tableCell:"PlaygroundEditorTheme__tableCell",tableCellActionButton:"PlaygroundEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"PlaygroundEditorTheme__tableCellActionButtonContainer",tableCellEditing:"PlaygroundEditorTheme__tableCellEditing",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",tableCellPrimarySelected:"PlaygroundEditorTheme__tableCellPrimarySelected",tableCellResizer:"PlaygroundEditorTheme__tableCellResizer",tableCellSelected:"PlaygroundEditorTheme__tableCellSelected",tableCellSortedIndicator:"PlaygroundEditorTheme__tableCellSortedIndicator",tableResizeRuler:"PlaygroundEditorTheme__tableCellResizeRuler",tableSelected:"PlaygroundEditorTheme__tableSelected",tableSelection:"PlaygroundEditorTheme__tableSelection"},IS="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDE1IDE1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYuMDAwMDEgOC4zMzMzM0wxLjkwMDAxIDEzLjhMMS4xMDAwMSAxMy4yTDUuMzc1MDEgNy41TDEuMTAwMDEgMS44TDEuOTAwMDEgMS4yTDYuMDAwMDEgNi42NjY2N0wxMC4xIDEuMkwxMC45IDEuOEw2LjYyNTAxIDcuNUwxMC45IDEzLjJMMTAuMSAxMy44TDYuMDAwMDEgOC4zMzMzM1pNMTIgMTIuNUMxMiAxMS42NzE2IDEyLjY3MTYgMTEgMTMuNSAxMUgxMy43OTI5QzE0LjQ1OTYgMTEgMTUgMTEuNTQwNCAxNSAxMi4yMDcxQzE1IDEyLjUyNzMgMTQuODcyOCAxMi44MzQzIDE0LjY0NjUgMTMuMDYwN0wxMy43MDcxIDE0SDE1VjE1SDEyLjVDMTIuMjk3OCAxNSAxMi4xMTU1IDE0Ljg3ODIgMTIuMDM4MSAxNC42OTEzQzExLjk2MDcgMTQuNTA0NSAxMi4wMDM1IDE0LjI4OTQgMTIuMTQ2NSAxNC4xNDY0TDEzLjkzOTMgMTIuMzUzNkMxMy45NzgyIDEyLjMxNDcgMTQgMTIuMjYyIDE0IDEyLjIwNzFDMTQgMTIuMDkyNyAxMy45MDczIDEyIDEzLjc5MjkgMTJIMTMuNUMxMy4yMjM5IDEyIDEzIDEyLjIyMzkgMTMgMTIuNUgxMloiIGZpbGw9IiMwMDAwMDAiLz4KPC9zdmc+",RS="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiBpbWFnZS1yZW5kZXJpbmc9Im9wdGltaXplUXVhbGl0eSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIHZpZXdCb3g9IjAgMCA1MDQgNTEyLjM2Ij48cGF0aCBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik00OTkuNDMgMjMxLjM2SDM2OC40Yy0yLjUzIDAtNC41OC0yLjA1LTQuNTgtNC41N3YtOC4xMWMwLTEuMjYuNTItMi40IDEuMzQtMy4yMmw3MS41Ny04Mi41M2M2LjczLTcuNzUgMTIuNTctMTQuOTcgMTcuNDgtMjEuNjggNC44OC02LjY0IDguODMtMTIuNzQgMTEuODUtMTguMjggMi45Ny01LjQzIDUuMTgtMTAuNjEgNi42NC0xNS41NSAxLjQyLTQuODUgMi4xMy05LjUzIDIuMTMtMTQgMC0xNC42OC0zLjk4LTI2LjA1LTExLjkyLTM0LjA5LTMuOTItMy45Ni04Ljc1LTYuOTMtMTQuNDktOC45Mi01Ljk1LTIuMDMtMTIuOTEtMy4wNS0yMC44Ny0zLjA1LTguNDUgMC0xNS44OCAxLjIxLTIyLjI5IDMuNjItNi4yNyAyLjM2LTExLjYzIDUuOTItMTYuMDcgMTAuNjNhNDcuODg0IDQ3Ljg4NCAwIDAgMC0xMC4xNCAxNi42Yy0yLjI3IDYuMjktMy40MSAxMy4zOS0zLjQxIDIxLjI2IDAgMi41Mi0yLjA1IDQuNTctNC41NyA0LjU3aC02Ljg5Yy0yLjA1IDAtMy44LTEuMzYtNC4zNy0zLjI0bC0uMjctLjgyYy0uMTgtLjU2LS4yNS0xLjEzLS4yMi0xLjY3LS4yMy05LjMyIDEuMTQtMTcuOTkgNC4xMi0yNS45NyAzLjAyLTguMTMgNy42OC0xNS41NCAxMy45NC0yMi4xOSA2LjI2LTYuNyAxMy42My0xMS43NiAyMi4xLTE1LjEzQzQwNy44NCAxLjY4IDQxNy4yIDAgNDI3LjU1IDBjOS41OSAwIDE4LjI2IDEuMzggMjYuMDMgNC4xMyA3Ljg2IDIuNzkgMTQuNzcgNyAyMC43MiAxMi42MSA2LjAyIDUuNjMgMTAuNTUgMTIuNCAxMy41NSAyMC4yOCAyLjk2IDcuNzUgNC40NSAxNi41NiA0LjQ1IDI2LjQgMCA2LjUtMS4wNyAxMy4wOC0zLjE3IDE5LjY5bC0uMTQuMzhjLTIuMDkgNi40Ni01LjE3IDEyLjk3LTkuMiAxOS40OWwtLjE0LjIxYy00LjA4IDYuNTEtOC45IDEzLjQzLTE0LjQzIDIwLjc0LTUuNTYgNy4zMy0xMS45NiAxNS4yMy0xOS4yMiAyMy42N2wtNTYuOTEgNjYuNTFoMTEwLjM0YzIuNTIgMCA0LjU3IDIuMDUgNC41NyA0LjU3djguMTFjMCAyLjUyLTIuMDUgNC41Ny00LjU3IDQuNTd6bS0zMjcuMjUgNjguNzUgMTM3Ljk2LTE2Ny43NmMuODktMS4wNyAyLjMtMS42NSAzLjc0LTEuNjVsMjAuMTMtLjAyYzIuNTIgMCA0LjU3IDEuNzQgNC41NyAzLjg4IDAgLjkxLS4zNyAxLjc1LS45OCAyLjQxTDE4OC4zMiAzMTcuNjYgMzQ0LjEgNTA2LjI0YzEuNDUgMS43NS45NSA0LjE3LTEuMSA1LjQtLjguNDgtMS43Mi43MS0yLjYzLjcxbC0yMC4xMy4wMWMtMS43IDAtMy4xOC0uNzktMy45Ny0xLjk2bC0xNDQuMS0xNzUuMkwyOC4yMyA1MTAuNjljLS44OCAxLjA3LTIuMyAxLjY0LTMuNzMgMS42NWwtMTkuOTMuMDJjLTIuNTIgMC00LjU3LTEuNzQtNC41Ny0zLjg5IDAtLjkuMzctMS43NC45OC0yLjRsMTU1LjY1LTE4OC40TDYuOSAxMzYuOGMtMS40NS0xLjc1LS45NS00LjE4IDEuMTEtNS40MS43OS0uNDcgMS43MS0uNyAyLjYyLS43bDIwLjQ0LS4wMWMxLjYzIDAgMy4wNi43MiAzLjg3IDEuODFsMTM3LjI0IDE2Ny42MnoiLz48L3N2Zz4=",MS="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik00IDEySDIwTTEyIDRWMjAiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjwvc3ZnPg==",DS="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik02IDEyTDE4IDEyIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+DQo8L3N2Zz4=",Ca=8,Ea=72,LS=15;function BS({selectionFontSize:y,disabled:d,editor:g}){const[t,f]=Yn.useState(y),[r,n]=Yn.useState(!1);Yn.useState(!1);const e=(c,u)=>{if(!u)return c;let h=c;switch(u){case 2:switch(!0){case c>Ea:h=Ea;break;case c>=48:h-=12;break;case c>=24:h-=4;break;case c>=14:h-=2;break;case c>=9:h-=1;break;default:h=Ca;break}break;case 1:switch(!0){case c<Ca:h=Ca;break;case c<12:h+=1;break;case c<20:h+=2;break;case c<36:h+=4;break;case c<=60:h+=12;break;default:h=Ea;break}break}return h},s=Yn.useCallback((c,u)=>{const h=p=>(p||(p=`${LS}px`),p=p.slice(0,-2),`${e(Number(p),u)}px`);g.update(()=>{if(g.isEditable()){const p=je();p!==null&&Gg(p,{"font-size":c||h})}})},[g]),i=c=>{const u=Number(t);if(c.key!=="Tab"){if(["e","E","+","-"].includes(c.key)||isNaN(u)){c.preventDefault(),f("");return}n(!0),(c.key==="Enter"||c.key==="Escape")&&(c.preventDefault(),a(u))}},l=()=>{if(t!==""&&r){const c=Number(t);a(c)}},o=c=>{if(t!==""){const u=e(Number(t),c);s(String(u)+"px",null)}else s(null,c)},a=c=>{let u=c;c>Ea?u=Ea:c<Ca&&(u=Ca),f(String(u)),s(String(u)+"px",null),n(!1)};return Yn.useEffect(()=>{f(y)},[y]),Se.jsxs(Se.Fragment,{children:[Se.jsx("button",{type:"button",disabled:d||y!==""&&Number(t)<=Ca,onClick:()=>o(2),className:"toolbar-item font-decrement",children:Se.jsx("img",{src:DS,height:16,width:16,style:{marginTop:"5px"}})}),Se.jsx("input",{type:"number",value:t,disabled:d,className:"toolbar-item font-size-input",min:Ca,max:Ea,onChange:c=>f(c.target.value),onKeyDown:i,onBlur:l}),Se.jsx("button",{type:"button",disabled:d||y!==""&&Number(t)>=Ea,onClick:()=>o(1),className:"toolbar-item font-increment",children:Se.jsx("img",{src:MS,height:16,width:16,style:{marginTop:"5px"}})}),Se.jsx("div",{children:Se.jsx("div",{className:"symbol-dropdown",children:Se.jsxs("select",{name:"cars",id:"cars",children:[Se.jsx("option",{value:"Heading 1",children:"Heading 1"}),Se.jsx("option",{value:"Heading 2",children:"Heading 2"}),Se.jsx("option",{value:"Heading 3",children:"heading 3"})]})})})]})}const FS="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iY3VycmVudENvbG9yIiBjbGFzcz0iYmkgYmktdGFibGUiPjxwYXRoIGQ9Ik0wIDJhMiAyIDAgMCAxIDItMmgxMmEyIDIgMCAwIDEgMiAydjEyYTIgMiAwIDAgMS0yIDJIMmEyIDIgMCAwIDEtMi0yVjJ6bTE1IDJoLTR2M2g0VjR6bTAgNGgtNHYzaDRWOHptMCA0aC00djNoM2ExIDEgMCAwIDAgMS0xdi0yem0tNSAzdi0zSDZ2M2g0em0tNSAwdi0zSDF2MmExIDEgMCAwIDAgMSAxaDN6bS00LTRoNFY4SDF2M3ptMC00aDRWNEgxdjN6bTUtM3YzaDRWNEg2em00IDRINnYzaDRWOHoiLz48L3N2Zz4=";function zS(){const[y,d]=Fe.useState(""),[g,t]=Fe.useState(""),[f,r]=Fe.useState(!1),[n]=Tr(),e=()=>{!y||!g||(n.update(()=>{const s=Tm(y,g,!0);tm(s)}),r(!1))};return Se.jsxs(Se.Fragment,{children:[Se.jsx("button",{className:"toolbar-item ",onClick:()=>r(!0),children:Se.jsx("img",{className:"add-toolbar-table-icon",src:FS,alt:"Add Table"})}),f&&Se.jsx("div",{className:"modal-overlay",children:Se.jsxs("div",{className:"modal-content",children:[Se.jsx("h3",{children:"Select Table Dimensions"}),Se.jsx("div",{className:"select-table-container",children:Se.jsx("input",{type:"number",value:y,onChange:s=>d(Number(s.target.value)),placeholder:"Rows"})}),Se.jsx("div",{className:"select-table-container",children:Se.jsx("input",{type:"number",value:g,onChange:s=>t(Number(s.target.value)),placeholder:"Columns"})}),Se.jsx("div",{children:Se.jsxs("div",{className:"modal-buttons",children:[Se.jsx("button",{className:"toolbar-item",onClick:e,children:"Add"}),Se.jsx("button",{className:"toolbar-item",onClick:()=>r(!1),children:"Cancel"})]})})]})})]})}const US="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMS4xIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLi0tPjxwYXRoIGQ9Ik0wIDI1NkMwIDExNC42IDExNC42IDAgMjU2IDBzMjU2IDExNC42IDI1NiAyNTYtMTE0LjYgMjU2LTI1NiAyNTZTMCAzOTcuNCAwIDI1NnptMTc1LTQ3LjkgNDcuMSA0N0wxNzUgMzAzYy05LjMgOS40LTkuMyAyNC42IDAgMzMuMSA5LjQgMTAuMiAyNC42IDEwLjIgMzMuMSAwbDQ3LTQ2LjIgNDcuOSA0Ni4yYzkuNCAxMC4yIDI0LjYgMTAuMiAzMy4xIDAgMTAuMi04LjUgMTAuMi0yMy43IDAtMzMuMWwtNDYuMi00Ny45IDQ2LjItNDdjMTAuMi04LjUgMTAuMi0yMy43IDAtMzMuMS04LjUtOS4zLTIzLjctOS4zLTMzLjEgMGwtNDcuOSA0Ny4xLTQ3LTQ3LjFjLTguNS05LjMtMjMuNy05LjMtMzMuMSAwLTkuMyA5LjQtOS4zIDI0LjYgMCAzMy4xeiIvPjwvc3ZnPg==",$S=[{letter:"",uppercase:"A",lowercase:"α"},{letter:"Beta",uppercase:"Β",lowercase:"β"},{letter:"Gamma",uppercase:"Γ",lowercase:"γ"},{letter:"Delta",uppercase:"Δ",lowercase:"δ"},{letter:"Epsilon",uppercase:"Ε",lowercase:"ε"},{letter:"Zeta",uppercase:"Ζ",lowercase:"ζ"},{letter:" Eta ",uppercase:"Η",lowercase:"η"},{letter:"Theta",uppercase:"Θ",lowercase:"θ"},{letter:"Iota",uppercase:"Ι",lowercase:"ι"},{letter:"Kappa",uppercase:"Κ",lowercase:"κ"}];function HS(){const[y]=Tr(),[d,g]=Fe.useState(!1),t=f=>{y.update(()=>{var n;const r=je();if(_e(r)){const e=r.anchor.getNode();let s="inherit";if(e instanceof ki){const l=e.getStyle();s=((n=l==null?void 0:l.match(/font-size:\s*(\S+);/))==null?void 0:n[1])||s}const i=Zn(f);r.insertNodes([i])}}),g(!1)};return Se.jsxs("div",{children:[Se.jsx("button",{className:"toolbar-item symbols-toolbar",onClick:()=>g(!d),children:"Symbols"}),d&&Se.jsx("div",{className:"modal-overlay",children:Se.jsxs("div",{className:"modal-content-symb",children:[Se.jsx("div",{className:"symbol-Flex-container",children:$S.map(({letter:f,uppercase:r,lowercase:n})=>Se.jsxs("div",{className:"symbol-items",children:[Se.jsx("button",{onClick:()=>t(n),children:n}),Se.jsx("button",{onClick:()=>t(r),children:r})]},f))}),Se.jsx("button",{className:"toolbar-item close-btn",onClick:()=>g(!1),children:Se.jsx("img",{src:US,width:16,height:16})})]})})]})}const Yf=1;function Zf(){return Se.jsx("div",{className:"divider"})}function qS(){const[y]=Tr(),d=Fe.useRef(null),[g,t]=Fe.useState(!1),[f,r]=Fe.useState(!1),[n,e]=Fe.useState(!1),[s,i]=Fe.useState(!1),[l,o]=Fe.useState(!1),[a,c]=Fe.useState(!1),[u,h]=Fe.useState(!1),[p,m]=Fe.useState(!1),[b,_]=Fe.useState("11px"),[v,w]=Fe.useState(()=>y.isEditable()),x=Fe.useCallback(()=>{const S=je();_e(S)&&(e(S.hasFormat("bold")),i(S.hasFormat("italic")),o(S.hasFormat("underline")),c(S.hasFormat("strikethrough")),h(S.hasFormat("subscript")),m(S.hasFormat("superscript")),_(Yg(S,"font-size","11px")))},[]);return Fe.useEffect(()=>ko(y.registerUpdateListener(({editorState:S})=>{S.read(()=>{x()})}),y.registerCommand(qo,(S,E)=>(x(),!1),Yf),y.registerCommand(Xa,S=>(t(S),!1),Yf),y.registerCommand(Qa,S=>(r(S),!1),Yf)),[y,x]),Se.jsxs("div",{className:"toolbar",ref:d,children:[Se.jsx("button",{disabled:!g,onClick:()=>{y.dispatchCommand(cl,void 0)},className:"toolbar-item spaced","aria-label":"Undo",children:Se.jsx("i",{className:"format undo"})}),Se.jsx("button",{disabled:!f,onClick:()=>{y.dispatchCommand(ul,void 0)},className:"toolbar-item","aria-label":"Redo",children:Se.jsx("i",{className:"format redo"})}),Se.jsx(Zf,{}),Se.jsx(BS,{selectionFontSize:b.slice(0,-2),editor:y,disabled:!v}),Se.jsx(Zf,{}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"bold")},className:"toolbar-item spaced "+(n?"active":""),"aria-label":"Format Bold",children:Se.jsx("i",{className:"format bold"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"italic")},className:"toolbar-item spaced "+(s?"active":""),"aria-label":"Format Italics",children:Se.jsx("i",{className:"format italic"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"underline")},className:"toolbar-item spaced "+(l?"active":""),"aria-label":"Format Underline",children:Se.jsx("i",{className:"format underline"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"strikethrough")},className:"toolbar-item spaced "+(a?"active":""),"aria-label":"Format Strikethrough",children:Se.jsx("i",{className:"format strikethrough"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"superscript")},className:"toolbar-item spaced "+(p?"active":""),"aria-label":"Format SuperScript",children:Se.jsx("img",{src:RS,height:16,width:16,style:{marginTop:"1px"}})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"subscript")},className:"toolbar-item spaced "+(u?"active":""),"aria-label":"Format SubScript",children:Se.jsx("img",{src:IS,height:16,width:16,style:{marginTop:"1px"}})}),Se.jsx(Zf,{}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"left")},className:"toolbar-item spaced","aria-label":"Left Align",children:Se.jsx("i",{className:"format left-align"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"center")},className:"toolbar-item spaced","aria-label":"Center Align",children:Se.jsx("i",{className:"format center-align"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"right")},className:"toolbar-item spaced","aria-label":"Right Align",children:Se.jsx("i",{className:"format right-align"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"justify")},className:"toolbar-item","aria-label":"Justify Align",children:Se.jsx("i",{className:"format justify-align"})}),Se.jsx(zS,{}),Se.jsx(HS,{})," "]})}const Qf=TS([...[To,ba,Oo]]);function JS(){return Se.jsx("div",{className:"editor-placeholder"})}const WS={namespace:"React.js Demo",nodes:Qf,onError(y){throw y},theme:PS},VS=()=>Se.jsx(Se.Fragment,{children:"hello"});function KS({collabApiKey:y,spfList:d,userObj:g}){const[t,f]=Fe.useState(!1),[r,n]=Fe.useState([]),[e,s]=Fe.useState("demo_docId_1"),[i,l]=Fe.useState({root:null}),{userId:o,userName:a,userEmail:c}=g,u=Fe.useRef(),p={docId:e,apiKey:y,user:{name:a,id:o,email:c},hooks:{contentChanged:({source:w,content:x})=>{},usersUpdate:w=>{n(w)}}},m=()=>{u.current&&u.current.start(p).then(()=>{console.log("[Lexical Demo][codox.start] success"),f(!0)}).catch(w=>console.log("[Lexical Demo][codox.start] error",w))},b=()=>{u.current&&(console.log("Codox stoped"),u.current.stop()),f(!1)};let _={root:{children:[{children:[],direction:"ltr",format:"",indent:0,type:"paragraph",version:1,textFormat:0,showUI:!0}],direction:"ltr",format:"",indent:0,type:"root",version:1}};Fe.useEffect(()=>{(async()=>{if(!e)return;t&&b();let w=_;if(w)try{jS(w,Qf),l(w)}catch(x){console.error("[APP] error: ",x)}})()},[e]),Fe.useEffect(()=>{i&&e&&!t&&m()},[i,e,t]),Fe.useMemo(()=>({editorState:i?JSON.stringify({root:i.root}):null,namespace:"Playground",nodes:Qf,onError:w=>{throw w},theme:{}}),[i]);const v=()=>{let w=[],x=[];return r&&r.length>0&&r.map((S,E)=>{x.includes(S.name)||(x.push(S.name),w.push(Se.jsxs("div",{title:S.email,className:`avatarStyle avatar-color-${E+1}`,children:[" ",S.name&&S.name[0]]})))}),Se.jsx("div",{className:"flexContainer",children:w})};return console.log("iam user object",g),console.log("i am CodoxStarted",t),Fe.useEffect(()=>{setTimeout(()=>{(!u||!u.current)&&m()},5e3)},[]),Se.jsx("div",{children:t&&Se.jsxs(Ug,{initialConfig:WS,children:[v(),Se.jsxs("div",{className:"editor-container",children:[Se.jsx(qS,{}),Se.jsxs("div",{className:"editor-inner",children:[Se.jsx(O1,{contentEditable:Se.jsx(Hg,{className:"editor-input"}),placeholder:Se.jsx(JS,{}),ErrorBoundary:VS}),Se.jsx(OS,{ref:u}),Se.jsx(om,{}),Se.jsx(NS,{}),Se.jsx($g,{})]})]})]})})}Ir.Editor=KS,Object.defineProperty(Ir,Symbol.toStringTag,{value:"Module"})});
|
|
1429
|
+
`,A.append(H),_=H}!R&&x.width<1&&r.length>1&&(A.style.width="3px")}b.forEach(w=>{this.hoverList.push([w,_,e])})});this.remoteSelections=[],this.isEditingInProgress=!1,this.hoverList=[],this.trackedNodesKeys=new Set,this.remoteSelectionDOMsMap={},this.activeEditorsKeys={},this.keyboardBindedListener=this._keyboardEventsListener.bind(this),this.mouseBindedListener=this._mouseEventsListener.bind(this),this.resizeBindedListener=this._resizeEventListener.bind(this),this.hideInUI=!1}_mouseEventsListener(d){let g=!1,t=d.target,f=!1,r=3;for(;r&&t;){if(t.__codox_track){g=!0;break}if(t.__lexicalEditor){g=!0,f=!0;break}t=t.parentNode,r--}if(!g)return;let n=null;for(let i in this.activeEditorsKeys){if(t[`__lexicalKey_${i}`]){n=i;break}t.__lexicalEditor&&(n=t.__lexicalEditor._key)}if(!n)return;let e=f?"root":t[`__lexicalKey_${n}`];if(!e||!this.trackedNodesKeys.has(`${e}__${n}`))return;let s=new Set;for(let i=0;i<this.hoverList.length;i++){let l=this.hoverList[i],[o,a,c]=l;if(s.has(c))continue;let u=tr.isMousePositionWithinElementCords(d,o);d.type===vr.mouseover&&u&&(a.style.animation=this.isEditingInProgress?tr.tooltipAnimations.hideAtOnce:tr.tooltipAnimations.showAtOnce,s.add(c)),d.type===vr.mouseout&&(a.style.animation=tr.tooltipAnimations.hideWithDelay,s.add(c)),d.type===vr.mousemove&&u&&(a.style.animation=this.isEditingInProgress?tr.tooltipAnimations.hideAtOnce:tr.tooltipAnimations.showAtOnce,s.add(c))}}_keyboardEventsListener(d){d.type===vr.keypress&&(this.isEditingInProgress||(this.isEditingInProgress=!0)),d.type===vr.keyup&&this.isEditingInProgress&&(this.isEditingInProgress=!1)}_resizeEventListener(d){xe.mainEditorExists()&&this.paintRemoteSelections(this.remoteSelections)}mount(){window.addEventListener(vr.keypress,this.keyboardBindedListener),window.addEventListener(vr.keyup,this.keyboardBindedListener),window.addEventListener(vr.resize,this.resizeBindedListener),window.addEventListener(vr.scroll,this.resizeBindedListener);for(const d of Vm)window.addEventListener(d,this.mouseBindedListener)}unmount(){window.removeEventListener(vr.keypress,this.keyboardBindedListener),window.removeEventListener(vr.keyup,this.keyboardBindedListener),window.removeEventListener(vr.resize,this.resizeBindedListener),window.removeEventListener(vr.scroll,this.resizeBindedListener);for(const d of Vm)window.removeEventListener(d,this.mouseBindedListener);this.gcPrevPaintedRemoteSelections()}shouldUpdateRemoteSelections(){return!0}gcPrevPaintedRemoteSelections(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let g in this.remoteSelectionDOMsMap)this.remoteSelectionDOMsMap[g].remove();this.hoverList=[],this.trackedNodesKeys=new Set,this.remoteSelections=d||[],this.remoteSelectionDOMsMap={},this.activeEditorsKeys={}}paintRemoteSelections(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.gcPrevPaintedRemoteSelections(d);let g=xe.getMainEditorState();g.read&&g.read(()=>{for(let t of this.remoteSelections)if(Ff.validateJSONSelection(t,Mf.remote))if($e.isNestedSelectionJSON(t)){let{nestedSelectionJSON:f,nestedEditor:r}=$e.getNestedSelectionJSONFromMainSelectionJSON(t);if(!r)continue;r.getEditorState().read(()=>{let n=$e.JSONToLexical(f);if(n)try{this.paintSingleRemoteSelection({editor:r,selectionJSON:t,lexicalSelection:n,selectedNodes:n.getNodes(),isBackward:n.isBackward()})}catch(e){le.warn("[PAINT REMOTE SELECTION] failed for nested editor - ",{error:e,nestedSelectionJSON:f,fullSelection:t,lexicalSelection:n})}else le.error("DEBUGGER: [paintRemoteSelections] nested selection from json to lexical is null: ",{selection:t,nestedSelectionJSON:f,lexicalSelection:n})})}else{let f=$e.JSONToLexical(t);if(!f){le.error("DEBUGGER: [paintRemoteSelections] selection from json to lexical is null: ",{selection:t,lexicalSelection:f});continue}try{this.paintSingleRemoteSelection({editor:xe.getMainEditor(),selectionJSON:t,lexicalSelection:f,selectedNodes:f.getNodes(),isBackward:f.isBackward()})}catch(r){le.warn("[PAINT REMOTE SELECTION] failed - ",{error:r,fullSelection:t,lexicalSelection:f})}}})}updateRemoteSelections(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";this.shouldUpdateRemoteSelections(d)&&(le.log("[updateRemoteSelections] "+g,{newRemoteSelections:d}),Promise.resolve().then(()=>{this.paintRemoteSelections(d),this.hideInUI&&this.hideRemoteSelectionsFromUI()}))}clear(){this.gcPrevPaintedRemoteSelections()}getCurrentRemoteSelections(){return this.remoteSelections}hideRemoteSelectionsFromUI(){this.hideInUI||(this.hideInUI=!0);const d=document.querySelectorAll(".codox_remote_selection");for(let g of d)g.classList.add("hidden_codox_remote_selection")}showHiddenRemoteSelectionsInUI(){this.hideInUI=!1;const d=document.querySelectorAll(".hidden_codox_remote_selection");for(let g of d)g.classList.remove("hidden_codox_remote_selection")}}const go=new Nx;function Px(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).findIndex(y=>y===_a.editorState)}function bu(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,g=xe.getMainEditorNodesClassesMap();const{klass:t}=g.get(y.type)||{};if(!t)return;const f=t.importJSON(y);if(y.children&&y.children.length)for(const r of y.children)bu(r,f);return d&&d.getChildrenSize&&d.splice(d.getChildrenSize(),0,[f]),f}function vu(y){if(y.getChildren)for(let d of y.getChildren())vu(d);y.remove()}function d0(y){y.__parent=null,y.__next=null,y.__prev=null}function f0(y,d){return!!xe.isLexicalEditorInstance(y)&&!(typeof d!="object"||!d.editorState||(y.update(()=>{try{let g=(0,ye.$getSelection)();const t=y.parseEditorState(d.editorState);if(t.isEmpty())return(0,ye.$getRoot)().clear(),!0;(0,ye.$setSelection)(g),y.setEditorState(t)}catch(g){le.error("[stateUpdates][updateNestedEditorState] update nested state and selection error: ",g)}}),0))}function Ix(y,d){let g=d;for(const t of y)g=g[t];return g}function wa(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],t=null,f=Ix(y,g?d:xe.getMainEditorState().toJSON());return f&&(t=Sa(f)?(0,ye.$getRoot)():Tn.get(f.codoxId)),t||le.debug("[WARNING][getLexicalNodeByPathOutOfJSONState] lexical node not found: ",{jsonNode:f,lexicalNode:t,pathArray:y,currentStateJSON:xe.getMainEditorState().toJSON(),newStateJSON:d,codoxNodes:Tn.nodesToArray(),searchInNewState:g}),t||(g?t:wa(y,d,!0))}function p0(y){le.log("[applyFullLexicalStateReplace] clear current state and apply new");const d=(0,ye.$getRoot)();d.clear();let g=xe.getMainEditorNodesClassesMap();function t(f){const r=g.get(f.type).klass.importJSON(f);if(f.children)for(const n of f.children)r.append(t(n));return r}for(const f of y.root.children)d.append(t(f))}function Rx(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(d.length){le.log("[applyDeltasToLexicalState] Original Deltas: ",{newStateJSON:y,deltas:JSON.parse(JSON.stringify(d))});for(const g of d){let{p:t}=g;const f=t[t.length-1],r=f==="children",n=typeof f=="number",e=!n&&!r,s=Px(t),i=s!==-1,l=g.hasOwnProperty("lm")&&typeof g.lm=="number";if(t.length)if(i){let o=s-1,a=wa(t.slice(0,o),y);if(a){let c=t.slice(0,s),u=y;for(const p of c)u=u[p];let h=Dl(t[o]);f0(a.getWritable()[h],u)}}else{if(r){let o=g.oi;if(!o){le.warn("[applyDeltasToLexicalState][====WARNING====] SKIPPED. Delta oi attr expected for path",{delta:g});continue}if(o.some(c=>!(!c.hasOwnProperty("text")||typeof c.text=="string"))){le.warn("[applyDeltasToLexicalState][====WARNING====] SKIPPED. Delta oi children contain invalid text value",{delta:g});continue}t.length=t.length-1;let a=wa(t,y);if(!a)continue;if(o.some(c=>!!c.codoxDId)){try{a=a.getWritable()}catch(p){le.debug("[applyDeltasToLexicalState][shouldUpdateLeaves] getWritable error: ",{err:p,delta:g,fullStateJSON:y});continue}let c={};for(let p of a.getChildren())p.codoxDId?c[p.codoxDId]=p:vu(p);let u=[],h=["codoxDId","codoxId","__key","__parent","__prev","__next"];for(let p=0;p<o.length;p++){let m=o[p],b=p===0,_=p===o.length-1,v=null,w=p>=0?u[p-1]:null;if(m.codoxDId){let x=c[m.codoxDId];if(x){x=x.getWritable();let S=bu(m);if(le.debug("[DELTA_DECORATOR_UPDATE]: ",{exisingDecorator:x,tmpDecorator:S}),!S){le.debug("[DELTA_DECORATOR_UPDATE] UPADATE SKIPPED: ",{exisingDecorator:x,tmpDecorator:S});continue}for(let E in S)if(S.hasOwnProperty(E)&&!h.includes(E))if(xe.isLexicalEditorInstance(S[E])){let k={editorState:S[E].getEditorState().toJSON()};f0(x[E],k)}else{let k=Rf(E),D=m[k];if(D===x[E]||!m.hasOwnProperty(k))continue;let N=D!==void 0&&S[E]!==D?D:S[E];k!=="height"&&k!=="width"||S[E]==="inherit"&&D===0&&(N=S[E]),x[E]=N}S.remove(),d0(x),v=x,delete c[m.codoxDId]}}v||(v=bu(m),v.codoxDId&&v.__type==="excalidraw"&&v.__data==="[]"&&(v.__data="{}")),v=v.getWritable(),u.push(v),v.__parent=a.__key,b?(a.__first=v.__key,v.__prev=null,_&&(a.__last=v.__key)):_?(a.__last=v.__key,v.__next=null,v.__prev=w.__key,w.__next=v.__key):(v.__prev=w.__key,w.__next=v.__key),a.__size=u.length}for(let p in c){let m=c[p];m=m.getWritable(),d0(m),vu(m),delete c[p]}}else{let c=o.map(u=>bu(u));a.splice(0,a.getChildrenSize(),c)}}if(n){if(g.ld){const o=g.ld,a=Tn.get(o.codoxId);a.getChildrenSize&&a.getChildrenSize()?vu(a):a.remove()}if(g.li){let o=xe.getMainEditorNodesClassesMap();const a=g.li,c=o.get(a.type).klass.importJSON(a);if(t.length===1&&t[0]==="root")(0,ye.$getRoot)().splice(0,0,[c]);else{const u=t[t.length-1];t.length=t.length-2;let h=wa(t,y);h&&h.splice(u,0,[c])}if(a.children&&a.children.length){let u=function(h,p){const m=o.get(h.type).klass.importJSON(h);if(p.splice(p.getChildrenSize(),0,[m]),h.children&&h.children.length)for(const b of h.children)u(b,m)};for(const h of a.children)u(h,c)}}if(g.oi||g.od){let{p:o,oi:a,od:c}=g,u=wa(o,y);if(u)try{let h=u.getWritable();if(a){let p=Object.keys(a);for(let m of p)h[Dl(m)]=a[m]}if(c){let p=Object.keys(c);for(let m of p)delete h[Dl(m)]}}catch(h){le.debug("[applyDeltasToLexicalState][delta oi/od] getWritable error: ",{err:h,delta:g})}}if(l){let{p:o,lm:a}=g,c=o[o.length-1],u=a,h=u<c,p=wa(o,y);if(p){let m=p.getParent().getChildren(),b=m[c],_=m[u];h?_.insertBefore(b):_.insertAfter(b)}}}if(e){const o=t[t.length-1];let a=Dl(o);t.length=t.length-1;let c,u=wa(t,y);if(!u){le.error("Missing node when update node attr from delta: ",{path:t,delta:g,fullStateJSON:y,currentEditorState:xe.getMainEditorState().toJSON()});continue}try{c=u.getWritable()}catch(p){le.debug("[applyDeltasToLexicalState][shouldUpdateBlockAttr] getWritable error: ",{err:p,delta:g})}if(!c)continue;let h=g.oi;if(o==="format"&&(h=I_(h)),o==="direction"&&(u.hasOwnProperty(a)||(a="__dir")),!c.hasOwnProperty(a)){let p=Object.keys(c);for(let m of p){let b=Rf(m);if(o.startsWith(b)){a=m;break}}}c[a]=h}}else if(g.oi&&g.oi.root)return p0(g.oi)}}else le.log("[applyDeltasToLexicalState] stop, no deltas: ",d)}function Mx(y){let d=y.clipboardData.getData(M_.paste),g=!1;try{d=JSON.parse(d),typeof d=="object"&&d.nodes&&Array.isArray(d.nodes)&&(g=!0)}catch{return!1}if(!g)return!1;if(g){Tn.clearPastedIds();const t=f=>{if(f.codoxId&&Tn.addPastedId(f.codoxId),f.children&&f.children.length)for(const r of f.children)t(r)};for(const f of d.nodes)t(f)}return!1}var Dx=y=>{var d={};return rn.d(d,y),d};const h0=Dx({useCollaborationContext:()=>K1});var Lx=y=>{var d={};return rn.d(d,y),d};const Li=Lx({LexicalComposerContext:()=>xf,useLexicalComposerContext:()=>Tr});class g0{constructor(){this.blacklist=Object.keys(Km).reduce((d,g)=>{let t=Km[g];return d[g]=t.reduce((f,r)=>(f[r]=r,f),{}),d},{}),this._isBlacklistedFound=!1,this._clientCallback=null}_shouldSkipNode(d){return d instanceof ye.TextNode||d instanceof ye.ParagraphNode||d instanceof ye.RootNode}setClientCallback(d){this._clientCallback=d}removeClientCallback(){this._clientCallback=null}invokeClientCallback(){this._clientCallback&&this._clientCallback()}trackBlacklisted(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0;if(zf||g!==$r.created||this._isBlacklistedFound||!d||!d.__type||this._shouldSkipNode(d))return;let f=t||xe.getMainEditorState(),r=d.__type,n=this.blacklist[r];n&&f.read(()=>{let e=d.getParent();for(;e!==null;){let s=e?e.__type:null;if(!s)return;if(n[s])return le.warn("[ContentNestingsWatcher][trackBlacklisted] FOUND: ",{targetNode:d,targetType:r,parent:e,parentType:s,mutationType:g}),void(this._isBlacklistedFound=!0);e=e.getParent()}})}trackBlacklistedInNestedEditor(d){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>3?arguments[3]:void 0;if(g!==$r.created||this._isBlacklistedFound||this._shouldSkipNode(d))return;let f=t.__type,r=d.__type;if(!f||!r)return;let n=this.blacklist[r];n&&n[f]&&(this._isBlacklistedFound=!0,le.warn("[ContentNestingsWatcher][trackBlacklistedInNestedEditor] FOUND: ",{targetNode:d,targetType:r,rootNode:t,rootType:f,mutationType:g}))}isBlacklistedFound(){let d=this._isBlacklistedFound;return d&&(this._isBlacklistedFound=!1),d}}const Bx=new g0,Bi=Bx,Fx=["editorState","prevEditorState","dirtyElements","dirtyLeaves"];function zx(y,d){if(y==null)return{};var g,t,f=Ux(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function Ux(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}class $x{constructor(){this.nestedEditorsListenersMap={}}_createNestedEditorUpdatesListener(d,g){let t=!1;return function(f){let{editorState:r,prevEditorState:n,dirtyElements:e,dirtyLeaves:s}=f,i=(zx(f,Fx),xe.getMainEditor()),l=xe.getMainEditorState(),o=r.toJSON(),a=n.toJSON(),c=Bf(o,a),u=r._selection,h=n._selection,p=!1,m=null,b=xe.isOnlySelectionChanged(e,s),_=d[g];if(le.debug("[NESTED EDITOR LISTENER] invoked: ",{lexicalNode:d,key:d.__key,onlySelectionChanged:b,newEditorStateJSON:o,prevEditorStateJSON:a,isSameState:c,lexicalSelection:u,prevLexicalSelection:h,mainDirtyLeaves:i._dirtyLeaves.size,mainDirtyElements:i._dirtyElements.size,nestedDirtyLeaves:_._dirtyLeaves.size,nestedDirtyElements:_._dirtyElements.size,nestedEditorKey:_._key}),Bi.isBlacklistedFound())return t=!0,le.debug("[NESTED EDITOR LISTENER] BLACKLISTED FOUND - revert to prev state"),xe.scanLexicalNodeForNestedEditorAttribute(d)?(_.update(()=>{try{const v=_.parseEditorState(a);if(v.isEmpty())return(0,ye.$getRoot)().clear(),!0;_.setEditorState(v)}catch(v){le.error("[NESTED EDITOR LISTENER] BLACKLISTED FOUND - ROLLBACK ERROR: ",v)}}),void Bi.invokeClientCallback()):void 0;if(t)t=!1;else{if(d.codoxId||d.codoxDId){let v=null;l.read(()=>{v=$e.getNodeAncestorsCodoxIds(d),!d.codoxId&&d.codoxDId&&v.push(d.codoxDId)}),r.read(()=>{let w=Rf(g),x=$e.lexicalToJSONNested(u,w,v);m=xe.getCurrentNestedSelectionJSON(),p=$e.equalSelectionsJSON(m,x),p||xe.setNestedSelectionJSON(x)})}c&&p||i.update(()=>{try{le.debug("[NESTED EDITOR LISTENER] MARKING DIRTY TO TRIGGER UPDATE",{mainTags:i._updateTags,nestedTags:_&&_._updateTags,isSameState:c,isSameSelection:p,onlyNestedSelectionChanged:b,mainDirtyLeaves:i._dirtyLeaves.size,mainDirtyElements:i._dirtyElements.size,nestedDirtyLeaves:_._dirtyLeaves.size,nestedDirtyElements:_._dirtyElements.size,lexicalNode:d,lexicalSelection:u,prevLexicalSelection:h,mainEditorTags:i._updateTags,mainEditorTagsSize:i._updateTags.size}),xe.addUpdateTag({fromNestedEditor:!0}),d.markDirty()}catch(v){le.error("[NESTED EDITOR LISTENER] MARKING DIRTY TO TRIGGER UPDATE - ERROR: ",v)}})}}}_isNestedEditorManaged(d){return!!this.nestedEditorsListenersMap[d]}gc(){for(let d in this.nestedEditorsListenersMap)if(!xe.getLexicalNodeByKey(d)){let g=this.nestedEditorsListenersMap[d];g&&g(),delete this.nestedEditorsListenersMap[d]}}manageNestedEditorInLexicalNode(d){if(this._isNestedEditorManaged(d.getKey()))return;let g=xe.scanLexicalNodeForNestedEditorAttribute(d);if(g){let t=d[g],f=this._createNestedEditorUpdatesListener(d,g),r=[];t._nodes.forEach((s,i,l)=>{let{klass:o}=s,a=t.registerMutationListener(o,c=>{for(let[u,h]of c)if(h===$r.created){let p=t.getEditorState()._nodeMap.get(u);p&&Bi.trackBlacklistedInNestedEditor(p,h,t.getEditorState(),d)}});r.push(a)});let n=(0,vs.mergeRegister)(t.registerUpdateListener(f),...r),e=d.getKey();this.nestedEditorsListenersMap[e]=n}}gcNestedEditorListenerInLexicalNode(d){let g=d.getKey(),t=this.nestedEditorsListenersMap[g];t&&(t(),delete this.nestedEditorsListenersMap[g])}manageNestedEditorInClonedLexicalNode(d,g){let t=d.getKey();t!==g.getKey()&&this._isNestedEditorManaged(t)&&(this.gcNestedEditorListenerInLexicalNode(d),this.manageNestedEditorInLexicalNode(g))}setNestedEditorSelection(d){let{nestedSelectionJSON:g,nestedEditor:t}=$e.getNestedSelectionJSONFromMainSelectionJSON(d);if(!t)return!1;let f=!0;return t.update(()=>{try{let r=$e.JSONToLexical(g);(0,ye.$setSelection)(r),le.debug("[setNestedEditorSelection]: lexical nested selection: ",r)}catch(r){le.error("[setNestedEditorSelection] set nested selection error: ",r),f=!1}}),f}clearListeners(){for(let d in this.nestedEditorsListenersMap){let g=this.nestedEditorsListenersMap[d];g&&g(),delete this.nestedEditorsListenersMap[d]}}}const Hx=new $x,oi=Hx,qx=function(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];try{let g=(0,ye.createEditor)({namespace:"validation",nodes:[...d],onError:e=>{throw e},parentEditor:null});const t=new g0,f=g.parseEditorState(y);if(f.isEmpty())return;g.setEditorState(f);let r=g.getEditorState();const n=r._nodeMap[Symbol.iterator]();for(const e of n){let[s,i]=e;if(i&&(t.trackBlacklisted(i,$r.created,r),t.isBlacklistedFound()))throw new Error(D_)}}catch(g){throw g}};class Jx{constructor(){this.removeCandidateTableKeys=new Set,this.validateTableCandidateKeys=new Set,this.tableFixActions=[]}_scanForCellHeaderState(d,g,t,f){if(g.length<f)return null;let r,n=g.some(s=>s.__headerState===Mi.BOTH||s.__headerState===Mi.ROW),e=d.some((s,i)=>{if(s.__size<f)return!1;let l=s.getChildAtIndex(t);return!(!l||l.__headerState!==Mi.BOTH&&l.__headerState!==Mi.COLUMN)});return n&&e?r=Mi.BOTH:n&&!e?r=Mi.ROW:e&&!n&&(r=Mi.COLUMN),r}_isValidCellChildren(d){for(let g of d)if(Es(g)||!Cs(g)&&Cn(g))return!1;return!0}_createEmptyCell(){let d=(0,En.$createTableCellNode)();return d.append((0,ye.$createParagraphNode)()),d}_wrapInvalidCellChildrenIntoParagraph(d){let g=(0,ye.$createParagraphNode)().getWritable(),t=d.getChildren();(d=d.getWritable()).__first=g.__key,d.__last=g.__key,d.__size=1,g.__parent=d.__key,t.forEach((f,r)=>{(f=f.getWritable()).__parent=null,g.append(f)})}_createFixAction_APPEND_CELLS_TO_ROW(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - APPEND_CELLS_TO_ROW] invoked: ",{rowKey:d,numOfCellsToAppend:g});let t=(0,ye.$getNodeByKey)(d);for(;g;){let f=(0,En.$createTableCellNode)().append((0,ye.$createParagraphNode)());f.setRowSpan(1).setColSpan(1),t.append(f),g--}}}_createFixAction_ADD_PARAGRAPH_TO_EMPTY_CELL(d){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - ADD_PARAGRAPH_TO_EMPTY_CELL] invoked: ",{cellKey:d}),(0,ye.$getNodeByKey)(d).append((0,ye.$createParagraphNode)())}}_createFixAction_WRAP_CELL_CHILDREN_IN_PARAGRAPH(d){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - WRAP_CELL_CHILDREN_IN_PARAGRAPH] invoked: ",{cellKey:d});let g=(0,ye.$getNodeByKey)(d);this._wrapInvalidCellChildrenIntoParagraph(g)}}_createFixAction_ADD_ROW_CELL_TO_TABLE_NODE(d){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - ADD_ROW_CELL_TO_EMPTY_TABLE_NODE] invoked: ",{tableKey:d});let g=(0,ye.$getNodeByKey)(d),t=(0,En.$createTableRowNode)();t.append(this._createEmptyCell()),g.append(t)}}_createFixAction_ADD_CELL_TO_EMPTY_ROW_NODE(d,g){return()=>{for(g||(g=1);g;)(0,ye.$getNodeByKey)(d).append(this._createEmptyCell()),g--}}_createFixAction_WRAP_INVALID_ROW_NODE(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - WRAP_INVALID_ROW_NODE] invoked: ",{tableKey:d,rowKey:g});let t=(0,ye.$getNodeByKey)(d);if(!t)return;let f=(0,ye.$getNodeByKey)(g);if(!f)return;t=t.getWritable(),f=f.getWritable();let r=f.getPreviousSibling(),n=f.getNextSibling();f.__parent=null,f.__prev=null,f.__next=null;let e=(0,En.$createTableRowNode)();if((0,En.$isTableCellNode)(f))f.getChildren().length?this._isValidCellChildren()||this._wrapInvalidCellChildrenIntoParagraph(f):f.append((0,ye.$createParagraphNode)()),e.append(f);else{let s=this._isValidCellChildren([f]),i=(0,En.$createTableCellNode)();if(e.append(i),s)i.append(f);else{let l=(0,ye.$createParagraphNode)();l.append(f),i.append(l)}}e.__parent=t.__key,t.__first===f.__key&&(t.__first=e.__key),t.__last===f.__key&&(t.__last=e.__key),r&&(r=r.getWritable(),r.__next=e.__key,e.__prev=r.__key),n&&(n=n.getWritable(),n.__prev=e.__key,e.__next=n.__key)}}_createFixAction_WRAP_INVALID_CELL_NODE(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - WRAP_INVALID_CELL_NODE] invoked: ",{rowKey:d,cellKey:g});let t=(0,ye.$getNodeByKey)(d);if(!t)return;let f=(0,ye.$getNodeByKey)(g);if(f.remove(),f=(0,ye.$createParagraphNode)(),!f)return;t=t.getWritable(),f=f.getWritable();let r=f.getPreviousSibling(),n=f.getNextSibling(),e=(0,En.$createTableCellNode)();if(e.__parent=t.__key,t.__first===f.__key&&(t.__first=e.__key),t.__last===f.__key&&(t.__last=e.__key),r&&(r=r.getWritable(),r.__next=e.__key,e.__prev=r.__key),n&&(n=n.getWritable(),n.__prev=e.__key,e.__next=n.__key),f.__parent=null,f.__prev=null,f.__next=null,this._isValidCellChildren([f]))e.append(f);else{let s=(0,ye.$createParagraphNode)();s.append(f),e.append(s)}}}_createFixAction_APPLY_HEADER_STATE_TO_CELL(d,g){return()=>{le.debug("[TablesValidator][FIX TABLE ACTION - APPLY_HEADER_STATE_TO_CELL] invoked: ",{cellKey:d,headerStateToApply:g});let t=(0,ye.$getNodeByKey)(d);t&&(t=t.getWritable(),t.__headerState=g)}}clear(){this.removeCandidateTableKeys=new Set,this.validateTableCandidateKeys=new Set,this.tableFixActions=[]}tableRemoveEventListener(d){let g=xe.getMainEditorState()._selection;if(le.debug(`[${d}]`,{selection:g}),!(0,ye.$isRangeSelection)(g))return;let t=[];try{let f=xe.getLexicalNodeByKey(g.anchor.key),r=xe.getLexicalNodeByKey(g.focus.key);f&&r&&(t=g.isBackward()?r.getNodesBetween(f):f.getNodesBetween(r))}catch(f){le.warn("[TablesValidator][tableRemoveEventListener] get range selection nodes internal lexical error: ",f)}t.forEach(f=>{(0,En.$isTableNode)(f)&&this.removeCandidateTableKeys.add(f.__key)})}tableNodeRemoveListener(d){this.removeCandidateTableKeys.has(d)&&this.removeCandidateTableKeys.delete(d)}shouldGCRemovedTables(){return!!this.removeCandidateTableKeys.size}gcRemovedTables(){le.debug("[TablesValidator][gcRemovedTable] candidate table keys ",{tableKeys:this.removeCandidateTableKeys}),xe.getMainEditor().update(()=>{Array.from(this.removeCandidateTableKeys).forEach(d=>{let g=(0,ye.$getNodeByKey)(d);g&&g.remove()}),this.removeCandidateTableKeys.clear(),(0,ye.$addUpdateTag)(Xr.historic)})}tableUpdateListener(d){this.validateTableCandidateKeys.add(d)}tableRowNodeChangesListener(d){let g=arguments.length>1&&arguments[1]!==void 0&&arguments[1],t=xe.getLexicalNodeByKey(d);if(!t)return void(g&&le.debug("[TablesValidator][tableRowNodeChangesListener] no row node found in lexical: ",{tableRowNodeKey:d}));let f=t.__parent;f?this.validateTableCandidateKeys.add(f):le.debug("[tableRowNodeChangesListener] no parent table for row node found in lexical: ",{rowNode:t})}tableCellNodeChangesListener(d){let g=xe.getLexicalNodeByKey(d);if(!g||!g.__parent)return;let t=xe.getLexicalNodeByKey(g.__parent);t&&t.__parent&&this.validateTableCandidateKeys.add(t.__parent)}shouldValidateUpdatedTables(){return!!this.validateTableCandidateKeys.size}validateUpdatedTables(){let d=Array.from(this.validateTableCandidateKeys);return xe.getMainEditorState().read(()=>{for(let g of d){let t=xe.getLexicalNodeByKey(g);if(!t)continue;let f=t.getChildren();if(!f.length){this.tableFixActions.push(this._createFixAction_ADD_ROW_CELL_TO_TABLE_NODE(g));continue}let r=0;f.forEach(i=>{i.__size>r&&(r=i.__size)});let n=[],e=f.map((i,l)=>{if(!(0,En.$isTableRowNode)(i))return this.tableFixActions.push(this._createFixAction_WRAP_INVALID_ROW_NODE(g,i.__key)),"invalid_row_node";let o=i.getChildren();if(!o.length&&!n.length)return this.tableFixActions.push(this._createFixAction_ADD_CELL_TO_EMPTY_ROW_NODE(i.__key,r)),"empty_row_should_add_cell";if(!o.length&&n.length)return n=[],"empty_row_should_be_empty";let a=0;if(n.length){let u=[];n.forEach(h=>{let[p,m]=h;a+=m,p--,p&&u.push([p,m])}),n=[...u]}let c=o.map((u,h)=>{if(!(0,En.$isTableCellNode)(u))return this.tableFixActions.push(this._createFixAction_WRAP_INVALID_CELL_NODE(i.__key,u.__key)),a++,"invalid_cell_node_should_wrap_in_cell";let p,m=u.getChildren(),b=!m.length;if(b?this.tableFixActions.push(this._createFixAction_ADD_PARAGRAPH_TO_EMPTY_CELL(u.__key)):(p=this._isValidCellChildren(m),p||this.tableFixActions.push(this._createFixAction_WRAP_CELL_CHILDREN_IN_PARAGRAPH(u.__key))),u.__rowSpan>1){let _=u.__rowSpan,v=u.__colSpan;n.push([_-1,v])}if(a+=u.__colSpan,u.__headerState===Mi.NO_STATUS){let _=this._scanForCellHeaderState(f,o,h,r);_&&this.tableFixActions.push(this._createFixAction_APPLY_HEADER_STATE_TO_CELL(u.__key,_))}return{cellKey:u.__key,rowKey:i.__key,tableKey:g,colSpan:u.__colSpan,rowSpan:u.__rowSpan,headerState:u.__headerState,childrenAreValid:p,isEmptyCell:b}});if(a<r){let u=r-a;this.tableFixActions.push(this._createFixAction_APPEND_CELLS_TO_ROW(i.__key,u))}return{realRowLength:a,rowKey:i.__key,tableKey:g,cells:c}}),s=!this.tableFixActions.length;le[s?"debug":"warn"](`[TablesValidator][validateUpdatedTables] IS TABLE VALID: ${s}`,{tableNodeKey:g,tableValidationMatrix:e,requiredRowLength:r}),this.validateTableCandidateKeys.delete(g)}}),!this.tableFixActions.length}shouldFixTablesStructure(){return!!this.tableFixActions.length}fixTablesStructure(){if(!this.tableFixActions.length)return;let d=xe.getMainEditor();le.log("[TablesValidator][fixTablesStructure]: fix actions to apply - count: ",this.tableFixActions.length),d.update(()=>{for(let g of this.tableFixActions)g();this.tableFixActions=[],(0,ye.$addUpdateTag)(Xr.historic)})}ensureDocTablesAreValid(d){return this.shouldGCRemovedTables()?(le.warn("[TablesValidator][GARBAGE COLLECT TABLE NODES AFTER TABLE REMOVAL ATTEMPT]"),this.gcRemovedTables(),!1):!(this.shouldValidateUpdatedTables()&&(le.debug("[TablesValidator][shouldValidateUpdatedTables] invoked"),!this.validateUpdatedTables()))||(le.warn("[TablesValidator][shouldValidateUpdatedTables] INVALID LEXICAL TABLE(S) STRUCTURE FOUND - FIXING",{state:JSON.parse(JSON.stringify(d.toJSON()))}),this.fixTablesStructure(),!1)}}const jo=new Jx,Wx=["contentChanged"],Vx=["state","remoteSelection"];function m0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function ws(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?m0(Object(g),!0).forEach(function(t){Kx(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):m0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function Kx(y,d,g){return(d=Gx(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function Gx(y){var d=Yx(y,"string");return typeof d=="symbol"?d:d+""}function Yx(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function y0(y,d){if(y==null)return{};var g,t,f=Zx(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function Zx(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}const zf={DEBUG:!1,VERSION:"1.0.2",NAME:"@codoxhq/lexical-provider",SDKUI_SOURCE_PATH:"../../../sdkui/dist-production2/codox.bundle.js"}.LOCAL==="true";le.info("MODE: ","production");const Qx=y=>async()=>{const{state:d,timestamp:g}=await y();if(!xe.isValidJSONState(d))throw new Error("Invalid state received from fetchDocOnNetworkReconnect hook");const{commentThreads:t,root:f}=d,r={content:{comments:t,root:f},timestamp:g};return le.info("[decorateFetchOnReconnctHook] hook invoked: ",{returnObj:r}),r};let _u=0,ii=null,Uf=!1,mo={},$f={};const Xx=(0,Gt.forwardRef)((y,d)=>{let{onBlacklistedInsert:g}=y;const t=(0,Gt.useContext)(Li.LexicalComposerContext);if(!t)throw new Error("[CodoxCollabPlugin] CodoxCollabPlugin must be inited inside <LexicalComposer> component - LexicalComposerContext is missing");const[f]=(0,Li.useLexicalComposerContext)(),r=(0,h0.useCollaborationContext)();(0,Gt.useEffect)(()=>{if(le.debug("[INIT] lexical context check: ",{lexicalContext:t,editor:f}),!f)return;le.log("[useEffect][editor] Editor instance changed: ",{editor:f,key:f._key}),xe.setMainEditor(f),Tn.gcAbandonedNodes(),oi.gc(),jo.clear(),le.log("[useEffect][editor] subscribe to editor changes");const b=(0,vs.mergeRegister)(f.registerUpdateListener(h),f.registerCommand(ye.PASTE_COMMAND,Mx,ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.UNDO_COMMAND,()=>{xe.setUndoInvoked(!0)},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.REDO_COMMAND,()=>{xe.setRedoInvoked(!0)},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.KEY_DELETE_COMMAND,(v,w)=>{jo.tableRemoveEventListener("KEY_DELETE_COMMAND")},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.KEY_BACKSPACE_COMMAND,(v,w)=>{jo.tableRemoveEventListener("KEY_BACKSPACE_COMMAND")},ye.COMMAND_PRIORITY_CRITICAL),f.registerCommand(ye.CUT_COMMAND,(v,w)=>{jo.tableRemoveEventListener("CUT_COMMAND")},ye.COMMAND_PRIORITY_CRITICAL),...p());go.mount(),xe.alignStateSelectionJSONsFromLatestEditor(),le.debug("New editor mounted: ",{isCodoxStarted:xe.isCodoxStarted,codoxLexicalEditorManager:xe,nestedEditorsProcessor:oi});let _=f._onError;return f._onError=v=>{le.error("[ERROR HANDLER WRAPPER] error from editor: ",v),_&&_(v),u()},g&&Bi.setClientCallback(g),()=>{xe.getMainEditorKey()&&(le.debug("Unmount prev editor"),b(),xe.removeMainEditor(),go.unmount(),xe.clearJSONs(),Sn.clear(),jo.clear(),xe.isCodoxStarted&&(le.debug("EDITOR USE_EFFECT stopping codox"),n(),xe.setIsCodoxStarted(!1)),Bi.removeClientCallback())}},[f]);const n=()=>{xe.isCodoxStarted&&(le.log("[stopCodoxInstance] stopping codox"),xe.setIsCodoxStarted(!1),zf||Zo().stop(),xe.clearJSONs(),Tn.clearAll(),go.clear(),Sn.resetComments(),oi.clearListeners())},e=async b=>{le.debug("[startCodoxInstance] invoked"),Zo().createNewInstance(),le.debug("[startCodoxInstance] instance created");for(let O in $f)Zo().instance.on(O,$f[O]);if(le.debug("[startCodoxInstance] events subscribed"),mo=b,ii=mo.docId,!ii)return le.error("[startCodoxInstance] - start codox skipped - docId is missing",{docId:ii});let _=Sn.initialCommentsExist();le.debug("[startCodoxInstance] initCommentsExist: ",_),_&&(Sn.activateInitialComments(f,Tn),le.log("[activateInitialComments] "));let v=xe.getMainEditorState().toJSON();if(!xe.isValidJSONState(v))throw le.error("[startCodoxInstance] - start codox skipped - invalid init state",{docId:ii,initJSONState:v}),new Error("start codox skipped - invalid init state");le.log("[startCodoxInstance] starting codox with: ",{docId:ii,initJSONState:v,config:mo,codoxComments:Sn}),xe.currentContentStateJSON||xe.setCurrentContentStateJSON(v),xe.isCodoxStarted&&n();let{username:w,apiKey:x,getServerState:S,domain:E="",demo:k=!1,hooks:D}=mo;D&&D.fetchDocOnNetworkReconnect&&(D.fetchDocOnNetworkReconnect=Qx(D.fetchDocOnNetworkReconnect));const N=y0(D,Wx);await Zo().start(Zo().createConfig(ws(ws({},mo),{},{docId:ii,username:w,apiKey:x,domain:E,hooks:ws({syncState:l,getState:i,getServerState:async()=>await S(ii)},N),editorInstanceHooks:{getSelection:()=>xe.getCurrentActiveSelectionJSON(),setSelection:O=>o(O),getState:i,setState:O=>{const{root:R,comments:A}=O;le.info("DEBUG: EDITOR INSTANCE setState:",{fullState:O}),a({state:{root:R},selection:xe.getCurrentActiveSelectionJSON()},go.getCurrentRemoteSelections()),Sn.setAllComments(A)},enableEditor:()=>{xe.disableEditorReadOnlyMode()},disableEditor:()=>{xe.enableEditorReadOnlyMode(),go.updateRemoteSelections([])},getContent:()=>{let O=xe.composeFullStateWithRootAndComments();return le.info("[getContent]: ",O),{state:O}}},appServer:mo.appServer,demo:k}))),le.log("[startCodoxInstance] codox started - first sync invoking"),xe.setIsCodoxStarted(!0),r.clientID=mo.username,r.name=mo.username,c()},s=()=>{let b=xe.composeFullStateWithRootAndComments({directlyFromEditor:!0});e(b)},i=()=>({state:ws(ws({},xe.getMainEditorState().toJSON()),{},{comments:Sn.getAllComments()}),docId:ii}),l=b=>{if(!xe.isCodoxStarted)return;le.log("[SYNC_STATE]: Before sync payload = ",b);const _=Zo().sync({meta:b}),{state:v,remoteSelection:w=[]}=_,x=y0(_,Vx);if(le.log("[SYNC_STATE]: After sync",{state:v,remoteSelection:w,rest:x}),!v)return le.error("[SYNC_STATE] abort apply - synced state is not valid - restarting codox"),s();const S=v.state;le.log("[SYNC_STATE] synced state: ",{synced:JSON.parse(JSON.stringify(S))});let{stateFromSync:E,commentsFromSync:k}=xe.extractStateAndCommentsFromSynced(S);if(!xe.isValidJSONState(E.state))return le.error("[SYNC_STATE] - invalid state from sync - local update skipped - restarting codox",{contentState:E.state}),s();a(E,w),Sn.setAllComments(k)},o=b=>{if(!xe.isCodoxStarted||(le.log("[setLocalSelectionFromSync] synced selection: ",{syncedSelectionJSON:b}),!Ff.validateJSONSelection(b,Mf.local)))return;let _=xe.getCurrentActiveSelectionJSON();if($e.equalSelectionsJSON(_,b))return void le.log("[setLocalSelectionFromSync] STOP - local and synced selections are equal");let v=$e.isNestedSelectionJSON(b);f.update(()=>{le.log("[setLocalSelectionFromSync] json selection to apply: ",{syncedSelectionJSON:b});const w=$e.JSONToLexical(b);if(le.log("[setLocalSelectionFromSync] lexical selection to apply: ",w),v){let x=oi.setNestedEditorSelection(b);xe.setNestedSelectionJSON(x?b:null)}else(0,ye.$setSelection)(w),xe.setMainSelectionJSON(b);le.log("[setLocalSelectionFromSync] selection updated. latest selection: ",{latestSelectionJSON:xe.getCurrentActiveSelectionJSON()})})},a=function(){let{state:b,selection:_,stateReplace:v}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",S=xe.getCurrentContentStateJSON();le.log("[updateEditor] invoked: ",{currentContentStateJSON:JSON.parse(JSON.stringify(S)),newStateJSON:JSON.parse(JSON.stringify(b)),newSelectionJSON:_,remoteSelection:w,stateReplace:v,editor:f}),_===void 0&&le.error("SELECTION FROm SYNC IS UNDEFINED - will default prev selection",_);const E=Bf(S,b),k=$e.equalSelectionsJSON(xe.getCurrentActiveSelectionJSON(),_);f.update(()=>{if(xe.addUpdateTag({isSameState:E,isSameSelection:k,updateTag:x}),v)le.log("[updateEditor] invoke full stateReplace after sync"),p0(b),S=xe.setCurrentContentStateJSON(b),(0,ye.$addUpdateTag)("codox_sync_state_changes"),le.log("[updateEditor] state updated: ",S);else{le.log("[updateEditor] invoke deltas diff");let N=Zo().diff(S,b,{keyNames:{default:"codoxId"}});le.log("JSON_DIFF_ANALYSIS: ",{currentContentStateJSON:JSON.parse(JSON.stringify(S)),newStateJSON:b,deltas:N&&JSON.parse(JSON.stringify(N))}),N&&N.length&&(le.log("[updateEditor] apply deltas to lexical state"),Rx(b,N),S=xe.setCurrentContentStateJSON(b),(0,ye.$addUpdateTag)("codox_sync_state_changes"),le.log("[updateEditor] state updated: ",S))}let D=$e.isNestedSelectionJSON(_);if(Ff.validateJSONSelection(_,Mf.local)||(_=xe.getCurrentActiveSelectionJSON()),D){let N=oi.setNestedEditorSelection(_);xe.setNestedSelectionJSON(N?_:null),le.log("[updateEditor] nested selection updated",N?_:null)}else if(_!==void 0){const N=$e.JSONToLexical(_);le.log("[updateEditor] updated selection to apply: ",{isSameSelection:k,newSelectionJSON:_,lexicalSelection:N}),(0,ye.$setSelection)(N),xe.setMainSelectionJSON(_),le.log("[updateEditor] selection updated",_)}},{onUpdate:()=>{E||go.updateRemoteSelections(w,"from onUpdate hook")}}),E&&go.updateRemoteSelections(w,"from direct updateEditor")},c=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(!xe.isCodoxStarted)return;le.log("[invokeSync] SYNC INVOKED ",{upd_call_counter:b});let _=xe.composeFullStateWithRootAndComments();const v={docId:ii,state:{state:_,selection:xe.getCurrentActiveSelectionJSON()}};le.log("[codoxSync]: Before sync",{local:v,upd_call_counter:b}),le.log("[codoxSync]: Before sync state",JSON.parse(JSON.stringify(v.state)));let{state:w,remoteSelection:x=[],changes:S}=Zo().sync({state:v,meta:{}});if(le.log("[codoxSync]: After sync",{afterSyncState:JSON.parse(JSON.stringify(w)),remoteSelection:x,changes:S}),!w)return le.error("[codoxSync] abort apply - synced state is not valid - restarting codox "),s();const E=w.state;le.log("[codoxSync]: synced state: ",JSON.parse(JSON.stringify(E)),b);let{stateFromSync:k,commentsFromSync:D}=xe.extractStateAndCommentsFromSynced(E);if(!xe.isValidJSONState(k.state))return le.error("[invokeSync] - invalid state from sync - local update skipped - restarting codox",{contentState:k.state}),s();a(k,x),Sn.setAllComments(D)},u=()=>{le.warn("[rollbackStateDuringUpdateError] rollback invoked"),le.log("[rollbackStateDuringUpdateError] values: ",{prevState:xe.getPrevContentStateJSON(),currentState:xe.getCurrentContentStateJSON(),prevSelection:xe.getPrevMainSelectionJSON(),currentSelection:xe.getCurrentActiveSelectionJSON(),codoxComments:Sn});let b=xe.getPrevContentStateJSON(),_=xe.getPrevMainSelectionJSON();a({state:b,selection:_},go.getCurrentRemoteSelections(),Xr.historic);let v=xe.undoInvoked(),w=xe.redoInvoked();Sn.gcAbandonedNodeKeys(xe.getMainEditorState()._nodeMap),v&&f.dispatchCommand(ye.CAN_REDO_COMMAND,!1),w&&f.dispatchCommand(ye.CAN_UNDO_COMMAND,!1)},h=b=>{let{editorState:_,prevEditorState:v,tags:w,dirtyElements:x,dirtyLeaves:S}=b;if(Uf)return Uf=!1,void le.debug("[editorUpdatesListener] invoked blacklisted queued selection change - stop");if(Bi.isBlacklistedFound())return Uf=!0,le.warn("[editorUpdatesListener] BLACKLISTED CHANGES FOUND - revert back to prev state"),((V,G)=>{let F=null,q=null;G.read(()=>{F=$e.lexicalToJSON(G._selection),q=G.toJSON()});let T=null,I=null;V.read(()=>{let L=(0,ye.$getSelection)();I=$e.lexicalToJSON(L),T=V.toJSON()}),xe.setCurrentContentStateJSON(T),xe.setMainSelectionJSON(I),a({state:q,selection:F},go.getCurrentRemoteSelections(),Xr.historic),f.dispatchCommand(ye.CAN_REDO_COMMAND,!1),f.dispatchCommand(ye.CAN_UNDO_COMMAND,!1)})(_,v),void Bi.invokeClientCallback();if(!jo.ensureDocTablesAreValid(_))return;_u++,le.log("[editorUpdatesListener] invoked by lexical. call counter: ",{upd_call_counter:_u,isCodoxStarted:xe.isCodoxStarted});let E=xe.isOnlySelectionChanged(x,S),k=null,D=null,N=null,O=null,R=xe.getCurrentContentStateJSON(),A=w.has("codox_sync_state_changes"),z=w.has(Ll),H=xe.undoInvoked(),$=xe.redoInvoked(),M=xe.canUndo(),J=xe.canRedo();k=_.toJSON(),D=v.toJSON(),v.read(()=>{O=$e.lexicalToJSON(v._selection)}),_.read(()=>{let V=(0,ye.$getSelection)();N=$e.lexicalToJSON(V);let G=$e.JSONToLexical(N),F=V===null&&G===null||V.is(G);le.log("[editorUpdatesListener] new values: ",{newContentStateJSON:k,currentContentStateJSON:JSON.parse(JSON.stringify(R)),prevContentStateJSON:JSON.parse(JSON.stringify(D)),currentCommentsJSON:JSON.parse(JSON.stringify(Sn.getAllComments())),newSelectionJSON:JSON.parse(JSON.stringify(N)),currentMainSelectionJSON:JSON.parse(JSON.stringify(xe.getCurrentMainSelectionJSON())),currentNestedSelectionJSON:JSON.parse(JSON.stringify(xe.getCurrentNestedSelectionJSON())),currentActiveSelectionJSON:JSON.parse(JSON.stringify(xe.getCurrentActiveSelectionJSON())),lexicalSelection:V,convertedBackMainSelection:G,isMainSelectionConvertionCorrect:F,nodes:f._editorState._nodeMap,fullEditor:f,codoxNodesMap:Tn.toArray(),codoxComments:Sn,isUpdateFromSync:A,isUpdateFromComments:z,tags:w,onlySelectionChanged:E,undoInvoked:H,redoInvoked:$,canUndo:M,canRedo:J})});let K=Bf(R,k),P=$e.equalSelectionsJSON(xe.getCurrentActiveSelectionJSON(),N);le.log("[editorUpdatesListener] compares: ",{isStateSame:K,isSelectionSame:P});let U=K&&P&&!z;if(!K||z||A){let V=ws({},K?R:k),G=Sn.getAllComments();G.length&&(V.commentThreads=G);let F={source:A?Gm.remote:Gm.local,content:V};mo.hooks&&mo.hooks.contentChanged&&mo.hooks.contentChanged(F),Zo().instance.emit("content_changed",F)}if(U)le.log("[editorUpdatesListener] STOP - state and selection and comments are same ",_u);else if(xe.undoInvoked()&&xe.setUndoInvoked(!1),xe.redoInvoked()&&xe.setRedoInvoked(!1),xe.setCurrentContentStateJSON(k),xe.setPrevContentStateJSON(D),xe.setMainSelectionJSON(N),xe.setPrevMainSelectionJSON(O),zf){let V=xe.getCurrentActiveSelectionJSON();a({state:xe.getCurrentContentStateJSON(),selection:V},[])}else c(_u)},p=()=>{let b=[];return xe.getMainEditorNodesClassesMap().forEach((_,v,w)=>{let{klass:x}=_,S=f.registerMutationListener(x,E=>{for(let[k,D]of E){if(!$r[D])continue;const N=xe.getLexicalNodeByKey(k);if(D===$r.created&&N&&Bi.trackBlacklisted(N,D),x.name===En.TableNode.name&&(D===$r.destroyed?jo.tableNodeRemoveListener(k):jo.tableUpdateListener(k)),x.name===En.TableRowNode.name&&D!==$r.destroyed&&jo.tableRowNodeChangesListener(k,D===$r.updated),x.name===En.TableCellNode.name&&D===$r.updated&&jo.tableCellNodeChangesListener(k),x.name===Qr.MarkNode.name&&(le.debug("[MUTATION LISTENER] MARK node: ",{nodeKey:k,node:N,mutationType:D,codoxComments:Sn}),D===$r.destroyed?Sn.removeRelatedNodeKey(k):N&&Sn.addRelatedNodeKey(N.__key,N.__ids,D===$r.created)),N&&N.codoxId){if(D===$r.destroyed)return void(N.codoxId&&Tn.remove(N.codoxId));E0(N)||le.warn("[MutationListener Error] duplicating codoxId detected - such codoxId already exists in codoxNodesMap - updating node ref to latest: ",{mutationType:D,node:N}),Tn.add(N.codoxId,N)}}b.push(S)})}),b},m={start:e,stop:n,on:(b,_)=>{le.info(`Subscribing client to codox ${b} event`),$f[b]=_},cursor:{hide:()=>{go.hideRemoteSelectionsFromUI()},show:()=>{go.showHiddenRemoteSelectionsInUI()}},initComments:b=>{Sn.setInitialComments(b)}};return(0,Gt.useImperativeHandle)(d,()=>m),null}),tw=Xx,ew=["comments"];function b0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function Hf(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?b0(Object(g),!0).forEach(function(t){nw(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):b0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function nw(y,d,g){return(d=rw(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function rw(y){var d=ow(y,"string");return typeof d=="symbol"?d:d+""}function ow(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function iw(y,d){if(y==null)return{};var g,t,f=aw(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function aw(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}class sw extends Wm{constructor(){super(),this.mainEditor=null,this.mainEditorKey=null,this.currentContentStateJSON=null,this.currentMainSelectionJSON=null,this.currentNestedSelectionJSON=null,this._isCodoxStarted=!1,this.prevContentStateJSON=null,this.prevMainSelectionJSON=null,this._undoInvoked=!1,this._redoInvoked=!1,this._canUndo=!1,this._canRedo=!1}setCanUndo(d){this._canUndo=d}setCanRedo(d){this._canRedo=d}canUndo(){return this._canUndo}canRedo(){return this._canRedo}setUndoInvoked(d){this._undoInvoked=d}setRedoInvoked(d){this._redoInvoked=d}undoInvoked(){return this._undoInvoked}redoInvoked(){return this._redoInvoked}setIsCodoxStarted(){let d=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this._isCodoxStarted=d}get isCodoxStarted(){return this._isCodoxStarted}getMainEditorKey(){return this.mainEditorKey}setMainEditor(d){this.mainEditor=d,this.mainEditorKey=d._key}clearJSONs(){le.debug("[CodoxLexicalEditorManager][clearJSONs] invoked"),this.currentContentStateJSON=null,this.currentMainSelectionJSON=null,this.currentNestedSelectionJSON=null,this.prevContentStateJSON=null,this.prevMainSelectionJSON=null}removeMainEditor(){this.mainEditor=null,this.mainEditorKey=null,this._undoInvoked=!1,this._redoInvoked=!1,this._canUndo=!1,this._canRedo=!1,super.clear()}getMainEditor(){return this.mainEditor}alignStateSelectionJSONsFromLatestEditor(){this.getMainEditorState().read(()=>{this.setCurrentContentStateJSON(this.getMainEditorState().toJSON()),this.setMainSelectionJSON($e.lexicalToJSON((0,ye.$getSelection)()))})}mainEditorExists(){return!!this.mainEditor}getMainEditorState(){return this.mainEditor?this.mainEditor.getEditorState():{}}getMainEditorNodesClassesMap(){return this.mainEditor?this.mainEditor._nodes:new Map}getLexicalNodeByKey(d){return this.mainEditor?this.getMainEditorState()._nodeMap.get(d):null}isLexicalEditorInstance(d){return d&&typeof d=="object"&&!!d.setEditorState}setCurrentContentStateJSON(d){return this.currentContentStateJSON=d,this.currentContentStateJSON}getCurrentContentStateJSON(){return this.currentContentStateJSON}setPrevContentStateJSON(d){this.prevContentStateJSON=d}getPrevContentStateJSON(){return this.prevContentStateJSON}setMainSelectionJSON(d){this.currentMainSelectionJSON=d,this.currentMainSelectionJSON&&this.currentNestedSelectionJSON&&(this.currentNestedSelectionJSON=null)}setNestedSelectionJSON(d){this.currentNestedSelectionJSON=d,this.currentNestedSelectionJSON&&this.currentMainSelectionJSON&&(this.currentMainSelectionJSON=null)}getCurrentMainSelectionJSON(){return this.currentMainSelectionJSON}getCurrentNestedSelectionJSON(){return this.currentNestedSelectionJSON}getCurrentActiveSelectionJSON(){return!this.currentMainSelectionJSON&&this.currentNestedSelectionJSON?this.currentNestedSelectionJSON:this.currentMainSelectionJSON}clearSelectionJSON(){this.currentMainSelectionJSON=null,this.currentNestedSelectionJSON=null}setPrevMainSelectionJSON(d){this.prevMainSelectionJSON=d}getPrevMainSelectionJSON(){return this.prevMainSelectionJSON}extractStateAndCommentsFromSynced(d){let{state:{comments:g},selection:t,stateReplace:f}=d;return{stateFromSync:{state:Hf({},iw(d.state,ew)),selection:t,stateReplace:f},commentsFromSync:g}}composeFullStateWithRootAndComments(){let{directlyFromEditor:d=!1}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Hf(Hf({},d?this.getMainEditorState().toJSON():this.currentContentStateJSON),{},{comments:Sn.getAllComments()})}isValidJSONState(d){let g=!1;try{if(!d)throw new Error("State is undefined");if(!d.root)throw new Error("State 'root' node is missing");let t=this.getMainEditorNodesClassesMap(),f=function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",e=r,s=t.get(e.type);if(!s)throw new Error(`Node with type "${e.type}" is not registered in editor`);let{klass:i}=s;if(n==="root"){let l=i.prototype instanceof ye.ElementNode,o=i.prototype instanceof ye.DecoratorNode;if(!l&&!o)throw new Error("State root node can have only element nodes as children")}if(e.children)for(let l of e.children)f(l,e.type)};f(d.root),g=!0}catch(t){le.error("[isValidJSONState] invalid state found: ",t.message),g=!1}return g}scanLexicalNodeForNestedEditorAttribute(d){for(let g in d){let t=d[g];if(this.isLexicalEditorInstance(t))return g}return""}isOnlySelectionChanged(d,g){return d.size===0&&g.size===0}addUpdateTag(){let{isSameState:d,isSameSelection:g,fromNestedEditor:t=!1,updateTag:f=""}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return f?(le.log(`[addUpdateTag] explicit add of tag "${f}" `),void(0,ye.$addUpdateTag)(f)):t?(le.log(`[addUpdateTag] add "${Xr.historic}" tag - change invoked by nested editor`),void(0,ye.$addUpdateTag)(Xr.historic)):void(d?(le.log(`[addUpdateTag] add "${Xr.historic}" tag - state is same`),(0,ye.$addUpdateTag)(Xr.historic)):(le.log(`[addUpdateTag] add "${Xr.historyMerge}" tag - state is different`),(0,ye.$addUpdateTag)(Xr.historyMerge)))}enableEditorReadOnlyMode(){this.mainEditor&&this.mainEditor.isEditable()&&this.mainEditor.setEditable(!1)}disableEditorReadOnlyMode(){this.mainEditor&&(this.mainEditor.isEditable()||this.mainEditor.setEditable(!0))}}const lw=new sw,xe=lw;class cw{constructor(){this._nodesMap=new Map,this._pastedNodesCodoxIds=new Set}get size(){return this._nodesMap.size}add(d,g){this._nodesMap.set(d,g)}get(d){return this._nodesMap.get(d)||null}remove(d){this._nodesMap.delete(d)}has(d){return this._nodesMap.has(d)}nodesToArray(){return Array.from(this._nodesMap.values())}keysToArray(){return Array.from(this._nodesMap.keys())}toArray(){return Array.from(this._nodesMap.entries())}addPastedId(d){this._pastedNodesCodoxIds.add(d)}removePastedId(d){this._pastedNodesCodoxIds.delete(d)}hasPastedId(d){return this._pastedNodesCodoxIds.has(d)}clearPastedIds(){this._pastedNodesCodoxIds.size>0&&this._pastedNodesCodoxIds.clear()}isEmptyPastedIds(){return this._pastedNodesCodoxIds.size===0}getPastedIdsSize(){return this._pastedNodesCodoxIds.size}clearAll(){this._nodesMap.clear(),this._pastedNodesCodoxIds.clear()}gcAbandonedNodes(){let d=xe.getMainEditorState();if(!d._nodeMap)return;let g=this.nodesToArray();for(let t of g)d._nodeMap.has(t.__key)||this.remove(t.codoxId)}}const uw=new cw,Tn=uw;function v0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function _0(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?v0(Object(g),!0).forEach(function(t){dw(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):v0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function dw(y,d,g){return(d=fw(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function fw(y){var d=pw(y,"string");return typeof d=="symbol"?d:d+""}function pw(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const qf=()=>x_(),x0=y=>typeof y=="number";function Ss(y){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const g=function(){for(var t=arguments.length,f=new Array(t),r=0;r<t;r++)f[r]=arguments[r];return y.apply(this,f)};return Object.defineProperty(g,"name",{value:d,writable:!0}),g}const Sa=y=>y.__type==="root"||y.type==="root",w0=y=>Sa(y.getParent()),Fn=y=>y.__type===hu.text||y.type===hu.text||y.hasOwnProperty("__text")||y.hasOwnProperty("text"),Cs=y=>(0,ye.$isElementNode)(y),Es=y=>(0,En.$isTableNode)(y)||(0,En.$isTableRowNode)(y)||(0,En.$isTableCellNode)(y),hw=y=>!y.getChildren,S0=y=>!!y.getChildren,Cn=y=>(0,ye.$isDecoratorNode)(y),Fl=y=>(0,p_.$isLinkNode)(y),zl=y=>y.__type==="mark"||y.type==="mark",Jf=y=>(0,ye.$isLineBreakNode)(y),Fi=y=>Fn(y)||Jf(y),Wf=y=>y.__type===hu.horizontalrule||y.type===hu.horizontalrule,C0=y=>{if(Fi(y)||Fl(y)||zl(y))return!1;if(!y.__parent||y.__parent==="root"||(0,ye.$isParagraphNode)(y))return!0;let d=y.getParent().getChildren();return d.length===1&&d[0].__key===y.__key?!((Cn(y)||Fl(y)||zl(y))&&!Wf(y)):!d.some(g=>{let t=Wf(g);return g.__key!==y.__key&&(Fi(g)||Cn(g)&&!t||Fl(g)||zl(g))})},E0=y=>{const d=Tn.get(y.codoxId);return!d||y.__key===d.__key},ks=function(y){const d=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||qf();y.codoxId=d,Tn.add(d,y)},k0=y=>{Tn.remove(y.codoxId),delete y.codoxId},gw=y=>{if(!S0(y)||!y.getChildrenSize())return;const d=y.getChildren();if(d.some(f=>!!(0,ye.$isParagraphNode)(f)))return;let g=!1,t=[];for(let f of d)(Fi(f)||Cn(f)||Fl(f)||zl(f))&&!g&&(Wf(f)||(g=!0)),(S0(f)||Cn(f))&&t.push(f);for(let f of t)g||f.codoxId?g&&f.codoxId&&(f=f.getWritable(),k0(f)):(f=f.getWritable(),ks(f))},mw=y=>{const d=_0({},y);for(const g in y)y[g]===void 0&&y.hasOwnProperty(g)&&delete d[g];return d},yw=y=>{const d=`__nativeCreateDOM_${y.name}`;y.prototype[d]=Ss(y.prototype.createDOM,d),y.prototype.createDOM=function(g,t){if(C0(this))if(this.codoxId){if(!E0(this)){let r=Tn.get(this.codoxId);r.__type===this.__type&&this.isAttached()&&!r.isAttached()?(le.warn("[createDOM][Non-unique codoxId] overwrite abandoned existing node with latest: ",{latestNode:this,existingNode:r}),Tn.add(this.codoxId,this)):ks(this)}}else ks(this);else this.codoxId&&k0(this);Cn(this)&&!this.codoxDId&&(this.codoxDId=qf()),oi.manageNestedEditorInLexicalNode(this);let f=this[d](g,t);return f.__codox_track=!0,f}},bw=y=>{const d=`__nativeUpdateDOM_${y.name}`;return y.prototype[d]=Ss(y.prototype.updateDOM,d),y.prototype.updateDOM=function(){const g=this[d](...arguments);return gw(this),g},y},vw=y=>{const d=`__nativeRemove_${y.name}`;return y.prototype[d]=Ss(y.prototype.remove,d),y.prototype.remove=function(){const g=this.codoxId;return g&&Tn.remove(g),oi.gcNestedEditorListenerInLexicalNode(this),this[d](...arguments)},y},_w=y=>{const d=`__nativeExportJSON_${y.name}`;y.prototype[d]=Ss(y.prototype.exportJSON,d),y.prototype.exportJSON=function(){const g=this[d]();return this.codoxId&&(g.codoxId=this.codoxId),this.codoxDId&&(g.codoxDId=this.codoxDId),Fn(this)&&x0(g.format)&&this.hasFormat&&(g.format=P_(this)),mw(g)}},xw=y=>{const d="__nativeImportJSON";y[d]=Ss(y.importJSON,d),y.importJSON=function(g){const t=_0({},g);Fn(t)&&!x0(t.format)&&(t.format=N_(t.format));const f=y[d](t);oi.manageNestedEditorInLexicalNode(f);const r=C0(f);return r&&t.codoxId&&(Tn.hasPastedId(t.codoxId)&&Tn.has(t.codoxId)?(Tn.removePastedId(t.codoxId),ks(f)):ks(f,t.codoxId)),r&&!f.codoxId&&ks(f),t.codoxDId&&(f.codoxDId=t.codoxDId),f}},ww=y=>{const d="__nativeClone";y[d]=Ss(y.clone,d),y.clone=function(g){const t=y[d](g);return g.codoxId&&(t.codoxId=g.codoxId),g.codoxDId&&(t.codoxDId=g.codoxDId),oi.manageNestedEditorInClonedLexicalNode(g,t),t}},Sw=y=>{let d=!1,g=!1,t=!1,f=!1;y.forEach(n=>{n.name===ye.TextNode.name?d=!0:n.name===ye.ParagraphNode.name?g=!0:n.name===ye.LineBreakNode.name?t=!0:n.name===Qr.MarkNode.name&&(f=!0)});let r=[];return d||r.push(ye.TextNode),g||r.push(ye.ParagraphNode),t||r.push(ye.LineBreakNode),f||r.push(Qr.MarkNode),r.length?[...r,...y]:y},Cw=function(){return Sw(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(y=>(y.hasOwnProperty("__isCodoxExtended")||(yw(y),bw(y),_w(y),vw(y),xw(y),ww(y),Object.defineProperty(y,"__isCodoxExtended",{value:!0,writable:!1})),y))};var xu=rn(777),Os={};Os.styleTagTransform=ri(),Os.setAttributes=ei(),Os.insert=ti().bind(null,"head"),Os.domAPI=Xo(),Os.insertStyleElement=ni(),Qo()(xu.A,Os),xu.A&&xu.A.locals&&xu.A.locals;var Ew=y=>{var d={};return rn.d(d,y),d};const kw=Ew({AutoFocusPlugin:()=>Ug});var Ow=y=>{var d={};return rn.d(d,y),d};const Tw=Ow({ClearEditorPlugin:()=>Y1});var jw=y=>{var d={};return rn.d(d,y),d};const Aw=jw({LexicalComposer:()=>zg});var Nw=y=>{var d={};return rn.d(d,y),d};const O0=Nw({default:()=>Q1});var Pw=y=>{var d={};return rn.d(d,y),d};const Iw=Pw({HistoryPlugin:()=>rm});var Rw=y=>{var d={};return rn.d(d,y),d};const Mw=Rw({OnChangePlugin:()=>t_});var Dw=y=>{var d={};return rn.d(d,y),d};const Lw=Dw({PlainTextPlugin:()=>l_});var Bw=y=>{var d={};return rn.d(d,y),d};const T0=Bw({$isRootTextContentEmpty:()=>am,$rootTextContent:()=>im});var Fw=y=>{var d={};return rn.d(d,y),d};const Ts=Fw({createPortal:()=>Tb.createPortal}),zw=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Uw=zw?Gt.useLayoutEffect:Gt.useEffect,j0=Uw;var wu=rn(253),js={};js.styleTagTransform=ri(),js.setAttributes=ei(),js.insert=ti().bind(null,"head"),js.domAPI=Xo(),js.insertStyleElement=ni(),Qo()(wu.A,js),wu.A&&wu.A.locals&&wu.A.locals;function $w(y){let{onClose:d,children:g,title:t,closeOnClickOutside:f}=y;const r=(0,Gt.useRef)(null);return(0,Gt.useEffect)(()=>{r.current!==null&&r.current.focus()},[]),(0,Gt.useEffect)(()=>{let n=null;const e=l=>{l.key==="Escape"&&d()},s=l=>{const o=l.target;r.current!==null&&!r.current.contains(o)&&f&&d()},i=r.current;return i!==null&&(n=i.parentElement,n!==null&&n.addEventListener("click",s)),window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e),n!==null&&(n==null||n.removeEventListener("click",s))}},[f,d]),Gt.createElement("div",{className:"Modal__overlay",role:"dialog"},Gt.createElement("div",{className:"Modal__modal",tabIndex:-1,ref:r},Gt.createElement("h2",{className:"Modal__title"},t),Gt.createElement("button",{className:"Modal__closeButton","aria-label":"Close modal",type:"button",onClick:d},"X"),Gt.createElement("div",{className:"Modal__content"},g)))}function Hw(y){let{onClose:d,children:g,title:t,closeOnClickOutside:f=!1}=y;return(0,Ts.createPortal)(Gt.createElement($w,{onClose:d,title:t,closeOnClickOutside:f},g),document.body)}function A0(){const[y,d]=(0,Gt.useState)(null),g=(0,Gt.useCallback)(()=>{d(null)},[]),t=(0,Gt.useMemo)(()=>{if(y===null)return null;const{title:r,content:n,closeOnClickOutside:e}=y;return Gt.createElement(Hw,{onClose:g,title:r,closeOnClickOutside:e},n)},[y,g]),f=(0,Gt.useCallback)(function(r,n){d({closeOnClickOutside:arguments.length>2&&arguments[2]!==void 0&&arguments[2],content:n(g),title:r})},[g]);return[t,f]}var Su=rn(191),As={};As.styleTagTransform=ri(),As.setAttributes=ei(),As.insert=ti().bind(null,"head"),As.domAPI=Xo(),As.insertStyleElement=ni(),Qo()(Su.A,As),Su.A&&Su.A.locals&&Su.A.locals;const qw={blockCursor:"CommentEditorTheme__blockCursor",characterLimit:"CommentEditorTheme__characterLimit",code:"CommentEditorTheme__code",codeHighlight:{atrule:"CommentEditorTheme__tokenAttr",attr:"CommentEditorTheme__tokenAttr",boolean:"CommentEditorTheme__tokenProperty",builtin:"CommentEditorTheme__tokenSelector",cdata:"CommentEditorTheme__tokenComment",char:"CommentEditorTheme__tokenSelector",class:"CommentEditorTheme__tokenFunction","class-name":"CommentEditorTheme__tokenFunction",comment:"CommentEditorTheme__tokenComment",constant:"CommentEditorTheme__tokenProperty",deleted:"CommentEditorTheme__tokenProperty",doctype:"CommentEditorTheme__tokenComment",entity:"CommentEditorTheme__tokenOperator",function:"CommentEditorTheme__tokenFunction",important:"CommentEditorTheme__tokenVariable",inserted:"CommentEditorTheme__tokenSelector",keyword:"CommentEditorTheme__tokenAttr",namespace:"CommentEditorTheme__tokenVariable",number:"CommentEditorTheme__tokenProperty",operator:"CommentEditorTheme__tokenOperator",prolog:"CommentEditorTheme__tokenComment",property:"CommentEditorTheme__tokenProperty",punctuation:"CommentEditorTheme__tokenPunctuation",regex:"CommentEditorTheme__tokenVariable",selector:"CommentEditorTheme__tokenSelector",string:"CommentEditorTheme__tokenSelector",symbol:"CommentEditorTheme__tokenProperty",tag:"CommentEditorTheme__tokenProperty",url:"CommentEditorTheme__tokenOperator",variable:"CommentEditorTheme__tokenVariable"},embedBlock:{base:"CommentEditorTheme__embedBlock",focus:"CommentEditorTheme__embedBlockFocus"},hashtag:"CommentEditorTheme__hashtag",heading:{h1:"CommentEditorTheme__h1",h2:"CommentEditorTheme__h2",h3:"CommentEditorTheme__h3",h4:"CommentEditorTheme__h4",h5:"CommentEditorTheme__h5",h6:"CommentEditorTheme__h6"},image:"editor-image",indent:"CommentEditorTheme__indent",inlineImage:"inline-editor-image",layoutContainer:"CommentEditorTheme__layoutContainer",layoutItem:"CommentEditorTheme__layoutItem",link:"CommentEditorTheme__link",list:{checklist:"CommentEditorTheme__checklist",listitem:"CommentEditorTheme__listItem",listitemChecked:"CommentEditorTheme__listItemChecked",listitemUnchecked:"CommentEditorTheme__listItemUnchecked",nested:{listitem:"CommentEditorTheme__nestedListItem"},olDepth:["CommentEditorTheme__ol1","CommentEditorTheme__ol2","CommentEditorTheme__ol3","CommentEditorTheme__ol4","CommentEditorTheme__ol5"],ul:"CommentEditorTheme__ul"},ltr:"CommentEditorTheme__ltr",mark:"CommentEditorTheme__mark",markOverlap:"CommentEditorTheme__markOverlap",paragraph:"CommentEditorTheme__paragraph",quote:"CommentEditorTheme__quote",rtl:"CommentEditorTheme__rtl",table:"CommentEditorTheme__table",tableCell:"CommentEditorTheme__tableCell",tableCellActionButton:"CommentEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"CommentEditorTheme__tableCellActionButtonContainer",tableCellEditing:"CommentEditorTheme__tableCellEditing",tableCellHeader:"CommentEditorTheme__tableCellHeader",tableCellPrimarySelected:"CommentEditorTheme__tableCellPrimarySelected",tableCellResizer:"CommentEditorTheme__tableCellResizer",tableCellSelected:"CommentEditorTheme__tableCellSelected",tableCellSortedIndicator:"CommentEditorTheme__tableCellSortedIndicator",tableResizeRuler:"CommentEditorTheme__tableCellResizeRuler",tableSelected:"CommentEditorTheme__tableSelected",tableSelection:"CommentEditorTheme__tableSelection",text:{bold:"CommentEditorTheme__textBold",code:"CommentEditorTheme__textCode",italic:"CommentEditorTheme__textItalic",strikethrough:"CommentEditorTheme__textStrikethrough",subscript:"CommentEditorTheme__textSubscript",superscript:"CommentEditorTheme__textSuperscript",underline:"CommentEditorTheme__textUnderline",underlineStrikethrough:"CommentEditorTheme__textUnderlineStrikethrough"}},Jw=qw;var Cu=rn(72),Ns={};Ns.styleTagTransform=ri(),Ns.setAttributes=ei(),Ns.insert=ti().bind(null,"head"),Ns.domAPI=Xo(),Ns.insertStyleElement=ni(),Qo()(Cu.A,Ns),Cu.A&&Cu.A.locals&&Cu.A.locals;function Ww(){for(var y=arguments.length,d=new Array(y),g=0;g<y;g++)d[g]=arguments[g];return d.filter(Boolean).join(" ")}function Vf(){return Vf=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var g=arguments[d];for(var t in g)({}).hasOwnProperty.call(g,t)&&(y[t]=g[t])}return y},Vf.apply(null,arguments)}function zi(y){let{"data-test-id":d,children:g,className:t,onClick:f,disabled:r,small:n,title:e}=y;return Gt.createElement("button",Vf({disabled:r,className:Ww("Button__root",r&&"Button__disabled",n&&"Button__small",t),onClick:f,title:e,"aria-label":e},d&&{"data-test-id":d}),g)}var Eu=rn(129),Ps={};Ps.styleTagTransform=ri(),Ps.setAttributes=ei(),Ps.insert=ti().bind(null,"head"),Ps.domAPI=Xo(),Ps.insertStyleElement=ni(),Qo()(Eu.A,Ps),Eu.A&&Eu.A.locals&&Eu.A.locals;var Vw=y=>{var d={};return rn.d(d,y),d};const Kw=Vw({ContentEditable:()=>$g});function Gw(y){let{className:d}=y;return Gt.createElement(Kw.ContentEditable,{className:d||"ContentEditable__root"})}var ku=rn(457),Is={};Is.styleTagTransform=ri(),Is.setAttributes=ei(),Is.insert=ti().bind(null,"head"),Is.domAPI=Xo(),Is.insertStyleElement=ni(),Qo()(ku.A,Is),ku.A&&ku.A.locals&&ku.A.locals;function Yw(y){let{children:d,className:g}=y;return Gt.createElement("div",{className:g||"Placeholder__root"},d)}const Zw=O0.default.LexicalErrorBoundary||O0.default,Qw=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#050505",className:"codox-add-comment-right"},Gt.createElement("path",{d:"M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4.414A2 2 0 0 0 3 11.586l-2 2V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12.793a.5.5 0 0 0 .854.353l2.853-2.853A1 1 0 0 1 4.414 12H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"}),Gt.createElement("path",{d:"M3 3.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM3 6a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9A.5.5 0 0 1 3 6zm0 2.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5z"})),N0=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",className:"codox-remove-comment"},Gt.createElement("path",{d:"M6.5 1h3a.5.5 0 0 1 .5.5v1H6v-1a.5.5 0 0 1 .5-.5ZM11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3A1.5 1.5 0 0 0 5 1.5v1H2.506a.58.58 0 0 0-.01 0H1.5a.5.5 0 0 0 0 1h.538l.853 10.66A2 2 0 0 0 4.885 16h6.23a2 2 0 0 0 1.994-1.84l.853-10.66h.538a.5.5 0 0 0 0-1h-.995a.59.59 0 0 0-.01 0H11Zm1.958 1-.846 10.58a1 1 0 0 1-.997.92h-6.23a1 1 0 0 1-.997-.92L3.042 3.5h9.916Zm-7.487 1a.5.5 0 0 1 .528.47l.5 8.5a.5.5 0 0 1-.998.06L5 5.03a.5.5 0 0 1 .47-.53Zm5.058 0a.5.5 0 0 1 .47.53l-.5 8.5a.5.5 0 1 1-.998-.06l.5-8.5a.5.5 0 0 1 .528-.47ZM8 4.5a.5.5 0 0 1 .5.5v8.5a.5.5 0 0 1-1 0V5a.5.5 0 0 1 .5-.5Z"})),Xw=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"codox-add-comment"},Gt.createElement("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"})),tS=()=>Gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"#0000008c",className:"codox-hide-show-comments"},Gt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13 5.885v1.166a3.95 3.95 0 0 1-3.949 3.95H6.917a.748.748 0 0 0-.45.15l-1.345 1.007a.752.752 0 0 0-.032 1.181A2.933 2.933 0 0 0 6.95 14h2.716l2.534 1.901a.506.506 0 0 0 .524.047A.501.501 0 0 0 13 15.5V14h.051a2.949 2.949 0 0 0 2.95-2.949v-3.05a3.002 3.002 0 0 0-2.002-2.83.756.756 0 0 0-.999.714"}),Gt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.05 1H2.95A2.952 2.952 0 0 0 0 3.949v3.102A2.952 2.952 0 0 0 2.949 10H3v1.5a.502.502 0 0 0 .8.4L6.334 10H9.05A2.952 2.952 0 0 0 12 7.05V3.95A2.952 2.952 0 0 0 9.05 1"}));function P0(y,d,g){let t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:performance.now(),f=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return Sn.createNewCommentObj({content:y,author:d,codoxId:g,timeStamp:t,deleted:f})}function eS(y,d,g){return Sn.createNewThreadObj({quote:y,comments:d,codoxId:g})}function nS(y){let{anchorKey:d,editor:g,onAddComment:t}=y;const f=(0,Gt.useRef)(null),r=(0,Gt.useCallback)(()=>{const n=f.current,e=g.getRootElement(),s=g.getElementByKey(d);if(n!==null&&e!==null&&s!==null){const{right:i}=e.getBoundingClientRect(),{top:l}=s.getBoundingClientRect();n.style.left=i-20+"px",n.style.top=l-30+"px"}},[d,g]);return(0,Gt.useEffect)(()=>(window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[g,r]),j0(()=>{r()},[d,g,r]),Gt.createElement("div",{className:"CodoxCommentPlugin_AddCommentBox",ref:f},Gt.createElement("button",{className:"CodoxCommentPlugin_AddCommentBox_button",onClick:t},Gt.createElement(Qw,null)))}function rS(y){let{onEscape:d}=y;const[g]=(0,Li.useLexicalComposerContext)();return(0,Gt.useEffect)(()=>g.registerCommand(ye.KEY_ESCAPE_COMMAND,t=>d(t),2),[g,d]),null}function oS(y){let{editorRef:d}=y;const[g]=(0,Li.useLexicalComposerContext)();return typeof d=="function"?d(g):typeof d=="object"&&(d.current=g),null}function I0(y){let{className:d,autoFocus:g,onEscape:t,onChange:f,editorRef:r,placeholder:n="Type a comment...",onEditorClick:e=()=>{}}=y;const s={namespace:"Commenting",nodes:[],onError:i=>{throw i},theme:Jw};return Gt.createElement(Aw.LexicalComposer,{initialConfig:s},Gt.createElement("div",{className:"CodoxCommentPlugin_CommentInputBox_EditorContainer",onClick:e},Gt.createElement(Lw.PlainTextPlugin,{contentEditable:Gt.createElement(Gw,{className:d}),placeholder:Gt.createElement(Yw,null,n),ErrorBoundary:Zw}),Gt.createElement(Mw.OnChangePlugin,{onChange:f}),Gt.createElement(Iw.HistoryPlugin,null),g!==!1&&Gt.createElement(kw.AutoFocusPlugin,null),Gt.createElement(rS,{onEscape:t}),Gt.createElement(Tw.ClearEditorPlugin,null),r!==void 0&&Gt.createElement(oS,{editorRef:r})))}function R0(y,d){return(0,Gt.useCallback)((g,t)=>{g.read(()=>{y((0,T0.$rootTextContent)()),d(!(0,T0.$isRootTextContentEmpty)(t.isComposing(),!0))})},[d,y])}function iS(y){let{editor:d,cancelAddComment:g,submitAddComment:t}=y;const[f,r]=(0,Gt.useState)(""),[n,e]=(0,Gt.useState)(!1),s=(0,Gt.useRef)(null),i=(0,Gt.useMemo)(()=>({container:document.createElement("div"),elements:[]}),[]),l=(0,Gt.useRef)(null),o=L0(),a=(0,Gt.useCallback)(()=>{d.getEditorState().read(()=>{const u=(0,ye.$getSelection)();if((0,ye.$isRangeSelection)(u)){l.current=u.clone();const h=u.anchor,p=u.focus,m=(0,xa.createDOMRange)(d,h.getNode(),h.offset,p.getNode(),p.offset),b=s.current;if(m!==null&&b!==null){const{left:_,bottom:v,width:w}=m.getBoundingClientRect(),x=(0,xa.createRectsFromDOMRange)(d,m);let S=x.length===1?_+w/2-125:_-125;S<10&&(S=10),b.style.left=`${S}px`,b.style.top=`${v+20+(window.pageYOffset||document.documentElement.scrollTop)}px`;const E=x.length,{container:k}=i,D=i.elements,N=D.length;for(let O=0;O<E;O++){const R=x[O];let A=D[O];A===void 0&&(A=document.createElement("span"),D[O]=A,k.appendChild(A));const z="255, 212, 0",H=`position:absolute;top:${R.top+(window.pageYOffset||document.documentElement.scrollTop)}px;left:${R.left}px;height:${R.height}px;width:${R.width}px;background-color:rgba(${z}, 0.3);pointer-events:none;z-index:5;`;A.style.cssText=H}for(let O=N-1;O>=E;O--){const R=D[O];k.removeChild(R),D.pop()}}}})},[d,i]);j0(()=>{a();const u=i.container,h=document.body;if(h!==null)return h.appendChild(u),()=>{h.removeChild(u)}},[i.container,a]),(0,Gt.useEffect)(()=>(window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}),[a]);const c=R0(r,e);return Gt.createElement("div",{className:"CodoxCommentPlugin_CommentInputBox",ref:s},Gt.createElement(I0,{className:"CodoxCommentPlugin_CommentInputBox_Editor",onEscape:u=>(u.preventDefault(),g(),!0),onChange:c}),Gt.createElement("div",{className:"CodoxCommentPlugin_CommentInputBox_Buttons"},Gt.createElement(zi,{onClick:g,className:"CodoxCommentPlugin_CommentInputBox_Button"},"Cancel"),Gt.createElement(zi,{onClick:()=>{if(n){let u=d.getEditorState().read(()=>{const h=l.current;return h?h.getTextContent():""});u.length>100&&(u=u.slice(0,99)+"…"),t(eS(u,[P0(f,o)]),!0,void 0,l.current),l.current=null}},disabled:!n,className:"CodoxCommentPlugin_CommentInputBox_Button primary"},"Comment")))}function aS(y){let{submitAddComment:d,thread:g,placeholder:t}=y;const[f,r]=(0,Gt.useState)(""),[n,e]=(0,Gt.useState)(!1),s=(0,Gt.useRef)(null),i=L0(),l=R0(r,e);return Gt.createElement(Gt.Fragment,null,Gt.createElement(I0,{className:"CodoxCommentPlugin_CommentsPanel_Editor",autoFocus:!1,onEscape:()=>!0,onChange:l,editorRef:s,placeholder:t}),Gt.createElement(zi,{className:"CodoxCommentPlugin_CommentsPanel_SendButton",onClick:()=>{if(n){d(P0(f,i),!1,g);const o=s.current;o!==null&&o.dispatchCommand(ye.CLEAR_EDITOR_COMMAND,void 0)}},disabled:!n},Gt.createElement(Xw,null)))}function M0(y){let{commentOrThread:d,deleteCommentOrThread:g,onClose:t,thread:f}=y;return Gt.createElement(Gt.Fragment,null,"Are you sure you want to delete this ",d.type,"?",Gt.createElement("div",{className:"Modal__content"},Gt.createElement(zi,{onClick:()=>{g(d,f),t()}},"Delete")," ",Gt.createElement(zi,{onClick:()=>{t()}},"Cancel")))}function D0(y){let{comment:d,deleteComment:g,thread:t,rtf:f}=y;const r=Math.round((d.timeStamp-performance.now())/1e3),n=Math.round(r/60),[e,s]=A0();return Gt.createElement("li",{className:"CodoxCommentPlugin_CommentsPanel_List_Comment"},Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_List_Details"},Gt.createElement("span",{className:"CodoxCommentPlugin_CommentsPanel_List_Comment_Author"},d.author),Gt.createElement("span",{className:"CodoxCommentPlugin_CommentsPanel_List_Comment_Time"},"· ",r>-10?"Just now":f.format(n,"minute"))),Gt.createElement("p",{className:d.deleted?"CodoxCommentPlugin_CommentsPanel_DeletedComment":""},d.content),!d.deleted&&Gt.createElement(Gt.Fragment,null,Gt.createElement(zi,{onClick:()=>{s("Delete Comment",i=>Gt.createElement(M0,{commentOrThread:d,deleteCommentOrThread:g,thread:t,onClose:i}))},className:"CodoxCommentPlugin_CommentsPanel_List_DeleteButton"},Gt.createElement(N0,null)),e))}function sS(y){let{activeIDs:d,comments:g,deleteCommentOrThread:t,listRef:f,submitAddComment:r,markNodeMap:n}=y;const[e]=(0,Li.useLexicalComposerContext)(),[s,i]=(0,Gt.useState)(0),[l,o]=A0(),a=(0,Gt.useMemo)(()=>new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"short"}),[]);return(0,Gt.useEffect)(()=>{const c=setTimeout(()=>{i(s+1)},1e4);return()=>{clearTimeout(c)}},[s]),Gt.createElement("ul",{className:"CodoxCommentPlugin_CommentsPanel_List",ref:f},g.map(c=>{const u=c.codoxId;if(!u)return null;if(c.type==="thread"){const h=()=>{if(n.get(u)!==void 0&&(d===null||d.indexOf(u)===-1)){const p=document.activeElement;e.update(()=>{(0,ye.$setSelection)(null)},{onUpdate(){p!==null&&p.focus()}})}};return Gt.createElement("li",{key:u,onClick:h,className:`CodoxCommentPlugin_CommentsPanel_List_Thread ${n.has(u)?"interactive":""} ${d.indexOf(u)===-1?"":"active"}`},Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_QuoteBox"},Gt.createElement("blockquote",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_Quote"},"> ",Gt.createElement("span",null,c.quote)),Gt.createElement(zi,{onClick:()=>{o("Delete Thread",p=>Gt.createElement(M0,{commentOrThread:c,deleteCommentOrThread:t,onClose:p}))},className:"CodoxCommentPlugin_CommentsPanel_List_DeleteButton"},Gt.createElement(N0,null)),l),Gt.createElement("ul",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_Comments"},c.comments.map(p=>Gt.createElement(D0,{key:p.codoxId,comment:p,deleteComment:t,thread:c,rtf:a}))),Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_List_Thread_Editor"},Gt.createElement(aS,{submitAddComment:r,thread:c,placeholder:"Reply to comment..."})))}return Gt.createElement(D0,{key:u,comment:c,deleteComment:t,rtf:a})}))}function lS(y){let{activeIDs:d,deleteCommentOrThread:g,comments:t,submitAddComment:f,markNodeMap:r}=y;const n=(0,Gt.useRef)(null),e=t.length===0;return Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel"},Gt.createElement("h2",{className:"CodoxCommentPlugin_CommentsPanel_Heading"},"Comments"),e?Gt.createElement("div",{className:"CodoxCommentPlugin_CommentsPanel_Empty"},"No Comments"):Gt.createElement(sS,{activeIDs:d,comments:t,deleteCommentOrThread:g,listRef:n,submitAddComment:f,markNodeMap:r}))}function L0(){const y=(0,h0.useCollaborationContext)(),{yjsDocMap:d,name:g}=y;return g||"Playground User"}function cS(y){const[d]=(0,Li.useLexicalComposerContext)(),g=J_(),t=(0,Gt.useMemo)(()=>new Map,[]),[f,r]=(0,Gt.useState)(),[n,e]=(0,Gt.useState)([]),[s,i]=(0,Gt.useState)(!1),[l,o]=(0,Gt.useState)(!1);(0,Gt.useEffect)(()=>{!g.length&&l?o(!1):g.length},[g]);const a=(0,Gt.useCallback)(()=>{d.update(()=>{const h=(0,ye.$getSelection)();h!==null&&(h.dirty=!0)}),i(!1)},[d]),c=(0,Gt.useCallback)((h,p)=>{if(h.type==="comment"){if(le.log("[deleteCommentOrThread]: type comment new values",{comment:h,thread:p,markNodeMap:t}),Sn.removeComment(p.codoxId,h.codoxId),!p)return;const m=p.codoxId,b=t.get(m);d.update(()=>{b?b.forEach((_,v)=>{const w=(0,ye.$getNodeByKey)(v);le.log("[deleteCommentOrThread]: type comment new values",{lexicalNode:w}),w&&w.markDirty()}):(0,ye.$getRoot)().markDirty(),(0,ye.$addUpdateTag)(Xr.historic),(0,ye.$addUpdateTag)(Ll)})}else{le.log("[deleteCommentOrThread]: type thread new values",{comment:h,markNodeMap:t});const m=p!==void 0?p.codoxId:h.codoxId,b=t.get(m);setTimeout(()=>{d.update(()=>{if(b)for(const _ of b){const v=(0,ye.$getNodeByKey)(_);le.log("[deleteCommentOrThread]: type thread new values",{node:v}),(0,Qr.$isMarkNode)(v)&&(v.deleteID(m),v.getIDs().length===0&&(0,Qr.$unwrapMarkNode)(v))}else(0,ye.$getRoot)().markDirty(),le.debug("[deleteCommentOrThread][refreshComments]");Sn.refreshComments(!0),(0,ye.$addUpdateTag)(Ll)})})}},[d,t]),u=(0,Gt.useCallback)((h,p,m,b)=>{if(le.log("[submitAddComment]: new values",{commentOrThread:h,isInlineComment:p,thread:m,markNodeMap:t}),m?Sn.addComment(m.codoxId,h):Sn.addCommentThread(h),p)d.update(()=>{if((0,ye.$isRangeSelection)(b)){const _=b.isBackward(),v=h.codoxId;(0,Qr.$wrapSelectionInMarkNode)(b,_,v),(0,ye.$addUpdateTag)(Ll)}}),i(!1);else if(!p&&m){const _=m.codoxId,v=t.get(_);if(!v)return void Sn.removeComment(m.codoxId,h.codoxId);d.update(()=>{v.forEach((w,x)=>{let S=(0,ye.$getNodeByKey)(x);S&&S.markDirty()}),(0,ye.$addUpdateTag)(Xr.historic),(0,ye.$addUpdateTag)(Ll)})}},[d]);return(0,Gt.useEffect)(()=>{const h=[];for(let p=0;p<n.length;p++){const m=n[p],b=t.get(m);if(b!==void 0)for(const _ of b){const v=d.getElementByKey(_);v!==null&&(v.classList.add("selected"),h.push(v),o(!0))}}return()=>{for(let p=0;p<h.length;p++)h[p].classList.remove("selected")}},[n,d,t]),(0,Gt.useEffect)(()=>{const h=new Map;return(0,vs.mergeRegister)((0,vs.registerNestedElementResolver)(d,Qr.MarkNode,p=>(0,Qr.$createMarkNode)(p.getIDs()),(p,m)=>{p.getIDs().forEach(b=>{m.addID(b)})}),d.registerMutationListener(Qr.MarkNode,p=>{d.getEditorState().read(()=>{for(const[m,b]of p){const _=(0,ye.$getNodeByKey)(m);let v=[];b==="destroyed"?v=h.get(m)||[]:(0,Qr.$isMarkNode)(_)&&(v=_.getIDs());for(let w=0;w<v.length;w++){const x=v[w];let S=t.get(x);h.set(m,v),b==="destroyed"?S!==void 0&&(S.delete(m),S.size===0&&t.delete(x)):(S===void 0&&(S=new Set,t.set(x,S)),S.has(m)||S.add(m))}}})}),d.registerUpdateListener(p=>{let{editorState:m,tags:b}=p;m.read(()=>{const _=(0,ye.$getSelection)();let v=!1,w=!1;if((0,ye.$isRangeSelection)(_)){const x=_.anchor.getNode();if((0,ye.$isTextNode)(x)){const S=(0,Qr.$getMarkIDs)(x,_.anchor.offset);S!==null&&(e(S),v=!0),_.isCollapsed()||(r(x.getKey()),w=!0)}}v||e(x=>x.length===0?x:[]),w||r(null),(0,ye.$isRangeSelection)(_)&&i(!1)})}),d.registerCommand(Lf,()=>{const p=window.getSelection();return p!==null&&p.removeAllRanges(),i(!0),!0},ye.COMMAND_PRIORITY_EDITOR))},[d,t]),Gt.createElement(Gt.Fragment,null,s&&(0,Ts.createPortal)(Gt.createElement(iS,{editor:d,cancelAddComment:a,submitAddComment:u}),document.body),f!=null&&!s&&(0,Ts.createPortal)(Gt.createElement(nS,{anchorKey:f,editor:d,onAddComment:()=>{d.dispatchCommand(Lf,void 0)}}),document.body),(0,Ts.createPortal)(Gt.createElement(zi,{className:"CodoxCommentPlugin_ShowCommentsButton "+(l?"active":""),onClick:()=>o(!l),title:l?"Hide Comments":"Show Comments"},Gt.createElement(tS,null)),document.body),l&&(0,Ts.createPortal)(Gt.createElement(lS,{comments:g,submitAddComment:u,deleteCommentOrThread:c,activeIDs:n,markNodeMap:t}),document.body))}var Ou=rn(766),Rs={};Rs.styleTagTransform=ri(),Rs.setAttributes=ei(),Rs.insert=ti().bind(null,"head"),Rs.domAPI=Xo(),Rs.insertStyleElement=ni(),Qo()(Ou.A,Rs),Ou.A&&Ou.A.locals&&Ou.A.locals;var Tu=rn(225),Ms={};Ms.styleTagTransform=ri(),Ms.setAttributes=ei(),Ms.insert=ti().bind(null,"head"),Ms.domAPI=Xo(),Ms.insertStyleElement=ni(),Qo()(Tu.A,Ms),Tu.A&&Tu.A.locals&&Tu.A.locals;function uS(y){let{label:d,value:g,onChange:t,placeholder:f="","data-test-id":r,type:n="text"}=y;return Gt.createElement("div",{className:"CodoxInput__wrapper"},Gt.createElement("label",{className:"CodoxInput__label"},d),Gt.createElement("input",{type:n,className:"CodoxInput__input",placeholder:f,value:g,onChange:e=>{t(e.target.value)},"data-test-id":r}))}function B0(y,d){var g=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(f){return Object.getOwnPropertyDescriptor(y,f).enumerable})),g.push.apply(g,t)}return g}function ju(y){for(var d=1;d<arguments.length;d++){var g=arguments[d]!=null?arguments[d]:{};d%2?B0(Object(g),!0).forEach(function(t){dS(y,t,g[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(g)):B0(Object(g)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(g,t))})}return y}function dS(y,d,g){return(d=fS(d))in y?Object.defineProperty(y,d,{value:g,enumerable:!0,configurable:!0,writable:!0}):y[d]=g,y}function fS(y){var d=pS(y,"string");return typeof d=="symbol"?d:d+""}function pS(y,d){if(typeof y!="object"||!y)return y;var g=y[Symbol.toPrimitive];if(g!==void 0){var t=g.call(y,d||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}let Ul=!1;const hS=["#d0021b","#f5a623","#f8e71c","#8b572a","#7ed321","#417505","#bd10e0","#9013fe","#4a90e2","#50e3c2","#b8e986","#000000","#4a4a4a","#9b9b9b","#ffffff"],$l=214,F0=150;function gS(y){let{color:d,onChange:g}=y;const[t,f]=(0,Gt.useState)(Ds("hex",d)),[r,n]=(0,Gt.useState)(d),e=(0,Gt.useRef)(null),s=(0,Gt.useMemo)(()=>({x:t.hsv.s/100*$l,y:(100-t.hsv.v)/100*F0}),[t.hsv.s,t.hsv.v]),i=(0,Gt.useMemo)(()=>({x:t.hsv.h/360*$l}),[t.hsv]);return(0,Gt.useEffect)(()=>{e.current!==null&&g&&n(t.hex)},[t,g]),(0,Gt.useEffect)(()=>{if(d===void 0)return;const l=Ds("hex",d);f(l),n(l.hex)},[d]),Gt.createElement("div",{className:"codox-color-picker-wrapper",style:{width:$l},ref:e},Gt.createElement(uS,{label:"Hex",onChange:l=>{if(n(l),/^#[0-9A-Fa-f]{6}$/i.test(l)){const o=Ds("hex",l);f(o)}},value:r}),Gt.createElement("div",{className:"codox-color-picker-basic-color"},hS.map(l=>Gt.createElement("button",{className:l===t.hex?" active":"",key:l,style:{backgroundColor:l},onClick:()=>(o=>{n(o);let a=Ds("hex",o);f(a),g(a.hex,Ul)})(l)}))),Gt.createElement(z0,{className:"codox-color-picker-saturation",style:{backgroundColor:`hsl(${t.hsv.h}, 100%, 50%)`},onChange:l=>{let{x:o,y:a}=l;const c=Ds("hsv",ju(ju({},t.hsv),{},{s:o/$l*100,v:100-a/F0*100}));f(c),n(c.hex),g(c.hex,Ul)}},Gt.createElement("div",{className:"codox-color-picker-saturation_cursor",style:{backgroundColor:t.hex,left:s.x,top:s.y}})),Gt.createElement(z0,{className:"codox-color-picker-hue",onChange:l=>{let{x:o}=l;const a=Ds("hsv",ju(ju({},t.hsv),{},{h:o/$l*360}));f(a),n(a.hex),g(a.hex,Ul)}},Gt.createElement("div",{className:"codox-color-picker-hue_cursor",style:{backgroundColor:`hsl(${t.hsv.h}, 100%, 50%)`,left:i.x}})),Gt.createElement("div",{className:"codox-color-picker-color",style:{backgroundColor:t.hex}}))}function z0(y){let{className:d,style:g,onChange:t,children:f}=y;const r=(0,Gt.useRef)(null),n=(0,Gt.useRef)(!1),e=s=>{if(r.current){const{current:i}=r,{width:l,height:o,left:a,top:c}=i.getBoundingClientRect(),u=U0(s.clientX-a,l,0),h=U0(s.clientY-c,o,0);t({x:u,y:h})}};return Gt.createElement("div",{ref:r,className:d,style:g,onMouseDown:s=>{if(s.button!==0)return;e(s);const i=o=>{n.current=!0,Ul=!0,e(o)},l=o=>{n.current&&(Ul=!1),document.removeEventListener("mousemove",i,!1),document.removeEventListener("mouseup",l,!1),e(o),n.current=!1};document.addEventListener("mousemove",i,!1),document.addEventListener("mouseup",l,!1)}},f)}function U0(y,d,g){return y>d?d:y<g?g:y}function $0(y){if(!y.startsWith("#")){const d=document.createElement("canvas").getContext("2d");if(!d)throw new Error("2d context not supported or canvas already initialized");return d.fillStyle=y,d.fillStyle}return y.length===4||y.length===5?y=y.split("").map((d,g)=>g?d+d:"#").join(""):y.length===7||y.length===9?y:"#000000"}function H0(y){const d=(y.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(g,t,f,r)=>"#"+t+t+f+f+r+r).substring(1).match(/.{2}/g)||[]).map(g=>parseInt(g,16));return{b:d[2],g:d[1],r:d[0]}}function Kf(y){let{r:d,g,b:t}=y;d/=255,g/=255,t/=255;const f=Math.max(d,g,t),r=f-Math.min(d,g,t);return{h:r?60*(f===d?(g-t)/r+(g<t?6:0):f===g?2+(t-d)/r:4+(d-g)/r):0,s:f?r/f*100:0,v:100*f}}function mS(y){let{h:d,s:g,v:t}=y;g/=100,t/=100;const f=~~(d/60),r=d/60-f,n=t*(1-g),e=t*(1-g*r),s=t*(1-g*(1-r)),i=f%6,l=Math.round(255*[t,e,n,n,s,t][i]),o=Math.round(255*[s,t,t,e,n,n][i]);return{b:Math.round(255*[n,n,s,t,t,e][i]),g:o,r:l}}function q0(y){let{b:d,g,r:t}=y;return"#"+[t,g,d].map(f=>f.toString(16).padStart(2,"0")).join("")}function Ds(y,d){let g=$0("#121212"),t=H0(g),f=Kf(t);return y==="hex"?(g=$0(d),t=H0(g),f=Kf(t)):y==="rgb"?(t=d,g=q0(t),f=Kf(t)):y==="hsv"&&(f=d,t=mS(f),g=q0(t)),{hex:g,hsv:f,rgb:t}}const yS=Gt.createContext(null),J0=4;function bS(y){let{children:d,dropDownRef:g,onClose:t,dropdownClassName:f}=y;const[r,n]=(0,Gt.useState)(),[e,s]=(0,Gt.useState)(),i=(0,Gt.useCallback)(o=>{n(a=>a?[...a,o]:[o])},[n]),l=(0,Gt.useMemo)(()=>({registerItem:i}),[i]);return(0,Gt.useEffect)(()=>{r&&!e&&s(r[0]),e&&e.current&&e.current.focus()},[r,e]),Gt.createElement(yS.Provider,{value:l},Gt.createElement("div",{className:f,ref:g,onKeyDown:o=>{if(!r)return;const a=o.key;["Escape","ArrowUp","ArrowDown","Tab"].includes(a)&&o.preventDefault(),a==="Escape"||a==="Tab"?t():a==="ArrowUp"?s(c=>{if(!c)return r[0];const u=r.indexOf(c)-1;return r[u===-1?r.length-1:u]}):a==="ArrowDown"&&s(c=>c?r[r.indexOf(c)+1]:r[0])}},d))}function vS(y){let{disabled:d=!1,buttonLabel:g,buttonAriaLabel:t,buttonClassName:f,buttonIconClassName:r,children:n,stopCloseOnClickSelf:e,dropdownClassName:s,buttonLabelClassName:i,dropdownChevronClassName:l}=y;const o=(0,Gt.useRef)(null),a=(0,Gt.useRef)(null),[c,u]=(0,Gt.useState)(!1);return(0,Gt.useEffect)(()=>{const h=a.current,p=o.current;if(c&&h!==null&&p!==null){const{top:m,left:b}=h.getBoundingClientRect();p.style.top=`${m+h.offsetHeight+J0}px`,p.style.left=`${Math.min(b,window.innerWidth-p.offsetWidth-20)}px`}},[o,a,c]),(0,Gt.useEffect)(()=>{const h=a.current;if(h!==null&&c){const p=m=>{const b=m.target;e&&o.current&&o.current.contains(b)||h.contains(b)||u(!1)};return document.addEventListener("click",p),()=>{document.removeEventListener("click",p)}}},[o,a,c,e]),(0,Gt.useEffect)(()=>{const h=()=>{if(c){const p=a.current,m=o.current;if(p!==null&&m!==null){const{top:b}=p.getBoundingClientRect(),_=b+p.offsetHeight+J0;_!==m.getBoundingClientRect().top&&(m.style.top=`${_}px`)}}};return document.addEventListener("scroll",h),()=>{document.removeEventListener("scroll",h)}},[a,o,c]),Gt.createElement(Gt.Fragment,null,Gt.createElement("button",{type:"button",disabled:d,"aria-label":t||g,className:f,onClick:()=>u(!c),ref:a},r&&Gt.createElement("span",{className:r}),g&&Gt.createElement("span",{className:i},g),Gt.createElement("i",{className:l})),c&&(0,Ts.createPortal)(Gt.createElement(bS,{dropDownRef:o,onClose:()=>{u(!1),a&&a.current&&a.current.focus()},dropdownClassName:s},n),document.body))}const _S=["disabled","stopCloseOnClickSelf","color","onChange"];function Gf(){return Gf=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var g=arguments[d];for(var t in g)({}).hasOwnProperty.call(g,t)&&(y[t]=g[t])}return y},Gf.apply(null,arguments)}function xS(y,d){if(y==null)return{};var g,t,f=wS(y,d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(y);for(t=0;t<r.length;t++)g=r[t],d.indexOf(g)>=0||{}.propertyIsEnumerable.call(y,g)&&(f[g]=y[g])}return f}function wS(y,d){if(y==null)return{};var g={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)>=0)continue;g[t]=y[t]}return g}function W0(y){let{disabled:d=!1,stopCloseOnClickSelf:g=!0,color:t,onChange:f}=y,r=xS(y,_S);return Gt.createElement(vS,Gf({},r,{disabled:d,stopCloseOnClickSelf:g}),Gt.createElement(gS,{color:t,onChange:f}))}const SS=y=>{let{onColorChange:d,buttonClassName:g,buttonIconClassName:t,buttonAriaLabel:f,buttonLabel:r,dropdownClassName:n,buttonLabelClassName:e,dropdownChevronClassName:s}=y;const[i]=(0,Li.useLexicalComposerContext)(),[l,o]=(0,Gt.useState)(()=>i.isEditable()),[a,c]=(0,Gt.useState)("");(0,Gt.useEffect)(()=>(0,vs.mergeRegister)(i.registerEditableListener(h=>{o(h)}),i.registerUpdateListener(h=>{let{editorState:p}=h;p.read(()=>{const m=(0,ye.$getSelection)();if((0,ye.$isRangeSelection)(m)){let b=(0,xa.$getSelectionStyleValueForProperty)(m,"color");b!==a&&(c(b||""),d(b))}})})),[i]);const u=(0,Gt.useCallback)((h,p)=>{i.update(()=>{const m=(0,ye.$getSelection)();m!==null&&(0,xa.$patchStyleText)(m,{color:h})})},[i]);return Gt.createElement(W0,{disabled:!l,color:a,onChange:u,buttonClassName:g||"",buttonIconClassName:t||"",buttonAriaLabel:f||"",buttonLabel:r||"",dropdownClassName:n||"",buttonLabelClassName:e||"",dropdownChevronClassName:s||""})},CS=SS,ES=y=>{let{onColorChange:d,buttonClassName:g,buttonIconClassName:t,buttonAriaLabel:f,buttonLabel:r,dropdownClassName:n,buttonLabelClassName:e,dropdownChevronClassName:s}=y;const[i]=(0,Li.useLexicalComposerContext)(),[l,o]=(0,Gt.useState)(()=>i.isEditable()),[a,c]=(0,Gt.useState)("#fff");(0,Gt.useEffect)(()=>(0,vs.mergeRegister)(i.registerEditableListener(h=>{o(h)}),i.registerUpdateListener(h=>{let{editorState:p}=h;p.read(()=>{const m=(0,ye.$getSelection)();if((0,ye.$isRangeSelection)(m)){let b=(0,xa.$getSelectionStyleValueForProperty)(m,"background-color");b!==a&&(c(b||""),d(b))}})})),[i]);const u=(0,Gt.useCallback)((h,p)=>{i.update(()=>{const m=(0,ye.$getSelection)();m!==null&&(0,xa.$patchStyleText)(m,{"background-color":h})})},[i]);return Gt.createElement(W0,{disabled:!l,color:a,onChange:u,buttonClassName:g||"",buttonIconClassName:t||"",buttonAriaLabel:f||"",buttonLabel:r||"",dropdownClassName:n||"",buttonLabelClassName:e||"",dropdownChevronClassName:s||""})},kS=ES;var OS=Ii.yy;Ii._U,Ii.a8,Ii.Vs,Ii.Cn;var TS=Ii.gK,jS=Ii.vv;function AS(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Au=AS(function(y){const d=new URLSearchParams;d.append("code",y);for(let g=1;g<arguments.length;g++)d.append("v",arguments[g]);throw Error(`Minified Lexical error #${y}; 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 NS({hasCellMerge:y=!0,hasCellBackgroundColor:d=!0,hasTabHandler:g=!0}){const[t]=Tr();return Be.useEffect(()=>(t.hasNodes([To,Oo,ba])||Au(10),ko(t.registerCommand(M1,({columns:f,rows:r,includeHeaders:n})=>{const e=Om(Number(r),Number(f),n);Xg(e);const s=e.getFirstDescendant();return Pe(s)&&s.select(),!0},an),t.registerNodeTransform(To,f=>{const[r]=Tm(f,null,null),n=r.reduce((e,s)=>Math.max(e,s.length),0);for(let e=0;e<r.length;++e){const s=r[e].length;if(s===n)continue;const i=r[e][s-1].cell;for(let l=s;l<n;++l){const o=hs(0);o.append(Qn()),i!==null?i.insertAfter(o):tm(i,o)}}}))),[t]),Be.useEffect(()=>{const f=new Map,r=e=>{const s=e.getKey(),i=t.getElementByKey(s);if(i&&!f.has(s)){const l=q1(e,i,t,g);f.set(s,l)}};t.getEditorState().read(()=>{const e=$h(To);for(const s of e)Jn(s)&&r(s)});const n=t.registerMutationListener(To,e=>{for(const[s,i]of e)if(i==="created")t.getEditorState().read(()=>{const l=Hn(s);Jn(l)&&r(l)});else if(i==="destroyed"){const l=f.get(s);l!==void 0&&(l.removeListeners(),f.delete(s))}});return()=>{n();for(const[,e]of f)e.removeListeners()}},[t,g]),Be.useEffect(()=>{if(!y)return t.registerNodeTransform(Oo,f=>{if(f.getColSpan()>1||f.getRowSpan()>1){const[,,r]=ms(f),[n]=gs(r,f,f),e=n.length,s=n[0].length;let i=r.getFirstChild();Mr(i)||Au(175);const l=[];for(let o=0;o<e;o++){o!==0&&(i=i.getNextSibling(),Mr(i)||Au(175));let a=null;for(let c=0;c<s;c++){const u=n[o][c],h=u.cell;if(u.startRow===o&&u.startColumn===c)a=h,l.push(h);else if(h.getColSpan()>1||h.getRowSpan()>1){on(h)||Au(176);const p=hs(h.__headerState);a!==null?a.insertAfter(p):tm(i,p)}}}for(const o of l)o.setColSpan(1),o.setRowSpan(1)}})},[t,y]),Be.useEffect(()=>{if(!d)return t.registerNodeTransform(Oo,f=>{f.getBackgroundColor()!==null&&f.setBackgroundColor(null)})},[t,d,y]),null}const PS={code:"editor-code",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5"},image:"editor-image",link:"editor-link",list:{listitem:"editor-listitem",nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul"},ltr:"ltr",paragraph:"editor-paragraph",placeholder:"editor-placeholder",quote:"editor-quote",rtl:"rtl",text:{bold:"editor-text-bold",code:"editor-text-code",hashtag:"editor-text-hashtag",italic:"editor-text-italic",overflowed:"editor-text-overflowed",strikethrough:"editor-text-strikethrough",underline:"editor-text-underline",underlineStrikethrough:"editor-text-underlineStrikethrough"},table:"PlaygroundEditorTheme__table",tableAddColumns:"PlaygroundEditorTheme__tableAddColumns",tableAddRows:"PlaygroundEditorTheme__tableAddRows",tableCell:"PlaygroundEditorTheme__tableCell",tableCellActionButton:"PlaygroundEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"PlaygroundEditorTheme__tableCellActionButtonContainer",tableCellEditing:"PlaygroundEditorTheme__tableCellEditing",tableCellHeader:"PlaygroundEditorTheme__tableCellHeader",tableCellPrimarySelected:"PlaygroundEditorTheme__tableCellPrimarySelected",tableCellResizer:"PlaygroundEditorTheme__tableCellResizer",tableCellSelected:"PlaygroundEditorTheme__tableCellSelected",tableCellSortedIndicator:"PlaygroundEditorTheme__tableCellSortedIndicator",tableResizeRuler:"PlaygroundEditorTheme__tableCellResizeRuler",tableSelected:"PlaygroundEditorTheme__tableSelected",tableSelection:"PlaygroundEditorTheme__tableSelection"},IS="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDE1IDE1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYuMDAwMDEgOC4zMzMzM0wxLjkwMDAxIDEzLjhMMS4xMDAwMSAxMy4yTDUuMzc1MDEgNy41TDEuMTAwMDEgMS44TDEuOTAwMDEgMS4yTDYuMDAwMDEgNi42NjY2N0wxMC4xIDEuMkwxMC45IDEuOEw2LjYyNTAxIDcuNUwxMC45IDEzLjJMMTAuMSAxMy44TDYuMDAwMDEgOC4zMzMzM1pNMTIgMTIuNUMxMiAxMS42NzE2IDEyLjY3MTYgMTEgMTMuNSAxMUgxMy43OTI5QzE0LjQ1OTYgMTEgMTUgMTEuNTQwNCAxNSAxMi4yMDcxQzE1IDEyLjUyNzMgMTQuODcyOCAxMi44MzQzIDE0LjY0NjUgMTMuMDYwN0wxMy43MDcxIDE0SDE1VjE1SDEyLjVDMTIuMjk3OCAxNSAxMi4xMTU1IDE0Ljg3ODIgMTIuMDM4MSAxNC42OTEzQzExLjk2MDcgMTQuNTA0NSAxMi4wMDM1IDE0LjI4OTQgMTIuMTQ2NSAxNC4xNDY0TDEzLjkzOTMgMTIuMzUzNkMxMy45NzgyIDEyLjMxNDcgMTQgMTIuMjYyIDE0IDEyLjIwNzFDMTQgMTIuMDkyNyAxMy45MDczIDEyIDEzLjc5MjkgMTJIMTMuNUMxMy4yMjM5IDEyIDEzIDEyLjIyMzkgMTMgMTIuNUgxMloiIGZpbGw9IiMwMDAwMDAiLz4KPC9zdmc+",RS="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiBpbWFnZS1yZW5kZXJpbmc9Im9wdGltaXplUXVhbGl0eSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIHZpZXdCb3g9IjAgMCA1MDQgNTEyLjM2Ij48cGF0aCBmaWxsLXJ1bGU9Im5vbnplcm8iIGQ9Ik00OTkuNDMgMjMxLjM2SDM2OC40Yy0yLjUzIDAtNC41OC0yLjA1LTQuNTgtNC41N3YtOC4xMWMwLTEuMjYuNTItMi40IDEuMzQtMy4yMmw3MS41Ny04Mi41M2M2LjczLTcuNzUgMTIuNTctMTQuOTcgMTcuNDgtMjEuNjggNC44OC02LjY0IDguODMtMTIuNzQgMTEuODUtMTguMjggMi45Ny01LjQzIDUuMTgtMTAuNjEgNi42NC0xNS41NSAxLjQyLTQuODUgMi4xMy05LjUzIDIuMTMtMTQgMC0xNC42OC0zLjk4LTI2LjA1LTExLjkyLTM0LjA5LTMuOTItMy45Ni04Ljc1LTYuOTMtMTQuNDktOC45Mi01Ljk1LTIuMDMtMTIuOTEtMy4wNS0yMC44Ny0zLjA1LTguNDUgMC0xNS44OCAxLjIxLTIyLjI5IDMuNjItNi4yNyAyLjM2LTExLjYzIDUuOTItMTYuMDcgMTAuNjNhNDcuODg0IDQ3Ljg4NCAwIDAgMC0xMC4xNCAxNi42Yy0yLjI3IDYuMjktMy40MSAxMy4zOS0zLjQxIDIxLjI2IDAgMi41Mi0yLjA1IDQuNTctNC41NyA0LjU3aC02Ljg5Yy0yLjA1IDAtMy44LTEuMzYtNC4zNy0zLjI0bC0uMjctLjgyYy0uMTgtLjU2LS4yNS0xLjEzLS4yMi0xLjY3LS4yMy05LjMyIDEuMTQtMTcuOTkgNC4xMi0yNS45NyAzLjAyLTguMTMgNy42OC0xNS41NCAxMy45NC0yMi4xOSA2LjI2LTYuNyAxMy42My0xMS43NiAyMi4xLTE1LjEzQzQwNy44NCAxLjY4IDQxNy4yIDAgNDI3LjU1IDBjOS41OSAwIDE4LjI2IDEuMzggMjYuMDMgNC4xMyA3Ljg2IDIuNzkgMTQuNzcgNyAyMC43MiAxMi42MSA2LjAyIDUuNjMgMTAuNTUgMTIuNCAxMy41NSAyMC4yOCAyLjk2IDcuNzUgNC40NSAxNi41NiA0LjQ1IDI2LjQgMCA2LjUtMS4wNyAxMy4wOC0zLjE3IDE5LjY5bC0uMTQuMzhjLTIuMDkgNi40Ni01LjE3IDEyLjk3LTkuMiAxOS40OWwtLjE0LjIxYy00LjA4IDYuNTEtOC45IDEzLjQzLTE0LjQzIDIwLjc0LTUuNTYgNy4zMy0xMS45NiAxNS4yMy0xOS4yMiAyMy42N2wtNTYuOTEgNjYuNTFoMTEwLjM0YzIuNTIgMCA0LjU3IDIuMDUgNC41NyA0LjU3djguMTFjMCAyLjUyLTIuMDUgNC41Ny00LjU3IDQuNTd6bS0zMjcuMjUgNjguNzUgMTM3Ljk2LTE2Ny43NmMuODktMS4wNyAyLjMtMS42NSAzLjc0LTEuNjVsMjAuMTMtLjAyYzIuNTIgMCA0LjU3IDEuNzQgNC41NyAzLjg4IDAgLjkxLS4zNyAxLjc1LS45OCAyLjQxTDE4OC4zMiAzMTcuNjYgMzQ0LjEgNTA2LjI0YzEuNDUgMS43NS45NSA0LjE3LTEuMSA1LjQtLjguNDgtMS43Mi43MS0yLjYzLjcxbC0yMC4xMy4wMWMtMS43IDAtMy4xOC0uNzktMy45Ny0xLjk2bC0xNDQuMS0xNzUuMkwyOC4yMyA1MTAuNjljLS44OCAxLjA3LTIuMyAxLjY0LTMuNzMgMS42NWwtMTkuOTMuMDJjLTIuNTIgMC00LjU3LTEuNzQtNC41Ny0zLjg5IDAtLjkuMzctMS43NC45OC0yLjRsMTU1LjY1LTE4OC40TDYuOSAxMzYuOGMtMS40NS0xLjc1LS45NS00LjE4IDEuMTEtNS40MS43OS0uNDcgMS43MS0uNyAyLjYyLS43bDIwLjQ0LS4wMWMxLjYzIDAgMy4wNi43MiAzLjg3IDEuODFsMTM3LjI0IDE2Ny42MnoiLz48L3N2Zz4=",MS="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik00IDEySDIwTTEyIDRWMjAiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4NCjwvc3ZnPg==",DS="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik02IDEyTDE4IDEyIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+DQo8L3N2Zz4=",Ca=8,Ea=72,LS=15;function BS({selectionFontSize:y,disabled:d,editor:g}){const[t,f]=Yn.useState(y),[r,n]=Yn.useState(!1);Yn.useState(!1);const e=(c,u)=>{if(!u)return c;let h=c;switch(u){case 2:switch(!0){case c>Ea:h=Ea;break;case c>=48:h-=12;break;case c>=24:h-=4;break;case c>=14:h-=2;break;case c>=9:h-=1;break;default:h=Ca;break}break;case 1:switch(!0){case c<Ca:h=Ca;break;case c<12:h+=1;break;case c<20:h+=2;break;case c<36:h+=4;break;case c<=60:h+=12;break;default:h=Ea;break}break}return h},s=Yn.useCallback((c,u)=>{const h=p=>(p||(p=`${LS}px`),p=p.slice(0,-2),`${e(Number(p),u)}px`);g.update(()=>{if(g.isEditable()){const p=je();p!==null&&Kg(p,{"font-size":c||h})}})},[g]),i=c=>{const u=Number(t);if(c.key!=="Tab"){if(["e","E","+","-"].includes(c.key)||isNaN(u)){c.preventDefault(),f("");return}n(!0),(c.key==="Enter"||c.key==="Escape")&&(c.preventDefault(),a(u))}},l=()=>{if(t!==""&&r){const c=Number(t);a(c)}},o=c=>{if(t!==""){const u=e(Number(t),c);s(String(u)+"px",null)}else s(null,c)},a=c=>{let u=c;c>Ea?u=Ea:c<Ca&&(u=Ca),f(String(u)),s(String(u)+"px",null),n(!1)};return Yn.useEffect(()=>{f(y)},[y]),Se.jsxs(Se.Fragment,{children:[Se.jsx("button",{type:"button",disabled:d||y!==""&&Number(t)<=Ca,onClick:()=>o(2),className:"toolbar-item font-decrement",children:Se.jsx("img",{src:DS,height:16,width:16,style:{marginTop:"5px"}})}),Se.jsx("input",{type:"number",value:t,disabled:d,className:"toolbar-item font-size-input",min:Ca,max:Ea,onChange:c=>f(c.target.value),onKeyDown:i,onBlur:l}),Se.jsx("button",{type:"button",disabled:d||y!==""&&Number(t)>=Ea,onClick:()=>o(1),className:"toolbar-item font-increment",children:Se.jsx("img",{src:MS,height:16,width:16,style:{marginTop:"5px"}})}),Se.jsx("div",{children:Se.jsx("div",{className:"symbol-dropdown",children:Se.jsxs("select",{name:"cars",id:"cars",children:[Se.jsx("option",{value:"Heading 1",children:"Heading 1"}),Se.jsx("option",{value:"Heading 2",children:"Heading 2"}),Se.jsx("option",{value:"Heading 3",children:"heading 3"})]})})})]})}const FS="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iY3VycmVudENvbG9yIiBjbGFzcz0iYmkgYmktdGFibGUiPjxwYXRoIGQ9Ik0wIDJhMiAyIDAgMCAxIDItMmgxMmEyIDIgMCAwIDEgMiAydjEyYTIgMiAwIDAgMS0yIDJIMmEyIDIgMCAwIDEtMi0yVjJ6bTE1IDJoLTR2M2g0VjR6bTAgNGgtNHYzaDRWOHptMCA0aC00djNoM2ExIDEgMCAwIDAgMS0xdi0yem0tNSAzdi0zSDZ2M2g0em0tNSAwdi0zSDF2MmExIDEgMCAwIDAgMSAxaDN6bS00LTRoNFY4SDF2M3ptMC00aDRWNEgxdjN6bTUtM3YzaDRWNEg2em00IDRINnYzaDRWOHoiLz48L3N2Zz4=";function zS(){const[y,d]=Be.useState(""),[g,t]=Be.useState(""),[f,r]=Be.useState(!1),[n]=Tr(),e=()=>{!y||!g||(n.update(()=>{const s=Om(y,g,!0);Xg(s)}),r(!1))};return Se.jsxs(Se.Fragment,{children:[Se.jsx("button",{className:"toolbar-item ",onClick:()=>r(!0),children:Se.jsx("img",{className:"add-toolbar-table-icon",src:FS,alt:"Add Table"})}),f&&Se.jsx("div",{className:"modal-overlay",children:Se.jsxs("div",{className:"modal-content",children:[Se.jsx("h3",{children:"Select Table Dimensions"}),Se.jsx("div",{className:"select-table-container",children:Se.jsx("input",{type:"number",value:y,onChange:s=>d(Number(s.target.value)),placeholder:"Rows"})}),Se.jsx("div",{className:"select-table-container",children:Se.jsx("input",{type:"number",value:g,onChange:s=>t(Number(s.target.value)),placeholder:"Columns"})}),Se.jsx("div",{children:Se.jsxs("div",{className:"modal-buttons",children:[Se.jsx("button",{className:"toolbar-item",onClick:e,children:"Add"}),Se.jsx("button",{className:"toolbar-item",onClick:()=>r(!1),children:"Cancel"})]})})]})})]})}const US="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMS4xIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLi0tPjxwYXRoIGQ9Ik0wIDI1NkMwIDExNC42IDExNC42IDAgMjU2IDBzMjU2IDExNC42IDI1NiAyNTYtMTE0LjYgMjU2LTI1NiAyNTZTMCAzOTcuNCAwIDI1NnptMTc1LTQ3LjkgNDcuMSA0N0wxNzUgMzAzYy05LjMgOS40LTkuMyAyNC42IDAgMzMuMSA5LjQgMTAuMiAyNC42IDEwLjIgMzMuMSAwbDQ3LTQ2LjIgNDcuOSA0Ni4yYzkuNCAxMC4yIDI0LjYgMTAuMiAzMy4xIDAgMTAuMi04LjUgMTAuMi0yMy43IDAtMzMuMWwtNDYuMi00Ny45IDQ2LjItNDdjMTAuMi04LjUgMTAuMi0yMy43IDAtMzMuMS04LjUtOS4zLTIzLjctOS4zLTMzLjEgMGwtNDcuOSA0Ny4xLTQ3LTQ3LjFjLTguNS05LjMtMjMuNy05LjMtMzMuMSAwLTkuMyA5LjQtOS4zIDI0LjYgMCAzMy4xeiIvPjwvc3ZnPg==",$S=[{letter:"",uppercase:"A",lowercase:"α"},{letter:"Beta",uppercase:"Β",lowercase:"β"},{letter:"Gamma",uppercase:"Γ",lowercase:"γ"},{letter:"Delta",uppercase:"Δ",lowercase:"δ"},{letter:"Epsilon",uppercase:"Ε",lowercase:"ε"},{letter:"Zeta",uppercase:"Ζ",lowercase:"ζ"},{letter:" Eta ",uppercase:"Η",lowercase:"η"},{letter:"Theta",uppercase:"Θ",lowercase:"θ"},{letter:"Iota",uppercase:"Ι",lowercase:"ι"},{letter:"Kappa",uppercase:"Κ",lowercase:"κ"}];function HS(){const[y]=Tr(),[d,g]=Be.useState(!1),t=f=>{y.update(()=>{var n;const r=je();if(_e(r)){const e=r.anchor.getNode();let s="inherit";if(e instanceof ki){const l=e.getStyle();s=((n=l==null?void 0:l.match(/font-size:\s*(\S+);/))==null?void 0:n[1])||s}const i=Zn(f);r.insertNodes([i])}}),g(!1)};return Se.jsxs("div",{children:[Se.jsx("button",{className:"toolbar-item symbols-toolbar",onClick:()=>g(!d),children:"Symbols"}),d&&Se.jsx("div",{className:"modal-overlay",children:Se.jsxs("div",{className:"modal-content-symb",children:[Se.jsx("div",{className:"symbol-Flex-container",children:$S.map(({letter:f,uppercase:r,lowercase:n})=>Se.jsxs("div",{className:"symbol-items",children:[Se.jsx("button",{onClick:()=>t(n),children:n}),Se.jsx("button",{onClick:()=>t(r),children:r})]},f))}),Se.jsx("button",{className:"toolbar-item close-btn",onClick:()=>g(!1),children:Se.jsx("img",{src:US,width:16,height:16})})]})})]})}const Yf=1;function Zf(){return Se.jsx("div",{className:"divider"})}function qS(){const[y]=Tr(),d=Be.useRef(null),[g,t]=Be.useState(!1),[f,r]=Be.useState(!1),[n,e]=Be.useState(!1),[s,i]=Be.useState(!1),[l,o]=Be.useState(!1),[a,c]=Be.useState(!1),[u,h]=Be.useState(!1),[p,m]=Be.useState(!1),[b,_]=Be.useState("11px"),[v,w]=Be.useState(()=>y.isEditable()),x=Be.useCallback(()=>{const S=je();_e(S)&&(e(S.hasFormat("bold")),i(S.hasFormat("italic")),o(S.hasFormat("underline")),c(S.hasFormat("strikethrough")),h(S.hasFormat("subscript")),m(S.hasFormat("superscript")),_(Gg(S,"font-size","11px")))},[]);return Be.useEffect(()=>ko(y.registerUpdateListener(({editorState:S})=>{S.read(()=>{x()})}),y.registerCommand(qo,(S,E)=>(x(),!1),Yf),y.registerCommand(Xa,S=>(t(S),!1),Yf),y.registerCommand(Qa,S=>(r(S),!1),Yf)),[y,x]),Se.jsxs("div",{className:"toolbar",ref:d,children:[Se.jsx("button",{disabled:!g,onClick:()=>{y.dispatchCommand(cl,void 0)},className:"toolbar-item spaced","aria-label":"Undo",children:Se.jsx("i",{className:"format undo"})}),Se.jsx("button",{disabled:!f,onClick:()=>{y.dispatchCommand(ul,void 0)},className:"toolbar-item","aria-label":"Redo",children:Se.jsx("i",{className:"format redo"})}),Se.jsx(Zf,{}),Se.jsx(BS,{selectionFontSize:b.slice(0,-2),editor:y,disabled:!v}),Se.jsx(Zf,{}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"bold")},className:"toolbar-item spaced "+(n?"active":""),"aria-label":"Format Bold",children:Se.jsx("i",{className:"format bold"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"italic")},className:"toolbar-item spaced "+(s?"active":""),"aria-label":"Format Italics",children:Se.jsx("i",{className:"format italic"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"underline")},className:"toolbar-item spaced "+(l?"active":""),"aria-label":"Format Underline",children:Se.jsx("i",{className:"format underline"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"strikethrough")},className:"toolbar-item spaced "+(a?"active":""),"aria-label":"Format Strikethrough",children:Se.jsx("i",{className:"format strikethrough"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"superscript")},className:"toolbar-item spaced "+(p?"active":""),"aria-label":"Format SuperScript",children:Se.jsx("img",{src:RS,height:16,width:16,style:{marginTop:"1px"}})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Cr,"subscript")},className:"toolbar-item spaced "+(u?"active":""),"aria-label":"Format SubScript",children:Se.jsx("img",{src:IS,height:16,width:16,style:{marginTop:"1px"}})}),Se.jsx(Zf,{}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"left")},className:"toolbar-item spaced","aria-label":"Left Align",children:Se.jsx("i",{className:"format left-align"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"center")},className:"toolbar-item spaced","aria-label":"Center Align",children:Se.jsx("i",{className:"format center-align"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"right")},className:"toolbar-item spaced","aria-label":"Right Align",children:Se.jsx("i",{className:"format right-align"})}),Se.jsx("button",{onClick:()=>{y.dispatchCommand(Za,"justify")},className:"toolbar-item","aria-label":"Justify Align",children:Se.jsx("i",{className:"format justify-align"})}),Se.jsx(zS,{}),Se.jsx(HS,{})," "]})}const V0=TS([...[To,ba,Oo]]);function JS(){return Se.jsx("div",{className:"editor-placeholder"})}const WS=()=>Se.jsx(Se.Fragment,{children:"hello"});function VS({collabApiKey:y,spfList:d,userObj:g}){const[t,f]=Be.useState(!1),[r,n]=Be.useState([]),[e,s]=Be.useState("demo_docId_1"),[i,l]=Be.useState({root:null}),{userId:o,userName:a,userEmail:c}=g,u=Be.useRef(),p={docId:e,apiKey:y,user:{name:a,id:o,email:c},hooks:{contentChanged:({source:x,content:S})=>{},usersUpdate:x=>{n(x)}}},m=()=>{u.current&&u.current.start(p).then(()=>{console.log("[Lexical Demo][codox.start] success"),f(!0)}).catch(x=>console.log("[Lexical Demo][codox.start] error",x))};Be.useEffect(()=>()=>{b()},[]);const b=()=>{u.current&&(console.log("i am stop"),u.current.stop()),f(!1)};let _={root:{children:[{children:[],direction:"ltr",format:"",indent:0,type:"paragraph",version:1,textFormat:0,showUI:!0}],direction:"ltr",format:"",indent:0,type:"root",version:1}};Be.useEffect(()=>{(async()=>{if(!e)return;t&&b();let x=_;if(x)try{jS(x,V0),l(x)}catch(S){console.error("[APP] error: ",S)}})()},[e]),Be.useEffect(()=>{console.log("inside lexical package spfList is ",d,u)},[d]),Be.useEffect(()=>{i&&e&&!t&&m()},[i,e,t]);const v=Be.useMemo(()=>({editorState:i?JSON.stringify({root:i.root}):null,namespace:"Playground",nodes:V0,onError:x=>{throw x},theme:PS}),[i]),w=()=>{let x=[],S=[];return r&&r.length>0&&r.map((E,k)=>{S.includes(E.name)||(S.push(E.name),x.push(Se.jsxs("div",{title:E.email,className:`avatarStyle avatar-color-${k+1}`,children:[" ",E.name&&E.name[0]]})))}),Se.jsx("div",{className:"flexContainer",children:x})};return Se.jsx("div",{children:Se.jsxs(zg,{initialConfig:v,children:[w(),Se.jsxs("div",{className:"editor-container",children:[Se.jsx(qS,{}),Se.jsxs("div",{className:"editor-inner",children:[Se.jsx(O1,{contentEditable:Se.jsx($g,{className:"editor-input"}),placeholder:Se.jsx(JS,{}),ErrorBoundary:WS}),Se.jsx(OS,{ref:u}),Se.jsx(rm,{}),Se.jsx(NS,{}),Se.jsx(Ug,{})]})]})]})})}Ir.Editor=VS,Object.defineProperty(Ir,Symbol.toStringTag,{value:"Module"})});
|
|
1430
1430
|
//# sourceMappingURL=index.umd.js.map
|