@micromerce/formbuilder-react 1.0.527 → 1.0.529
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formbuilder.js +4 -4
- package/dist/formbuilder.js.map +1 -1
- package/package.json +1 -1
package/dist/formbuilder.js
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
animation-iteration-count: infinite;
|
73
73
|
animation-delay: 200ms;
|
74
74
|
}
|
75
|
-
`),je.rippleVisible,Le,550,(({theme:e})=>e.transitions.easing.easeInOut),je.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),je.child,je.childLeaving,Ie,550,(({theme:e})=>e.transitions.easing.easeInOut),je.childPulsate,Be,(({theme:e})=>e.transitions.easing.easeInOut)),Ue=r.forwardRef((function(n,o){const i=(0,ce.Z)({props:n,name:"MuiTouchRipple"}),{center:a=!1,classes:l={},className:c}=i,u=(0,t.Z)(i,Re),[d,p]=r.useState([]),h=r.useRef(0),f=r.useRef(null);r.useEffect((()=>{f.current&&(f.current(),f.current=null)}),[d]);const m=r.useRef(!1),g=r.useRef(0),b=r.useRef(null),y=r.useRef(null);r.useEffect((()=>()=>{g.current&&clearTimeout(g.current)}),[]);const v=r.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:o,cb:i}=e;p((e=>[...e,(0,s.jsx)(ze,{classes:{ripple:(0,oe.Z)(l.ripple,je.ripple),rippleVisible:(0,oe.Z)(l.rippleVisible,je.rippleVisible),ripplePulsate:(0,oe.Z)(l.ripplePulsate,je.ripplePulsate),child:(0,oe.Z)(l.child,je.child),childLeaving:(0,oe.Z)(l.childLeaving,je.childLeaving),childPulsate:(0,oe.Z)(l.childPulsate,je.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:o},h.current)])),h.current+=1,f.current=i}),[l]),O=r.useCallback(((e={},t={},r=(()=>{}))=>{const{pulsate:n=!1,center:o=a||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&m.current)return void(m.current=!1);"touchstart"===(null==e?void 0:e.type)&&(m.current=!0);const s=i?null:y.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(r-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===b.current&&(b.current=()=>{v({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})},g.current=setTimeout((()=>{b.current&&(b.current(),b.current=null)}),80)):v({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})}),[a,v]),w=r.useCallback((()=>{O({},{pulsate:!0})}),[O]),A=r.useCallback(((e,t)=>{if(clearTimeout(g.current),"touchend"===(null==e?void 0:e.type)&&b.current)return b.current(),b.current=null,void(g.current=setTimeout((()=>{A(e,t)})));b.current=null,p((e=>e.length>0?e.slice(1):e)),f.current=t}),[]);return r.useImperativeHandle(o,(()=>({pulsate:w,start:O,stop:A})),[w,O,A]),(0,s.jsx)(Qe,(0,e.Z)({className:(0,oe.Z)(je.root,l.root,c),ref:y},u,{children:(0,s.jsx)(Ae,{component:null,exit:!0,children:d})}))})),Fe=Ue;var We=__webpack_require__(4867);function Ye(e){return(0,We.Z)("MuiButtonBase",e)}const Ve=(0,Te.Z)("MuiButtonBase",["root","disabled","focusVisible"]),Xe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],He=(0,le.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ve.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ge=r.forwardRef((function(n,o){const i=(0,ce.Z)({props:n,name:"MuiButtonBase"}),{action:a,centerRipple:l=!1,children:c,className:u,component:d="button",disabled:p=!1,disableRipple:h=!1,disableTouchRipple:f=!1,focusRipple:m=!1,LinkComponent:g="a",onBlur:b,onClick:y,onContextMenu:v,onDragLeave:O,onFocus:w,onFocusVisible:A,onKeyDown:x,onKeyUp:k,onMouseDown:C,onMouseLeave:S,onMouseUp:_,onTouchEnd:E,onTouchMove:P,onTouchStart:q,tabIndex:T=0,TouchRippleProps:j,touchRippleRef:R,type:Z}=i,$=(0,t.Z)(i,Xe),M=r.useRef(null),N=r.useRef(null),D=(0,ue.Z)(N,R),{isFocusVisibleRef:L,onFocus:I,onBlur:B,ref:Q}=(0,pe.Z)(),[z,U]=r.useState(!1);p&&z&&U(!1),r.useImperativeHandle(a,(()=>({focusVisible:()=>{U(!0),M.current.focus()}})),[]);const[F,W]=r.useState(!1);r.useEffect((()=>{W(!0)}),[]);const Y=F&&!h&&!p;function V(e,t,r=f){return(0,de.Z)((n=>(t&&t(n),!r&&N.current&&N.current[e](n),!0)))}r.useEffect((()=>{z&&m&&!h&&F&&N.current.pulsate()}),[h,m,z,F]);const X=V("start",C),H=V("stop",v),G=V("stop",O),K=V("stop",_),J=V("stop",(e=>{z&&e.preventDefault(),S&&S(e)})),ee=V("start",q),te=V("stop",E),re=V("stop",P),ne=V("stop",(e=>{B(e),!1===L.current&&U(!1),b&&b(e)}),!1),ie=(0,de.Z)((e=>{M.current||(M.current=e.currentTarget),I(e),!0===L.current&&(U(!0),A&&A(e)),w&&w(e)})),se=()=>{const e=M.current;return d&&"button"!==d&&!("A"===e.tagName&&e.href)},le=r.useRef(!1),he=(0,de.Z)((e=>{m&&!le.current&&z&&N.current&&" "===e.key&&(le.current=!0,N.current.stop(e,(()=>{N.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!p&&(e.preventDefault(),y&&y(e))})),fe=(0,de.Z)((e=>{m&&" "===e.key&&N.current&&z&&!e.defaultPrevented&&(le.current=!1,N.current.stop(e,(()=>{N.current.pulsate(e)}))),k&&k(e),y&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&y(e)}));let me=d;"button"===me&&($.href||$.to)&&(me=g);const ge={};"button"===me?(ge.type=void 0===Z?"button":Z,ge.disabled=p):($.href||$.to||(ge.role="button"),p&&(ge["aria-disabled"]=p));const be=(0,ue.Z)(o,Q,M),ye=(0,e.Z)({},i,{centerRipple:l,component:d,disabled:p,disableRipple:h,disableTouchRipple:f,focusRipple:m,tabIndex:T,focusVisible:z}),ve=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i={root:["root",t&&"disabled",r&&"focusVisible"]},a=(0,ae.Z)(i,Ye,o);return r&&n&&(a.root+=` ${n}`),a})(ye);return(0,s.jsxs)(He,(0,e.Z)({as:me,className:(0,oe.Z)(ve.root,u),ownerState:ye,onBlur:ne,onClick:y,onContextMenu:H,onFocus:ie,onKeyDown:he,onKeyUp:fe,onMouseDown:X,onMouseLeave:J,onMouseUp:K,onDragLeave:G,onTouchEnd:te,onTouchMove:re,onTouchStart:ee,ref:be,tabIndex:p?-1:T,type:Z},ge,$,{children:[c,Y?(0,s.jsx)(Fe,(0,e.Z)({ref:D,center:l},j)):null]}))}));var Ke=__webpack_require__(8216);function Je(e){return(0,We.Z)("MuiButton",e)}const et=(0,Te.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),tt=r.createContext({}),rt=r.createContext(void 0),nt=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ot=t=>(0,e.Z)({},"small"===t.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===t.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===t.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),it=(0,le.ZP)(Ge,{shouldForwardProp:e=>(0,le.FO)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,Ke.Z)(r.color)}`],t[`size${(0,Ke.Z)(r.size)}`],t[`${r.variant}Size${(0,Ke.Z)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((({theme:t,ownerState:r})=>{var n,o;const i="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,e.Z)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,e.Z)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===r.variant&&"inherit"!==r.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===r.variant&&"inherit"!==r.color&&{border:`1px solid ${(t.vars||t).palette[r.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===r.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===r.variant&&"inherit"!==r.color&&{backgroundColor:(t.vars||t).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[r.color].main}}),"&:active":(0,e.Z)({},"contained"===r.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${et.focusVisible}`]:(0,e.Z)({},"contained"===r.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${et.disabled}`]:(0,e.Z)({color:(t.vars||t).palette.action.disabled},"outlined"===r.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"contained"===r.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===r.variant&&{padding:"6px 8px"},"text"===r.variant&&"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main},"outlined"===r.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===r.variant&&"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[r.color].mainChannel} / 0.5)`:`1px solid ${(0,se.Fq)(t.palette[r.color].main,.5)}`},"contained"===r.variant&&{color:t.vars?t.vars.palette.text.primary:null==(n=(o=t.palette).getContrastText)?void 0:n.call(o,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},"contained"===r.variant&&"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].contrastText,backgroundColor:(t.vars||t).palette[r.color].main},"inherit"===r.color&&{color:"inherit",borderColor:"currentColor"},"small"===r.size&&"text"===r.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===r.size&&"text"===r.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===r.size&&"outlined"===r.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===r.size&&"outlined"===r.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===r.size&&"contained"===r.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===r.size&&"contained"===r.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${et.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${et.disabled}`]:{boxShadow:"none"}})),at=(0,le.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${(0,Ke.Z)(r.size)}`]]}})((({ownerState:t})=>(0,e.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},ot(t)))),st=(0,le.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${(0,Ke.Z)(r.size)}`]]}})((({ownerState:t})=>(0,e.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},ot(t)))),lt=r.forwardRef((function(n,o){const i=r.useContext(tt),a=r.useContext(rt),l=(0,ie.Z)(i,n),c=(0,ce.Z)({props:l,name:"MuiButton"}),{children:u,color:d="primary",component:p="button",className:h,disabled:f=!1,disableElevation:m=!1,disableFocusRipple:g=!1,endIcon:b,focusVisibleClassName:y,fullWidth:v=!1,size:O="medium",startIcon:w,type:A,variant:x="text"}=c,k=(0,t.Z)(c,nt),C=(0,e.Z)({},c,{color:d,component:p,disabled:f,disableElevation:m,disableFocusRipple:g,fullWidth:v,size:O,type:A,variant:x}),S=(t=>{const{color:r,disableElevation:n,fullWidth:o,size:i,variant:a,classes:s}=t,l={root:["root",a,`${a}${(0,Ke.Z)(r)}`,`size${(0,Ke.Z)(i)}`,`${a}Size${(0,Ke.Z)(i)}`,"inherit"===r&&"colorInherit",n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${(0,Ke.Z)(i)}`],endIcon:["endIcon",`iconSize${(0,Ke.Z)(i)}`]},c=(0,ae.Z)(l,Je,s);return(0,e.Z)({},s,c)})(C),_=w&&(0,s.jsx)(at,{className:S.startIcon,ownerState:C,children:w}),E=b&&(0,s.jsx)(st,{className:S.endIcon,ownerState:C,children:b}),P=a||"";return(0,s.jsxs)(it,(0,e.Z)({ownerState:C,className:(0,oe.Z)(i.className,S.root,h,P),component:p,disabled:f,focusRipple:!g,focusVisibleClassName:(0,oe.Z)(S.focusVisible,y),ref:o,type:A},k,{classes:S,children:[_,u,E]}))})),ct=lt,ut=r.createContext(void 0);function dt(){return r.useContext(ut)}var pt=__webpack_require__(9766);const ht=(0,__webpack_require__(2807).ZP)();var ft=__webpack_require__(7333),mt=__webpack_require__(8010);const gt=["sx"];function bt(r){const{sx:n}=r,o=(0,t.Z)(r,gt),{systemProps:i,otherProps:a}=(e=>{var t,r;const n={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(r=e.theme)?void 0:r.unstable_sxConfig)?t:mt.Z;return Object.keys(e).forEach((t=>{o[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]})),n})(o);let s;return s=Array.isArray(n)?[i,...n]:"function"==typeof n?(...t)=>{const r=n(...t);return(0,pt.P)(r)?(0,e.Z)({},i,r):i}:(0,e.Z)({},i,n),(0,e.Z)({},a,{sx:s})}var yt=__webpack_require__(6268),vt=__webpack_require__(5408),Ot=__webpack_require__(2605);const wt=["component","direction","spacing","divider","children","className","useFlexGap"],At=(0,yt.Z)(),xt=ht("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function kt(e){return(0,ft.Z)({props:e,name:"MuiStack",defaultTheme:At})}function Ct(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i<n.length-1&&e.push(r.cloneElement(t,{key:`separator-${i}`})),e)),[])}const St=({ownerState:t,theme:r})=>{let n=(0,e.Z)({display:"flex",flexDirection:"column"},(0,vt.k9)({theme:r},(0,vt.P$)({values:t.direction,breakpoints:r.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,Ot.hB)(r),o=Object.keys(r.breakpoints.values).reduce(((e,r)=>(("object"==typeof t.spacing&&null!=t.spacing[r]||"object"==typeof t.direction&&null!=t.direction[r])&&(e[r]=!0),e)),{}),i=(0,vt.P$)({values:t.direction,base:o}),a=(0,vt.P$)({values:t.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach(((e,t,r)=>{if(!i[e]){const n=t>0?i[r[t-1]]:"column";i[e]=n}}));const s=(r,n)=>{return t.useFlexGap?{gap:(0,Ot.NA)(e,r)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=n?i[n]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,Ot.NA)(e,r)}};var o};n=(0,pt.Z)(n,(0,vt.k9)({theme:r},a,s))}return n=(0,vt.dt)(r.breakpoints,n),n},_t=function(n={}){const{createStyledComponent:o=xt,useThemeProps:i=kt,componentName:a="MuiStack"}=n,l=o(St),c=r.forwardRef((function(r,n){const o=bt(i(r)),{component:c="div",direction:u="column",spacing:d=0,divider:p,children:h,className:f,useFlexGap:m=!1}=o,g=(0,t.Z)(o,wt),b={direction:u,spacing:d,useFlexGap:m},y=(0,ae.Z)({root:["root"]},(e=>(0,We.Z)(a,e)),{});return(0,s.jsx)(l,(0,e.Z)({as:c,ownerState:b,ref:n,className:(0,oe.Z)(y.root,f)},g,{children:p?Ct(h,p):h}))}));return c}({createStyledComponent:(0,le.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,ce.Z)({props:e,name:"MuiStack"})}),Et=_t;function Pt(e){return(0,We.Z)("MuiTypography",e)}(0,Te.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const qt=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Tt=(0,le.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${(0,Ke.Z)(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})((({theme:t,ownerState:r})=>(0,e.Z)({margin:0},"inherit"===r.variant&&{font:"inherit"},"inherit"!==r.variant&&t.typography[r.variant],"inherit"!==r.align&&{textAlign:r.align},r.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r.gutterBottom&&{marginBottom:"0.35em"},r.paragraph&&{marginBottom:16}))),jt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Rt={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Zt=r.forwardRef((function(r,n){const o=(0,ce.Z)({props:r,name:"MuiTypography"}),i=(e=>Rt[e]||e)(o.color),a=bt((0,e.Z)({},o,{color:i})),{align:l="inherit",className:c,component:u,gutterBottom:d=!1,noWrap:p=!1,paragraph:h=!1,variant:f="body1",variantMapping:m=jt}=a,g=(0,t.Z)(a,qt),b=(0,e.Z)({},a,{align:l,color:i,className:c,component:u,gutterBottom:d,noWrap:p,paragraph:h,variant:f,variantMapping:m}),y=u||(h?"p":m[f]||jt[f])||"span",v=(e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,"inherit"!==e.align&&`align${(0,Ke.Z)(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return(0,ae.Z)(s,Pt,a)})(b);return(0,s.jsx)(Tt,(0,e.Z)({as:y,ref:n,ownerState:b,className:(0,oe.Z)(v.root,c)},g))})),$t=Zt;function Mt(e){return(0,We.Z)("MuiFormControlLabel",e)}const Nt=(0,Te.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function Dt({props:e,states:t,muiFormControl:r}){return t.reduce(((t,n)=>(t[n]=e[n],r&&void 0===e[n]&&(t[n]=r[n]),t)),{})}const Lt=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],It=(0,le.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Nt.label}`]:t.label},t.root,t[`labelPlacement${(0,Ke.Z)(r.labelPlacement)}`]]}})((({theme:t,ownerState:r})=>(0,e.Z)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Nt.disabled}`]:{cursor:"default"}},"start"===r.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===r.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===r.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${Nt.label}`]:{[`&.${Nt.disabled}`]:{color:(t.vars||t).palette.text.disabled}}}))),Bt=(0,le.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${Nt.error}`]:{color:(e.vars||e).palette.error.main}}))),Qt=r.forwardRef((function(n,o){var i,a;const l=(0,ce.Z)({props:n,name:"MuiFormControlLabel"}),{className:c,componentsProps:u={},control:d,disabled:p,disableTypography:h,label:f,labelPlacement:m="end",required:g,slotProps:b={}}=l,y=(0,t.Z)(l,Lt),v=dt(),O=null!=(i=null!=p?p:d.props.disabled)?i:null==v?void 0:v.disabled,w=null!=g?g:d.props.required,A={disabled:O,required:w};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===d.props[e]&&void 0!==l[e]&&(A[e]=l[e])}));const x=Dt({props:l,muiFormControl:v,states:["error"]}),k=(0,e.Z)({},l,{disabled:O,labelPlacement:m,required:w,error:x.error}),C=(e=>{const{classes:t,disabled:r,labelPlacement:n,error:o,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${(0,Ke.Z)(n)}`,o&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,ae.Z)(a,Mt,t)})(k),S=null!=(a=b.typography)?a:u.typography;let _=f;return null==_||_.type===$t||h||(_=(0,s.jsx)($t,(0,e.Z)({component:"span"},S,{className:(0,oe.Z)(C.label,null==S?void 0:S.className),children:_}))),(0,s.jsxs)(It,(0,e.Z)({className:(0,oe.Z)(C.root,c),ownerState:k,ref:o},y,{children:[r.cloneElement(d,A),w?(0,s.jsxs)(Et,{display:"block",children:[_,(0,s.jsxs)(Bt,{ownerState:k,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}):_]}))})),zt=Qt;var Ut=__webpack_require__(8403),Ft=__webpack_require__.n(Ut),Wt=__webpack_require__(8866),Yt=__webpack_require__(1121);const Vt=()=>n().createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n().createElement("path",{d:"M8.1 11.7H9.9V13.5H8.1V11.7ZM8.1 4.5H9.9V9.9H8.1V4.5ZM8.991 0C4.023 0 0 4.032 0 9C0 13.968 4.023 18 8.991 18C13.968 18 18 13.968 18 9C18 4.032 13.968 0 8.991 0ZM9 16.2C5.022 16.2 1.8 12.978 1.8 9C1.8 5.022 5.022 1.8 9 1.8C12.978 1.8 16.2 5.022 16.2 9C16.2 12.978 12.978 16.2 9 16.2Z",fill:"#B01F14"}));var Xt=__webpack_require__(3463),Ht={};Ht.styleTagTransform=j(),Ht.setAttributes=E(),Ht.insert=S().bind(null,"head"),Ht.domAPI=k(),Ht.insertStyleElement=q(),A()(Xt.Z,Ht);const Gt=Xt.Z&&Xt.Z.locals?Xt.Z.locals:void 0,Kt=({error:e})=>{const[t,o]=(0,r.useState)(!1);return n().createElement("div",{className:Gt.errorContainer,"data-testid":"form-general-error-container"},n().createElement("div",{className:Gt.iconWrapper},n().createElement(Vt,null)),n().createElement("p",{className:`${Gt.errorMessage} ${t?Gt.open:Gt.closed}`,"data-testid":"form-general-error-message"},e),n().createElement("div",{className:Gt.errorMessageToggleButtonContainer},n().createElement("button",{type:"button",onClick:()=>{o((e=>!e))}},t?n().createElement(Wt.R,{"data-testid":"form-list__sort-down-button",color:"#B01F14"}):n().createElement(Yt.s,{"data-testid":"form-list__sort-up-button",color:"#B01F14"}))))};var Jt=__webpack_require__(1191),er={};er.styleTagTransform=j(),er.setAttributes=E(),er.insert=S().bind(null,"head"),er.domAPI=k(),er.insertStyleElement=q(),A()(Jt.Z,er);const tr=Jt.Z&&Jt.Z.locals?Jt.Z.locals:void 0;var rr=__webpack_require__(9299);function nr(e){return(0,We.Z)("PrivateSwitchBase",e)}(0,Te.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const or=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ir=(0,le.ZP)(Ge)((({ownerState:t})=>(0,e.Z)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12}))),ar=(0,le.ZP)("input",{shouldForwardProp:le.FO})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),sr=r.forwardRef((function(r,n){const{autoFocus:o,checked:i,checkedIcon:a,className:l,defaultChecked:c,disabled:u,disableFocusRipple:d=!1,edge:p=!1,icon:h,id:f,inputProps:m,inputRef:g,name:b,onBlur:y,onChange:v,onFocus:O,readOnly:w,required:A=!1,tabIndex:x,type:k,value:C}=r,S=(0,t.Z)(r,or),[_,E]=(0,rr.Z)({controlled:i,default:Boolean(c),name:"SwitchBase",state:"checked"}),P=dt();let q=u;P&&void 0===q&&(q=P.disabled);const T="checkbox"===k||"radio"===k,j=(0,e.Z)({},r,{checked:_,disabled:q,disableFocusRipple:d,edge:p}),R=(e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,i={root:["root",r&&"checked",n&&"disabled",o&&`edge${(0,Ke.Z)(o)}`],input:["input"]};return(0,ae.Z)(i,nr,t)})(j);return(0,s.jsxs)(ir,(0,e.Z)({component:"span",className:(0,oe.Z)(R.root,l),centerRipple:!0,focusRipple:!d,disabled:q,tabIndex:null,role:void 0,onFocus:e=>{O&&O(e),P&&P.onFocus&&P.onFocus(e)},onBlur:e=>{y&&y(e),P&&P.onBlur&&P.onBlur(e)},ownerState:j,ref:n},S,{children:[(0,s.jsx)(ar,(0,e.Z)({autoFocus:o,checked:i,defaultChecked:c,className:R.input,disabled:q,id:T?f:void 0,name:b,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;E(t),v&&v(e,t)},readOnly:w,ref:g,required:A,ownerState:j,tabIndex:x,type:k},"checkbox"===k&&void 0===C?{}:{value:C},m)),_?a:h]}))})),lr=sr;function cr(e){return(0,We.Z)("MuiSwitch",e)}const ur=(0,Te.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),dr=["className","color","edge","size","sx"],pr=(0,le.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${(0,Ke.Z)(r.edge)}`],t[`size${(0,Ke.Z)(r.size)}`]]}})((({ownerState:t})=>(0,e.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===t.edge&&{marginLeft:-8},"end"===t.edge&&{marginRight:-8},"small"===t.size&&{width:40,height:24,padding:7,[`& .${ur.thumb}`]:{width:16,height:16},[`& .${ur.switchBase}`]:{padding:4,[`&.${ur.checked}`]:{transform:"translateX(16px)"}}}))),hr=(0,le.ZP)(lr,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${ur.input}`]:t.input},"default"!==r.color&&t[`color${(0,Ke.Z)(r.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${ur.checked}`]:{transform:"translateX(20px)"},[`&.${ur.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${ur.checked} + .${ur.track}`]:{opacity:.5},[`&.${ur.disabled} + .${ur.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${ur.input}`]:{left:"-100%",width:"300%"}})),(({theme:t,ownerState:r})=>(0,e.Z)({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&{[`&.${ur.checked}`]:{color:(t.vars||t).palette[r.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ur.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${r.color}DisabledColor`]:`${"light"===t.palette.mode?(0,se.$n)(t.palette[r.color].main,.62):(0,se._j)(t.palette[r.color].main,.55)}`}},[`&.${ur.checked} + .${ur.track}`]:{backgroundColor:(t.vars||t).palette[r.color].main}}))),fr=(0,le.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),mr=(0,le.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),gr=r.forwardRef((function(r,n){const o=(0,ce.Z)({props:r,name:"MuiSwitch"}),{className:i,color:a="primary",edge:l=!1,size:c="medium",sx:u}=o,d=(0,t.Z)(o,dr),p=(0,e.Z)({},o,{color:a,edge:l,size:c}),h=(t=>{const{classes:r,edge:n,size:o,color:i,checked:a,disabled:s}=t,l={root:["root",n&&`edge${(0,Ke.Z)(n)}`,`size${(0,Ke.Z)(o)}`],switchBase:["switchBase",`color${(0,Ke.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,ae.Z)(l,cr,r);return(0,e.Z)({},r,c)})(p),f=(0,s.jsx)(mr,{className:h.thumb,ownerState:p});return(0,s.jsxs)(pr,{className:(0,oe.Z)(h.root,i),sx:u,ownerState:p,children:[(0,s.jsx)(hr,(0,e.Z)({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:p},d,{classes:(0,e.Z)({},h,{root:h.switchBase})})),(0,s.jsx)(fr,{className:h.track,ownerState:p})]})})),br=gr,yr=(0,le.ZP)(br)((()=>({"& .MuiSwitch-switchBase.Mui-checked":{color:"white"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"#4A96D2",opacity:1,"&:hover":{backgroundColor:"#255F8E"}}}))),vr={add:n().createElement(te.Z,{"data-testid":"formfooter__add-icon"}),save:n().createElement(re.Z,{"data-testid":"formfooter__save-icon"}),update:n().createElement(ne.d,{size:14,"data-testid":"formfooter__update-icon"})},Or=({controlProps:e,error:t,iconType:o,loading:i,onSubmit:a})=>{const{formControls:s,isExpertMode:l,hasExpertMode:c,toggleExpertMode:u}=(0,r.useContext)(O.L8),d=o&&vr[o.toLowerCase()],p=o&&Ft()(o)||"Add",h=e?.footerProps?.style??{},f=e?.footerProps?.container?.style??{},m=e?.footerProps?.submitButtonContainer?.style??{},g=e?.footerProps?.submitButton?.sx??{};return n().createElement("div",{"data-testid":"form-footer-container",className:tr["form-footer-container"],style:h},t&&n().createElement("div",{className:tr.notificationContainer},n().createElement(Kt,{error:t})),n().createElement("div",{className:tr.controlsContainer,style:f},c?n().createElement(zt,{"data-testid":"formfooter__expert-mode",control:n().createElement(yr,{checked:l,onChange:u}),label:"Expert Mode",sx:{color:"rgba(0,0,0,.54)",marginBottom:0,input:{marginTop:0},".MuiTypography-root":{fontSize:12}}}):n().createElement("div",null),n().createElement("div",{className:tr["submit-container"],style:m},n().createElement("span",{className:tr["required-message"]},"* Please fill in all required fields"),n().createElement(ct,{"data-testid":"formfooter__submit",id:"submit-button",variant:"contained",type:"submit",form:"form-horizontal xhtmlInstantForm",onClick:()=>a(s),sx:{backgroundColor:"#4A96D2",boxShadow:"none","&:hover":{backgroundColor:"#0B5BA6",boxShadow:"none"},...g},endIcon:i?n().createElement("svg",{className:`${tr["run-button__spinner"]} run-button__spinner`,"data-testid":"formfooter__loading-icon",xmlns:"http://www.w3.org/2000/svg",width:"21.076",height:"20.31",viewBox:"0 0 21.076 20.31"},n().createElement("g",{id:"Gruppe_272","data-name":"Gruppe 272",transform:"translate(-269.58 -82.717)"},n().createElement("path",{id:"Pfad_338","data-name":"Pfad 338",d:"M278.934,84.754l3.514-2.03v4.06l-3.514,2.03Z",transform:"translate(-5.841 -0.004)",fill:"#fff"}),n().createElement("path",{id:"Pfad_339","data-name":"Pfad 339",d:"M288.29,86.784v-4.06l3.514,2.03v4.06Z",transform:"translate(-11.683 -0.004)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_340","data-name":"Pfad 340",d:"M282.45,119.233v-4.06l-3.514,2.03v4.06Z",transform:"translate(-5.842 -20.266)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_341","data-name":"Pfad 341",d:"M285.963,128.014l-3.515-2.03-3.514,2.03,3.514,2.03Z",transform:"translate(-5.841 -27.017)",fill:"#fff"}),n().createElement("path",{id:"Pfad_342","data-name":"Pfad 342",d:"M297.625,124.639l3.514,2.03v-4.06l-3.514-2.03Z",transform:"translate(-17.513 -23.642)",fill:"#fff"}),n().createElement("path",{id:"Pfad_343","data-name":"Pfad 343",d:"M306.981,122.609v4.06l3.514-2.03v-4.06Z",transform:"translate(-23.355 -23.642)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_344","data-name":"Pfad 344",d:"M273.094,106.394v4.06l-3.514-2.03v-4.06Z",transform:"translate(0 -13.516)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_345","data-name":"Pfad 345",d:"M276.608,100.988l-3.514,2.03-3.514-2.03,3.514-2.03Z",transform:"translate(0 -10.141)",fill:"#fff"}),n().createElement("path",{id:"Pfad_346","data-name":"Pfad 346",d:"M310.5,92.185l-3.514,2.03v-4.06l3.514-2.03Z",transform:"translate(-23.355 -3.377)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_347","data-name":"Pfad 347",d:"M304.657,84.747l-3.514,2.03-3.514-2.03,3.514-2.03Z",transform:"translate(-17.515)",fill:"#fff"}),n().createElement("path",{id:"Pfad_348","data-name":"Pfad 348",d:"M319.853,100.968l-3.514-2.03V103l3.514,2.03Z",transform:"translate(-29.198 -10.129)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_349","data-name":"Pfad 349",d:"M314.011,111.778l-3.514-2.03-3.514,2.03,3.514,2.03Z",transform:"translate(-23.356 -16.879)",fill:"#fff"}))):d||vr.add},p))))};var wr=__webpack_require__(7361),Ar=__webpack_require__.n(wr),xr=__webpack_require__(236),kr=__webpack_require__.n(xr),Cr=__webpack_require__(8932),Sr={};Sr.styleTagTransform=j(),Sr.setAttributes=E(),Sr.insert=S().bind(null,"head"),Sr.domAPI=k(),Sr.insertStyleElement=q(),A()(Cr.Z,Sr);const _r=Cr.Z&&Cr.Z.locals?Cr.Z.locals:void 0;var Er=__webpack_require__(3804),Pr={};Pr.styleTagTransform=j(),Pr.setAttributes=E(),Pr.insert=S().bind(null,"head"),Pr.domAPI=k(),Pr.insertStyleElement=q(),A()(Er.Z,Pr);const qr=Er.Z&&Er.Z.locals?Er.Z.locals:void 0,Tr=({controlProps:e,...t})=>{const{id:r,objectPathId:o,error:i,displayName:a,required:s,hideLabel:l=!1,isExpert:c,children:u}=t,d=i?"error":"",p=c?"expert":"",h=o||r,f=o?`${qr["control-wrapper"]} ${_r["control-wrapper"]}`:`${qr["control-wrapper"]} ${_r["control-wrapper"]} ${qr["control-wrapper-firstlayer"]}`,m=e?.controlWrapperProps?.style??{},g=e?.controlWrapperProps?.label?.style??{},b=e?.controlWrapperProps?.container?.style??{};return n().createElement("div",{className:`${qr["form-group"]} ${_r["form-group"]} ${qr[d]} ${qr[p]}`,style:m},!l&&n().createElement("label",{htmlFor:h,"data-testid":"control-label",className:`${qr["control-label"]} ${_r["control-label"]}`,style:g},s?a+" *":a),n().createElement("div",{className:f,style:b},u,n().createElement("label",{htmlFor:h,className:qr["error-message"]},i)))},jr=({Control:e,config:t,isExpert:o,hideLabel:i=!1,controlProps:a})=>{const{control:s,id:l,objectPathId:c,groupIsRequired:u}=t,{error:d,displayName:p,required:h}=s,{updateControl:f}=(0,r.useContext)(O.L8),m={id:l,objectPathId:c,error:d?.message,displayName:p,hideLabel:i,isExpert:o,required:!!u&&h},g={objectPathId:c,id:l,control:{...s,required:!!u&&h}};return n().createElement(Tr,{controlProps:a,...m},n().createElement(e,{controlProps:a,onChangeValue:(e,t)=>{const r={hasChanged:!0,...e};f(c||l,kr()({},s,r,t))},...g}))},Rr=/mrn:srv:([a-z-A-Z0-9]+):([a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}):([^\s]*)/g,Zr=e=>{if(e){const t=[...e.matchAll(Rr)],r=t&&t[0];return r&&4===r.length?{matchAll:t,mrn:r[0],serviceName:r[1],applicationId:r[2],resource:r[3]}:$r(e)}},$r=e=>{const t=[...e.matchAll(/mrn:srv:([a-z-A-Z0-9]+):([a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12})/g)],r=t&&t[0];return r&&3===r.length?{matchAll:t,mrn:r[0],serviceName:r[1],applicationId:r[2]}:null};var Mr=__webpack_require__(5949);const Nr=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Dr=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Lr=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Ir(e){return(0,We.Z)("MuiCheckbox",e)}const Br=(0,Te.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Qr=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],zr=(0,le.ZP)(lr,{shouldForwardProp:e=>(0,le.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,Ke.Z)(r.size)}`],"default"!==r.color&&t[`color${(0,Ke.Z)(r.color)}`]]}})((({theme:t,ownerState:r})=>(0,e.Z)({color:(t.vars||t).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${"default"===r.color?t.vars.palette.action.activeChannel:t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)("default"===r.color?t.palette.action.active:t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&{[`&.${Br.checked}, &.${Br.indeterminate}`]:{color:(t.vars||t).palette[r.color].main},[`&.${Br.disabled}`]:{color:(t.vars||t).palette.action.disabled}}))),Ur=(0,s.jsx)(Dr,{}),Fr=(0,s.jsx)(Nr,{}),Wr=(0,s.jsx)(Lr,{}),Yr=r.forwardRef((function(n,o){var i,a;const l=(0,ce.Z)({props:n,name:"MuiCheckbox"}),{checkedIcon:c=Ur,color:u="primary",icon:d=Fr,indeterminate:p=!1,indeterminateIcon:h=Wr,inputProps:f,size:m="medium",className:g}=l,b=(0,t.Z)(l,Qr),y=p?h:d,v=p?h:c,O=(0,e.Z)({},l,{color:u,indeterminate:p,size:m}),w=(t=>{const{classes:r,indeterminate:n,color:o,size:i}=t,a={root:["root",n&&"indeterminate",`color${(0,Ke.Z)(o)}`,`size${(0,Ke.Z)(i)}`]},s=(0,ae.Z)(a,Ir,r);return(0,e.Z)({},r,s)})(O);return(0,s.jsx)(zr,(0,e.Z)({type:"checkbox",inputProps:(0,e.Z)({"data-indeterminate":p},f),icon:r.cloneElement(y,{fontSize:null!=(i=y.props.fontSize)?i:m}),checkedIcon:r.cloneElement(v,{fontSize:null!=(a=v.props.fontSize)?a:m}),ownerState:O,ref:o,className:(0,oe.Z)(w.root,g)},b,{classes:w}))})),Vr=Yr;var Xr=__webpack_require__(7557),Hr=__webpack_require__.n(Xr),Gr=__webpack_require__(9673),Kr={};Kr.styleTagTransform=j(),Kr.setAttributes=E(),Kr.insert=S().bind(null,"head"),Kr.domAPI=k(),Kr.insertStyleElement=q(),A()(Gr.Z,Kr);const Jr=Gr.Z&&Gr.Z.locals?Gr.Z.locals:void 0;var en=__webpack_require__(5540),tn={};tn.styleTagTransform=j(),tn.setAttributes=E(),tn.insert=S().bind(null,"head"),tn.domAPI=k(),tn.insertStyleElement=q(),A()(en.Z,tn);const rn=en.Z&&en.Z.locals?en.Z.locals:void 0;var nn=__webpack_require__(8880);const on="rgb(85, 85, 85)",an=({onChangeValue:e,query:t,objectPathId:n,value:o})=>{if(!t)return{textColor:on,setHasEdited:()=>{}};const{resolvedQuery:i,mrnEntriesLoaded:a}=(0,nn.Z)({query:t,objectPathId:n}),[s,l]=(0,r.useState)(o!==i);return L((()=>{const t=s?o:i;l(t!==i),e({value:t})}),[i]),{textColor:a&&!s&&o?.length>0?"rgba(85, 85, 85, 0.6)":on,setHasEdited:l}};var sn=__webpack_require__(9547),ln={};ln.styleTagTransform=j(),ln.setAttributes=E(),ln.insert=S().bind(null,"head"),ln.domAPI=k(),ln.insertStyleElement=q(),A()(sn.Z,ln);const cn=sn.Z&&sn.Z.locals?sn.Z.locals:void 0;var un=__webpack_require__(9864),dn=__webpack_require__(6774),pn=__webpack_require__.n(dn);const hn=function(e){function t(e,n,l,c,p){for(var h,f,m,g,O,A=0,x=0,k=0,C=0,S=0,j=0,Z=m=h=0,M=0,N=0,D=0,L=0,I=l.length,B=I-1,Q="",z="",U="",F="";M<I;){if(f=l.charCodeAt(M),M===B&&0!==x+C+k+A&&(0!==x&&(f=47===x?10:47),C=k=A=0,I++,B++),0===x+C+k+A){if(M===B&&(0<N&&(Q=Q.replace(d,"")),0<Q.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:Q+=l.charAt(M)}f=59}switch(f){case 123:for(h=(Q=Q.trim()).charCodeAt(0),m=1,L=++M;M<I;){switch(f=l.charCodeAt(M)){case 123:m++;break;case 125:m--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(Z=M+1;Z<B;++Z)switch(l.charCodeAt(Z)){case 47:if(42===f&&42===l.charCodeAt(Z-1)&&M+2!==Z){M=Z+1;break e}break;case 10:if(47===f){M=Z+1;break e}}M=Z}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<B&&l.charCodeAt(M)!==f;);}if(0===m)break;M++}if(m=l.substring(L,M),0===h&&(h=(Q=Q.replace(u,"").trim()).charCodeAt(0)),64===h){switch(0<N&&(Q=Q.replace(d,"")),f=Q.charCodeAt(1)){case 100:case 109:case 115:case 45:N=n;break;default:N=T}if(L=(m=t(n,N,m,f,p+1)).length,0<R&&(O=s(3,m,N=r(T,Q,D),n,E,_,L,f,p,c),Q=N.join(""),void 0!==O&&0===(L=(m=O.trim()).length)&&(f=0,m="")),0<L)switch(f){case 115:Q=Q.replace(w,a);case 100:case 109:case 45:m=Q+"{"+m+"}";break;case 107:m=(Q=Q.replace(b,"$1 $2"))+"{"+m+"}",m=1===q||2===q&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=Q+m,112===c&&(z+=m,m="")}else m=""}else m=t(n,r(n,Q,D),m,c,p+1);U+=m,m=D=N=Z=h=0,Q="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(L=(Q=(0<N?Q.replace(d,""):Q).trim()).length))switch(0===Z&&(h=Q.charCodeAt(0),45===h||96<h&&123>h)&&(L=(Q=Q.replace(" ",":")).length),0<R&&void 0!==(O=s(1,Q,n,e,E,_,z.length,c,p,c))&&0===(L=(Q=O.trim()).length)&&(Q="\0\0"),h=Q.charCodeAt(0),f=Q.charCodeAt(1),h){case 0:break;case 64:if(105===f||99===f){F+=Q+l.charAt(M);break}default:58!==Q.charCodeAt(L-1)&&(z+=o(Q,h,f,Q.charCodeAt(2)))}D=N=Z=h=0,Q="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===x?x=0:0===1+h&&107!==c&&0<Q.length&&(N=1,Q+="\0"),0<R*$&&s(0,Q,n,e,E,_,z.length,c,p,c),_=1,E++;break;case 59:case 125:if(0===x+C+k+A){_++;break}default:switch(_++,g=l.charAt(M),f){case 9:case 32:if(0===C+A+x)switch(S){case 44:case 58:case 9:case 32:g="";break;default:32!==f&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===C+x+A&&(N=D=1,g="\f"+g);break;case 108:if(0===C+x+A+P&&0<Z)switch(M-Z){case 2:112===S&&58===l.charCodeAt(M-3)&&(P=S);case 8:111===j&&(P=j)}break;case 58:0===C+x+A&&(Z=M);break;case 44:0===x+k+C+A&&(N=1,g+="\r");break;case 34:case 39:0===x&&(C=C===f?0:0===C?f:C);break;case 91:0===C+x+k&&A++;break;case 93:0===C+x+k&&A--;break;case 41:0===C+x+A&&k--;break;case 40:0===C+x+A&&(0===h&&(2*S+3*j==533||(h=1)),k++);break;case 64:0===x+k+C+A+Z+m&&(m=1);break;case 42:case 47:if(!(0<C+A+k))switch(x){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:x=47;break;case 220:L=M,x=42}break;case 42:47===f&&42===S&&L+2!==M&&(33===l.charCodeAt(L+2)&&(z+=l.substring(L,M+1)),g="",x=0)}}0===x&&(Q+=g)}j=S,S=f,M++}if(0<(L=z.length)){if(N=n,0<R&&void 0!==(O=s(2,z,N,e,E,_,L,c,p,c))&&0===(z=O).length)return F+z+U;if(z=N.join(",")+"{"+z+"}",0!=q*P){switch(2!==q||i(z,2)||(P=0),P){case 111:z=z.replace(v,":-moz-$1")+z;break;case 112:z=z.replace(y,"::-webkit-input-$1")+z.replace(y,"::-moz-$1")+z.replace(y,":-ms-input-$1")+z}P=0}}return F+z+U}function r(e,t,r){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[l++]=n(e[c]+" ",o[s],r).trim()}return t}function n(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,r,n){var a=e+";",s=2*t+3*r+4*n;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===q||2===q&&i(l,1)?"-webkit-"+l+l:l}if(0===q||2===q&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(O,"tb");break;case 232:l=a.replace(O,"tb-rl");break;case 220:l=a.replace(O,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),Z(2!==t?n:n.replace(k,"$1"),r,t)}function a(e,t){var r=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(A," or ($1)").substring(4):"("+t+")"}function s(e,t,r,n,o,i,a,s,l,u){for(var d,p=0,h=t;p<R;++p)switch(d=j[p].call(c,e,h,r,n,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function l(e){return void 0!==(e=e.prefix)&&(Z=null,e?"function"!=typeof e?q=1:(q=2,Z=e):q=0),l}function c(e,r){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<R){var o=s(-1,r,n,n,E,_,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=t(T,n,r,0,0);return 0<R&&void 0!==(o=s(-2,i,n,n,E,_,i.length,0,0,0))&&(i=o),P=0,_=E=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,v=/:(read-only)/g,O=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,A=/([\s\S]*?);/g,x=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,_=1,E=1,P=0,q=1,T=[],j=[],R=0,Z=null,$=0;return c.use=function e(t){switch(t){case void 0:case null:R=j.length=0;break;default:if("function"==typeof t)j[R++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else $=0|!!t}return e},c.set=l,void 0!==e&&l(e),c},fn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var mn=__webpack_require__(1068);function gn(){return(gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var bn=function(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r},yn=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,un.typeOf)(e)},vn=Object.freeze([]),On=Object.freeze({});function wn(e){return"function"==typeof e}function An(e){return e.displayName||e.name||"Component"}function xn(e){return e&&"string"==typeof e.styledComponentId}var kn="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Cn="undefined"!=typeof window&&"HTMLElement"in window,Sn=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY));function _n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var En=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)(o<<=1)<0&&_n(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),Pn=new Map,qn=new Map,Tn=1,jn=function(e){if(Pn.has(e))return Pn.get(e);for(;qn.has(Tn);)Tn++;var t=Tn++;return Pn.set(e,t),qn.set(t,e),t},Rn=function(e){return qn.get(e)},Zn=function(e,t){t>=Tn&&(Tn=t+1),Pn.set(e,t),qn.set(t,e)},$n="style["+kn+'][data-styled-version="5.3.11"]',Mn=new RegExp("^"+kn+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Nn=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},Dn=function(e,t){for(var r=(t.textContent||"").split("/*!sc*/\n"),n=[],o=0,i=r.length;o<i;o++){var a=r[o].trim();if(a){var s=a.match(Mn);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(Zn(c,l),Nn(e,c,s[3]),e.getTag().insertRules(l,n)),n.length=0}else n.push(a)}}},Ln=function(){return __webpack_require__.nc},In=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(kn))return n}}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(kn,"active"),n.setAttribute("data-styled-version","5.3.11");var a=Ln();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},Bn=function(){function e(e){var t=this.element=In(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}_n(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Qn=function(){function e(e){var t=this.element=In(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),zn=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Un=Cn,Fn={isServer:!Cn,useCSSOMInjection:!Sn},Wn=function(){function e(e,t,r){void 0===e&&(e=On),void 0===t&&(t={}),this.options=gn({},Fn,{},e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&Cn&&Un&&(Un=!1,function(e){for(var t=document.querySelectorAll($n),r=0,n=t.length;r<n;r++){var o=t[r];o&&"active"!==o.getAttribute(kn)&&(Dn(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return jn(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(gn({},this.options,{},t),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(t=this.options).isServer,n=t.useCSSOMInjection,o=t.target,e=r?new zn(o):n?new Bn(o):new Qn(o),new En(e)));var e,t,r,n,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(jn(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},t.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(jn(e),r)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(jn(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=0;o<r;o++){var i=Rn(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var l=kn+".g"+o+'[id="'+i+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),n+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return n}(this)},e}(),Yn=/(a)(d)/gi,Vn=function(e){return String.fromCharCode(e+(e>25?39:97))};function Xn(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Vn(t%52)+r;return(Vn(t%52)+r).replace(Yn,"$1-$2")}var Hn=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Gn=function(e){return Hn(5381,e)};function Kn(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(wn(r)&&!xn(r))return!1}return!0}var Jn=Gn("5.3.11"),eo=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Kn(e),this.componentId=t,this.baseHash=Hn(Jn,t),this.baseStyle=r,Wn.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))o.push(this.staticRulesId);else{var i=yo(this.rules,e,t,r).join(""),a=Xn(Hn(this.baseHash,i)>>>0);if(!t.hasNameForId(n,a)){var s=r(i,"."+a,void 0,n);t.insertRules(n,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=Hn(this.baseHash,r.hash),u="",d=0;d<l;d++){var p=this.rules[d];if("string"==typeof p)u+=p;else if(p){var h=yo(p,e,t,r),f=Array.isArray(h)?h.join(""):h;c=Hn(c,f+d),u+=f}}if(u){var m=Xn(c>>>0);if(!t.hasNameForId(n,m)){var g=r(u,"."+m,void 0,n);t.insertRules(n,m,g)}o.push(m)}}return o.join(" ")},e}(),to=/^\s*\/\/.*$/gm,ro=[":","[",".","#"];function no(e){var t,r,n,o,i=void 0===e?On:e,a=i.options,s=void 0===a?On:a,l=i.plugins,c=void 0===l?vn:l,u=new hn(s),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,o,i,a,s,l,c,u,d){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+n),"";default:return n+(0===d?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),h=function(e,n,i){return 0===n&&-1!==ro.indexOf(i[r.length])||i.match(o)?e:"."+t};function f(e,i,a,s){void 0===s&&(s="&");var l=e.replace(to,""),c=i&&a?a+" "+i+" { "+l+" }":l;return t=s,r=i,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(a||!i?"":i,c)}return u.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(r)>0&&(o[0]=o[0].replace(n,h))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),f.hash=c.length?c.reduce((function(e,t){return t.name||_n(15),Hn(e,t.name)}),5381).toString():"",f}var oo=n().createContext(),io=(oo.Consumer,n().createContext()),ao=(io.Consumer,new Wn),so=no();function lo(){return(0,r.useContext)(oo)||ao}function co(e){var t=(0,r.useState)(e.stylisPlugins),o=t[0],i=t[1],a=lo(),s=(0,r.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,r.useMemo)((function(){return no({options:{prefix:!e.disableVendorPrefixes},plugins:o})}),[e.disableVendorPrefixes,o]);return(0,r.useEffect)((function(){pn()(o,e.stylisPlugins)||i(e.stylisPlugins)}),[e.stylisPlugins]),n().createElement(oo.Provider,{value:s},n().createElement(io.Provider,{value:l},e.children))}var uo=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=so);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return _n(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=so),this.name+e.hash},e}(),po=/([A-Z])/,ho=/([A-Z])/g,fo=/^ms-/,mo=function(e){return"-"+e.toLowerCase()};function go(e){return po.test(e)?e.replace(ho,mo).replace(fo,"-ms-"):e}var bo=function(e){return null==e||!1===e||""===e};function yo(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=yo(e[a],t,r,n))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return bo(e)?"":xn(e)?"."+e.styledComponentId:wn(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:yo(e(t),t,r,n):e instanceof uo?r?(e.inject(r,n),e.getName(n)):e:yn(e)?function e(t,r){var n,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!bo(t[a])&&(Array.isArray(t[a])&&t[a].isCss||wn(t[a])?i.push(go(a)+":",t[a],";"):yn(t[a])?i.push.apply(i,e(t[a],a)):i.push(go(a)+": "+(n=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in fn||n.startsWith("--")?String(o).trim():o+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString();var l}var vo=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Oo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return wn(e)||yn(e)?vo(yo(bn(vn,[e].concat(r)))):0===r.length&&1===e.length&&"string"==typeof e[0]?e:vo(yo(bn(e,r)))}new Set;var wo=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ao=/(^-|-$)/g;function xo(e){return e.replace(wo,"-").replace(Ao,"")}function ko(e){return"string"==typeof e&&!0}var Co=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},So=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function _o(e,t,r){var n=e[r];Co(t)&&Co(n)?Eo(n,t):e[r]=t}function Eo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var o=0,i=r;o<i.length;o++){var a=i[o];if(Co(a))for(var s in a)So(s)&&_o(e,a[s],s)}return e}var Po=n().createContext();Po.Consumer;var qo={};function To(e,t,o){var i=xn(e),a=!ko(e),s=t.attrs,l=void 0===s?vn:s,c=t.componentId,u=void 0===c?function(e,t){var r="string"!=typeof e?"sc":xo(e);qo[r]=(qo[r]||0)+1;var n=r+"-"+function(e){return Xn(Gn(e)>>>0)}("5.3.11"+r+qo[r]);return t?t+"-"+n:n}(t.displayName,t.parentComponentId):c,d=t.displayName,p=void 0===d?function(e){return ko(e)?"styled."+e:"Styled("+An(e)+")"}(e):d,h=t.displayName&&t.componentId?xo(t.displayName)+"-"+t.componentId:t.componentId||u,f=i&&e.attrs?Array.prototype.concat(e.attrs,l).filter(Boolean):l,m=t.shouldForwardProp;i&&e.shouldForwardProp&&(m=t.shouldForwardProp?function(r,n,o){return e.shouldForwardProp(r,n,o)&&t.shouldForwardProp(r,n,o)}:e.shouldForwardProp);var g,b=new eo(o,h,i?e.componentStyle:void 0),y=b.isStatic&&0===l.length,v=function(e,t){return function(e,t,n,o){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,d=e.target,p=function(e,t,r){void 0===e&&(e=On);var n=gn({},t,{theme:e}),o={};return r.forEach((function(e){var t,r,i,a=e;for(t in wn(a)&&(a=a(n)),a)n[t]=o[t]="className"===t?(r=o[t],i=a[t],r&&i?r+" "+i:r||i):a[t]})),[n,o]}(function(e,t,r){return void 0===r&&(r=On),e.theme!==r.theme&&e.theme||t||r.theme}(t,(0,r.useContext)(Po),s)||On,t,i),h=p[0],f=p[1],m=function(e,t,n,o){var i=lo(),a=(0,r.useContext)(io)||so;return t?e.generateAndInjectStyles(On,i,a):e.generateAndInjectStyles(n,i,a)}(a,o,h),g=n,b=f.$as||t.$as||f.as||t.as||d,y=ko(b),v=f!==t?gn({},t,{},f):t,O={};for(var w in v)"$"!==w[0]&&"as"!==w&&("forwardedAs"===w?O.as=v[w]:(c?c(w,mn.Z,b):!y||(0,mn.Z)(w))&&(O[w]=v[w]));return t.style&&f.style!==t.style&&(O.style=gn({},t.style,{},f.style)),O.className=Array.prototype.concat(l,u,m!==u?m:null,t.className,f.className).filter(Boolean).join(" "),O.ref=g,(0,r.createElement)(b,O)}(g,e,t,y)};return v.displayName=p,(g=n().forwardRef(v)).attrs=f,g.componentStyle=b,g.displayName=p,g.shouldForwardProp=m,g.foldedComponentIds=i?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):vn,g.styledComponentId=h,g.target=i?e.target:e,g.withComponent=function(e){var r=t.componentId,n=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(t,["componentId"]),i=r&&r+"-"+(ko(e)?e:xo(An(e)));return To(e,gn({},n,{attrs:f,componentId:i}),o)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?Eo({},e.defaultProps,t):t}}),Object.defineProperty(g,"toString",{value:function(){return"."+g.styledComponentId}}),a&&_e()(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var jo=function(e){return function e(t,r,n){if(void 0===n&&(n=On),!(0,un.isValidElementType)(r))return _n(1,String(r));var o=function(){return t(r,n,Oo.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,r,gn({},n,{},o))},o.attrs=function(o){return e(t,r,gn({},n,{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o}(To,e)};["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(e){jo[e]=jo(e)})),function(){var e=function(e,t){this.rules=e,this.componentId=t,this.isStatic=Kn(e),Wn.registerId(this.componentId+1)}.prototype;e.createStyles=function(e,t,r,n){var o=n(yo(this.rules,t,r,n).join(""),""),i=this.componentId+e;r.insertRules(i,i,o)},e.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.renderStyles=function(e,t,r,n){e>2&&Wn.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}(),function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=Ln();return"<style "+[r&&'nonce="'+r+'"',kn+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?_n(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return _n(2);var r=((t={})[kn]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Ln();return o&&(r.nonce=o),[n().createElement("style",gn({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Wn({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?_n(2):n().createElement(co,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return _n(3)}}();const Ro=jo,Zo=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),$o=Ro.div`
|
75
|
+
`),je.rippleVisible,Le,550,(({theme:e})=>e.transitions.easing.easeInOut),je.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),je.child,je.childLeaving,Ie,550,(({theme:e})=>e.transitions.easing.easeInOut),je.childPulsate,Be,(({theme:e})=>e.transitions.easing.easeInOut)),Ue=r.forwardRef((function(n,o){const i=(0,ce.Z)({props:n,name:"MuiTouchRipple"}),{center:a=!1,classes:l={},className:c}=i,u=(0,t.Z)(i,Re),[d,p]=r.useState([]),h=r.useRef(0),f=r.useRef(null);r.useEffect((()=>{f.current&&(f.current(),f.current=null)}),[d]);const m=r.useRef(!1),g=r.useRef(0),b=r.useRef(null),y=r.useRef(null);r.useEffect((()=>()=>{g.current&&clearTimeout(g.current)}),[]);const v=r.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:o,cb:i}=e;p((e=>[...e,(0,s.jsx)(ze,{classes:{ripple:(0,oe.Z)(l.ripple,je.ripple),rippleVisible:(0,oe.Z)(l.rippleVisible,je.rippleVisible),ripplePulsate:(0,oe.Z)(l.ripplePulsate,je.ripplePulsate),child:(0,oe.Z)(l.child,je.child),childLeaving:(0,oe.Z)(l.childLeaving,je.childLeaving),childPulsate:(0,oe.Z)(l.childPulsate,je.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:o},h.current)])),h.current+=1,f.current=i}),[l]),O=r.useCallback(((e={},t={},r=(()=>{}))=>{const{pulsate:n=!1,center:o=a||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&m.current)return void(m.current=!1);"touchstart"===(null==e?void 0:e.type)&&(m.current=!0);const s=i?null:y.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(r-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===b.current&&(b.current=()=>{v({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})},g.current=setTimeout((()=>{b.current&&(b.current(),b.current=null)}),80)):v({pulsate:n,rippleX:c,rippleY:u,rippleSize:d,cb:r})}),[a,v]),w=r.useCallback((()=>{O({},{pulsate:!0})}),[O]),A=r.useCallback(((e,t)=>{if(clearTimeout(g.current),"touchend"===(null==e?void 0:e.type)&&b.current)return b.current(),b.current=null,void(g.current=setTimeout((()=>{A(e,t)})));b.current=null,p((e=>e.length>0?e.slice(1):e)),f.current=t}),[]);return r.useImperativeHandle(o,(()=>({pulsate:w,start:O,stop:A})),[w,O,A]),(0,s.jsx)(Qe,(0,e.Z)({className:(0,oe.Z)(je.root,l.root,c),ref:y},u,{children:(0,s.jsx)(Ae,{component:null,exit:!0,children:d})}))})),Fe=Ue;var We=__webpack_require__(4867);function Ye(e){return(0,We.Z)("MuiButtonBase",e)}const Ve=(0,Te.Z)("MuiButtonBase",["root","disabled","focusVisible"]),Xe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],He=(0,le.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ve.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ge=r.forwardRef((function(n,o){const i=(0,ce.Z)({props:n,name:"MuiButtonBase"}),{action:a,centerRipple:l=!1,children:c,className:u,component:d="button",disabled:p=!1,disableRipple:h=!1,disableTouchRipple:f=!1,focusRipple:m=!1,LinkComponent:g="a",onBlur:b,onClick:y,onContextMenu:v,onDragLeave:O,onFocus:w,onFocusVisible:A,onKeyDown:x,onKeyUp:k,onMouseDown:C,onMouseLeave:S,onMouseUp:_,onTouchEnd:E,onTouchMove:P,onTouchStart:q,tabIndex:T=0,TouchRippleProps:j,touchRippleRef:R,type:Z}=i,$=(0,t.Z)(i,Xe),M=r.useRef(null),N=r.useRef(null),D=(0,ue.Z)(N,R),{isFocusVisibleRef:L,onFocus:I,onBlur:B,ref:Q}=(0,pe.Z)(),[z,U]=r.useState(!1);p&&z&&U(!1),r.useImperativeHandle(a,(()=>({focusVisible:()=>{U(!0),M.current.focus()}})),[]);const[F,W]=r.useState(!1);r.useEffect((()=>{W(!0)}),[]);const Y=F&&!h&&!p;function V(e,t,r=f){return(0,de.Z)((n=>(t&&t(n),!r&&N.current&&N.current[e](n),!0)))}r.useEffect((()=>{z&&m&&!h&&F&&N.current.pulsate()}),[h,m,z,F]);const X=V("start",C),H=V("stop",v),G=V("stop",O),K=V("stop",_),J=V("stop",(e=>{z&&e.preventDefault(),S&&S(e)})),ee=V("start",q),te=V("stop",E),re=V("stop",P),ne=V("stop",(e=>{B(e),!1===L.current&&U(!1),b&&b(e)}),!1),ie=(0,de.Z)((e=>{M.current||(M.current=e.currentTarget),I(e),!0===L.current&&(U(!0),A&&A(e)),w&&w(e)})),se=()=>{const e=M.current;return d&&"button"!==d&&!("A"===e.tagName&&e.href)},le=r.useRef(!1),he=(0,de.Z)((e=>{m&&!le.current&&z&&N.current&&" "===e.key&&(le.current=!0,N.current.stop(e,(()=>{N.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!p&&(e.preventDefault(),y&&y(e))})),fe=(0,de.Z)((e=>{m&&" "===e.key&&N.current&&z&&!e.defaultPrevented&&(le.current=!1,N.current.stop(e,(()=>{N.current.pulsate(e)}))),k&&k(e),y&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&y(e)}));let me=d;"button"===me&&($.href||$.to)&&(me=g);const ge={};"button"===me?(ge.type=void 0===Z?"button":Z,ge.disabled=p):($.href||$.to||(ge.role="button"),p&&(ge["aria-disabled"]=p));const be=(0,ue.Z)(o,Q,M),ye=(0,e.Z)({},i,{centerRipple:l,component:d,disabled:p,disableRipple:h,disableTouchRipple:f,focusRipple:m,tabIndex:T,focusVisible:z}),ve=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i={root:["root",t&&"disabled",r&&"focusVisible"]},a=(0,ae.Z)(i,Ye,o);return r&&n&&(a.root+=` ${n}`),a})(ye);return(0,s.jsxs)(He,(0,e.Z)({as:me,className:(0,oe.Z)(ve.root,u),ownerState:ye,onBlur:ne,onClick:y,onContextMenu:H,onFocus:ie,onKeyDown:he,onKeyUp:fe,onMouseDown:X,onMouseLeave:J,onMouseUp:K,onDragLeave:G,onTouchEnd:te,onTouchMove:re,onTouchStart:ee,ref:be,tabIndex:p?-1:T,type:Z},ge,$,{children:[c,Y?(0,s.jsx)(Fe,(0,e.Z)({ref:D,center:l},j)):null]}))}));var Ke=__webpack_require__(8216);function Je(e){return(0,We.Z)("MuiButton",e)}const et=(0,Te.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),tt=r.createContext({}),rt=r.createContext(void 0),nt=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ot=t=>(0,e.Z)({},"small"===t.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===t.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===t.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),it=(0,le.ZP)(Ge,{shouldForwardProp:e=>(0,le.FO)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,Ke.Z)(r.color)}`],t[`size${(0,Ke.Z)(r.size)}`],t[`${r.variant}Size${(0,Ke.Z)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((({theme:t,ownerState:r})=>{var n,o;const i="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,e.Z)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,e.Z)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===r.variant&&"inherit"!==r.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===r.variant&&"inherit"!==r.color&&{border:`1px solid ${(t.vars||t).palette[r.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===r.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===r.variant&&"inherit"!==r.color&&{backgroundColor:(t.vars||t).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[r.color].main}}),"&:active":(0,e.Z)({},"contained"===r.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${et.focusVisible}`]:(0,e.Z)({},"contained"===r.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${et.disabled}`]:(0,e.Z)({color:(t.vars||t).palette.action.disabled},"outlined"===r.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"contained"===r.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===r.variant&&{padding:"6px 8px"},"text"===r.variant&&"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main},"outlined"===r.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===r.variant&&"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[r.color].mainChannel} / 0.5)`:`1px solid ${(0,se.Fq)(t.palette[r.color].main,.5)}`},"contained"===r.variant&&{color:t.vars?t.vars.palette.text.primary:null==(n=(o=t.palette).getContrastText)?void 0:n.call(o,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},"contained"===r.variant&&"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].contrastText,backgroundColor:(t.vars||t).palette[r.color].main},"inherit"===r.color&&{color:"inherit",borderColor:"currentColor"},"small"===r.size&&"text"===r.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===r.size&&"text"===r.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===r.size&&"outlined"===r.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===r.size&&"outlined"===r.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===r.size&&"contained"===r.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===r.size&&"contained"===r.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},r.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${et.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${et.disabled}`]:{boxShadow:"none"}})),at=(0,le.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${(0,Ke.Z)(r.size)}`]]}})((({ownerState:t})=>(0,e.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},ot(t)))),st=(0,le.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${(0,Ke.Z)(r.size)}`]]}})((({ownerState:t})=>(0,e.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},ot(t)))),lt=r.forwardRef((function(n,o){const i=r.useContext(tt),a=r.useContext(rt),l=(0,ie.Z)(i,n),c=(0,ce.Z)({props:l,name:"MuiButton"}),{children:u,color:d="primary",component:p="button",className:h,disabled:f=!1,disableElevation:m=!1,disableFocusRipple:g=!1,endIcon:b,focusVisibleClassName:y,fullWidth:v=!1,size:O="medium",startIcon:w,type:A,variant:x="text"}=c,k=(0,t.Z)(c,nt),C=(0,e.Z)({},c,{color:d,component:p,disabled:f,disableElevation:m,disableFocusRipple:g,fullWidth:v,size:O,type:A,variant:x}),S=(t=>{const{color:r,disableElevation:n,fullWidth:o,size:i,variant:a,classes:s}=t,l={root:["root",a,`${a}${(0,Ke.Z)(r)}`,`size${(0,Ke.Z)(i)}`,`${a}Size${(0,Ke.Z)(i)}`,"inherit"===r&&"colorInherit",n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${(0,Ke.Z)(i)}`],endIcon:["endIcon",`iconSize${(0,Ke.Z)(i)}`]},c=(0,ae.Z)(l,Je,s);return(0,e.Z)({},s,c)})(C),_=w&&(0,s.jsx)(at,{className:S.startIcon,ownerState:C,children:w}),E=b&&(0,s.jsx)(st,{className:S.endIcon,ownerState:C,children:b}),P=a||"";return(0,s.jsxs)(it,(0,e.Z)({ownerState:C,className:(0,oe.Z)(i.className,S.root,h,P),component:p,disabled:f,focusRipple:!g,focusVisibleClassName:(0,oe.Z)(S.focusVisible,y),ref:o,type:A},k,{classes:S,children:[_,u,E]}))})),ct=lt,ut=r.createContext(void 0);function dt(){return r.useContext(ut)}var pt=__webpack_require__(9766);const ht=(0,__webpack_require__(2807).ZP)();var ft=__webpack_require__(7333),mt=__webpack_require__(8010);const gt=["sx"];function bt(r){const{sx:n}=r,o=(0,t.Z)(r,gt),{systemProps:i,otherProps:a}=(e=>{var t,r;const n={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(r=e.theme)?void 0:r.unstable_sxConfig)?t:mt.Z;return Object.keys(e).forEach((t=>{o[t]?n.systemProps[t]=e[t]:n.otherProps[t]=e[t]})),n})(o);let s;return s=Array.isArray(n)?[i,...n]:"function"==typeof n?(...t)=>{const r=n(...t);return(0,pt.P)(r)?(0,e.Z)({},i,r):i}:(0,e.Z)({},i,n),(0,e.Z)({},a,{sx:s})}var yt=__webpack_require__(6268),vt=__webpack_require__(5408),Ot=__webpack_require__(2605);const wt=["component","direction","spacing","divider","children","className","useFlexGap"],At=(0,yt.Z)(),xt=ht("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function kt(e){return(0,ft.Z)({props:e,name:"MuiStack",defaultTheme:At})}function Ct(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i<n.length-1&&e.push(r.cloneElement(t,{key:`separator-${i}`})),e)),[])}const St=({ownerState:t,theme:r})=>{let n=(0,e.Z)({display:"flex",flexDirection:"column"},(0,vt.k9)({theme:r},(0,vt.P$)({values:t.direction,breakpoints:r.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,Ot.hB)(r),o=Object.keys(r.breakpoints.values).reduce(((e,r)=>(("object"==typeof t.spacing&&null!=t.spacing[r]||"object"==typeof t.direction&&null!=t.direction[r])&&(e[r]=!0),e)),{}),i=(0,vt.P$)({values:t.direction,base:o}),a=(0,vt.P$)({values:t.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach(((e,t,r)=>{if(!i[e]){const n=t>0?i[r[t-1]]:"column";i[e]=n}}));const s=(r,n)=>{return t.useFlexGap?{gap:(0,Ot.NA)(e,r)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=n?i[n]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,Ot.NA)(e,r)}};var o};n=(0,pt.Z)(n,(0,vt.k9)({theme:r},a,s))}return n=(0,vt.dt)(r.breakpoints,n),n},_t=function(n={}){const{createStyledComponent:o=xt,useThemeProps:i=kt,componentName:a="MuiStack"}=n,l=o(St),c=r.forwardRef((function(r,n){const o=bt(i(r)),{component:c="div",direction:u="column",spacing:d=0,divider:p,children:h,className:f,useFlexGap:m=!1}=o,g=(0,t.Z)(o,wt),b={direction:u,spacing:d,useFlexGap:m},y=(0,ae.Z)({root:["root"]},(e=>(0,We.Z)(a,e)),{});return(0,s.jsx)(l,(0,e.Z)({as:c,ownerState:b,ref:n,className:(0,oe.Z)(y.root,f)},g,{children:p?Ct(h,p):h}))}));return c}({createStyledComponent:(0,le.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,ce.Z)({props:e,name:"MuiStack"})}),Et=_t;function Pt(e){return(0,We.Z)("MuiTypography",e)}(0,Te.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const qt=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Tt=(0,le.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${(0,Ke.Z)(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})((({theme:t,ownerState:r})=>(0,e.Z)({margin:0},"inherit"===r.variant&&{font:"inherit"},"inherit"!==r.variant&&t.typography[r.variant],"inherit"!==r.align&&{textAlign:r.align},r.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r.gutterBottom&&{marginBottom:"0.35em"},r.paragraph&&{marginBottom:16}))),jt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Rt={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Zt=r.forwardRef((function(r,n){const o=(0,ce.Z)({props:r,name:"MuiTypography"}),i=(e=>Rt[e]||e)(o.color),a=bt((0,e.Z)({},o,{color:i})),{align:l="inherit",className:c,component:u,gutterBottom:d=!1,noWrap:p=!1,paragraph:h=!1,variant:f="body1",variantMapping:m=jt}=a,g=(0,t.Z)(a,qt),b=(0,e.Z)({},a,{align:l,color:i,className:c,component:u,gutterBottom:d,noWrap:p,paragraph:h,variant:f,variantMapping:m}),y=u||(h?"p":m[f]||jt[f])||"span",v=(e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,"inherit"!==e.align&&`align${(0,Ke.Z)(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return(0,ae.Z)(s,Pt,a)})(b);return(0,s.jsx)(Tt,(0,e.Z)({as:y,ref:n,ownerState:b,className:(0,oe.Z)(v.root,c)},g))})),$t=Zt;function Mt(e){return(0,We.Z)("MuiFormControlLabel",e)}const Nt=(0,Te.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function Dt({props:e,states:t,muiFormControl:r}){return t.reduce(((t,n)=>(t[n]=e[n],r&&void 0===e[n]&&(t[n]=r[n]),t)),{})}const Lt=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],It=(0,le.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Nt.label}`]:t.label},t.root,t[`labelPlacement${(0,Ke.Z)(r.labelPlacement)}`]]}})((({theme:t,ownerState:r})=>(0,e.Z)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Nt.disabled}`]:{cursor:"default"}},"start"===r.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===r.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===r.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${Nt.label}`]:{[`&.${Nt.disabled}`]:{color:(t.vars||t).palette.text.disabled}}}))),Bt=(0,le.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((({theme:e})=>({[`&.${Nt.error}`]:{color:(e.vars||e).palette.error.main}}))),Qt=r.forwardRef((function(n,o){var i,a;const l=(0,ce.Z)({props:n,name:"MuiFormControlLabel"}),{className:c,componentsProps:u={},control:d,disabled:p,disableTypography:h,label:f,labelPlacement:m="end",required:g,slotProps:b={}}=l,y=(0,t.Z)(l,Lt),v=dt(),O=null!=(i=null!=p?p:d.props.disabled)?i:null==v?void 0:v.disabled,w=null!=g?g:d.props.required,A={disabled:O,required:w};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===d.props[e]&&void 0!==l[e]&&(A[e]=l[e])}));const x=Dt({props:l,muiFormControl:v,states:["error"]}),k=(0,e.Z)({},l,{disabled:O,labelPlacement:m,required:w,error:x.error}),C=(e=>{const{classes:t,disabled:r,labelPlacement:n,error:o,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${(0,Ke.Z)(n)}`,o&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,ae.Z)(a,Mt,t)})(k),S=null!=(a=b.typography)?a:u.typography;let _=f;return null==_||_.type===$t||h||(_=(0,s.jsx)($t,(0,e.Z)({component:"span"},S,{className:(0,oe.Z)(C.label,null==S?void 0:S.className),children:_}))),(0,s.jsxs)(It,(0,e.Z)({className:(0,oe.Z)(C.root,c),ownerState:k,ref:o},y,{children:[r.cloneElement(d,A),w?(0,s.jsxs)(Et,{display:"block",children:[_,(0,s.jsxs)(Bt,{ownerState:k,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}):_]}))})),zt=Qt;var Ut=__webpack_require__(8403),Ft=__webpack_require__.n(Ut),Wt=__webpack_require__(8866),Yt=__webpack_require__(1121);const Vt=()=>n().createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n().createElement("path",{d:"M8.1 11.7H9.9V13.5H8.1V11.7ZM8.1 4.5H9.9V9.9H8.1V4.5ZM8.991 0C4.023 0 0 4.032 0 9C0 13.968 4.023 18 8.991 18C13.968 18 18 13.968 18 9C18 4.032 13.968 0 8.991 0ZM9 16.2C5.022 16.2 1.8 12.978 1.8 9C1.8 5.022 5.022 1.8 9 1.8C12.978 1.8 16.2 5.022 16.2 9C16.2 12.978 12.978 16.2 9 16.2Z",fill:"#B01F14"}));var Xt=__webpack_require__(3463),Ht={};Ht.styleTagTransform=j(),Ht.setAttributes=E(),Ht.insert=S().bind(null,"head"),Ht.domAPI=k(),Ht.insertStyleElement=q(),A()(Xt.Z,Ht);const Gt=Xt.Z&&Xt.Z.locals?Xt.Z.locals:void 0,Kt=({error:e})=>{const[t,o]=(0,r.useState)(!1);return n().createElement("div",{className:Gt.errorContainer,"data-testid":"form-general-error-container"},n().createElement("div",{className:Gt.iconWrapper},n().createElement(Vt,null)),n().createElement("p",{className:`${Gt.errorMessage} ${t?Gt.open:Gt.closed}`,"data-testid":"form-general-error-message"},e),n().createElement("div",{className:Gt.errorMessageToggleButtonContainer},n().createElement("button",{type:"button",onClick:()=>{o((e=>!e))}},t?n().createElement(Wt.R,{"data-testid":"form-list__sort-down-button",color:"#B01F14"}):n().createElement(Yt.s,{"data-testid":"form-list__sort-up-button",color:"#B01F14"}))))};var Jt=__webpack_require__(1191),er={};er.styleTagTransform=j(),er.setAttributes=E(),er.insert=S().bind(null,"head"),er.domAPI=k(),er.insertStyleElement=q(),A()(Jt.Z,er);const tr=Jt.Z&&Jt.Z.locals?Jt.Z.locals:void 0;var rr=__webpack_require__(9299);function nr(e){return(0,We.Z)("PrivateSwitchBase",e)}(0,Te.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const or=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ir=(0,le.ZP)(Ge)((({ownerState:t})=>(0,e.Z)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12}))),ar=(0,le.ZP)("input",{shouldForwardProp:le.FO})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),sr=r.forwardRef((function(r,n){const{autoFocus:o,checked:i,checkedIcon:a,className:l,defaultChecked:c,disabled:u,disableFocusRipple:d=!1,edge:p=!1,icon:h,id:f,inputProps:m,inputRef:g,name:b,onBlur:y,onChange:v,onFocus:O,readOnly:w,required:A=!1,tabIndex:x,type:k,value:C}=r,S=(0,t.Z)(r,or),[_,E]=(0,rr.Z)({controlled:i,default:Boolean(c),name:"SwitchBase",state:"checked"}),P=dt();let q=u;P&&void 0===q&&(q=P.disabled);const T="checkbox"===k||"radio"===k,j=(0,e.Z)({},r,{checked:_,disabled:q,disableFocusRipple:d,edge:p}),R=(e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,i={root:["root",r&&"checked",n&&"disabled",o&&`edge${(0,Ke.Z)(o)}`],input:["input"]};return(0,ae.Z)(i,nr,t)})(j);return(0,s.jsxs)(ir,(0,e.Z)({component:"span",className:(0,oe.Z)(R.root,l),centerRipple:!0,focusRipple:!d,disabled:q,tabIndex:null,role:void 0,onFocus:e=>{O&&O(e),P&&P.onFocus&&P.onFocus(e)},onBlur:e=>{y&&y(e),P&&P.onBlur&&P.onBlur(e)},ownerState:j,ref:n},S,{children:[(0,s.jsx)(ar,(0,e.Z)({autoFocus:o,checked:i,defaultChecked:c,className:R.input,disabled:q,id:T?f:void 0,name:b,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;E(t),v&&v(e,t)},readOnly:w,ref:g,required:A,ownerState:j,tabIndex:x,type:k},"checkbox"===k&&void 0===C?{}:{value:C},m)),_?a:h]}))})),lr=sr;function cr(e){return(0,We.Z)("MuiSwitch",e)}const ur=(0,Te.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),dr=["className","color","edge","size","sx"],pr=(0,le.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${(0,Ke.Z)(r.edge)}`],t[`size${(0,Ke.Z)(r.size)}`]]}})((({ownerState:t})=>(0,e.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===t.edge&&{marginLeft:-8},"end"===t.edge&&{marginRight:-8},"small"===t.size&&{width:40,height:24,padding:7,[`& .${ur.thumb}`]:{width:16,height:16},[`& .${ur.switchBase}`]:{padding:4,[`&.${ur.checked}`]:{transform:"translateX(16px)"}}}))),hr=(0,le.ZP)(lr,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${ur.input}`]:t.input},"default"!==r.color&&t[`color${(0,Ke.Z)(r.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${ur.checked}`]:{transform:"translateX(20px)"},[`&.${ur.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${ur.checked} + .${ur.track}`]:{opacity:.5},[`&.${ur.disabled} + .${ur.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${ur.input}`]:{left:"-100%",width:"300%"}})),(({theme:t,ownerState:r})=>(0,e.Z)({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&{[`&.${ur.checked}`]:{color:(t.vars||t).palette[r.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)(t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ur.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${r.color}DisabledColor`]:`${"light"===t.palette.mode?(0,se.$n)(t.palette[r.color].main,.62):(0,se._j)(t.palette[r.color].main,.55)}`}},[`&.${ur.checked} + .${ur.track}`]:{backgroundColor:(t.vars||t).palette[r.color].main}}))),fr=(0,le.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),mr=(0,le.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),gr=r.forwardRef((function(r,n){const o=(0,ce.Z)({props:r,name:"MuiSwitch"}),{className:i,color:a="primary",edge:l=!1,size:c="medium",sx:u}=o,d=(0,t.Z)(o,dr),p=(0,e.Z)({},o,{color:a,edge:l,size:c}),h=(t=>{const{classes:r,edge:n,size:o,color:i,checked:a,disabled:s}=t,l={root:["root",n&&`edge${(0,Ke.Z)(n)}`,`size${(0,Ke.Z)(o)}`],switchBase:["switchBase",`color${(0,Ke.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,ae.Z)(l,cr,r);return(0,e.Z)({},r,c)})(p),f=(0,s.jsx)(mr,{className:h.thumb,ownerState:p});return(0,s.jsxs)(pr,{className:(0,oe.Z)(h.root,i),sx:u,ownerState:p,children:[(0,s.jsx)(hr,(0,e.Z)({type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:p},d,{classes:(0,e.Z)({},h,{root:h.switchBase})})),(0,s.jsx)(fr,{className:h.track,ownerState:p})]})})),br=gr,yr=(0,le.ZP)(br)((()=>({"& .MuiSwitch-switchBase.Mui-checked":{color:"white"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"#4A96D2",opacity:1,"&:hover":{backgroundColor:"#255F8E"}}}))),vr={add:n().createElement(te.Z,{"data-testid":"formfooter__add-icon"}),save:n().createElement(re.Z,{"data-testid":"formfooter__save-icon"}),update:n().createElement(ne.d,{size:14,"data-testid":"formfooter__update-icon"})},Or=({controlProps:e,error:t,iconType:o,loading:i,onSubmit:a})=>{const{formControls:s,isExpertMode:l,hasExpertMode:c,toggleExpertMode:u}=(0,r.useContext)(O.L8),d=o&&vr[o.toLowerCase()],p=o&&Ft()(o)||"Add",h=e?.footerProps?.style??{},f=e?.footerProps?.container?.style??{},m=e?.footerProps?.submitButtonContainer?.style??{},g=e?.footerProps?.submitButton?.sx??{};return n().createElement("div",{"data-testid":"form-footer-container",className:tr["form-footer-container"],style:h},t&&n().createElement("div",{className:tr.notificationContainer},n().createElement(Kt,{error:t})),n().createElement("div",{className:tr.controlsContainer,style:f},c?n().createElement(zt,{"data-testid":"formfooter__expert-mode",control:n().createElement(yr,{checked:l,onChange:u}),label:"Expert Mode",sx:{color:"rgba(0,0,0,.54)",marginBottom:0,input:{marginTop:0},".MuiTypography-root":{fontSize:12}}}):n().createElement("div",null),n().createElement("div",{className:tr["submit-container"],style:m},n().createElement("span",{className:tr["required-message"]},"* Please fill in all required fields"),n().createElement(ct,{"data-testid":"formfooter__submit",id:"submit-button",variant:"contained",type:"submit",form:"form-horizontal xhtmlInstantForm",onClick:()=>a(s),sx:{backgroundColor:"#4A96D2",boxShadow:"none","&:hover":{backgroundColor:"#0B5BA6",boxShadow:"none"},...g},endIcon:i?n().createElement("svg",{className:`${tr["run-button__spinner"]} run-button__spinner`,"data-testid":"formfooter__loading-icon",xmlns:"http://www.w3.org/2000/svg",width:"21.076",height:"20.31",viewBox:"0 0 21.076 20.31"},n().createElement("g",{id:"Gruppe_272","data-name":"Gruppe 272",transform:"translate(-269.58 -82.717)"},n().createElement("path",{id:"Pfad_338","data-name":"Pfad 338",d:"M278.934,84.754l3.514-2.03v4.06l-3.514,2.03Z",transform:"translate(-5.841 -0.004)",fill:"#fff"}),n().createElement("path",{id:"Pfad_339","data-name":"Pfad 339",d:"M288.29,86.784v-4.06l3.514,2.03v4.06Z",transform:"translate(-11.683 -0.004)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_340","data-name":"Pfad 340",d:"M282.45,119.233v-4.06l-3.514,2.03v4.06Z",transform:"translate(-5.842 -20.266)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_341","data-name":"Pfad 341",d:"M285.963,128.014l-3.515-2.03-3.514,2.03,3.514,2.03Z",transform:"translate(-5.841 -27.017)",fill:"#fff"}),n().createElement("path",{id:"Pfad_342","data-name":"Pfad 342",d:"M297.625,124.639l3.514,2.03v-4.06l-3.514-2.03Z",transform:"translate(-17.513 -23.642)",fill:"#fff"}),n().createElement("path",{id:"Pfad_343","data-name":"Pfad 343",d:"M306.981,122.609v4.06l3.514-2.03v-4.06Z",transform:"translate(-23.355 -23.642)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_344","data-name":"Pfad 344",d:"M273.094,106.394v4.06l-3.514-2.03v-4.06Z",transform:"translate(0 -13.516)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_345","data-name":"Pfad 345",d:"M276.608,100.988l-3.514,2.03-3.514-2.03,3.514-2.03Z",transform:"translate(0 -10.141)",fill:"#fff"}),n().createElement("path",{id:"Pfad_346","data-name":"Pfad 346",d:"M310.5,92.185l-3.514,2.03v-4.06l3.514-2.03Z",transform:"translate(-23.355 -3.377)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_347","data-name":"Pfad 347",d:"M304.657,84.747l-3.514,2.03-3.514-2.03,3.514-2.03Z",transform:"translate(-17.515)",fill:"#fff"}),n().createElement("path",{id:"Pfad_348","data-name":"Pfad 348",d:"M319.853,100.968l-3.514-2.03V103l3.514,2.03Z",transform:"translate(-29.198 -10.129)",fill:"#f0f0f0"}),n().createElement("path",{id:"Pfad_349","data-name":"Pfad 349",d:"M314.011,111.778l-3.514-2.03-3.514,2.03,3.514,2.03Z",transform:"translate(-23.356 -16.879)",fill:"#fff"}))):d||vr.add},p))))};var wr=__webpack_require__(7361),Ar=__webpack_require__.n(wr),xr=__webpack_require__(236),kr=__webpack_require__.n(xr),Cr=__webpack_require__(8932),Sr={};Sr.styleTagTransform=j(),Sr.setAttributes=E(),Sr.insert=S().bind(null,"head"),Sr.domAPI=k(),Sr.insertStyleElement=q(),A()(Cr.Z,Sr);const _r=Cr.Z&&Cr.Z.locals?Cr.Z.locals:void 0;var Er=__webpack_require__(3804),Pr={};Pr.styleTagTransform=j(),Pr.setAttributes=E(),Pr.insert=S().bind(null,"head"),Pr.domAPI=k(),Pr.insertStyleElement=q(),A()(Er.Z,Pr);const qr=Er.Z&&Er.Z.locals?Er.Z.locals:void 0,Tr=({controlProps:e,...t})=>{const{id:r,objectPathId:o,error:i,displayName:a,required:s,hideLabel:l=!1,isExpert:c,children:u}=t,d=i?"error":"",p=c?"expert":"",h=o||r,f=o?`${qr["control-wrapper"]} ${_r["control-wrapper"]}`:`${qr["control-wrapper"]} ${_r["control-wrapper"]} ${qr["control-wrapper-firstlayer"]}`,m=e?.controlWrapperProps?.style??{},g=e?.controlWrapperProps?.label?.style??{},b=e?.controlWrapperProps?.container?.style??{};return n().createElement("div",{className:`${qr["form-group"]} ${_r["form-group"]} ${qr[d]} ${qr[p]}`,style:m},!l&&n().createElement("label",{htmlFor:h,"data-testid":"control-label",className:`${qr["control-label"]} ${_r["control-label"]}`,style:g},s?a+" *":a),n().createElement("div",{className:f,style:b},u,n().createElement("label",{htmlFor:h,className:qr["error-message"]},i)))},jr=({Control:e,config:t,isExpert:o,hideLabel:i=!1,controlProps:a})=>{const{control:s,id:l,objectPathId:c,groupIsRequired:u}=t,{error:d,displayName:p,required:h}=s,{updateControl:f}=(0,r.useContext)(O.L8),m={id:l,objectPathId:c,error:d?.message,displayName:p,hideLabel:i,isExpert:o,required:!!u&&h},g={objectPathId:c,id:l,control:{...s,required:!!u&&h}};return n().createElement(Tr,{controlProps:a,...m},n().createElement(e,{controlProps:a,onChangeValue:(e,t)=>{const r={hasChanged:!0,...e};f(c||l,kr()({},s,r,t))},...g}))},Rr=/mrn:srv:([a-z-A-Z0-9]+):([a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}):([^\s]*)/g,Zr=e=>{if(e){const t=[...e.matchAll(Rr)],r=t&&t[0];return r&&4===r.length?{matchAll:t,mrn:r[0],serviceName:r[1],applicationId:r[2],resource:r[3]}:$r(e)}},$r=e=>{const t=[...e.matchAll(/mrn:srv:([a-z-A-Z0-9]+):([a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12})/g)],r=t&&t[0];return r&&3===r.length?{matchAll:t,mrn:r[0],serviceName:r[1],applicationId:r[2]}:null};var Mr=__webpack_require__(5949);const Nr=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Dr=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Lr=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Ir(e){return(0,We.Z)("MuiCheckbox",e)}const Br=(0,Te.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Qr=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],zr=(0,le.ZP)(lr,{shouldForwardProp:e=>(0,le.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,Ke.Z)(r.size)}`],"default"!==r.color&&t[`color${(0,Ke.Z)(r.color)}`]]}})((({theme:t,ownerState:r})=>(0,e.Z)({color:(t.vars||t).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${"default"===r.color?t.vars.palette.action.activeChannel:t.vars.palette[r.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,se.Fq)("default"===r.color?t.palette.action.active:t.palette[r.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&{[`&.${Br.checked}, &.${Br.indeterminate}`]:{color:(t.vars||t).palette[r.color].main},[`&.${Br.disabled}`]:{color:(t.vars||t).palette.action.disabled}}))),Ur=(0,s.jsx)(Dr,{}),Fr=(0,s.jsx)(Nr,{}),Wr=(0,s.jsx)(Lr,{}),Yr=r.forwardRef((function(n,o){var i,a;const l=(0,ce.Z)({props:n,name:"MuiCheckbox"}),{checkedIcon:c=Ur,color:u="primary",icon:d=Fr,indeterminate:p=!1,indeterminateIcon:h=Wr,inputProps:f,size:m="medium",className:g}=l,b=(0,t.Z)(l,Qr),y=p?h:d,v=p?h:c,O=(0,e.Z)({},l,{color:u,indeterminate:p,size:m}),w=(t=>{const{classes:r,indeterminate:n,color:o,size:i}=t,a={root:["root",n&&"indeterminate",`color${(0,Ke.Z)(o)}`,`size${(0,Ke.Z)(i)}`]},s=(0,ae.Z)(a,Ir,r);return(0,e.Z)({},r,s)})(O);return(0,s.jsx)(zr,(0,e.Z)({type:"checkbox",inputProps:(0,e.Z)({"data-indeterminate":p},f),icon:r.cloneElement(y,{fontSize:null!=(i=y.props.fontSize)?i:m}),checkedIcon:r.cloneElement(v,{fontSize:null!=(a=v.props.fontSize)?a:m}),ownerState:O,ref:o,className:(0,oe.Z)(w.root,g)},b,{classes:w}))})),Vr=Yr;var Xr=__webpack_require__(7557),Hr=__webpack_require__.n(Xr),Gr=__webpack_require__(9673),Kr={};Kr.styleTagTransform=j(),Kr.setAttributes=E(),Kr.insert=S().bind(null,"head"),Kr.domAPI=k(),Kr.insertStyleElement=q(),A()(Gr.Z,Kr);const Jr=Gr.Z&&Gr.Z.locals?Gr.Z.locals:void 0;var en=__webpack_require__(5540),tn={};tn.styleTagTransform=j(),tn.setAttributes=E(),tn.insert=S().bind(null,"head"),tn.domAPI=k(),tn.insertStyleElement=q(),A()(en.Z,tn);const rn=en.Z&&en.Z.locals?en.Z.locals:void 0;var nn=__webpack_require__(8880);const on="rgb(85, 85, 85)",an=({onChangeValue:e,query:t,objectPathId:n,value:o,hasEdited:i})=>{if(!t)return{textColor:on};const{resolvedQuery:a,mrnEntriesLoaded:s}=(0,nn.Z)({query:t,objectPathId:n});return(0,r.useEffect)((()=>{!i&&a&&(0===o.length&&a||o===a?e({value:a,hasEdited:"not-edited"}):o!==a&&e({value:o,hasEdited:"edited"})),i&&e({value:"not-edited"===i?a:o})}),[a]),{textColor:s&&(!i||"not-edited"===i)&&o?.length>0?"rgba(85, 85, 85, 0.6)":on}};var sn=__webpack_require__(9547),ln={};ln.styleTagTransform=j(),ln.setAttributes=E(),ln.insert=S().bind(null,"head"),ln.domAPI=k(),ln.insertStyleElement=q(),A()(sn.Z,ln);const cn=sn.Z&&sn.Z.locals?sn.Z.locals:void 0;var un=__webpack_require__(9864),dn=__webpack_require__(6774),pn=__webpack_require__.n(dn);const hn=function(e){function t(e,n,l,c,p){for(var h,f,m,g,O,A=0,x=0,k=0,C=0,S=0,j=0,Z=m=h=0,M=0,N=0,D=0,L=0,I=l.length,B=I-1,Q="",z="",U="",F="";M<I;){if(f=l.charCodeAt(M),M===B&&0!==x+C+k+A&&(0!==x&&(f=47===x?10:47),C=k=A=0,I++,B++),0===x+C+k+A){if(M===B&&(0<N&&(Q=Q.replace(d,"")),0<Q.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:Q+=l.charAt(M)}f=59}switch(f){case 123:for(h=(Q=Q.trim()).charCodeAt(0),m=1,L=++M;M<I;){switch(f=l.charCodeAt(M)){case 123:m++;break;case 125:m--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(Z=M+1;Z<B;++Z)switch(l.charCodeAt(Z)){case 47:if(42===f&&42===l.charCodeAt(Z-1)&&M+2!==Z){M=Z+1;break e}break;case 10:if(47===f){M=Z+1;break e}}M=Z}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<B&&l.charCodeAt(M)!==f;);}if(0===m)break;M++}if(m=l.substring(L,M),0===h&&(h=(Q=Q.replace(u,"").trim()).charCodeAt(0)),64===h){switch(0<N&&(Q=Q.replace(d,"")),f=Q.charCodeAt(1)){case 100:case 109:case 115:case 45:N=n;break;default:N=T}if(L=(m=t(n,N,m,f,p+1)).length,0<R&&(O=s(3,m,N=r(T,Q,D),n,E,_,L,f,p,c),Q=N.join(""),void 0!==O&&0===(L=(m=O.trim()).length)&&(f=0,m="")),0<L)switch(f){case 115:Q=Q.replace(w,a);case 100:case 109:case 45:m=Q+"{"+m+"}";break;case 107:m=(Q=Q.replace(b,"$1 $2"))+"{"+m+"}",m=1===q||2===q&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=Q+m,112===c&&(z+=m,m="")}else m=""}else m=t(n,r(n,Q,D),m,c,p+1);U+=m,m=D=N=Z=h=0,Q="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(L=(Q=(0<N?Q.replace(d,""):Q).trim()).length))switch(0===Z&&(h=Q.charCodeAt(0),45===h||96<h&&123>h)&&(L=(Q=Q.replace(" ",":")).length),0<R&&void 0!==(O=s(1,Q,n,e,E,_,z.length,c,p,c))&&0===(L=(Q=O.trim()).length)&&(Q="\0\0"),h=Q.charCodeAt(0),f=Q.charCodeAt(1),h){case 0:break;case 64:if(105===f||99===f){F+=Q+l.charAt(M);break}default:58!==Q.charCodeAt(L-1)&&(z+=o(Q,h,f,Q.charCodeAt(2)))}D=N=Z=h=0,Q="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===x?x=0:0===1+h&&107!==c&&0<Q.length&&(N=1,Q+="\0"),0<R*$&&s(0,Q,n,e,E,_,z.length,c,p,c),_=1,E++;break;case 59:case 125:if(0===x+C+k+A){_++;break}default:switch(_++,g=l.charAt(M),f){case 9:case 32:if(0===C+A+x)switch(S){case 44:case 58:case 9:case 32:g="";break;default:32!==f&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===C+x+A&&(N=D=1,g="\f"+g);break;case 108:if(0===C+x+A+P&&0<Z)switch(M-Z){case 2:112===S&&58===l.charCodeAt(M-3)&&(P=S);case 8:111===j&&(P=j)}break;case 58:0===C+x+A&&(Z=M);break;case 44:0===x+k+C+A&&(N=1,g+="\r");break;case 34:case 39:0===x&&(C=C===f?0:0===C?f:C);break;case 91:0===C+x+k&&A++;break;case 93:0===C+x+k&&A--;break;case 41:0===C+x+A&&k--;break;case 40:0===C+x+A&&(0===h&&(2*S+3*j==533||(h=1)),k++);break;case 64:0===x+k+C+A+Z+m&&(m=1);break;case 42:case 47:if(!(0<C+A+k))switch(x){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:x=47;break;case 220:L=M,x=42}break;case 42:47===f&&42===S&&L+2!==M&&(33===l.charCodeAt(L+2)&&(z+=l.substring(L,M+1)),g="",x=0)}}0===x&&(Q+=g)}j=S,S=f,M++}if(0<(L=z.length)){if(N=n,0<R&&void 0!==(O=s(2,z,N,e,E,_,L,c,p,c))&&0===(z=O).length)return F+z+U;if(z=N.join(",")+"{"+z+"}",0!=q*P){switch(2!==q||i(z,2)||(P=0),P){case 111:z=z.replace(v,":-moz-$1")+z;break;case 112:z=z.replace(y,"::-webkit-input-$1")+z.replace(y,"::-moz-$1")+z.replace(y,":-ms-input-$1")+z}P=0}}return F+z+U}function r(e,t,r){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[l++]=n(e[c]+" ",o[s],r).trim()}return t}function n(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,r,n){var a=e+";",s=2*t+3*r+4*n;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===q||2===q&&i(l,1)?"-webkit-"+l+l:l}if(0===q||2===q&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(O,"tb");break;case 232:l=a.replace(O,"tb-rl");break;case 220:l=a.replace(O,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),Z(2!==t?n:n.replace(k,"$1"),r,t)}function a(e,t){var r=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(A," or ($1)").substring(4):"("+t+")"}function s(e,t,r,n,o,i,a,s,l,u){for(var d,p=0,h=t;p<R;++p)switch(d=j[p].call(c,e,h,r,n,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function l(e){return void 0!==(e=e.prefix)&&(Z=null,e?"function"!=typeof e?q=1:(q=2,Z=e):q=0),l}function c(e,r){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<R){var o=s(-1,r,n,n,E,_,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=t(T,n,r,0,0);return 0<R&&void 0!==(o=s(-2,i,n,n,E,_,i.length,0,0,0))&&(i=o),P=0,_=E=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,v=/:(read-only)/g,O=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,A=/([\s\S]*?);/g,x=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,_=1,E=1,P=0,q=1,T=[],j=[],R=0,Z=null,$=0;return c.use=function e(t){switch(t){case void 0:case null:R=j.length=0;break;default:if("function"==typeof t)j[R++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else $=0|!!t}return e},c.set=l,void 0!==e&&l(e),c},fn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var mn=__webpack_require__(1068);function gn(){return(gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var bn=function(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r},yn=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,un.typeOf)(e)},vn=Object.freeze([]),On=Object.freeze({});function wn(e){return"function"==typeof e}function An(e){return e.displayName||e.name||"Component"}function xn(e){return e&&"string"==typeof e.styledComponentId}var kn="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Cn="undefined"!=typeof window&&"HTMLElement"in window,Sn=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY));function _n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var En=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)(o<<=1)<0&&_n(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),Pn=new Map,qn=new Map,Tn=1,jn=function(e){if(Pn.has(e))return Pn.get(e);for(;qn.has(Tn);)Tn++;var t=Tn++;return Pn.set(e,t),qn.set(t,e),t},Rn=function(e){return qn.get(e)},Zn=function(e,t){t>=Tn&&(Tn=t+1),Pn.set(e,t),qn.set(t,e)},$n="style["+kn+'][data-styled-version="5.3.11"]',Mn=new RegExp("^"+kn+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Nn=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},Dn=function(e,t){for(var r=(t.textContent||"").split("/*!sc*/\n"),n=[],o=0,i=r.length;o<i;o++){var a=r[o].trim();if(a){var s=a.match(Mn);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(Zn(c,l),Nn(e,c,s[3]),e.getTag().insertRules(l,n)),n.length=0}else n.push(a)}}},Ln=function(){return __webpack_require__.nc},In=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(kn))return n}}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(kn,"active"),n.setAttribute("data-styled-version","5.3.11");var a=Ln();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},Bn=function(){function e(e){var t=this.element=In(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}_n(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Qn=function(){function e(e){var t=this.element=In(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),zn=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Un=Cn,Fn={isServer:!Cn,useCSSOMInjection:!Sn},Wn=function(){function e(e,t,r){void 0===e&&(e=On),void 0===t&&(t={}),this.options=gn({},Fn,{},e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&Cn&&Un&&(Un=!1,function(e){for(var t=document.querySelectorAll($n),r=0,n=t.length;r<n;r++){var o=t[r];o&&"active"!==o.getAttribute(kn)&&(Dn(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return jn(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(gn({},this.options,{},t),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(t=this.options).isServer,n=t.useCSSOMInjection,o=t.target,e=r?new zn(o):n?new Bn(o):new Qn(o),new En(e)));var e,t,r,n,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(jn(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},t.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(jn(e),r)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(jn(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=0;o<r;o++){var i=Rn(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var l=kn+".g"+o+'[id="'+i+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),n+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return n}(this)},e}(),Yn=/(a)(d)/gi,Vn=function(e){return String.fromCharCode(e+(e>25?39:97))};function Xn(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Vn(t%52)+r;return(Vn(t%52)+r).replace(Yn,"$1-$2")}var Hn=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Gn=function(e){return Hn(5381,e)};function Kn(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(wn(r)&&!xn(r))return!1}return!0}var Jn=Gn("5.3.11"),eo=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Kn(e),this.componentId=t,this.baseHash=Hn(Jn,t),this.baseStyle=r,Wn.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))o.push(this.staticRulesId);else{var i=yo(this.rules,e,t,r).join(""),a=Xn(Hn(this.baseHash,i)>>>0);if(!t.hasNameForId(n,a)){var s=r(i,"."+a,void 0,n);t.insertRules(n,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=Hn(this.baseHash,r.hash),u="",d=0;d<l;d++){var p=this.rules[d];if("string"==typeof p)u+=p;else if(p){var h=yo(p,e,t,r),f=Array.isArray(h)?h.join(""):h;c=Hn(c,f+d),u+=f}}if(u){var m=Xn(c>>>0);if(!t.hasNameForId(n,m)){var g=r(u,"."+m,void 0,n);t.insertRules(n,m,g)}o.push(m)}}return o.join(" ")},e}(),to=/^\s*\/\/.*$/gm,ro=[":","[",".","#"];function no(e){var t,r,n,o,i=void 0===e?On:e,a=i.options,s=void 0===a?On:a,l=i.plugins,c=void 0===l?vn:l,u=new hn(s),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,o,i,a,s,l,c,u,d){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+n),"";default:return n+(0===d?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),h=function(e,n,i){return 0===n&&-1!==ro.indexOf(i[r.length])||i.match(o)?e:"."+t};function f(e,i,a,s){void 0===s&&(s="&");var l=e.replace(to,""),c=i&&a?a+" "+i+" { "+l+" }":l;return t=s,r=i,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(a||!i?"":i,c)}return u.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(r)>0&&(o[0]=o[0].replace(n,h))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),f.hash=c.length?c.reduce((function(e,t){return t.name||_n(15),Hn(e,t.name)}),5381).toString():"",f}var oo=n().createContext(),io=(oo.Consumer,n().createContext()),ao=(io.Consumer,new Wn),so=no();function lo(){return(0,r.useContext)(oo)||ao}function co(e){var t=(0,r.useState)(e.stylisPlugins),o=t[0],i=t[1],a=lo(),s=(0,r.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,r.useMemo)((function(){return no({options:{prefix:!e.disableVendorPrefixes},plugins:o})}),[e.disableVendorPrefixes,o]);return(0,r.useEffect)((function(){pn()(o,e.stylisPlugins)||i(e.stylisPlugins)}),[e.stylisPlugins]),n().createElement(oo.Provider,{value:s},n().createElement(io.Provider,{value:l},e.children))}var uo=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=so);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return _n(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=so),this.name+e.hash},e}(),po=/([A-Z])/,ho=/([A-Z])/g,fo=/^ms-/,mo=function(e){return"-"+e.toLowerCase()};function go(e){return po.test(e)?e.replace(ho,mo).replace(fo,"-ms-"):e}var bo=function(e){return null==e||!1===e||""===e};function yo(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=yo(e[a],t,r,n))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return bo(e)?"":xn(e)?"."+e.styledComponentId:wn(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:yo(e(t),t,r,n):e instanceof uo?r?(e.inject(r,n),e.getName(n)):e:yn(e)?function e(t,r){var n,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!bo(t[a])&&(Array.isArray(t[a])&&t[a].isCss||wn(t[a])?i.push(go(a)+":",t[a],";"):yn(t[a])?i.push.apply(i,e(t[a],a)):i.push(go(a)+": "+(n=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in fn||n.startsWith("--")?String(o).trim():o+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString();var l}var vo=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Oo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return wn(e)||yn(e)?vo(yo(bn(vn,[e].concat(r)))):0===r.length&&1===e.length&&"string"==typeof e[0]?e:vo(yo(bn(e,r)))}new Set;var wo=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ao=/(^-|-$)/g;function xo(e){return e.replace(wo,"-").replace(Ao,"")}function ko(e){return"string"==typeof e&&!0}var Co=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},So=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function _o(e,t,r){var n=e[r];Co(t)&&Co(n)?Eo(n,t):e[r]=t}function Eo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var o=0,i=r;o<i.length;o++){var a=i[o];if(Co(a))for(var s in a)So(s)&&_o(e,a[s],s)}return e}var Po=n().createContext();Po.Consumer;var qo={};function To(e,t,o){var i=xn(e),a=!ko(e),s=t.attrs,l=void 0===s?vn:s,c=t.componentId,u=void 0===c?function(e,t){var r="string"!=typeof e?"sc":xo(e);qo[r]=(qo[r]||0)+1;var n=r+"-"+function(e){return Xn(Gn(e)>>>0)}("5.3.11"+r+qo[r]);return t?t+"-"+n:n}(t.displayName,t.parentComponentId):c,d=t.displayName,p=void 0===d?function(e){return ko(e)?"styled."+e:"Styled("+An(e)+")"}(e):d,h=t.displayName&&t.componentId?xo(t.displayName)+"-"+t.componentId:t.componentId||u,f=i&&e.attrs?Array.prototype.concat(e.attrs,l).filter(Boolean):l,m=t.shouldForwardProp;i&&e.shouldForwardProp&&(m=t.shouldForwardProp?function(r,n,o){return e.shouldForwardProp(r,n,o)&&t.shouldForwardProp(r,n,o)}:e.shouldForwardProp);var g,b=new eo(o,h,i?e.componentStyle:void 0),y=b.isStatic&&0===l.length,v=function(e,t){return function(e,t,n,o){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,d=e.target,p=function(e,t,r){void 0===e&&(e=On);var n=gn({},t,{theme:e}),o={};return r.forEach((function(e){var t,r,i,a=e;for(t in wn(a)&&(a=a(n)),a)n[t]=o[t]="className"===t?(r=o[t],i=a[t],r&&i?r+" "+i:r||i):a[t]})),[n,o]}(function(e,t,r){return void 0===r&&(r=On),e.theme!==r.theme&&e.theme||t||r.theme}(t,(0,r.useContext)(Po),s)||On,t,i),h=p[0],f=p[1],m=function(e,t,n,o){var i=lo(),a=(0,r.useContext)(io)||so;return t?e.generateAndInjectStyles(On,i,a):e.generateAndInjectStyles(n,i,a)}(a,o,h),g=n,b=f.$as||t.$as||f.as||t.as||d,y=ko(b),v=f!==t?gn({},t,{},f):t,O={};for(var w in v)"$"!==w[0]&&"as"!==w&&("forwardedAs"===w?O.as=v[w]:(c?c(w,mn.Z,b):!y||(0,mn.Z)(w))&&(O[w]=v[w]));return t.style&&f.style!==t.style&&(O.style=gn({},t.style,{},f.style)),O.className=Array.prototype.concat(l,u,m!==u?m:null,t.className,f.className).filter(Boolean).join(" "),O.ref=g,(0,r.createElement)(b,O)}(g,e,t,y)};return v.displayName=p,(g=n().forwardRef(v)).attrs=f,g.componentStyle=b,g.displayName=p,g.shouldForwardProp=m,g.foldedComponentIds=i?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):vn,g.styledComponentId=h,g.target=i?e.target:e,g.withComponent=function(e){var r=t.componentId,n=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(t,["componentId"]),i=r&&r+"-"+(ko(e)?e:xo(An(e)));return To(e,gn({},n,{attrs:f,componentId:i}),o)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?Eo({},e.defaultProps,t):t}}),Object.defineProperty(g,"toString",{value:function(){return"."+g.styledComponentId}}),a&&_e()(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var jo=function(e){return function e(t,r,n){if(void 0===n&&(n=On),!(0,un.isValidElementType)(r))return _n(1,String(r));var o=function(){return t(r,n,Oo.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,r,gn({},n,{},o))},o.attrs=function(o){return e(t,r,gn({},n,{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o}(To,e)};["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(e){jo[e]=jo(e)})),function(){var e=function(e,t){this.rules=e,this.componentId=t,this.isStatic=Kn(e),Wn.registerId(this.componentId+1)}.prototype;e.createStyles=function(e,t,r,n){var o=n(yo(this.rules,t,r,n).join(""),""),i=this.componentId+e;r.insertRules(i,i,o)},e.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.renderStyles=function(e,t,r,n){e>2&&Wn.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}(),function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=Ln();return"<style "+[r&&'nonce="'+r+'"',kn+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?_n(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return _n(2);var r=((t={})[kn]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Ln();return o&&(r.nonce=o),[n().createElement("style",gn({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Wn({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?_n(2):n().createElement(co,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return _n(3)}}();const Ro=jo,Zo=(0,Mr.Z)((0,s.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),$o=Ro.div`
|
76
76
|
width: 100%;
|
77
77
|
position: relative;
|
78
78
|
`,Mo=Ro.div`
|
@@ -90,7 +90,7 @@
|
|
90
90
|
}
|
91
91
|
`,No=Ro(Zo)`
|
92
92
|
color: #767676;
|
93
|
-
`,Do=({onChangeValue:e,hasClearButton:t=!1,onClearCallback:r,controlProps:o,...i})=>{const{control:a,id:s,objectPathId:l,...c}=i,{value:u="",displayName:d,"custom-attributes":p,error:h,placeholder:f,required:m,...
|
93
|
+
`,Do=({onChangeValue:e,hasClearButton:t=!1,onClearCallback:r,controlProps:o,...i})=>{const{control:a,id:s,objectPathId:l,...c}=i,{value:u="",displayName:d,"custom-attributes":p,error:h,placeholder:f,required:m,hasEdited:g,...b}=a,y=p?.defaultValue,{textColor:v}=an({onChangeValue:e,query:y,objectPathId:l,value:u,hasEdited:g}),O=h?"error":"";let w=`${Jr["form-control"]} ${cn["form-control"]}`;w=O?w+" "+cn[O]:w;const A=f?m?f+" *":f:"";return n().createElement($o,null,n().createElement("input",{role:"textbox","data-testid":`input-control-${s}`,max:"date"===a.type?"9999-12-31":null,className:w,id:l||s,name:l||s,value:u,onChange:t=>{e({value:t.target.value,hasEdited:"edited"})},onWheel:e=>{const t=e.target;"number"===t.type&&t.blur()},placeholder:A,required:m,...Hr()(p,["defaultValue","mrnPreview","mrnSources"]),...Hr()(b,["displayName","placholder","control","error","defaultValue"]),...Hr()(c,["defaultValue","mrnPreview","mrnSources"]),style:{color:v,...o?.inputProps?.style}}),t&&"date"===a.type&&n().createElement(Mo,{inputValue:u},n().createElement(No,{"data-testid":"input_clearButton",fontSize:"small",onClick:()=>{e({value:""}),r?.()}})))},Lo=Ro.div`
|
94
94
|
position: relative;
|
95
95
|
font-size: 14px;
|
96
96
|
font-weight: 400;
|
@@ -617,7 +617,7 @@ ${e=>e["data-disabled"]&&Em`pointer-events: none;`}
|
|
617
617
|
animation: ${0} 1.4s linear infinite;
|
618
618
|
`),Tk))),Zk=(0,le.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),$k=(0,le.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,Ke.Z)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((({ownerState:t,theme:r})=>(0,e.Z)({stroke:"currentColor"},"determinate"===t.variant&&{transition:r.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&Pe(Pk||(Pk=qk`
|
619
619
|
animation: ${0} 1.4s ease-in-out infinite;
|
620
|
-
`),jk))),Mk=r.forwardRef((function(r,n){const o=(0,ce.Z)({props:r,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:l=!1,size:c=40,style:u,thickness:d=3.6,value:p=0,variant:h="indeterminate"}=o,f=(0,t.Z)(o,Ck),m=(0,e.Z)({},o,{color:a,disableShrink:l,size:c,thickness:d,value:p,variant:h}),g=(e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${(0,Ke.Z)(n)}`],svg:["svg"],circle:["circle",`circle${(0,Ke.Z)(r)}`,o&&"circleDisableShrink"]};return(0,ae.Z)(i,kk,t)})(m),b={},y={},v={};if("determinate"===h){const e=2*Math.PI*((44-d)/2);b.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(p),b.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,y.transform="rotate(-90deg)"}return(0,s.jsx)(Rk,(0,e.Z)({className:(0,oe.Z)(g.root,i),style:(0,e.Z)({width:c,height:c},y,u),ownerState:m,ref:n,role:"progressbar"},v,f,{children:(0,s.jsx)(Zk,{className:g.svg,ownerState:m,viewBox:"22 22 44 44",children:(0,s.jsx)($k,{className:g.circle,style:b,ownerState:m,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))})),Nk=Mk;var Dk=__webpack_require__(3955),Lk=__webpack_require__.n(Dk),Ik=__webpack_require__(8247),Bk=__webpack_require__(9677),Qk={};Qk.styleTagTransform=j(),Qk.setAttributes=E(),Qk.insert=S().bind(null,"head"),Qk.domAPI=k(),Qk.insertStyleElement=q(),A()(Bk.Z,Qk);const zk=Bk.Z&&Bk.Z.locals?Bk.Z.locals:void 0;var Uk=__webpack_require__(7897);const Fk=({onChangeValue:e,controlProps:t,...o})=>{const{id:i,control:a,objectPathId:s}=o,{error:l,options:c,placeholder:u,required:d,value:p,"custom-attributes":h}=a,f=l?"error":"",m=(0,Uk.Z)(c,p),g=u?d?u+" *":u:"",{options:b}=(0,Ik.Z)({controlKey:i,objectPathId:s,options:c,query:h?.optionsGenerator}),[y,v]=(0,r.useState)(m),[O,w]=(0,r.useState)(""),A=s||i;(0,r.useEffect)((()=>{if(!p){const e=(0,Uk.Z)(c,p);x({option:e})}if(p!==y?.value){const e=(0,Uk.Z)(c,p);x({option:e,hasChanged:!1})}}),[p]);const x=({option:t,hasChanged:r=!0})=>{v(t),e({value:t?.value||"",options:[...c?.map((e=>({...e,selected:e.value===t?.value})))],hasChanged:r})};return n().createElement(JO,{className:zk["select-container"],id:A,"data-testid":`select-container ${i}`,disableClearable:!0,size:"small",sx:t?.selectProps?.sx,value:y,readOnly:h?.readOnly,onChange:(e,t)=>x({option:t}),isOptionEqualToValue:(e,t)=>e.value===t.value,inputValue:O,onInputChange:(e,t)=>w(t),options:b,getOptionLabel:e=>e.text,ListboxProps:{sx:{"& .MuiAutocomplete-option":{minHeight:"40px"}}},renderInput:e=>n().createElement(Ok,{...e,className:zk[f],placeholder:g,required:d,sx:{"& > div":{minWidth:"0 !important"},"& .MuiInputBase-root":{height:"40px"},...t?.selectProps?.textField?.sx}})})};var Wk=__webpack_require__(9089),Yk={};Yk.styleTagTransform=j(),Yk.setAttributes=E(),Yk.insert=S().bind(null,"head"),Yk.domAPI=k(),Yk.insertStyleElement=q(),A()(Wk.Z,Yk);const Vk=Wk.Z&&Wk.Z.locals?Wk.Z.locals:void 0,Xk=async(e,t,r,n)=>{const o=t["mrn-ref-display-field"]||t.displayField||"name",i=t["mrn-ref-mrn-field"]||"_mrn",a=await n(e,r,{headers:{accept:"application/xhtml-form+json"}});if(!a||!a?.items&&!a?.values)throw new Error("unable to handle response - json expected");const s=(a.items||[a]).map((e=>{const t=Object.keys(e?.values).filter((e=>!e.startsWith("_"))),r={};return t.forEach((t=>{r[t]=e.values[t]})),{key:e.values[o],mrn:e.values[i],mrnEntries:r}}));return s},Hk=(e,t)=>{const r=new URLSearchParams(e);return t&&r.append("q",t),r?.toString()},Gk=(e,t,r)=>"/solution/index.html"===e.pathname?e.pathname.replace("index","resolver")+e.hash.split("/")[0]+"?mrn="+encodeURIComponent(t):e.pathname+"#"+r,Kk=({onChangeValue:e,controlProps:t,objectPathId:o,...i})=>{const{id:a,control:s}=i||{},{value:l="","custom-attributes":c,displayName:u,error:d}=s||{},p=d?"error":"",h=c?.defaultValue,{isLoading:f,isOpen:m,isDisabled:g,mrnOptions:b,selectedOption:y,setSelectedOption:v,setSearchText:w,setIsOpen:A,currentMrnOption:x,onChangeCurrentMrnOption:k}=(({value:e,customAttributes:t,objectPathId:n,onChangeValue:o})=>{const{resolveUrl:i}=(0,r.useContext)(O.L8);if(!i)throw new Error("resolveUrl Prop is not defined");const[a,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)([]),[p,h]=(0,r.useState)(null),[f,m]=(0,r.useState)(""),g=t?.mrnSources?.find((t=>e?.includes(t?.mrn))),b=g||t?.mrnSources?.[0]||t,[y,v]=(0,r.useState)(b),w=y?.["mrn-ref-params"]||y?.query,{dependentControls:A,resolvedQuery:x,isDisabled:k}=(0,nn.Z)({query:w,objectPathId:n}),C=y?.["mrn-ref"]||y?.mrn;(0,r.useEffect)((()=>{v(b)}),[e]),(0,r.useEffect)((()=>{let t=!0;return e?(async()=>{const r=Hk(x),n=await Xk(e,y,r,i);t&&(o({mrnEntries:n?.[0]?.mrnEntries}),h(n?.[0]))})():h(null),()=>{t=!1}}),[e]),L((()=>{const e=setTimeout((()=>{S(f)}),500);return()=>clearTimeout(e)}),[f]);const S=async e=>{s(!0),d([]);const t=Hk(x,e),r=await Xk(C,y,t,i);d(r),s(!1)};return(0,r.useEffect)((()=>{!l&&s(!1),l&&(async()=>{s(!0);const e=Hk(x),t=await Xk(C,y,e,i);d(t),s(!1)})()}),[l]),{isLoading:a,isOpen:l,isDisabled:k,mrnOptions:u,selectedOption:p,setSelectedOption:h,setSearchText:m,setIsOpen:c,currentMrnOption:y,onChangeCurrentMrnOption:e=>{const r=(0,Uk.Z)(t?.mrnSources?.map((e=>({value:e?.mrn,text:e?.name,...e}))),e?.value);v(r),d([])},dependentControls:A}})({value:l,customAttributes:c,objectPathId:o,onChangeValue:e}),{textColor:C,setHasEdited:S}=an({onChangeValue:e,query:h,objectPathId:o,value:l}),_=c?.mrnSources?.length||1,E=e=>{w(e?.target?.value)},P=_>1?Vk["with-select"]:"";return n().createElement("div",{className:`${Vk["mrn-input-container"]} ${P}`,"data-testid":`mrn-input-container ${a}`,style:{color:C}},_>1&&n().createElement("div",{style:{width:"35%",height:"40px"}},n().createElement(Fk,{id:Lk()(),control:{control:"select",options:c?.mrnSources?.map((e=>({value:e?.mrn,text:e?.name,...e}))),value:x?.mrn},controlProps:t,onChangeValue:k})),n().createElement(JO,{id:a,sx:{width:"100%",backgroundColor:"white",...t?.selectProps?.sx},"data-testid":`mrn-input ${a}`,size:"small",value:y,readOnly:c?.readOnly,disabled:!l&&g,onChange:(t,r)=>(t=>{S(!0),e({value:t?.mrn||"",mrnEntries:t?.mrnEntries||null},((e,r,n)=>function(e,t){if("mrnEntries"===t)return e?.mrnEntries}(t,n))),v(t)})(r),isOptionEqualToValue:(e,t)=>e?.mrn===t?.mrn,filterOptions:(e,t)=>e,getOptionLabel:e=>e?.key,options:b,open:m,onOpen:()=>A(!0),onClose:()=>A(!1),loading:f,PaperComponent:e=>((e,t,r,o,i)=>{const a=Zr(t)?.applicationId,s={hash:window.top.location.hash,pathname:window.top.location.pathname};return n().createElement(lO,{...i,style:{zIndex:999999999}},e,!o&&n().createElement("a",{className:"mrn-reference-link","data-testid":"link__mrn-reference-link",href:Gk(s,t,a),onMouseDown:e=>e.preventDefault(),rel:"noreferrer",target:"_blank",style:{color:"#4a96d2",textDecoration:"none"}},n().createElement("ul",{style:{listStyle:"none",padding:"12px"}},n().createElement("li",{style:{display:"flex",alignItems:"center",gap:"3px"}},n().createElement(te.Z,{className:"add-icon",style:{marginTop:"-2px"}}),n().createElement("span",null,r)))))})(e.children,x?.["mrn-ref"]||x?.mrn,x?.name||u,t?.mrnProps?.disableMrnLink,e),renderInput:e=>n().createElement(Ok,{...e,className:Vk[p],onChange:E,required:c?.required,sx:t?.selectProps?.textField?.sx,InputProps:{style:{minHeight:40,color:C},...e.InputProps,endAdornment:n().createElement(n().Fragment,null,f&&n().createElement(Nk,{style:{marginRight:30},color:"inherit",size:20}),e.InputProps.endAdornment)}})}))};var Jk=__webpack_require__(7972),eC={};eC.styleTagTransform=j(),eC.setAttributes=E(),eC.insert=S().bind(null,"head"),eC.domAPI=k(),eC.insertStyleElement=q(),A()(Jk.Z,eC);const tC=Jk.Z&&Jk.Z.locals?Jk.Z.locals:void 0;var rC=__webpack_require__(2961),nC=__webpack_require__(2450),oC=__webpack_require__(909),iC={};iC.styleTagTransform=j(),iC.setAttributes=E(),iC.insert=S().bind(null,"head"),iC.domAPI=k(),iC.insertStyleElement=q(),A()(oC.Z,iC);const aC=oC.Z&&oC.Z.locals?oC.Z.locals:void 0;var sC=__webpack_require__(706),lC={};lC.styleTagTransform=j(),lC.setAttributes=E(),lC.insert=S().bind(null,"head"),lC.domAPI=k(),lC.insertStyleElement=q(),A()(sC.Z,lC);const cC=sC.Z&&sC.Z.locals?sC.Z.locals:void 0,uC=({onAcceptAiResponse:e})=>{const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(!1),[a,s]=(0,r.useState)({state:!1,message:"",prompt:"",profile:""}),[l,c]=(0,r.useState)(null),{postGenAiMessage:u}=(0,r.useContext)(O.L8),d=async(e,t,r)=>{i(!0),c(r);const o=await(u?.({message:e,profile:t}));"success"===o.status?(n(o),s({state:!1,message:"",prompt:"",profile:""})):s({state:!0,message:o.message,profile:t,prompt:e}),i(!1),c(null)};return{aiResponse:t,isLoading:o,isError:a,loadingActionIndex:l,handleAiActionClick:d,handleAccept:()=>{e({value:t.message}),n(null)},handleDiscard:()=>{n(null)},handleBack:()=>{n(null),s({state:!1,message:"",prompt:"",profile:""})},handleRetry:async()=>{a.prompt&&await d(a.prompt,a.profile,l)}}};var dC=__webpack_require__(471),pC={};pC.styleTagTransform=j(),pC.setAttributes=E(),pC.insert=S().bind(null,"head"),pC.domAPI=k(),pC.insertStyleElement=q(),A()(dC.Z,pC),dC.Z&&dC.Z.locals&&dC.Z.locals;var hC=__webpack_require__(347),fC={};fC.styleTagTransform=j(),fC.setAttributes=E(),fC.insert=S().bind(null,"head"),fC.domAPI=k(),fC.insertStyleElement=q(),A()(hC.Z,fC);const mC=hC.Z&&hC.Z.locals?hC.Z.locals:void 0;var gC=__webpack_require__(7909);function bC(e){return(0,We.Z)("MuiTooltip",e)}const yC=(0,Te.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),vC=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"],OC=(0,le.ZP)(Kv,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})((({theme:t,ownerState:r,open:n})=>(0,e.Z)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!r.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},r.arrow&&{[`&[data-popper-placement*="bottom"] .${yC.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${yC.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${yC.arrow}`]:(0,e.Z)({},r.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${yC.arrow}`]:(0,e.Z)({},r.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),wC=(0,le.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,Ke.Z)(r.placement.split("-")[0])}`]]}})((({theme:t,ownerState:r})=>(0,e.Z)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,se.Fq)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},r.arrow&&{position:"relative",margin:0},r.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:(16/14,Math.round(114285.71428571428)/1e5+"em"),fontWeight:t.typography.fontWeightRegular},{[`.${yC.popper}[data-popper-placement*="left"] &`]:(0,e.Z)({transformOrigin:"right center"},r.isRtl?(0,e.Z)({marginLeft:"14px"},r.touch&&{marginLeft:"24px"}):(0,e.Z)({marginRight:"14px"},r.touch&&{marginRight:"24px"})),[`.${yC.popper}[data-popper-placement*="right"] &`]:(0,e.Z)({transformOrigin:"left center"},r.isRtl?(0,e.Z)({marginRight:"14px"},r.touch&&{marginRight:"24px"}):(0,e.Z)({marginLeft:"14px"},r.touch&&{marginLeft:"24px"})),[`.${yC.popper}[data-popper-placement*="top"] &`]:(0,e.Z)({transformOrigin:"center bottom",marginBottom:"14px"},r.touch&&{marginBottom:"24px"}),[`.${yC.popper}[data-popper-placement*="bottom"] &`]:(0,e.Z)({transformOrigin:"center top",marginTop:"14px"},r.touch&&{marginTop:"24px"})}))),AC=(0,le.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,se.Fq)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let xC=!1,kC=null,CC={x:0,y:0};function SC(e,t){return r=>{t&&t(r),e(r)}}const _C=r.forwardRef((function(n,o){var i,a,l,c,u,d,p,h,f,m,g,b,y,v,O,w,A,x,k;const C=(0,ce.Z)({props:n,name:"MuiTooltip"}),{arrow:S=!1,children:_,components:E={},componentsProps:P={},describeChild:q=!1,disableFocusListener:T=!1,disableHoverListener:j=!1,disableInteractive:R=!1,disableTouchListener:Z=!1,enterDelay:$=100,enterNextDelay:M=0,enterTouchDelay:N=700,followCursor:D=!1,id:L,leaveDelay:I=0,leaveTouchDelay:B=1500,onClose:Q,onOpen:z,open:U,placement:F="bottom",PopperComponent:W,PopperProps:Y={},slotProps:V={},slots:X={},title:H,TransitionComponent:G=YA,TransitionProps:K}=C,J=(0,t.Z)(C,vC),ee=r.isValidElement(_)?_:(0,s.jsx)("span",{children:_}),te=LA(),re="rtl"===te.direction,[ne,ie]=r.useState(),[se,le]=r.useState(null),he=r.useRef(!1),fe=R||D,me=r.useRef(),ge=r.useRef(),be=r.useRef(),ye=r.useRef(),[ve,Oe]=(0,rr.Z)({controlled:U,default:!1,name:"Tooltip",state:"open"});let we=ve;const Ae=(0,gC.Z)(L),xe=r.useRef(),ke=r.useCallback((()=>{void 0!==xe.current&&(document.body.style.WebkitUserSelect=xe.current,xe.current=void 0),clearTimeout(ye.current)}),[]);r.useEffect((()=>()=>{clearTimeout(me.current),clearTimeout(ge.current),clearTimeout(be.current),ke()}),[ke]);const Ce=e=>{clearTimeout(kC),xC=!0,Oe(!0),z&&!we&&z(e)},Se=(0,de.Z)((e=>{clearTimeout(kC),kC=setTimeout((()=>{xC=!1}),800+I),Oe(!1),Q&&we&&Q(e),clearTimeout(me.current),me.current=setTimeout((()=>{he.current=!1}),te.transitions.duration.shortest)})),_e=e=>{he.current&&"touchstart"!==e.type||(ne&&ne.removeAttribute("title"),clearTimeout(ge.current),clearTimeout(be.current),$||xC&&M?ge.current=setTimeout((()=>{Ce(e)}),xC?M:$):Ce(e))},Ee=e=>{clearTimeout(ge.current),clearTimeout(be.current),be.current=setTimeout((()=>{Se(e)}),I)},{isFocusVisibleRef:Pe,onBlur:qe,onFocus:Te,ref:je}=(0,pe.Z)(),[,Re]=r.useState(!1),Ze=e=>{qe(e),!1===Pe.current&&(Re(!1),Ee(e))},$e=e=>{ne||ie(e.currentTarget),Te(e),!0===Pe.current&&(Re(!0),_e(e))},Me=e=>{he.current=!0;const t=ee.props;t.onTouchStart&&t.onTouchStart(e)},Ne=_e,De=Ee;r.useEffect((()=>{if(we)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Se(e)}}),[Se,we]);const Le=(0,ue.Z)(ee.ref,je,ie,o);H||0===H||(we=!1);const Ie=r.useRef(),Be={},Qe="string"==typeof H;q?(Be.title=we||!Qe||j?null:H,Be["aria-describedby"]=we?Ae:null):(Be["aria-label"]=Qe?H:null,Be["aria-labelledby"]=we&&!Qe?Ae:null);const ze=(0,e.Z)({},Be,J,ee.props,{className:(0,oe.Z)(J.className,ee.props.className),onTouchStart:Me,ref:Le},D?{onMouseMove:e=>{const t=ee.props;t.onMouseMove&&t.onMouseMove(e),CC={x:e.clientX,y:e.clientY},Ie.current&&Ie.current.update()}}:{}),Ue={};Z||(ze.onTouchStart=e=>{Me(e),clearTimeout(be.current),clearTimeout(me.current),ke(),xe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ye.current=setTimeout((()=>{document.body.style.WebkitUserSelect=xe.current,_e(e)}),N)},ze.onTouchEnd=e=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(e),ke(),clearTimeout(be.current),be.current=setTimeout((()=>{Se(e)}),B)}),j||(ze.onMouseOver=SC(Ne,ze.onMouseOver),ze.onMouseLeave=SC(De,ze.onMouseLeave),fe||(Ue.onMouseOver=Ne,Ue.onMouseLeave=De)),T||(ze.onFocus=SC($e,ze.onFocus),ze.onBlur=SC(Ze,ze.onBlur),fe||(Ue.onFocus=$e,Ue.onBlur=Ze));const Fe=r.useMemo((()=>{var t;let r=[{name:"arrow",enabled:Boolean(se),options:{element:se,padding:4}}];return null!=(t=Y.popperOptions)&&t.modifiers&&(r=r.concat(Y.popperOptions.modifiers)),(0,e.Z)({},Y.popperOptions,{modifiers:r})}),[se,Y]),We=(0,e.Z)({},C,{isRtl:re,arrow:S,disableInteractive:fe,placement:F,PopperComponentProp:W,touch:he.current}),Ye=(e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,Ke.Z)(i.split("-")[0])}`],arrow:["arrow"]};return(0,ae.Z)(a,bC,t)})(We),Ve=null!=(i=null!=(a=X.popper)?a:E.Popper)?i:OC,Xe=null!=(l=null!=(c=null!=(u=X.transition)?u:E.Transition)?c:G)?l:YA,He=null!=(d=null!=(p=X.tooltip)?p:E.Tooltip)?d:wC,Ge=null!=(h=null!=(f=X.arrow)?f:E.Arrow)?h:AC,Je=Mv(Ve,(0,e.Z)({},Y,null!=(m=V.popper)?m:P.popper,{className:(0,oe.Z)(Ye.popper,null==Y?void 0:Y.className,null==(g=null!=(b=V.popper)?b:P.popper)?void 0:g.className)}),We),et=Mv(Xe,(0,e.Z)({},K,null!=(y=V.transition)?y:P.transition),We),tt=Mv(He,(0,e.Z)({},null!=(v=V.tooltip)?v:P.tooltip,{className:(0,oe.Z)(Ye.tooltip,null==(O=null!=(w=V.tooltip)?w:P.tooltip)?void 0:O.className)}),We),rt=Mv(Ge,(0,e.Z)({},null!=(A=V.arrow)?A:P.arrow,{className:(0,oe.Z)(Ye.arrow,null==(x=null!=(k=V.arrow)?k:P.arrow)?void 0:x.className)}),We);return(0,s.jsxs)(r.Fragment,{children:[r.cloneElement(ee,ze),(0,s.jsx)(Ve,(0,e.Z)({as:null!=W?W:Kv,placement:F,anchorEl:D?{getBoundingClientRect:()=>({top:CC.y,left:CC.x,right:CC.x,bottom:CC.y,width:0,height:0})}:ne,popperRef:Ie,open:!!ne&&we,id:Ae,transition:!0},Ue,Je,{popperOptions:Fe,children:({TransitionProps:t})=>(0,s.jsx)(Xe,(0,e.Z)({timeout:te.transitions.duration.shorter},t,et,{children:(0,s.jsxs)(He,(0,e.Z)({},tt,{children:[H,S?(0,s.jsx)(Ge,(0,e.Z)({},rt,{ref:le})):null]}))}))}))]})})),EC=_C;var PC=__webpack_require__(4574),qC=__webpack_require__(5171),TC=__webpack_require__(7691);const jC=()=>n().createElement("svg",{width:"100%",viewBox:"0 0 769 532",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n().createElement("mask",{id:"mask0_6_2662",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"769",height:"532"},n().createElement("path",{d:"M0 6.00001C0 2.6863 2.68629 0 6 0H763C766.314 0 769 2.68629 769 6V526C769 529.314 766.314 532 763 532H0V6.00001Z",fill:"#D9D9D9"})),n().createElement("g",{mask:"url(#mask0_6_2662)"},n().createElement("path",{opacity:"0.5",d:"M307.972 177.272L307.972 -0.300446L153.983 88.4859L153.983 266.059L307.972 177.272Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.5",d:"M615.263 178.119L769.221 89.2552L615.286 0.431558L461.328 89.295L615.263 178.119Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M461.961 88.4859L307.972 -0.300459L307.972 177.272L461.961 266.059L461.961 88.4859Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M769.162 266.883L769.215 89.2476L615.257 178.111L615.204 355.746L769.162 266.883Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M153.855 264.725L-0.0504942 353.497L153.908 442.36L307.813 353.588L153.855 264.725Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.5",d:"M153.915 443.352L-0.0435364 354.489L-0.0206077 532.176L153.937 621.04L153.915 443.352Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M769.095 621.257L923 532.486L769.042 443.622L615.137 532.394L769.095 621.257Z",fill:"#4A96D2",fillOpacity:"0.2"}))),RC=()=>n().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"136",height:"160",viewBox:"0 0 136 160",fill:"none"},n().createElement("path",{d:"M65.4681 59.6214H64.988C64.988 59.2245 64.6615 58.8981 64.2647 58.8981C63.8678 58.8981 63.5413 59.2245 63.5413 59.6214H63.0612C63.0612 58.9557 63.5989 58.418 64.2647 58.418C64.9304 58.418 65.4681 58.9557 65.4681 59.6214Z",fill:"white"}),n().createElement("path",{d:"M104.939 158.048H91.4001L96.6043 140.937H99.7345L104.939 158.048Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M106.059 158.048H90.2798V160H106.059V158.048Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M92.6995 153.772L91.4001 158.048H104.939L103.639 153.772H92.6995Z",fill:"#1A3846"}),n().createElement("path",{d:"M93.999 149.495H102.333L101.034 145.213H95.3049L93.999 149.495Z",fill:"#1A3846"}),n().createElement("path",{d:"M110.482 159.892H113.484V148.254H128.911V159.892H131.913V148.254H135.095V138.959H132.554V138.102H128.175V138.959H114.508V138.102H110.13V138.959H107.345V148.254H110.476V159.892H110.482ZM134.135 139.932V139.971L132.285 147.281H128.982L130.844 139.932H134.141H134.135ZM125.512 147.281H122.209L124.072 139.932H127.375L125.512 147.281ZM118.746 147.281H115.443L117.306 139.932H120.609L118.746 147.281ZM110.533 139.932H113.836L111.973 147.281H108.67L110.533 139.932Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M25.2299 25.605H24.5898V53.7706H25.2299V25.605Z",fill:"#1A3846"}),n().createElement("path",{d:"M27.624 56.5046C27.624 58.1306 26.3053 59.4492 24.6794 59.4492C23.0535 59.4492 21.7348 58.1306 21.7348 56.5046C21.7348 54.8787 23.0535 53.5601 24.6794 53.5601C26.3053 53.5601 27.624 54.8787 27.624 56.5046Z",fill:"#1A3846"}),n().createElement("path",{d:"M24.7242 66.381C24.673 66.381 23.7128 66.3746 23.015 65.6704C22.5478 65.2031 22.3109 64.5566 22.3109 63.7436C22.3109 63.526 22.4837 63.3532 22.7014 63.3532C22.919 63.3532 23.0919 63.526 23.0919 63.7436C23.0919 64.339 23.2519 64.8063 23.5656 65.1199C24.0393 65.5872 24.7178 65.6 24.7242 65.6C25.8252 65.6 26.715 64.7038 26.715 63.6092C26.715 62.5146 25.8188 61.6184 24.7242 61.6184C24.5066 61.6184 24.3337 61.4456 24.3337 61.2279V59.0643C24.3337 58.8467 24.5066 58.6738 24.7242 58.6738C24.9418 58.6738 25.1147 58.8467 25.1147 59.0643V60.8631C26.4589 61.0551 27.4959 62.2137 27.4959 63.6092C27.4959 65.1391 26.2541 66.381 24.7242 66.381Z",fill:"#1A3846"}),n().createElement("path",{d:"M54.535 23.9409H18.3486V27.9225H54.535V23.9409Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M85.9776 106.261H73.9624V0.0512695H85.9776V106.261ZM75.1531 105.071H84.787V1.24191H75.1531V105.077V105.071Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 11.7079H74.1098V0H85.8242V11.7079ZM75.3197 10.5045H84.6207V1.20344H75.3197V10.5045Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1463 0.174427L74.2954 1.02539L84.8011 11.5311L85.6521 10.6802L75.1463 0.174427Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8011 0.178825L74.2954 10.6846L75.1463 11.5355L85.6521 1.02979L84.8011 0.178825Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 22.2187H74.1098V10.5107H85.8242V22.2187ZM75.3197 21.0152H84.6207V11.7142H75.3197V21.0152Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1422 10.6808L74.2913 11.5317L84.797 22.0375L85.648 21.1865L75.1422 10.6808Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.797 10.6857L74.2913 21.1914L75.1422 22.0424L85.648 11.5366L84.797 10.6857Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 32.7236H74.1098V21.0093H85.8242V32.7236ZM75.3197 31.5202H84.6207V22.2191H75.3197V31.5202Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1428 21.192L74.2918 22.043L84.7976 32.5487L85.6485 31.6978L75.1428 21.192Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8041 21.1964L74.2984 31.7021L75.1493 32.5531L85.6551 22.0474L84.8041 21.1964Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 43.2338H74.1098V31.5259H85.8242V43.2338ZM75.3197 42.0304H84.6207V32.7293H75.3197V42.0304Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1452 31.6925L74.2943 32.5435L84.8 43.0492L85.651 42.1982L75.1452 31.6925Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8 31.6969L74.2943 42.2026L75.1452 43.0536L85.651 32.5479L84.8 31.6969Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 53.7387H74.1098V42.0308H85.8242V53.7387ZM75.3197 52.5353H84.6207V43.2342H75.3197V52.5353Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1454 42.2037L74.2945 43.0547L84.8002 53.5604L85.6512 52.7095L75.1454 42.2037Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.7958 42.2111L74.2901 52.7168L75.1411 53.5678L85.6468 43.062L84.7958 42.2111Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 64.2495H74.1098V52.5352H85.8242V64.2495ZM75.3197 63.0461H84.6207V53.745H75.3197V63.0461Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1415 52.7106L74.2906 53.5615L84.7963 64.0673L85.6473 63.2163L75.1415 52.7106Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8024 52.7218L74.2967 63.2275L75.1476 64.0785L85.6534 53.5728L84.8024 52.7218Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 74.7538H74.1098V63.0459H85.8242V74.7538ZM75.3197 73.5504H84.6207V64.2493H75.3197V73.5504Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1482 63.2218L74.2972 64.0728L84.803 74.5785L85.654 73.7275L75.1482 63.2218Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.7983 63.2286L74.2925 73.7344L75.1435 74.5853L85.6492 64.0796L84.7983 63.2286Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 85.2587H74.1098V73.5508H85.8242V85.2587ZM75.3197 84.0553H84.6207V74.7542H75.3197V84.0553Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1441 73.7223L74.2931 74.5732L84.7988 85.079L85.6498 84.228L75.1441 73.7223Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.7988 73.734L74.2931 84.2397L75.1441 85.0907L85.6498 74.585L84.7988 73.734Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 95.7695H74.1098V84.0615H85.8242V95.7695ZM75.3197 94.566H84.6207V85.265H75.3197V94.566Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.14 84.2291L74.2891 85.0801L84.7948 95.5858L85.6458 94.7349L75.14 84.2291Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8014 84.2403L74.2956 94.7461L75.1466 95.5971L85.6523 85.0913L84.8014 84.2403Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 106.274H74.1098V94.5659H85.8242V106.274ZM75.3197 105.07H84.6207V95.7694H75.3197V105.07Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.147 94.7408L74.2961 95.5918L84.8018 106.098L85.6528 105.247L75.147 94.7408Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8014 94.7441L74.2938 105.248L75.1446 106.099L85.6522 95.5952L84.8014 94.7441Z",fill:"#1A3846"}),n().createElement("path",{d:"M106.737 22.0591H95.029V10.3447H106.737V22.0591ZM96.2324 20.8556H105.534V11.5546H96.2324V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M105.702 10.5276L95.1984 21.0352L96.0495 21.886L106.553 11.3784L105.702 10.5276Z",fill:"#1A3846"}),n().createElement("path",{d:"M96.0516 10.525L95.2007 11.376L105.706 21.8817L106.557 21.0308L96.0516 10.525Z",fill:"#1A3846"}),n().createElement("path",{d:"M96.2264 22.0591H84.5184V10.3447H96.2264V22.0591ZM85.7219 20.8556H95.0229V11.5546H85.7219V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M95.1968 10.5251L84.6929 21.0327L85.544 21.8835L96.048 11.3759L95.1968 10.5251Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.5401 10.5255L84.6891 11.3765L95.1949 21.8822L96.0459 21.0313L85.5401 10.5255Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.7216 22.0591H74.0137V10.3447H85.7216V22.0591ZM75.2171 20.8556H84.5182V11.5546H75.2171V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.211 22.0591H63.503V10.3447H75.211V22.0591ZM64.7065 20.8556H74.0075V11.5546H64.7065V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M74.1831 10.5236L63.6774 21.0293L64.5284 21.8803L75.0341 11.3745L74.1831 10.5236Z",fill:"#1A3846"}),n().createElement("path",{d:"M64.5331 10.5235L63.6821 11.3745L74.1878 21.8803L75.0388 21.0293L64.5331 10.5235Z",fill:"#1A3846"}),n().createElement("path",{d:"M64.7064 22.0591H52.9984V10.3447H64.7064V22.0591ZM54.2019 20.8556H63.5029V11.5546H54.2019V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M63.6719 10.5236L53.1662 21.0293L54.0172 21.8803L64.5229 11.3745L63.6719 10.5236Z",fill:"#1A3846"}),n().createElement("path",{d:"M54.0219 10.5299L53.1709 11.3809L63.6766 21.8866L64.5276 21.0356L54.0219 10.5299Z",fill:"#1A3846"}),n().createElement("path",{d:"M54.1956 22.0591H42.4876V10.3447H54.1956V22.0591ZM43.6911 20.8556H52.9921V11.5546H43.6911V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M43.0893 22.0585H32.5848C32.3416 22.0585 32.1239 21.9113 32.0279 21.6872C31.9319 21.4632 31.9895 21.2007 32.1559 21.0343L42.6604 10.5298L43.5118 11.3812L34.0315 20.8615H42.8333L53.1649 10.5298L54.0163 11.3812L43.5118 21.8857C43.3966 22.0009 43.2429 22.0649 43.0893 22.0649V22.0585Z",fill:"#1A3846"}),n().createElement("path",{d:"M43.5147 10.526L42.6638 11.377L53.1695 21.8827L54.0205 21.0317L43.5147 10.526Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 117.976H73.9625V106.268H86.0033V117.976ZM75.2043 116.772H84.7678V107.471H75.2043V116.772Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 117.796L74.1481 107.291L75.0187 106.44L85.824 116.944L84.9471 117.796Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 117.796L74.1481 116.944L84.9471 106.44L85.824 107.291L75.0187 117.796Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 160H73.9625V148.292H86.0033V160ZM75.2043 158.796H84.7678V149.495H75.2043V158.796Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 159.827L74.1481 149.316L75.0187 148.471L85.824 158.976L84.9471 159.827Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 159.827L74.1481 158.976L84.9471 148.471L85.824 149.316L75.0187 159.827Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 127.488H73.9625V115.78H86.0033V127.488ZM75.2043 126.284H84.7678V116.983H75.2043V126.284Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 127.309L74.1481 116.804L75.0187 115.953L85.824 126.458L84.9471 127.309Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 127.309L74.1481 126.458L84.9471 115.953L85.824 116.804L75.0187 127.309Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 137.992H73.9625V126.284H86.0033V137.992ZM75.2043 136.789H84.7678V127.488H75.2043V136.789Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 137.82L74.1481 127.309L75.0187 126.458L85.824 136.968L84.9471 137.82Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 137.82L74.1481 136.968L84.9471 126.458L85.824 127.309L75.0187 137.82Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 148.497H73.9625V136.789H86.0033V148.497ZM75.2043 147.294H84.7678V137.993H75.2043V147.294Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 148.324L74.1481 137.82L75.0187 136.968L85.824 147.473L84.9471 148.324Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 148.324L74.1481 147.473L84.9471 136.968L85.824 137.82L75.0187 148.324Z",fill:"#1A3846"}),n().createElement("path",{d:"M8.3732 65.1426L15.8577 60.812V69.4404L8.3732 73.7546V65.1426Z",fill:"#1A3846"}),n().createElement("path",{d:"M15.8576 69.4404V60.812L23.3257 65.1426V73.7546L15.8576 69.4404Z",fill:"#1A3846"}),n().createElement("path",{d:"M15.8577 95.3581V86.7134L8.3732 91.0276V99.656L15.8577 95.3581Z",fill:"#1A3846"}),n().createElement("path",{d:"M23.3259 99.6563L15.8577 95.3584L8.3732 99.6563L15.8577 103.954L23.3259 99.6563Z",fill:"#1A3846"}),n().createElement("path",{d:"M23.2931 99.6567L30.7612 103.955V95.3589L23.2931 91.0283V99.6567Z",fill:"#1A3846"}),n().createElement("path",{d:"M30.7614 95.3589V103.955L38.2459 99.6567V91.0283L30.7614 95.3589Z",fill:"#1A3846"}),n().createElement("path",{d:"M8.37312 82.416V91.0281L0.904968 86.7139L0.904968 78.0854L8.37312 82.416Z",fill:"#1A3846"}),n().createElement("path",{d:"M15.8576 78.085L8.37312 82.4155L0.904968 78.085L8.37312 73.7871L15.8576 78.085Z",fill:"#1A3846"}),n().createElement("path",{d:"M38.2459 73.7546L30.7614 78.0852V69.4404L38.2459 65.1099V73.7546Z",fill:"#1A3846"}),n().createElement("path",{d:"M38.2457 65.1099L30.7612 69.4404L23.2931 65.1099L30.7612 60.812L38.2457 65.1099Z",fill:"#1A3846"}),n().createElement("path",{d:"M45.7139 78.0859L38.2457 73.7554V82.3838L45.7139 86.698V78.0859Z",fill:"#1A3846"}),n().createElement("path",{d:"M45.714 86.697L38.2459 82.3828L30.7614 86.697L38.2459 91.0276L45.714 86.697Z",fill:"#1A3846"})),ZC=Ro.div`
|
620
|
+
`),jk))),Mk=r.forwardRef((function(r,n){const o=(0,ce.Z)({props:r,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:l=!1,size:c=40,style:u,thickness:d=3.6,value:p=0,variant:h="indeterminate"}=o,f=(0,t.Z)(o,Ck),m=(0,e.Z)({},o,{color:a,disableShrink:l,size:c,thickness:d,value:p,variant:h}),g=(e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${(0,Ke.Z)(n)}`],svg:["svg"],circle:["circle",`circle${(0,Ke.Z)(r)}`,o&&"circleDisableShrink"]};return(0,ae.Z)(i,kk,t)})(m),b={},y={},v={};if("determinate"===h){const e=2*Math.PI*((44-d)/2);b.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(p),b.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,y.transform="rotate(-90deg)"}return(0,s.jsx)(Rk,(0,e.Z)({className:(0,oe.Z)(g.root,i),style:(0,e.Z)({width:c,height:c},y,u),ownerState:m,ref:n,role:"progressbar"},v,f,{children:(0,s.jsx)(Zk,{className:g.svg,ownerState:m,viewBox:"22 22 44 44",children:(0,s.jsx)($k,{className:g.circle,style:b,ownerState:m,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))})),Nk=Mk;var Dk=__webpack_require__(3955),Lk=__webpack_require__.n(Dk),Ik=__webpack_require__(8247),Bk=__webpack_require__(9677),Qk={};Qk.styleTagTransform=j(),Qk.setAttributes=E(),Qk.insert=S().bind(null,"head"),Qk.domAPI=k(),Qk.insertStyleElement=q(),A()(Bk.Z,Qk);const zk=Bk.Z&&Bk.Z.locals?Bk.Z.locals:void 0;var Uk=__webpack_require__(7897);const Fk=({onChangeValue:e,controlProps:t,...o})=>{const{id:i,control:a,objectPathId:s}=o,{error:l,options:c,placeholder:u,required:d,value:p,"custom-attributes":h}=a,f=l?"error":"",m=(0,Uk.Z)(c,p),g=u?d?u+" *":u:"",{options:b}=(0,Ik.Z)({controlKey:i,objectPathId:s,options:c,query:h?.optionsGenerator}),[y,v]=(0,r.useState)(m),[O,w]=(0,r.useState)(""),A=s||i;(0,r.useEffect)((()=>{if(!p){const e=(0,Uk.Z)(c,p);x({option:e})}if(p!==y?.value){const e=(0,Uk.Z)(c,p);x({option:e,hasChanged:!1})}}),[p]);const x=({option:t,hasChanged:r=!0})=>{v(t),e({value:t?.value||"",options:[...c?.map((e=>({...e,selected:e.value===t?.value})))],hasChanged:r})};return n().createElement(JO,{className:zk["select-container"],id:A,"data-testid":`select-container ${i}`,disableClearable:!0,size:"small",sx:t?.selectProps?.sx,value:y,readOnly:h?.readOnly,onChange:(e,t)=>x({option:t}),isOptionEqualToValue:(e,t)=>e.value===t.value,inputValue:O,onInputChange:(e,t)=>w(t),options:b,getOptionLabel:e=>e.text,ListboxProps:{sx:{"& .MuiAutocomplete-option":{minHeight:"40px"}}},renderInput:e=>n().createElement(Ok,{...e,className:zk[f],placeholder:g,required:d,sx:{"& > div":{minWidth:"0 !important"},"& .MuiInputBase-root":{height:"40px"},...t?.selectProps?.textField?.sx}})})};var Wk=__webpack_require__(9089),Yk={};Yk.styleTagTransform=j(),Yk.setAttributes=E(),Yk.insert=S().bind(null,"head"),Yk.domAPI=k(),Yk.insertStyleElement=q(),A()(Wk.Z,Yk);const Vk=Wk.Z&&Wk.Z.locals?Wk.Z.locals:void 0,Xk=async(e,t,r,n)=>{const o=t["mrn-ref-display-field"]||t.displayField||"name",i=t["mrn-ref-mrn-field"]||"_mrn",a=await n(e,r,{headers:{accept:"application/xhtml-form+json"}});if(!a||!a?.items&&!a?.values)throw new Error("unable to handle response - json expected");const s=(a.items||[a]).map((e=>{const t=Object.keys(e?.values).filter((e=>!e.startsWith("_"))),r={};return t.forEach((t=>{r[t]=e.values[t]})),{key:e.values[o],mrn:e.values[i],mrnEntries:r}}));return s},Hk=(e,t)=>{const r=new URLSearchParams(e);return t&&r.append("q",t),r?.toString()},Gk=(e,t,r)=>"/solution/index.html"===e.pathname?e.pathname.replace("index","resolver")+e.hash.split("/")[0]+"?mrn="+encodeURIComponent(t):e.pathname+"#"+r,Kk=({onChangeValue:e,controlProps:t,objectPathId:o,...i})=>{const{id:a,control:s}=i||{},{value:l="","custom-attributes":c,displayName:u,error:d,hasEdited:p}=s||{},h=d?"error":"",f=c?.defaultValue,{isLoading:m,isOpen:g,isDisabled:b,mrnOptions:y,selectedOption:v,setSelectedOption:w,setSearchText:A,setIsOpen:x,currentMrnOption:k,onChangeCurrentMrnOption:C}=(({value:e,customAttributes:t,objectPathId:n,onChangeValue:o})=>{const{resolveUrl:i}=(0,r.useContext)(O.L8);if(!i)throw new Error("resolveUrl Prop is not defined");const[a,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)([]),[p,h]=(0,r.useState)(null),[f,m]=(0,r.useState)(""),g=t?.mrnSources?.find((t=>e?.includes(t?.mrn))),b=g||t?.mrnSources?.[0]||t,[y,v]=(0,r.useState)(b),w=y?.["mrn-ref-params"]||y?.query,{dependentControls:A,resolvedQuery:x,isDisabled:k}=(0,nn.Z)({query:w,objectPathId:n}),C=y?.["mrn-ref"]||y?.mrn;(0,r.useEffect)((()=>{v(b)}),[e]),(0,r.useEffect)((()=>{let t=!0;return e?(async()=>{const r=Hk(x),n=await Xk(e,y,r,i);t&&(o({mrnEntries:n?.[0]?.mrnEntries}),h(n?.[0]))})():h(null),()=>{t=!1}}),[e]),L((()=>{const e=setTimeout((()=>{S(f)}),500);return()=>clearTimeout(e)}),[f]);const S=async e=>{s(!0),d([]);const t=Hk(x,e),r=await Xk(C,y,t,i);d(r),s(!1)};return(0,r.useEffect)((()=>{!l&&s(!1),l&&(async()=>{s(!0);const e=Hk(x),t=await Xk(C,y,e,i);d(t),s(!1)})()}),[l]),{isLoading:a,isOpen:l,isDisabled:k,mrnOptions:u,selectedOption:p,setSelectedOption:h,setSearchText:m,setIsOpen:c,currentMrnOption:y,onChangeCurrentMrnOption:e=>{const r=(0,Uk.Z)(t?.mrnSources?.map((e=>({value:e?.mrn,text:e?.name,...e}))),e?.value);v(r),d([])},dependentControls:A}})({value:l,customAttributes:c,objectPathId:o,onChangeValue:e}),{textColor:S}=an({onChangeValue:e,query:f,objectPathId:o,value:l,hasEdited:p}),_=c?.mrnSources?.length||1,E=e=>{A(e?.target?.value)},P=_>1?Vk["with-select"]:"";return n().createElement("div",{className:`${Vk["mrn-input-container"]} ${P}`,"data-testid":`mrn-input-container ${a}`,style:{color:S}},_>1&&n().createElement("div",{style:{width:"35%",height:"40px"}},n().createElement(Fk,{id:Lk()(),control:{control:"select",options:c?.mrnSources?.map((e=>({value:e?.mrn,text:e?.name,...e}))),value:k?.mrn},controlProps:t,onChangeValue:C})),n().createElement(JO,{id:a,sx:{width:"100%",backgroundColor:"white",...t?.selectProps?.sx},"data-testid":`mrn-input ${a}`,size:"small",value:v,readOnly:c?.readOnly,disabled:!l&&b,onChange:(t,r)=>(t=>{e({hasEdited:"edited",value:t?.mrn||"",mrnEntries:t?.mrnEntries||null},((e,r,n)=>function(e,t){if("mrnEntries"===t)return e?.mrnEntries}(t,n))),w(t)})(r),isOptionEqualToValue:(e,t)=>e?.mrn===t?.mrn,filterOptions:(e,t)=>e,getOptionLabel:e=>e?.key,options:y,open:g,onOpen:()=>x(!0),onClose:()=>x(!1),loading:m,PaperComponent:e=>((e,t,r,o,i)=>{const a=Zr(t)?.applicationId,s={hash:window.top.location.hash,pathname:window.top.location.pathname};return n().createElement(lO,{...i,style:{zIndex:999999999}},e,!o&&n().createElement("a",{className:"mrn-reference-link","data-testid":"link__mrn-reference-link",href:Gk(s,t,a),onMouseDown:e=>e.preventDefault(),rel:"noreferrer",target:"_blank",style:{color:"#4a96d2",textDecoration:"none"}},n().createElement("ul",{style:{listStyle:"none",padding:"12px"}},n().createElement("li",{style:{display:"flex",alignItems:"center",gap:"3px"}},n().createElement(te.Z,{className:"add-icon",style:{marginTop:"-2px"}}),n().createElement("span",null,r)))))})(e.children,k?.["mrn-ref"]||k?.mrn,k?.name||u,t?.mrnProps?.disableMrnLink,e),renderInput:e=>n().createElement(Ok,{...e,className:Vk[h],onChange:E,required:c?.required,sx:t?.selectProps?.textField?.sx,InputProps:{style:{minHeight:40,color:S},...e.InputProps,endAdornment:n().createElement(n().Fragment,null,m&&n().createElement(Nk,{style:{marginRight:30},color:"inherit",size:20}),e.InputProps.endAdornment)}})}))};var Jk=__webpack_require__(7972),eC={};eC.styleTagTransform=j(),eC.setAttributes=E(),eC.insert=S().bind(null,"head"),eC.domAPI=k(),eC.insertStyleElement=q(),A()(Jk.Z,eC);const tC=Jk.Z&&Jk.Z.locals?Jk.Z.locals:void 0;var rC=__webpack_require__(2961),nC=__webpack_require__(2450),oC=__webpack_require__(909),iC={};iC.styleTagTransform=j(),iC.setAttributes=E(),iC.insert=S().bind(null,"head"),iC.domAPI=k(),iC.insertStyleElement=q(),A()(oC.Z,iC);const aC=oC.Z&&oC.Z.locals?oC.Z.locals:void 0;var sC=__webpack_require__(706),lC={};lC.styleTagTransform=j(),lC.setAttributes=E(),lC.insert=S().bind(null,"head"),lC.domAPI=k(),lC.insertStyleElement=q(),A()(sC.Z,lC);const cC=sC.Z&&sC.Z.locals?sC.Z.locals:void 0,uC=({onAcceptAiResponse:e})=>{const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(!1),[a,s]=(0,r.useState)({state:!1,message:"",prompt:"",profile:""}),[l,c]=(0,r.useState)(null),{postGenAiMessage:u}=(0,r.useContext)(O.L8),d=async(e,t,r)=>{i(!0),c(r);const o=await(u?.({message:e,profile:t}));"success"===o.status?(n(o),s({state:!1,message:"",prompt:"",profile:""})):s({state:!0,message:o.message,profile:t,prompt:e}),i(!1),c(null)};return{aiResponse:t,isLoading:o,isError:a,loadingActionIndex:l,handleAiActionClick:d,handleAccept:()=>{e({value:t.message}),n(null)},handleDiscard:()=>{n(null)},handleBack:()=>{n(null),s({state:!1,message:"",prompt:"",profile:""})},handleRetry:async()=>{a.prompt&&await d(a.prompt,a.profile,l)}}};var dC=__webpack_require__(471),pC={};pC.styleTagTransform=j(),pC.setAttributes=E(),pC.insert=S().bind(null,"head"),pC.domAPI=k(),pC.insertStyleElement=q(),A()(dC.Z,pC),dC.Z&&dC.Z.locals&&dC.Z.locals;var hC=__webpack_require__(347),fC={};fC.styleTagTransform=j(),fC.setAttributes=E(),fC.insert=S().bind(null,"head"),fC.domAPI=k(),fC.insertStyleElement=q(),A()(hC.Z,fC);const mC=hC.Z&&hC.Z.locals?hC.Z.locals:void 0;var gC=__webpack_require__(7909);function bC(e){return(0,We.Z)("MuiTooltip",e)}const yC=(0,Te.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),vC=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"],OC=(0,le.ZP)(Kv,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})((({theme:t,ownerState:r,open:n})=>(0,e.Z)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!r.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},r.arrow&&{[`&[data-popper-placement*="bottom"] .${yC.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${yC.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${yC.arrow}`]:(0,e.Z)({},r.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${yC.arrow}`]:(0,e.Z)({},r.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),wC=(0,le.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,Ke.Z)(r.placement.split("-")[0])}`]]}})((({theme:t,ownerState:r})=>(0,e.Z)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,se.Fq)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},r.arrow&&{position:"relative",margin:0},r.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:(16/14,Math.round(114285.71428571428)/1e5+"em"),fontWeight:t.typography.fontWeightRegular},{[`.${yC.popper}[data-popper-placement*="left"] &`]:(0,e.Z)({transformOrigin:"right center"},r.isRtl?(0,e.Z)({marginLeft:"14px"},r.touch&&{marginLeft:"24px"}):(0,e.Z)({marginRight:"14px"},r.touch&&{marginRight:"24px"})),[`.${yC.popper}[data-popper-placement*="right"] &`]:(0,e.Z)({transformOrigin:"left center"},r.isRtl?(0,e.Z)({marginRight:"14px"},r.touch&&{marginRight:"24px"}):(0,e.Z)({marginLeft:"14px"},r.touch&&{marginLeft:"24px"})),[`.${yC.popper}[data-popper-placement*="top"] &`]:(0,e.Z)({transformOrigin:"center bottom",marginBottom:"14px"},r.touch&&{marginBottom:"24px"}),[`.${yC.popper}[data-popper-placement*="bottom"] &`]:(0,e.Z)({transformOrigin:"center top",marginTop:"14px"},r.touch&&{marginTop:"24px"})}))),AC=(0,le.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,se.Fq)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let xC=!1,kC=null,CC={x:0,y:0};function SC(e,t){return r=>{t&&t(r),e(r)}}const _C=r.forwardRef((function(n,o){var i,a,l,c,u,d,p,h,f,m,g,b,y,v,O,w,A,x,k;const C=(0,ce.Z)({props:n,name:"MuiTooltip"}),{arrow:S=!1,children:_,components:E={},componentsProps:P={},describeChild:q=!1,disableFocusListener:T=!1,disableHoverListener:j=!1,disableInteractive:R=!1,disableTouchListener:Z=!1,enterDelay:$=100,enterNextDelay:M=0,enterTouchDelay:N=700,followCursor:D=!1,id:L,leaveDelay:I=0,leaveTouchDelay:B=1500,onClose:Q,onOpen:z,open:U,placement:F="bottom",PopperComponent:W,PopperProps:Y={},slotProps:V={},slots:X={},title:H,TransitionComponent:G=YA,TransitionProps:K}=C,J=(0,t.Z)(C,vC),ee=r.isValidElement(_)?_:(0,s.jsx)("span",{children:_}),te=LA(),re="rtl"===te.direction,[ne,ie]=r.useState(),[se,le]=r.useState(null),he=r.useRef(!1),fe=R||D,me=r.useRef(),ge=r.useRef(),be=r.useRef(),ye=r.useRef(),[ve,Oe]=(0,rr.Z)({controlled:U,default:!1,name:"Tooltip",state:"open"});let we=ve;const Ae=(0,gC.Z)(L),xe=r.useRef(),ke=r.useCallback((()=>{void 0!==xe.current&&(document.body.style.WebkitUserSelect=xe.current,xe.current=void 0),clearTimeout(ye.current)}),[]);r.useEffect((()=>()=>{clearTimeout(me.current),clearTimeout(ge.current),clearTimeout(be.current),ke()}),[ke]);const Ce=e=>{clearTimeout(kC),xC=!0,Oe(!0),z&&!we&&z(e)},Se=(0,de.Z)((e=>{clearTimeout(kC),kC=setTimeout((()=>{xC=!1}),800+I),Oe(!1),Q&&we&&Q(e),clearTimeout(me.current),me.current=setTimeout((()=>{he.current=!1}),te.transitions.duration.shortest)})),_e=e=>{he.current&&"touchstart"!==e.type||(ne&&ne.removeAttribute("title"),clearTimeout(ge.current),clearTimeout(be.current),$||xC&&M?ge.current=setTimeout((()=>{Ce(e)}),xC?M:$):Ce(e))},Ee=e=>{clearTimeout(ge.current),clearTimeout(be.current),be.current=setTimeout((()=>{Se(e)}),I)},{isFocusVisibleRef:Pe,onBlur:qe,onFocus:Te,ref:je}=(0,pe.Z)(),[,Re]=r.useState(!1),Ze=e=>{qe(e),!1===Pe.current&&(Re(!1),Ee(e))},$e=e=>{ne||ie(e.currentTarget),Te(e),!0===Pe.current&&(Re(!0),_e(e))},Me=e=>{he.current=!0;const t=ee.props;t.onTouchStart&&t.onTouchStart(e)},Ne=_e,De=Ee;r.useEffect((()=>{if(we)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Se(e)}}),[Se,we]);const Le=(0,ue.Z)(ee.ref,je,ie,o);H||0===H||(we=!1);const Ie=r.useRef(),Be={},Qe="string"==typeof H;q?(Be.title=we||!Qe||j?null:H,Be["aria-describedby"]=we?Ae:null):(Be["aria-label"]=Qe?H:null,Be["aria-labelledby"]=we&&!Qe?Ae:null);const ze=(0,e.Z)({},Be,J,ee.props,{className:(0,oe.Z)(J.className,ee.props.className),onTouchStart:Me,ref:Le},D?{onMouseMove:e=>{const t=ee.props;t.onMouseMove&&t.onMouseMove(e),CC={x:e.clientX,y:e.clientY},Ie.current&&Ie.current.update()}}:{}),Ue={};Z||(ze.onTouchStart=e=>{Me(e),clearTimeout(be.current),clearTimeout(me.current),ke(),xe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ye.current=setTimeout((()=>{document.body.style.WebkitUserSelect=xe.current,_e(e)}),N)},ze.onTouchEnd=e=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(e),ke(),clearTimeout(be.current),be.current=setTimeout((()=>{Se(e)}),B)}),j||(ze.onMouseOver=SC(Ne,ze.onMouseOver),ze.onMouseLeave=SC(De,ze.onMouseLeave),fe||(Ue.onMouseOver=Ne,Ue.onMouseLeave=De)),T||(ze.onFocus=SC($e,ze.onFocus),ze.onBlur=SC(Ze,ze.onBlur),fe||(Ue.onFocus=$e,Ue.onBlur=Ze));const Fe=r.useMemo((()=>{var t;let r=[{name:"arrow",enabled:Boolean(se),options:{element:se,padding:4}}];return null!=(t=Y.popperOptions)&&t.modifiers&&(r=r.concat(Y.popperOptions.modifiers)),(0,e.Z)({},Y.popperOptions,{modifiers:r})}),[se,Y]),We=(0,e.Z)({},C,{isRtl:re,arrow:S,disableInteractive:fe,placement:F,PopperComponentProp:W,touch:he.current}),Ye=(e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,Ke.Z)(i.split("-")[0])}`],arrow:["arrow"]};return(0,ae.Z)(a,bC,t)})(We),Ve=null!=(i=null!=(a=X.popper)?a:E.Popper)?i:OC,Xe=null!=(l=null!=(c=null!=(u=X.transition)?u:E.Transition)?c:G)?l:YA,He=null!=(d=null!=(p=X.tooltip)?p:E.Tooltip)?d:wC,Ge=null!=(h=null!=(f=X.arrow)?f:E.Arrow)?h:AC,Je=Mv(Ve,(0,e.Z)({},Y,null!=(m=V.popper)?m:P.popper,{className:(0,oe.Z)(Ye.popper,null==Y?void 0:Y.className,null==(g=null!=(b=V.popper)?b:P.popper)?void 0:g.className)}),We),et=Mv(Xe,(0,e.Z)({},K,null!=(y=V.transition)?y:P.transition),We),tt=Mv(He,(0,e.Z)({},null!=(v=V.tooltip)?v:P.tooltip,{className:(0,oe.Z)(Ye.tooltip,null==(O=null!=(w=V.tooltip)?w:P.tooltip)?void 0:O.className)}),We),rt=Mv(Ge,(0,e.Z)({},null!=(A=V.arrow)?A:P.arrow,{className:(0,oe.Z)(Ye.arrow,null==(x=null!=(k=V.arrow)?k:P.arrow)?void 0:x.className)}),We);return(0,s.jsxs)(r.Fragment,{children:[r.cloneElement(ee,ze),(0,s.jsx)(Ve,(0,e.Z)({as:null!=W?W:Kv,placement:F,anchorEl:D?{getBoundingClientRect:()=>({top:CC.y,left:CC.x,right:CC.x,bottom:CC.y,width:0,height:0})}:ne,popperRef:Ie,open:!!ne&&we,id:Ae,transition:!0},Ue,Je,{popperOptions:Fe,children:({TransitionProps:t})=>(0,s.jsx)(Xe,(0,e.Z)({timeout:te.transitions.duration.shorter},t,et,{children:(0,s.jsxs)(He,(0,e.Z)({},tt,{children:[H,S?(0,s.jsx)(Ge,(0,e.Z)({},rt,{ref:le})):null]}))}))}))]})})),EC=_C;var PC=__webpack_require__(4574),qC=__webpack_require__(5171),TC=__webpack_require__(7691);const jC=()=>n().createElement("svg",{width:"100%",viewBox:"0 0 769 532",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n().createElement("mask",{id:"mask0_6_2662",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"769",height:"532"},n().createElement("path",{d:"M0 6.00001C0 2.6863 2.68629 0 6 0H763C766.314 0 769 2.68629 769 6V526C769 529.314 766.314 532 763 532H0V6.00001Z",fill:"#D9D9D9"})),n().createElement("g",{mask:"url(#mask0_6_2662)"},n().createElement("path",{opacity:"0.5",d:"M307.972 177.272L307.972 -0.300446L153.983 88.4859L153.983 266.059L307.972 177.272Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.5",d:"M615.263 178.119L769.221 89.2552L615.286 0.431558L461.328 89.295L615.263 178.119Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M461.961 88.4859L307.972 -0.300459L307.972 177.272L461.961 266.059L461.961 88.4859Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M769.162 266.883L769.215 89.2476L615.257 178.111L615.204 355.746L769.162 266.883Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M153.855 264.725L-0.0504942 353.497L153.908 442.36L307.813 353.588L153.855 264.725Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.5",d:"M153.915 443.352L-0.0435364 354.489L-0.0206077 532.176L153.937 621.04L153.915 443.352Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{opacity:"0.25",d:"M769.095 621.257L923 532.486L769.042 443.622L615.137 532.394L769.095 621.257Z",fill:"#4A96D2",fillOpacity:"0.2"}))),RC=()=>n().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"136",height:"160",viewBox:"0 0 136 160",fill:"none"},n().createElement("path",{d:"M65.4681 59.6214H64.988C64.988 59.2245 64.6615 58.8981 64.2647 58.8981C63.8678 58.8981 63.5413 59.2245 63.5413 59.6214H63.0612C63.0612 58.9557 63.5989 58.418 64.2647 58.418C64.9304 58.418 65.4681 58.9557 65.4681 59.6214Z",fill:"white"}),n().createElement("path",{d:"M104.939 158.048H91.4001L96.6043 140.937H99.7345L104.939 158.048Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M106.059 158.048H90.2798V160H106.059V158.048Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M92.6995 153.772L91.4001 158.048H104.939L103.639 153.772H92.6995Z",fill:"#1A3846"}),n().createElement("path",{d:"M93.999 149.495H102.333L101.034 145.213H95.3049L93.999 149.495Z",fill:"#1A3846"}),n().createElement("path",{d:"M110.482 159.892H113.484V148.254H128.911V159.892H131.913V148.254H135.095V138.959H132.554V138.102H128.175V138.959H114.508V138.102H110.13V138.959H107.345V148.254H110.476V159.892H110.482ZM134.135 139.932V139.971L132.285 147.281H128.982L130.844 139.932H134.141H134.135ZM125.512 147.281H122.209L124.072 139.932H127.375L125.512 147.281ZM118.746 147.281H115.443L117.306 139.932H120.609L118.746 147.281ZM110.533 139.932H113.836L111.973 147.281H108.67L110.533 139.932Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M25.2299 25.605H24.5898V53.7706H25.2299V25.605Z",fill:"#1A3846"}),n().createElement("path",{d:"M27.624 56.5046C27.624 58.1306 26.3053 59.4492 24.6794 59.4492C23.0535 59.4492 21.7348 58.1306 21.7348 56.5046C21.7348 54.8787 23.0535 53.5601 24.6794 53.5601C26.3053 53.5601 27.624 54.8787 27.624 56.5046Z",fill:"#1A3846"}),n().createElement("path",{d:"M24.7242 66.381C24.673 66.381 23.7128 66.3746 23.015 65.6704C22.5478 65.2031 22.3109 64.5566 22.3109 63.7436C22.3109 63.526 22.4837 63.3532 22.7014 63.3532C22.919 63.3532 23.0919 63.526 23.0919 63.7436C23.0919 64.339 23.2519 64.8063 23.5656 65.1199C24.0393 65.5872 24.7178 65.6 24.7242 65.6C25.8252 65.6 26.715 64.7038 26.715 63.6092C26.715 62.5146 25.8188 61.6184 24.7242 61.6184C24.5066 61.6184 24.3337 61.4456 24.3337 61.2279V59.0643C24.3337 58.8467 24.5066 58.6738 24.7242 58.6738C24.9418 58.6738 25.1147 58.8467 25.1147 59.0643V60.8631C26.4589 61.0551 27.4959 62.2137 27.4959 63.6092C27.4959 65.1391 26.2541 66.381 24.7242 66.381Z",fill:"#1A3846"}),n().createElement("path",{d:"M54.535 23.9409H18.3486V27.9225H54.535V23.9409Z",fill:"#4A96D2",fillOpacity:"0.2"}),n().createElement("path",{d:"M85.9776 106.261H73.9624V0.0512695H85.9776V106.261ZM75.1531 105.071H84.787V1.24191H75.1531V105.077V105.071Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 11.7079H74.1098V0H85.8242V11.7079ZM75.3197 10.5045H84.6207V1.20344H75.3197V10.5045Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1463 0.174427L74.2954 1.02539L84.8011 11.5311L85.6521 10.6802L75.1463 0.174427Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8011 0.178825L74.2954 10.6846L75.1463 11.5355L85.6521 1.02979L84.8011 0.178825Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 22.2187H74.1098V10.5107H85.8242V22.2187ZM75.3197 21.0152H84.6207V11.7142H75.3197V21.0152Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1422 10.6808L74.2913 11.5317L84.797 22.0375L85.648 21.1865L75.1422 10.6808Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.797 10.6857L74.2913 21.1914L75.1422 22.0424L85.648 11.5366L84.797 10.6857Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 32.7236H74.1098V21.0093H85.8242V32.7236ZM75.3197 31.5202H84.6207V22.2191H75.3197V31.5202Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1428 21.192L74.2918 22.043L84.7976 32.5487L85.6485 31.6978L75.1428 21.192Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8041 21.1964L74.2984 31.7021L75.1493 32.5531L85.6551 22.0474L84.8041 21.1964Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 43.2338H74.1098V31.5259H85.8242V43.2338ZM75.3197 42.0304H84.6207V32.7293H75.3197V42.0304Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1452 31.6925L74.2943 32.5435L84.8 43.0492L85.651 42.1982L75.1452 31.6925Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8 31.6969L74.2943 42.2026L75.1452 43.0536L85.651 32.5479L84.8 31.6969Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 53.7387H74.1098V42.0308H85.8242V53.7387ZM75.3197 52.5353H84.6207V43.2342H75.3197V52.5353Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1454 42.2037L74.2945 43.0547L84.8002 53.5604L85.6512 52.7095L75.1454 42.2037Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.7958 42.2111L74.2901 52.7168L75.1411 53.5678L85.6468 43.062L84.7958 42.2111Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 64.2495H74.1098V52.5352H85.8242V64.2495ZM75.3197 63.0461H84.6207V53.745H75.3197V63.0461Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1415 52.7106L74.2906 53.5615L84.7963 64.0673L85.6473 63.2163L75.1415 52.7106Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8024 52.7218L74.2967 63.2275L75.1476 64.0785L85.6534 53.5728L84.8024 52.7218Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 74.7538H74.1098V63.0459H85.8242V74.7538ZM75.3197 73.5504H84.6207V64.2493H75.3197V73.5504Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1482 63.2218L74.2972 64.0728L84.803 74.5785L85.654 73.7275L75.1482 63.2218Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.7983 63.2286L74.2925 73.7344L75.1435 74.5853L85.6492 64.0796L84.7983 63.2286Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 85.2587H74.1098V73.5508H85.8242V85.2587ZM75.3197 84.0553H84.6207V74.7542H75.3197V84.0553Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.1441 73.7223L74.2931 74.5732L84.7988 85.079L85.6498 84.228L75.1441 73.7223Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.7988 73.734L74.2931 84.2397L75.1441 85.0907L85.6498 74.585L84.7988 73.734Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 95.7695H74.1098V84.0615H85.8242V95.7695ZM75.3197 94.566H84.6207V85.265H75.3197V94.566Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.14 84.2291L74.2891 85.0801L84.7948 95.5858L85.6458 94.7349L75.14 84.2291Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8014 84.2403L74.2956 94.7461L75.1466 95.5971L85.6523 85.0913L84.8014 84.2403Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.8242 106.274H74.1098V94.5659H85.8242V106.274ZM75.3197 105.07H84.6207V95.7694H75.3197V105.07Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.147 94.7408L74.2961 95.5918L84.8018 106.098L85.6528 105.247L75.147 94.7408Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.8014 94.7441L74.2938 105.248L75.1446 106.099L85.6522 95.5952L84.8014 94.7441Z",fill:"#1A3846"}),n().createElement("path",{d:"M106.737 22.0591H95.029V10.3447H106.737V22.0591ZM96.2324 20.8556H105.534V11.5546H96.2324V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M105.702 10.5276L95.1984 21.0352L96.0495 21.886L106.553 11.3784L105.702 10.5276Z",fill:"#1A3846"}),n().createElement("path",{d:"M96.0516 10.525L95.2007 11.376L105.706 21.8817L106.557 21.0308L96.0516 10.525Z",fill:"#1A3846"}),n().createElement("path",{d:"M96.2264 22.0591H84.5184V10.3447H96.2264V22.0591ZM85.7219 20.8556H95.0229V11.5546H85.7219V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M95.1968 10.5251L84.6929 21.0327L85.544 21.8835L96.048 11.3759L95.1968 10.5251Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.5401 10.5255L84.6891 11.3765L95.1949 21.8822L96.0459 21.0313L85.5401 10.5255Z",fill:"#1A3846"}),n().createElement("path",{d:"M85.7216 22.0591H74.0137V10.3447H85.7216V22.0591ZM75.2171 20.8556H84.5182V11.5546H75.2171V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.211 22.0591H63.503V10.3447H75.211V22.0591ZM64.7065 20.8556H74.0075V11.5546H64.7065V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M74.1831 10.5236L63.6774 21.0293L64.5284 21.8803L75.0341 11.3745L74.1831 10.5236Z",fill:"#1A3846"}),n().createElement("path",{d:"M64.5331 10.5235L63.6821 11.3745L74.1878 21.8803L75.0388 21.0293L64.5331 10.5235Z",fill:"#1A3846"}),n().createElement("path",{d:"M64.7064 22.0591H52.9984V10.3447H64.7064V22.0591ZM54.2019 20.8556H63.5029V11.5546H54.2019V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M63.6719 10.5236L53.1662 21.0293L54.0172 21.8803L64.5229 11.3745L63.6719 10.5236Z",fill:"#1A3846"}),n().createElement("path",{d:"M54.0219 10.5299L53.1709 11.3809L63.6766 21.8866L64.5276 21.0356L54.0219 10.5299Z",fill:"#1A3846"}),n().createElement("path",{d:"M54.1956 22.0591H42.4876V10.3447H54.1956V22.0591ZM43.6911 20.8556H52.9921V11.5546H43.6911V20.8556Z",fill:"#1A3846"}),n().createElement("path",{d:"M43.0893 22.0585H32.5848C32.3416 22.0585 32.1239 21.9113 32.0279 21.6872C31.9319 21.4632 31.9895 21.2007 32.1559 21.0343L42.6604 10.5298L43.5118 11.3812L34.0315 20.8615H42.8333L53.1649 10.5298L54.0163 11.3812L43.5118 21.8857C43.3966 22.0009 43.2429 22.0649 43.0893 22.0649V22.0585Z",fill:"#1A3846"}),n().createElement("path",{d:"M43.5147 10.526L42.6638 11.377L53.1695 21.8827L54.0205 21.0317L43.5147 10.526Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 117.976H73.9625V106.268H86.0033V117.976ZM75.2043 116.772H84.7678V107.471H75.2043V116.772Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 117.796L74.1481 107.291L75.0187 106.44L85.824 116.944L84.9471 117.796Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 117.796L74.1481 116.944L84.9471 106.44L85.824 107.291L75.0187 117.796Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 160H73.9625V148.292H86.0033V160ZM75.2043 158.796H84.7678V149.495H75.2043V158.796Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 159.827L74.1481 149.316L75.0187 148.471L85.824 158.976L84.9471 159.827Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 159.827L74.1481 158.976L84.9471 148.471L85.824 149.316L75.0187 159.827Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 127.488H73.9625V115.78H86.0033V127.488ZM75.2043 126.284H84.7678V116.983H75.2043V126.284Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 127.309L74.1481 116.804L75.0187 115.953L85.824 126.458L84.9471 127.309Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 127.309L74.1481 126.458L84.9471 115.953L85.824 116.804L75.0187 127.309Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 137.992H73.9625V126.284H86.0033V137.992ZM75.2043 136.789H84.7678V127.488H75.2043V136.789Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 137.82L74.1481 127.309L75.0187 126.458L85.824 136.968L84.9471 137.82Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 137.82L74.1481 136.968L84.9471 126.458L85.824 127.309L75.0187 137.82Z",fill:"#1A3846"}),n().createElement("path",{d:"M86.0033 148.497H73.9625V136.789H86.0033V148.497ZM75.2043 147.294H84.7678V137.993H75.2043V147.294Z",fill:"#1A3846"}),n().createElement("path",{d:"M84.9471 148.324L74.1481 137.82L75.0187 136.968L85.824 147.473L84.9471 148.324Z",fill:"#1A3846"}),n().createElement("path",{d:"M75.0187 148.324L74.1481 147.473L84.9471 136.968L85.824 137.82L75.0187 148.324Z",fill:"#1A3846"}),n().createElement("path",{d:"M8.3732 65.1426L15.8577 60.812V69.4404L8.3732 73.7546V65.1426Z",fill:"#1A3846"}),n().createElement("path",{d:"M15.8576 69.4404V60.812L23.3257 65.1426V73.7546L15.8576 69.4404Z",fill:"#1A3846"}),n().createElement("path",{d:"M15.8577 95.3581V86.7134L8.3732 91.0276V99.656L15.8577 95.3581Z",fill:"#1A3846"}),n().createElement("path",{d:"M23.3259 99.6563L15.8577 95.3584L8.3732 99.6563L15.8577 103.954L23.3259 99.6563Z",fill:"#1A3846"}),n().createElement("path",{d:"M23.2931 99.6567L30.7612 103.955V95.3589L23.2931 91.0283V99.6567Z",fill:"#1A3846"}),n().createElement("path",{d:"M30.7614 95.3589V103.955L38.2459 99.6567V91.0283L30.7614 95.3589Z",fill:"#1A3846"}),n().createElement("path",{d:"M8.37312 82.416V91.0281L0.904968 86.7139L0.904968 78.0854L8.37312 82.416Z",fill:"#1A3846"}),n().createElement("path",{d:"M15.8576 78.085L8.37312 82.4155L0.904968 78.085L8.37312 73.7871L15.8576 78.085Z",fill:"#1A3846"}),n().createElement("path",{d:"M38.2459 73.7546L30.7614 78.0852V69.4404L38.2459 65.1099V73.7546Z",fill:"#1A3846"}),n().createElement("path",{d:"M38.2457 65.1099L30.7612 69.4404L23.2931 65.1099L30.7612 60.812L38.2457 65.1099Z",fill:"#1A3846"}),n().createElement("path",{d:"M45.7139 78.0859L38.2457 73.7554V82.3838L45.7139 86.698V78.0859Z",fill:"#1A3846"}),n().createElement("path",{d:"M45.714 86.697L38.2459 82.3828L30.7614 86.697L38.2459 91.0276L45.714 86.697Z",fill:"#1A3846"})),ZC=Ro.div`
|
621
621
|
display: flex;
|
622
622
|
justify-content: space-between;
|
623
623
|
align-self: center;
|
@@ -675,7 +675,7 @@ ${e=>e["data-disabled"]&&Em`pointer-events: none;`}
|
|
675
675
|
border: none;
|
676
676
|
color: white;
|
677
677
|
cursor: pointer;
|
678
|
-
`,QC=({onBack:e,onRetry:t})=>n().createElement(ZC,null,n().createElement($C,null,n().createElement(MC,null,n().createElement(RC,null)),n().createElement(NC,null,n().createElement("p",null,"Sorry, but the request has encountered",n().createElement("br",null)," an issue. We're working on fixing it.",n().createElement("br",null)," Please try again later."),n().createElement(DC,null,n().createElement(IC,{onClick:e},n().createElement("p",null,"Back"),n().createElement(TC.W,{size:16,style:{transform:"scaleX(-1)"}})),n().createElement(BC,{onClick:t},n().createElement("p",null,"Retry"),n().createElement(TC.W,{size:16}))))),n().createElement(LC,null,n().createElement(jC,null))),zC=()=>n().createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n().createElement("g",{id:"Vector"},n().createElement("path",{d:"M2.00001 1.38288L4.00438 0.223145V2.53387L2.00001 3.68923V1.38288Z",fill:"white"}),n().createElement("path",{d:"M4.00438 2.53387V0.223145L6.00437 1.38288V3.68923L4.00438 2.53387Z",fill:"white"}),n().createElement("path",{d:"M4.00438 9.47487V7.15977L2.00001 8.31513V10.6259L4.00438 9.47487Z",fill:"white"}),n().createElement("path",{d:"M6.00438 10.6258L4.00438 9.47487L2.00001 10.6259L4.00438 11.7768L6.00438 10.6258Z",fill:"white"}),n().createElement("path",{d:"M5.99563 10.6257L7.99563 11.7767V9.47468L5.99563 8.31495V10.6257Z",fill:"white"}),n().createElement("path",{d:"M7.99563 9.47468V11.7767L10 10.6257V8.31495L7.99563 9.47468Z",fill:"white"}),n().createElement("path",{d:"M2 6.00857L2.00001 8.31513L0 7.15955V4.84883L2 6.00857Z",fill:"white"}),n().createElement("path",{d:"M4.00438 4.84903L2 6.00857L0 4.84883L2 3.69805L4.00438 4.84903Z",fill:"white"}),n().createElement("path",{d:"M10 3.68932L7.99563 4.84906V2.53396L10 1.37422V3.68932Z",fill:"white"}),n().createElement("path",{d:"M10 1.37422L7.99563 2.53396L5.99563 1.37413L7.99563 0.223145L10 1.37422Z",fill:"white"}),n().createElement("path",{d:"M12 4.849L10 3.68932L10 5.99998L12 7.15534V4.849Z",fill:"white"}),n().createElement("path",{d:"M12 7.15534L10 5.99998L7.99563 7.15527L10 8.31495L12 7.15534Z",fill:"white"}))),UC=({action:e,objectPathId:t,isLoading:r,isDisabled:o,index:i,onClick:a})=>{const{resolvedQuery:s}=(0,nn.Z)({query:e.promptTemplate,objectPathId:t});return n().createElement("button",{onClick:()=>{r||a(s,e.profile,i)},className:`${mC.actionButton} ${r?mC.actionButtonLoading:""}`,disabled:o,"data-testid":"textarea-ai-wrapper-action-button",type:"button"},n().createElement("p",null,e.displayValue),r&&n().createElement(zC,null))},FC=({AiResponseControl:e,aiActions:t,inputControl:r,objectPathId:o,aiResponse:i,isError:a,isLoading:s,loadingActionIndex:l,modalOpen:c,onModalToggle:u,handleAccept:d,handleAiActionClick:p,handleDiscard:h,handleBack:f,handleRetry:m})=>n().createElement("div",{className:v()(mC.aiWrapperContainer,{[mC.expanded]:c}),"data-testid":"textarea-ai-wrapper"},n().createElement("div",{className:mC.aiWrapperContentContainer},n().createElement("div",{className:`${mC.aiWrapperContentWrapper} aiWrapperContentWrapper`},a.state?n().createElement(QC,{onBack:f,onRetry:m}):n().createElement(n().Fragment,null,r,i&&n().createElement("div",{className:mC.aiResponseInputControlContainer,"data-testid":"textarea-ai-response-container"},n().createElement(e,{value:i.message,readonly:!0})))),i&&n().createElement("div",{className:mC.aiWrapperActionsContainer,"data-testid":"textarea-ai-wrapper-response-actions"},n().createElement("button",{onClick:h,className:mC.discardButton,"data-testid":"textarea-ai-wrapper-discard-button",type:"button"},n().createElement("p",null,"Discard Changes"),n().createElement("i",{className:"fas fa-times"})),n().createElement("button",{onClick:d,className:mC.acceptButton,"data-testid":"textarea-ai-wrapper-accept-button",type:"button"},n().createElement("p",null,"Accept Changes"),n().createElement("i",{className:"fas fa-check"})))),n().createElement("div",{className:mC.aiWrapperFooterContainer,"data-testid":"textarea-ai-wrapper-footer"},n().createElement("div",{className:mC.footerAiIcon},t?.length>0&&n().createElement(EC,{title:"Powered by Artificial Intelligence",arrow:!0,componentsProps:{arrow:{sx:{color:"#333"}},tooltip:{sx:{backgroundColor:"#333",color:"white"}}}},n().createElement("i",{className:"fas fa-sparkles fa-lg"}))),n().createElement("div",{className:mC.aiActionsContainer,"data-testid":"textarea-ai-wrapper-actions"},t?.map(((e,t)=>n().createElement(UC,{key:t,onClick:p,action:e,objectPathId:o,isLoading:s&&l===t,isDisabled:s&&l!==t,index:t}))),!c&&n().createElement(qC.U,{size:18,className:mC.expandButton,"data-testid":"textarea-ai-wrapper-expand-button",onClick:u}),c&&n().createElement(PC.o,{size:18,className:mC.expandButton,"data-testid":"textarea-ai-wrapper-close-button",onClick:u})))),WC={position:"fixed",display:"flex",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 32px)",height:"calc(100% - 32px)",bgcolor:"background.paper",borderRadius:"4px"},YC=({...e})=>{const{onAcceptAiResponse:t}=e,o={...uC({onAcceptAiResponse:t}),...e},[i,a]=(0,r.useState)(!1),s=()=>a((e=>!e));return n().createElement(n().Fragment,null,!i&&n().createElement(FC,{...o,modalOpen:i,onModalToggle:s}),n().createElement(bx,{open:i},n().createElement(Fb,{sx:WC},n().createElement(FC,{...o,modalOpen:i,onModalToggle:s}))))},VC=({value:e,onChange:t,id:r,readOnly:o,setHasEdited:i,control:a,errorClass:s,textColor:l})=>{const{"custom-attributes":c,error:u,...d}=a??{};return n().createElement(sw,{role:"textbox","data-testid":`textarea-control-${r}`,className:`${Jr["form-control"]} ${cC[s]}`,id:r,name:r,style:{flex:"1",maxHeight:400,resize:"vertical",overflow:"auto",color:l,width:"100%"},value:e,readOnly:o,onChange:e=>{i?.(!0),t?.({value:e.target.value})},...Hr()(c,["defaultValue"]),...Hr()(d,["displayName","control","error","defaultValue"])})},XC=1024;let HC=0;class GC{constructor(e,t){this.from=e,this.to=t}}class KC{constructor(e={}){this.id=HC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=tS.match(e)),t=>{let r=e(t);return void 0===r?null:[this,r]}}}KC.closedBy=new KC({deserialize:e=>e.split(" ")}),KC.openedBy=new KC({deserialize:e=>e.split(" ")}),KC.group=new KC({deserialize:e=>e.split(" ")}),KC.contextHash=new KC({perNode:!0}),KC.lookAhead=new KC({perNode:!0}),KC.mounted=new KC({perNode:!0});class JC{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[KC.mounted.id]}}const eS=Object.create(null);class tS{constructor(e,t,r,n=0){this.name=e,this.props=t,this.id=r,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):eS,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new tS(e.name||"",t,e.id,r);if(e.props)for(let r of e.props)if(Array.isArray(r)||(r=r(n)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(KC.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let n of r.split(" "))t[n]=e[r];return e=>{for(let r=e.prop(KC.group),n=-1;n<(r?r.length:0);n++){let o=t[n<0?e.name:r[n]];if(o)return o}}}}tS.none=new tS("",Object.create(null),0,8);class rS{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let n=null;for(let t of e){let e=t(r);e&&(n||(n=Object.assign({},r.props)),n[e[0].id]=e[1])}t.push(n?new tS(r.name,n,r.id,r.flags):r)}return new rS(t)}}const nS=new WeakMap,oS=new WeakMap;var iS;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(iS||(iS={}));class aS{constructor(e,t,r,n,o){if(this.type=e,this.children=t,this.positions=r,this.length=n,this.props=null,o&&o.length){this.props=Object.create(null);for(let[e,t]of o)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=JC.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let r=e.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new vS(this.topNode,e)}cursorAt(e,t=0,r=0){let n=nS.get(this)||this.topNode,o=new vS(n);return o.moveTo(e,t),nS.set(this,o._tree),o}get topNode(){return new pS(this,0,0,null)}resolve(e,t=0){let r=uS(nS.get(this)||this.topNode,e,t,!1);return nS.set(this,r),r}resolveInner(e,t=0){let r=uS(oS.get(this)||this.topNode,e,t,!0);return oS.set(this,r),r}resolveStack(e,t=0){return function(e,t,r){let n=e.resolveInner(t,r),o=null;for(let e=n instanceof pS?n:n.context.parent;e;e=e.parent)if(e.index<0){let i=e.parent;(o||(o=[n])).push(i.resolve(t,r)),e=i}else{let i=JC.get(e.tree);if(i&&i.overlay&&i.overlay[0].from<=t&&i.overlay[i.overlay.length-1].to>=t){let a=new pS(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[n])).push(uS(a,t,r,!1))}}return o?bS(o):n}(this,e,t)}iterate(e){let{enter:t,leave:r,from:n=0,to:o=this.length}=e,i=e.mode||0,a=(i&iS.IncludeAnonymous)>0;for(let e=this.cursor(i|iS.IncludeAnonymous);;){let i=!1;if(e.from<=o&&e.to>=n&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&r&&(a||!e.type.isAnonymous)&&r(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:xS(tS.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,r)=>new aS(this.type,e,t,r,this.propValues)),e.makeTree||((e,t,r)=>new aS(tS.none,e,t,r)))}static build(e){return function(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:o=XC,reused:i=[],minRepeatType:a=n.types.length}=e,s=Array.isArray(r)?new sS(r,r.length):r,l=n.types,c=0,u=0;function d(e,t,r,g,b,y){let{id:v,start:O,end:w,size:A}=s,x=u;for(;A<0;){if(s.next(),-1==A){let t=i[v];return r.push(t),void g.push(O-e)}if(-3==A)return void(c=v);if(-4==A)return void(u=v);throw new RangeError(`Unrecognized record size: ${A}`)}let k,C,S=l[v],_=O-e;if(w-O<=o&&(C=function(e,t){let r=s.fork(),n=0,i=0,l=0,c=r.end-o,u={size:0,start:0,skip:0};e:for(let o=r.pos-e;r.pos>o;){let e=r.size;if(r.id==t&&e>=0){u.size=n,u.start=i,u.skip=l,l+=4,n+=4,r.next();continue}let s=r.pos-e;if(e<0||s<o||r.start<c)break;let d=r.id>=a?4:0,p=r.start;for(r.next();r.pos>s;){if(r.size<0){if(-3!=r.size)break e;d+=4}else r.id>=a&&(d+=4);r.next()}i=p,n+=e,l+=d}return(t<0||n==e)&&(u.size=n,u.start=i,u.skip=l),u.size>4?u:void 0}(s.pos-t,b))){let t=new Uint16Array(C.size-C.skip),r=s.pos-C.size,o=t.length;for(;s.pos>r;)o=m(C.start,t,o);k=new lS(t,w-C.start,n),_=C.start-e}else{let e=s.pos-A;s.next();let t=[],r=[],n=v>=a?v:-1,i=0,l=w;for(;s.pos>e;)n>=0&&s.id==n&&s.size>=0?(s.end<=l-o&&(h(t,r,O,i,s.end,l,n,x),i=t.length,l=s.end),s.next()):y>2500?p(O,e,t,r):d(O,e,t,r,n,y+1);if(n>=0&&i>0&&i<t.length&&h(t,r,O,i,O,l,n,x),t.reverse(),r.reverse(),n>-1&&i>0){let e=function(e){return(t,r,n)=>{let o,i,a=0,s=t.length-1;if(s>=0&&(o=t[s])instanceof aS){if(!s&&o.type==e&&o.length==n)return o;(i=o.prop(KC.lookAhead))&&(a=r[s]+o.length+i)}return f(e,t,r,n,a)}}(S);k=xS(S,t,r,0,t.length,0,w-O,e,e)}else k=f(S,t,r,w-O,x-w)}r.push(k),g.push(_)}function p(e,t,r,i){let a=[],l=0,c=-1;for(;s.pos>t;){let{id:e,start:t,end:r,size:n}=s;if(n>4)s.next();else{if(c>-1&&t<c)break;c<0&&(c=r-o),a.push(e,t,r),l++,s.next()}}if(l){let t=new Uint16Array(4*l),o=a[a.length-2];for(let e=a.length-3,r=0;e>=0;e-=3)t[r++]=a[e],t[r++]=a[e+1]-o,t[r++]=a[e+2]-o,t[r++]=r;r.push(new lS(t,a[2]-o,n)),i.push(o-e)}}function h(e,t,r,o,i,a,s,l){let c=[],u=[];for(;e.length>o;)c.push(e.pop()),u.push(t.pop()+r-i);e.push(f(n.types[s],c,u,a-i,l-a)),t.push(i-r)}function f(e,t,r,n,o=0,i){if(c){let e=[KC.contextHash,c];i=i?[e].concat(i):[e]}if(o>25){let e=[KC.lookAhead,o];i=i?[e].concat(i):[e]}return new aS(e,t,r,n,i)}function m(e,t,r){let{id:n,start:o,end:i,size:l}=s;if(s.next(),l>=0&&n<a){let a=r;if(l>4){let n=s.pos-(l-4);for(;s.pos>n;)r=m(e,t,r)}t[--r]=a,t[--r]=i-e,t[--r]=o-e,t[--r]=n}else-3==l?c=n:-4==l&&(u=n);return r}let g=[],b=[];for(;s.pos>0;)d(e.start||0,e.bufferStart||0,g,b,-1,0);let y=null!==(t=e.length)&&void 0!==t?t:g.length?b[0]+g[0].length:0;return new aS(l[e.topID],g.reverse(),b.reverse(),y)}(e)}}aS.empty=new aS(tS.none,[],[],0);class sS{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new sS(this.buffer,this.index)}}class lS{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return tS.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],n=this.set.types[t],o=n.name;if(/\W/.test(o)&&!n.isError&&(o=JSON.stringify(o)),r==(e+=4))return o;let i=[];for(;e<r;)i.push(this.childString(e)),e=this.buffer[e+3];return o+"("+i.join(",")+")"}findChild(e,t,r,n,o){let{buffer:i}=this,a=-1;for(let s=e;s!=t&&!(cS(o,n,i[s+1],i[s+2])&&(a=s,r>0));s=i[s+3]);return a}slice(e,t,r){let n=this.buffer,o=new Uint16Array(t-e),i=0;for(let a=e,s=0;a<t;){o[s++]=n[a++],o[s++]=n[a++]-r;let t=o[s++]=n[a++]-r;o[s++]=n[a++]-e,i=Math.max(i,t)}return new lS(o,i,this.set)}}function cS(e,t,r,n){switch(e){case-2:return r<t;case-1:return n>=t&&r<t;case 0:return r<t&&n>t;case 1:return r<=t&&n>t;case 2:return n>t;case 4:return!0}}function uS(e,t,r,n){for(var o;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let t=!n&&e instanceof pS&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=n?0:iS.IgnoreOverlays;if(n)for(let n=e,a=n.parent;a;n=a,a=n.parent)n instanceof pS&&n.index<0&&(null===(o=a.enter(t,r,i))||void 0===o?void 0:o.from)!=n.from&&(e=a);for(;;){let n=e.enter(t,r,i);if(!n)return e;e=n}}class dS{cursor(e=0){return new vS(this,e)}getChild(e,t=null,r=null){let n=hS(this,e,t,r);return n.length?n[0]:null}getChildren(e,t=null,r=null){return hS(this,e,t,r)}resolve(e,t=0){return uS(this,e,t,!1)}resolveInner(e,t=0){return uS(this,e,t,!0)}matchContext(e){return fS(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(r=t,t=e.prevSibling):t=e}return r}get node(){return this}get next(){return this.parent}}class pS extends dS{constructor(e,t,r,n){super(),this._tree=e,this.from=t,this.index=r,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,n,o=0){for(let i=this;;){for(let{children:a,positions:s}=i._tree,l=t>0?a.length:-1;e!=l;e+=t){let l=a[e],c=s[e]+i.from;if(cS(n,r,c,c+l.length))if(l instanceof lS){if(o&iS.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,r-c,n);if(a>-1)return new gS(new mS(i,l,e,c),null,a)}else if(o&iS.IncludeAnonymous||!l.type.isAnonymous||OS(l)){let a;if(!(o&iS.IgnoreMounts)&&(a=JC.get(l))&&!a.overlay)return new pS(a.tree,c,e,i);let s=new pS(l,c,e,i);return o&iS.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,r,n)}}if(o&iS.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let n;if(!(r&iS.IgnoreOverlays)&&(n=JC.get(this._tree))&&n.overlay){let r=e-this.from;for(let{from:e,to:o}of n.overlay)if((t>0?e<=r:e<r)&&(t<0?o>=r:o>r))return new pS(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function hS(e,t,r,n){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=r)for(;!o.type.is(r);)if(!o.nextSibling())return i;for(;;){if(null!=n&&o.type.is(n))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==n?i:[]}}function fS(e,t,r=t.length-1){for(let n=e.parent;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}class mS{constructor(e,t,r,n){this.parent=e,this.buffer=t,this.index=r,this.start=n}}class gS extends dS{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:n}=this.context,o=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,r);return o<0?null:new gS(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&iS.ExcludeBuffers)return null;let{buffer:n}=this.context,o=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new gS(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new gS(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new gS(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,n=this.index+4,o=r.buffer[this.index+3];if(o>n){let i=r.buffer[this.index+1];e.push(r.slice(n,o,i)),t.push(0)}return new aS(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function bS(e){if(!e.length)return null;let t=0,r=e[0];for(let n=1;n<e.length;n++){let o=e[n];(o.from>r.from||o.to<r.to)&&(r=o,t=n)}let n=r instanceof pS&&r.index<0?null:r.parent,o=e.slice();return n?o[t]=n:o.splice(t,1),new yS(o,r)}class yS{constructor(e,t){this.heads=e,this.node=t}get next(){return bS(this.heads)}}class vS{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof pS)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:r,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=r+n.buffer[e+1],this.to=r+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof pS?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:n}=this.buffer,o=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,r);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?!(r&iS.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&iS.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&iS.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let e=r<0?0:this.stack[r]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(e)}return r<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(n.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:r}=n)}else({index:t,_parent:r}=this._tree);for(;r;({index:t,_parent:r}=r))if(t>-1)for(let n=t+e,o=e<0?-1:r._tree.children.length;n!=o;n+=e){let e=r._tree.children[n];if(this.mode&iS.IncludeAnonymous||e instanceof lS||!e.type.isAnonymous||OS(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let n=this.index,o=this.stack.length;o>=0;){for(let i=e;i;i=i._parent)if(i.index==n){if(n==this.index)return i;t=i,r=o+1;break e}n=this.stack[--o]}for(let e=r;e<this.stack.length;e++)t=new gS(this.buffer,t,this.stack[e]);return this.bufferNode=new gS(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let n=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){r++;continue}this.type.isAnonymous||(n=!0)}for(;n&&t&&t(this),n=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,n=!0}}}matchContext(e){if(!this.buffer)return fS(this.node,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let n=e.length-1,o=this.stack.length-1;n>=0;o--){if(o<0)return fS(this.node,e,n);let i=r[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}}function OS(e){return e.children.some((e=>e instanceof lS||!e.type.isAnonymous||OS(e)))}const wS=new WeakMap;function AS(e,t){if(!e.isAnonymous||t instanceof lS||t.type!=e)return 1;let r=wS.get(t);if(null==r){r=1;for(let n of t.children){if(n.type!=e||!(n instanceof aS)){r=1;break}r+=AS(e,n)}wS.set(t,r)}return r}function xS(e,t,r,n,o,i,a,s,l){let c=0;for(let r=n;r<o;r++)c+=AS(e,t[r]);let u=Math.ceil(1.5*c/8),d=[],p=[];return function t(r,n,o,a,s){for(let c=o;c<a;){let o=c,h=n[c],f=AS(e,r[c]);for(c++;c<a;c++){let t=AS(e,r[c]);if(f+t>=u)break;f+=t}if(c==o+1){if(f>u){let e=r[o];t(e.children,e.positions,0,e.children.length,n[o]+s);continue}d.push(r[o])}else{let t=n[c-1]+r[c-1].length-h;d.push(xS(e,r,n,o,c,h,t,null,l))}p.push(h+s-i)}}(t,r,n,o,0),(s||l)(d,p,a)}class kS{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof gS?this.setBuffer(e.context.buffer,e.index,t):e instanceof pS&&this.map.set(e.tree,t)}get(e){return e instanceof gS?this.getBuffer(e.context.buffer,e.index):e instanceof pS?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class CS{constructor(e,t,r,n,o=!1,i=!1){this.from=e,this.to=t,this.tree=r,this.offset=n,this.open=(o?1:0)|(i?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],r=!1){let n=[new CS(0,e.length,e,0,!1,r)];for(let r of t)r.to>e.length&&n.push(r);return n}static applyChanges(e,t,r=128){if(!t.length)return e;let n=[],o=1,i=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let c=a<t.length?t[a]:null,u=c?c.fromA:1e9;if(u-s>=r)for(;i&&i.from<u;){let t=i;if(s>=t.from||u<=t.to||l){let e=Math.max(t.from,s)-l,r=Math.min(t.to,u)-l;t=e>=r?null:new CS(e,r,t.tree,t.offset+l,a>0,!!c)}if(t&&n.push(t),i.to>u)break;i=o<e.length?e[o++]:null}if(!c)break;s=c.toA,l=c.toA-c.toB}return n}}class SS{startParse(e,t,r){return"string"==typeof e&&(e=new _S(e)),r=r?r.length?r.map((e=>new GC(e.from,e.to))):[new GC(0,0)]:[new GC(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let n=this.startParse(e,t,r);for(;;){let e=n.advance();if(e)return e}}}class _S{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function ES(e){return(t,r,n,o)=>new RS(t,e,r,n,o)}class PS{constructor(e,t,r,n,o){this.parser=e,this.parse=t,this.overlay=r,this.target=n,this.from=o}}function qS(e){if(!e.length||e.some((e=>e.from>=e.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class TS{constructor(e,t,r,n,o,i,a){this.parser=e,this.predicate=t,this.mounts=r,this.index=n,this.start=o,this.target=i,this.prev=a,this.depth=0,this.ranges=[]}}const jS=new KC({perNode:!0});class RS{constructor(e,t,r,n,o){this.nest=t,this.input=r,this.fragments=n,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new aS(e.type,e.children,e.positions,e.length,e.propValues.concat([[jS,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[KC.mounted.id]=new JC(t,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new DS(this.fragments),t=null,r=null,n=new vS(new pS(this.baseTree,this.ranges[0].from,0,null),iS.IncludeAnonymous|iS.IgnoreMounts);e:for(let o,i;;){let a,s=!0;if(null!=this.stoppedAt&&n.from>=this.stoppedAt)s=!1;else if(e.hasNode(n)){if(t){let e=t.mounts.find((e=>e.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay));if(e)for(let r of e.mount.overlay){let o=r.from+e.pos,i=r.to+e.pos;o>=n.from&&i<=n.to&&!t.ranges.some((e=>e.from<i&&e.to>o))&&t.ranges.push({from:o,to:i})}}s=!1}else if(r&&(i=ZS(r.ranges,n.from,n.to)))s=2!=i;else if(!n.type.isAnonymous&&(o=this.nest(n,this.input))&&(n.from<n.to||!o.overlay)){n.tree||MS(n);let i=e.findMounts(n.from,o.parser);if("function"==typeof o.overlay)t=new TS(o.parser,o.overlay,i,this.inner.length,n.from,n.tree,t);else{let e=LS(this.ranges,o.overlay||(n.from<n.to?[new GC(n.from,n.to)]:[]));e.length&&qS(e),!e.length&&o.overlay||this.inner.push(new PS(o.parser,e.length?o.parser.startParse(this.input,BS(i,e),e):o.parser.startParse(""),o.overlay?o.overlay.map((e=>new GC(e.from-n.from,e.to-n.from))):null,n.tree,e.length?e[0].from:n.from)),o.overlay?e.length&&(r={ranges:e,depth:0,prev:r}):s=!1}}else t&&(a=t.predicate(n))&&(!0===a&&(a=new GC(n.from,n.to)),a.from<a.to&&t.ranges.push(a));if(s&&n.firstChild())t&&t.depth++,r&&r.depth++;else for(;!n.nextSibling();){if(!n.parent())break e;if(t&&! --t.depth){let e=LS(this.ranges,t.ranges);e.length&&(qS(e),this.inner.splice(t.index,0,new PS(t.parser,t.parser.startParse(this.input,BS(t.mounts,e),e),t.ranges.map((e=>new GC(e.from-t.start,e.to-t.start))),t.target,e[0].from))),t=t.prev}r&&! --r.depth&&(r=r.prev)}}}}function ZS(e,t,r){for(let n of e){if(n.from>=r)break;if(n.to>t)return n.from<=t&&n.to>=r?2:1}return 0}function $S(e,t,r,n,o,i){if(t<r){let a=e.buffer[t+1];n.push(e.slice(t,r,a)),o.push(a-i)}}function MS(e){let{node:t}=e,r=[];do{r.push(e.index),e.parent()}while(!e.tree);let n=0,o=e.tree,i=0;for(;i=o.positions[n]+e.from,!(i<=t.from&&i+o.children[n].length>=t.to);n++);let a=o.children[n],s=a.buffer,l=[n];o.children[n]=function e(n,o,i,c,u,d){let p=r[d],h=[],f=[];$S(a,n,p,h,f,c);let m=s[p+1],g=s[p+2];l.push(h.length);let b=d?e(p+4,s[p+3],a.set.types[s[p]],m,g-m,d-1):t.toTree();return h.push(b),f.push(m-c),$S(a,s[p+3],o,h,f,c),new aS(i,h,f,u)}(0,s.length,tS.none,0,a.length,r.length-1);for(let t of l){let r=e.tree.children[t],n=e.tree.positions[t];e.yield(new pS(r,n+e.from,t,e._tree))}}class NS{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(iS.IncludeAnonymous|iS.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,iS.IgnoreOverlays|iS.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof aS))break;t=t.children[0]}return!1}}class DS{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=null!==(t=r.tree.prop(jS))&&void 0!==t?t:r.to,this.inner=new NS(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(jS))&&void 0!==e?e:t.to,this.inner=new NS(t.tree,-t.offset)}}findMounts(e,t){var r;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let o=null===(r=e.tree)||void 0===r?void 0:r.prop(KC.mounted);if(o&&o.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let r=this.fragments[t];if(r.from>=e.to)break;r.tree==this.curFrag.tree&&n.push({frag:r,pos:e.from-r.offset,mount:o})}}}return n}}function LS(e,t){let r=null,n=t;for(let o=1,i=0;o<e.length;o++){let a=e[o-1].to,s=e[o].from;for(;i<n.length;i++){let e=n[i];if(e.from>=s)break;e.to<=a||(r||(n=r=t.slice()),e.from<a?(r[i]=new GC(e.from,a),e.to>s&&r.splice(i+1,0,new GC(s,e.to))):e.to>s?r[i--]=new GC(s,e.to):r.splice(i--,1))}}return n}function IS(e,t,r,n){let o=0,i=0,a=!1,s=!1,l=-1e9,c=[];for(;;){let u=o==e.length?1e9:a?e[o].to:e[o].from,d=i==t.length?1e9:s?t[i].to:t[i].from;if(a!=s){let e=Math.max(l,r),t=Math.min(u,d,n);e<t&&c.push(new GC(e,t))}if(l=Math.min(u,d),1e9==l)break;u==l&&(a?(a=!1,o++):a=!0),d==l&&(s?(s=!1,i++):s=!0)}return c}function BS(e,t){let r=[];for(let{pos:n,mount:o,frag:i}of e){let e=n+(o.overlay?o.overlay[0].from:0),a=e+o.tree.length,s=Math.max(i.from,e),l=Math.min(i.to,a);if(o.overlay){let a=IS(t,o.overlay.map((e=>new GC(e.from+n,e.to+n))),s,l);for(let t=0,n=s;;t++){let s=t==a.length,c=s?l:a[t].from;if(c>n&&r.push(new CS(n,c,o.tree,-e,i.from>=n||i.openStart,i.to<=c||i.openEnd)),s)break;n=a[t].to}}else r.push(new CS(s,l,o.tree,-e,i.from>=e||i.openStart,i.to<=a||i.openEnd))}return r}class QS{constructor(e,t,r,n,o,i,a,s,l,c=0,u){this.p=e,this.stack=t,this.state=r,this.reducePos=n,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let n=e.parser.context;return new QS(e,[],t,r,r,0,[],0,n?new zS(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,n=65535&e,{parser:o}=this.p,i=o.dynamicPrecedence(n);if(i&&(this.score+=i),0==r)return this.pushState(o.getGoto(this.state,n,!0),this.reducePos),n<o.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,4,!0),void this.reduceContext(n,this.reducePos);let a=this.stack.length-3*(r-1)-(262144&e?6:0),s=a?this.stack[a-2]:this.p.ranges[0].from,l=this.reducePos-s;l>=2e3&&!(null===(t=this.p.parser.nodeSet.types[n])||void 0===t?void 0:t.isAnonymous)&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=l));let c=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-c;if(n<o.minRepeatTerm||131072&e){let e=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=o.getGoto(e,n,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,r,n=4,o=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,n=this.buffer.length;if(0==n&&e.parent&&(n=e.bufferBase-e.parent.bufferBase,e=e.parent),n>0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==r)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=r)}}if(o&&this.pos!=r){let o=this.buffer.length;if(o>0&&0!=this.buffer[o-4])for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,n>4&&(n-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=n}else this.buffer.push(e,t,r,n)}shift(e,t,r,n){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let o=e,{parser:i}=this.p;(n>this.pos||t<=i.maxNode)&&(this.pos=n,i.stateFlag(o,1)||(this.reducePos=n)),this.pushState(o,r),this.shiftContext(t,r),t<=i.maxNode&&this.buffer.push(t,r,n,4)}else this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4)}apply(e,t,r,n){65536&e?this.reduce(e):this.shift(e,t,r,n)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(r,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new QS(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new US(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==r)return!1;if(0==(65536&r))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let n,o=0;o<t.length;o+=2)(n=t[o+1])!=this.state&&this.p.parser.hasAction(n,e)&&r.push(t[o],n);if(this.stack.length<120)for(let e=0;r.length<8&&e<t.length;e+=2){let n=t[e+1];r.some(((e,t)=>1&t&&e==n))||r.push(t[e],n)}t=r}let r=[];for(let e=0;e<t.length&&r.length<4;e+=2){let n=t[e+1];if(n==this.state)continue;let o=this.split();o.pushState(n,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[e],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(0==(65536&t))return!1;if(!e.validAction(this.state,t)){let r=t>>19,n=65535&t,o=this.stack.length-3*r;if(o<0||e.getGoto(this.stack[o],n,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(n,o)=>{if(!t.includes(n))return t.push(n),e.allActions(n,(t=>{if(393216&t);else if(65536&t){let r=(t>>19)-o;if(r>1){let n=65535&t,o=this.stack.length-3*r;if(o>=0&&e.getGoto(this.stack[o],n,!1)>=0)return r<<19|65536|n}}else{let e=r(t,o+1);if(null!=e)return e}}))};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new zS(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class zS{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class US{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,r=e>>19;0==r?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(r-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class FS{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new FS(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new FS(this.stack,this.pos,this.index)}}function WS(e,t=Uint16Array){if("string"!=typeof e)return e;let r=null;for(let n=0,o=0;n<e.length;){let i=0;for(;;){let t=e.charCodeAt(n++),r=!1;if(126==t){i=65535;break}t>=92&&t--,t>=34&&t--;let o=t-32;if(o>=46&&(o-=46,r=!0),i+=o,r)break;i*=46}r?r[o++]=i:r=new t(i)}return r}class YS{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const VS=new YS;class XS{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=VS,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,n=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!n)return null;let e=this.ranges[--n];o-=r.from-e.to,r=e}for(;t<0?o>r.to:o>=r.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];o+=e.from-r.to,r=e}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,r,n=this.chunkOff+e;if(n>=0&&n<this.chunk.length)t=this.pos+e,r=this.chunk.charCodeAt(n);else{let n=this.resolveOffset(e,1);if(null==n)return-1;if(t=n,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,n=this.range;for(;n.to<=t;)n=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(null==r||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=VS,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(r+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return r}}class HS{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;JS(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}HS.prototype.contextual=HS.prototype.fallback=HS.prototype.extend=!1;class GS{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data="string"==typeof e?WS(e):e}token(e,t){let r=e.pos,n=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(JS(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(r||n++,null==o)break;e.reset(o,e.token)}n&&(e.reset(r,e.token),e.acceptToken(this.elseToken,n))}}GS.prototype.contextual=HS.prototype.fallback=HS.prototype.extend=!1;class KS{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function JS(e,t,r,n,o,i){let a=0,s=1<<n,{dialect:l}=r.p.parser;e:for(;0!=(s&e[a]);){let r=e[a+1];for(let n=a+3;n<r;n+=2)if((e[n+1]&s)>0){let r=e[n];if(l.allows(r)&&(-1==t.token.value||t.token.value==r||t_(r,t.token.value,o,i))){t.acceptToken(r);break}}let n=t.next,c=0,u=e[a+2];if(!(t.next<0&&u>c&&65535==e[r+3*u-3])){for(;c<u;){let o=c+u>>1,i=r+o+(o<<1),s=e[i],l=e[i+1]||65536;if(n<s)u=o;else{if(!(n>=l)){a=e[i+2],t.advance();continue e}c=o+1}}break}a=e[r+3*u-1]}}function e_(e,t,r){for(let n,o=t;65535!=(n=e[o]);o++)if(n==r)return o-t;return-1}function t_(e,t,r,n){let o=e_(r,n,t);return o<0||e_(r,n,e)<o}const r_="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let n_=null;function o_(e,t,r){let n=e.cursor(iS.IncludeAnonymous);for(n.moveTo(t);;)if(!(r<0?n.childBefore(t):n.childAfter(t)))for(;;){if((r<0?n.to<t:n.from>t)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:e.length}}class i_{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?o_(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?o_(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],n=this.index[t];if(n==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[n],i=this.start[t]+r.positions[n];if(i>e)return this.nextStart=i,null;if(o instanceof aS){if(i==e){if(i<this.safeFrom)return null;let e=i+o.length;if(e<=this.safeTo){let t=o.prop(KC.lookAhead);if(!t||e+t<this.fragment.to)return o}}this.index[t]++,i+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}}}class a_{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new YS))}getActions(e){let t=0,r=null,{parser:n}=e.p,{tokenizers:o}=n,i=n.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let n=0;n<o.length;n++){if(0==(1<<n&i))continue;let l=o[n],c=this.tokens[n];if((!r||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=i||c.context!=a)&&(this.updateCachedToken(c,l,e),c.mask=i,c.context=a),c.lookAhead>c.end+25&&(s=Math.max(c.lookAhead,s)),0!=c.value)){let n=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(r=c,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),r||e.pos!=this.stream.end||(r=new YS,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new YS,{pos:r,p:n}=e;return t.start=r,t.end=Math.min(r+1,n.stream.end),t.value=r==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,r){let n=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(n,e),r),e.value>-1){let{parser:t}=r.p;for(let n=0;n<t.specialized.length;n++)if(t.specialized[n]==e.value){let o=t.specializers[n](this.stream.read(e.start,e.end),r);if(o>=0&&r.p.parser.dialect.allows(o>>1)){0==(1&o)?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,r,n){for(let t=0;t<n;t+=3)if(this.actions[t]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=r,n}addActions(e,t,r,n){let{state:o}=e,{parser:i}=e.p,{data:a}=i;for(let e=0;e<2;e++)for(let s=i.stateSlot(o,e?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==n&&2==a[s+1]&&(n=this.putAction(h_(a,s+2),t,r,n));break}s=h_(a,s+2)}a[s]==t&&(n=this.putAction(h_(a,s+1),t,r,n))}return n}}class s_{constructor(e,t,r,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new XS(t,n),this.tokens=new a_(e,this.stream),this.topTerm=e.top[1];let{from:o}=n[0];this.stacks=[QS.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>4*e.bufferLength?new i_(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,r=this.stacks,n=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==r.length){let[e]=r;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;i<r.length;i++){let a=r[i];for(;;){if(this.tokens.mainToken=null,a.pos>n)o.push(a);else{if(this.advanceStack(a,o,r))continue;{e||(e=[],t=[]),e.push(a);let r=this.tokens.getMainToken(a);t.push(r.value,r.end)}}break}}if(!o.length){let t=e&&function(e){let t=null;for(let r of e){let e=r.p.stoppedAt;(r.pos==r.p.stream.end||null!=e&&r.pos>e)&&r.p.parser.stateFlag(r.state,2)&&(!t||t.score<r.score)&&(t=r)}return t}(e);if(t)return r_&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw r_&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&e){let r=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,o);if(r)return r_&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(o.length>e)for(o.sort(((e,t)=>t.score-e.score));o.length>e;)o.pop();o.some((e=>e.reducePos>n))&&this.recovering--}else if(o.length>1){e:for(let e=0;e<o.length-1;e++){let t=o[e];for(let r=e+1;r<o.length;r++){let n=o[r];if(t.sameState(n)||t.buffer.length>500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){o.splice(e--,1);continue e}o.splice(r--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let e=1;e<o.length;e++)o[e].pos<this.minStackPos&&(this.minStackPos=o[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let n=e.pos,{parser:o}=this,i=r_?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,r=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(n);a;){let n=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(n>-1&&a.length&&(!t||(a.prop(KC.contextHash)||0)==r))return e.useNode(a,n),r_&&console.log(i+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof aS)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof aS&&0==a.positions[0]))break;a=s}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),r_&&console.log(i+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;a<s.length;){let l=s[a++],c=s[a++],u=s[a++],d=a==s.length||!r,p=d?e:e.split(),h=this.tokens.mainToken;if(p.apply(l,c,h?h.start:p.pos,u),r_&&console.log(i+this.stackID(p)+` (via ${0==(65536&l)?"shift":`reduce of ${o.getName(65535&l)}`} for ${o.getName(c)} @ ${n}${p==e?"":", split"})`),d)return!0;p.pos>n?t.push(p):r.push(p)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return l_(e,t),!0}}runRecovery(e,t,r){let n=null,o=!1;for(let i=0;i<e.length;i++){let a=e[i],s=t[i<<1],l=t[1+(i<<1)],c=r_?this.stackID(a)+" -> ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),r_&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))continue}let u=a.split(),d=c;for(let e=0;u.forceReduce()&&e<10&&(r_&&console.log(d+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,r));e++)r_&&(d=this.stackID(u)+" -> ");for(let e of a.recoverByInsert(s))r_&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,r);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),r_&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),l_(a,r)):(!n||n.score<a.score)&&(n=a)}return n}stackToTree(e){return e.close(),aS.build({buffer:FS.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(n_||(n_=new WeakMap)).get(e);return t||n_.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function l_(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(n.pos==e.pos&&n.sameState(e))return void(t[r].score<e.score&&(t[r]=e))}t.push(e)}class c_{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||0==this.disabled[e]}}const u_=e=>e;class d_{constructor(e){this.start=e.start,this.shift=e.shift||u_,this.reduce=e.reduce||u_,this.reuse=e.reuse||u_,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class p_ extends SS{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let r=0;r<e.repeatNodeCount;r++)t.push("");let r=Object.keys(e.topRules).map((t=>e.topRules[t][1])),n=[];for(let e=0;e<t.length;e++)n.push([]);function o(e,t,r){n[e].push([t,t.deserialize(String(r))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=KC[e]);for(let r=1;r<t.length;){let n=t[r++];if(n>=0)o(n,e,t[r++]);else{let i=t[r+-n];for(let a=-n;a>0;a--)o(t[r++],e,i);r++}}}this.nodeSet=new rS(t.map(((t,o)=>tS.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:n[o],top:r.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=XC;let i=WS(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(f_),this.states=WS(e.states,Uint32Array),this.data=WS(e.stateData),this.goto=WS(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map((e=>"number"==typeof e?new HS(i,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let n=new s_(this,e,t,r);for(let o of this.wrappers)n=o(n,e,t,r);return n}getGoto(e,t,r=!1){let n=this.goto;if(t>=n[0])return-1;for(let o=n[t+1];;){let t=n[o++],i=1&t,a=n[o++];if(i&&r)return a;for(let r=o+(t>>1);o<r;o++)if(n[o]==e)return a;if(i)return-1}}hasAction(e,t){let r=this.data;for(let n=0;n<2;n++)for(let o,i=this.stateSlot(e,n?2:1);;i+=3){if(65535==(o=r[i])){if(1!=r[i+1]){if(2==r[i+1])return h_(r,i+2);break}o=r[i=h_(r,i+2)]}if(o==t||0==o)return h_(r,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let r=this.stateSlot(e,4),n=r?t(r):void 0;for(let r=this.stateSlot(e,1);null==n;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=h_(this.data,r+2)}n=t(h_(this.data,r+1))}return n}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=h_(this.data,r+2)}if(0==(1&this.data[r+2])){let e=this.data[r+1];t.some(((t,r)=>1&r&&t==e))||t.push(this.data[r],e)}}return t}configure(e){let t=Object.assign(Object.create(p_.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let r=e.tokenizers.find((e=>e.from==t));return r?r.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((r,n)=>{let o=e.specializers.find((e=>e.from==r.external));if(!o)return r;let i=Object.assign(Object.assign({},r),{external:o.to});return t.specializers[n]=f_(i),i}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map((()=>!1));if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(r[e]=!0)}let n=null;for(let e=0;e<t.length;e++)if(!r[e])for(let r,o=this.dialects[t[e]];65535!=(r=this.data[o++]);)(n||(n=new Uint8Array(this.maxTerm+1)))[r]=1;return new c_(e,r,n)}static deserialize(e){return new p_(e)}}function h_(e,t){return e[t]|e[t+1]<<16}function f_(e){if(e.external){let t=e.extend?1:0;return(r,n)=>e.external(r,n)<<1|t}return e.get}let m_=0;class g_{constructor(e,t,r){this.set=e,this.base=t,this.modified=r,this.id=m_++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new g_([],null,[]);if(t.set.push(t),e)for(let r of e.set)t.set.push(r);return t}static defineModifier(){let e=new y_;return t=>t.modified.indexOf(e)>-1?t:y_.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let b_=0;class y_{constructor(){this.instances=[],this.id=b_++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find((r=>r.base==e&&function(e,t){return e.length==t.length&&e.every(((e,r)=>e==t[r]))}(t,r.modified)));if(r)return r;let n=[],o=new g_(n,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let r=0;r<e.length;r++)for(let n=0,o=t.length;n<o;n++)t.push(t[n].concat(e[r]));return t.sort(((e,t)=>t.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)n.push(y_.get(t,e));return o}}function v_(e){let t=Object.create(null);for(let r in e){let n=e[r];Array.isArray(n)||(n=[n]);for(let e of r.split(" "))if(e){let r=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!n)throw new RangeError("Invalid path: "+e);if(r.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){o=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=r.length-1,s=r[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new w_(n,o,a>0?r.slice(0,a):null);t[s]=l.sort(t[s])}}return O_.add(t)}const O_=new KC;class w_{constructor(e,t,r,n){this.tags=e,this.mode=t,this.context=r,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function A_(e,t){let r=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)r[e.id]=t.class;else r[t.tag.id]=t.class;let{scope:n,all:o=null}=t||{};return{style:e=>{let t=o;for(let n of e)for(let e of n.set){let n=r[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}function x_(e,t,r,n=0,o=e.length){let i=new k_(n,Array.isArray(t)?t:[t],r);i.highlightRange(e.cursor(),n,o,"",i.highlighters),i.flush(o)}w_.empty=new w_([],2,null);class k_{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,n,o){let{type:i,from:a,to:s}=e;if(a>=r||s<=t)return;i.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(i))));let l=n,c=function(e){let t=e.type.prop(O_);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||w_.empty,u=function(e,t){let r=null;for(let n of e){let e=n.style(t);e&&(r=r?r+" "+e:e)}return r}(o,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(n+=(n?" ":"")+u)),this.startSpan(Math.max(t,a),l),c.opaque)return;let d=e.tree&&e.tree.prop(KC.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+a,1),c=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),u=e.firstChild();for(let p=0,h=a;;p++){let f=p<d.overlay.length?d.overlay[p]:null,m=f?f.from+a:s,g=Math.max(t,h),b=Math.min(r,m);if(g<b&&u)for(;e.from<b&&(this.highlightRange(e,g,b,n,o),this.startSpan(Math.min(b,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!f||m>r)break;h=f.to+a,h>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+a),Math.min(r,h),"",c),this.startSpan(Math.min(r,h),l))}u&&e.parent()}else if(e.firstChild()){d&&(n="");do{if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,n,o),this.startSpan(Math.min(r,e.to),l)}}while(e.nextSibling());e.parent()}}}const C_=g_.define,S_=C_(),__=C_(),E_=C_(__),P_=C_(__),q_=C_(),T_=C_(q_),j_=C_(q_),R_=C_(),Z_=C_(R_),$_=C_(),M_=C_(),N_=C_(),D_=C_(N_),L_=C_(),I_={comment:S_,lineComment:C_(S_),blockComment:C_(S_),docComment:C_(S_),name:__,variableName:C_(__),typeName:E_,tagName:C_(E_),propertyName:P_,attributeName:C_(P_),className:C_(__),labelName:C_(__),namespace:C_(__),macroName:C_(__),literal:q_,string:T_,docString:C_(T_),character:C_(T_),attributeValue:C_(T_),number:j_,integer:C_(j_),float:C_(j_),bool:C_(q_),regexp:C_(q_),escape:C_(q_),color:C_(q_),url:C_(q_),keyword:$_,self:C_($_),null:C_($_),atom:C_($_),unit:C_($_),modifier:C_($_),operatorKeyword:C_($_),controlKeyword:C_($_),definitionKeyword:C_($_),moduleKeyword:C_($_),operator:M_,derefOperator:C_(M_),arithmeticOperator:C_(M_),logicOperator:C_(M_),bitwiseOperator:C_(M_),compareOperator:C_(M_),updateOperator:C_(M_),definitionOperator:C_(M_),typeOperator:C_(M_),controlOperator:C_(M_),punctuation:N_,separator:C_(N_),bracket:D_,angleBracket:C_(D_),squareBracket:C_(D_),paren:C_(D_),brace:C_(D_),content:R_,heading:Z_,heading1:C_(Z_),heading2:C_(Z_),heading3:C_(Z_),heading4:C_(Z_),heading5:C_(Z_),heading6:C_(Z_),contentSeparator:C_(R_),list:C_(R_),quote:C_(R_),emphasis:C_(R_),strong:C_(R_),link:C_(R_),monospace:C_(R_),strikethrough:C_(R_),inserted:C_(),deleted:C_(),changed:C_(),invalid:C_(),meta:L_,documentMeta:C_(L_),annotation:C_(L_),processingInstruction:C_(L_),definition:g_.defineModifier(),constant:g_.defineModifier(),function:g_.defineModifier(),standard:g_.defineModifier(),local:g_.defineModifier(),special:g_.defineModifier()},B_=(A_([{tag:I_.link,class:"tok-link"},{tag:I_.heading,class:"tok-heading"},{tag:I_.emphasis,class:"tok-emphasis"},{tag:I_.strong,class:"tok-strong"},{tag:I_.keyword,class:"tok-keyword"},{tag:I_.atom,class:"tok-atom"},{tag:I_.bool,class:"tok-bool"},{tag:I_.url,class:"tok-url"},{tag:I_.labelName,class:"tok-labelName"},{tag:I_.inserted,class:"tok-inserted"},{tag:I_.deleted,class:"tok-deleted"},{tag:I_.literal,class:"tok-literal"},{tag:I_.string,class:"tok-string"},{tag:I_.number,class:"tok-number"},{tag:[I_.regexp,I_.escape,I_.special(I_.string)],class:"tok-string2"},{tag:I_.variableName,class:"tok-variableName"},{tag:I_.local(I_.variableName),class:"tok-variableName tok-local"},{tag:I_.definition(I_.variableName),class:"tok-variableName tok-definition"},{tag:I_.special(I_.variableName),class:"tok-variableName2"},{tag:I_.definition(I_.propertyName),class:"tok-propertyName tok-definition"},{tag:I_.typeName,class:"tok-typeName"},{tag:I_.namespace,class:"tok-namespace"},{tag:I_.className,class:"tok-className"},{tag:I_.macroName,class:"tok-macroName"},{tag:I_.propertyName,class:"tok-propertyName"},{tag:I_.operator,class:"tok-operator"},{tag:I_.comment,class:"tok-comment"},{tag:I_.meta,class:"tok-meta"},{tag:I_.invalid,class:"tok-invalid"},{tag:I_.punctuation,class:"tok-punctuation"}]),20),Q_=22,z_=23,U_=24,F_=26,W_=27,Y_=28,V_=31,X_=34,H_=37,G_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},K_={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},J_={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function eE(e){return 9==e||10==e||13==e||32==e}let tE=null,rE=null,nE=0;function oE(e,t){let r=e.pos+t;if(nE==r&&rE==e)return tE;let n=e.peek(t);for(;eE(n);)n=e.peek(++t);let o="";for(;45==(i=n)||46==i||58==i||i>=65&&i<=90||95==i||i>=97&&i<=122||i>=161;)o+=String.fromCharCode(n),n=e.peek(++t);var i;return rE=e,nE=r,tE=o?o.toLowerCase():n==iE||n==aE?void 0:null}const iE=63,aE=33;function sE(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;t<e.length;t++)this.hash+=(this.hash<<4)+e.charCodeAt(t)+(e.charCodeAt(t)<<8)}const lE=[6,10,7,8,9],cE=new d_({start:null,shift:(e,t,r,n)=>lE.indexOf(t)>-1?new sE(oE(n,1)||"",e):e,reduce:(e,t)=>t==B_&&e?e.parent:e,reuse(e,t,r,n){let o=t.type.id;return 6==o||36==o?new sE(oE(n,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),uE=new KS(((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(57));e.advance();let r=47==e.next;r&&e.advance();let n=oE(e,0);if(void 0===n)return;if(!n)return e.acceptToken(r?14:6);let o=t.context?t.context.name:null;if(r){if(n==o)return e.acceptToken(11);if(o&&K_[o])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(13)}else{if("script"==n)return e.acceptToken(7);if("style"==n)return e.acceptToken(8);if("textarea"==n)return e.acceptToken(9);if(G_.hasOwnProperty(n))return e.acceptToken(10);o&&J_[o]&&J_[o][n]?e.acceptToken(57,-1):e.acceptToken(6)}}),{contextual:!0}),dE=new KS((e=>{for(let t=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(58);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){r>=3&&e.acceptToken(58,-2);break}t=0}e.advance()}})),pE=new KS(((e,t)=>{if(47==e.next&&62==e.peek(1)){let r=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(r?5:4,2)}else 62==e.next&&e.acceptToken(4,1)}));function hE(e,t,r){let n=2+e.length;return new KS((o=>{for(let i=0,a=0,s=0;;s++){if(o.next<0){s&&o.acceptToken(t);break}if(0==i&&60==o.next||1==i&&47==o.next||i>=2&&i<n&&o.next==e.charCodeAt(i-2))i++,a++;else if(2!=i&&i!=n||!eE(o.next)){if(i==n&&62==o.next){s>a?o.acceptToken(t,-a):o.acceptToken(r,-(a-2));break}if((10==o.next||13==o.next)&&s){o.acceptToken(t,1);break}i=a=0}else a++;o.advance()}}))}const fE=hE("script",54,1),mE=hE("style",55,2),gE=hE("textarea",56,3),bE=v_({"Text RawText":I_.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":I_.angleBracket,TagName:I_.tagName,"MismatchedCloseTag/TagName":[I_.tagName,I_.invalid],AttributeName:I_.attributeName,"AttributeValue UnquotedAttributeValue":I_.attributeValue,Is:I_.definitionOperator,"EntityReference CharacterReference":I_.character,Comment:I_.blockComment,ProcessingInst:I_.processingInstruction,DoctypeDecl:I_.documentMeta}),yE=p_.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|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O~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:cE,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[bE],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%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!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[fE,mE,gE,pE,uE,dE,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function vE(e,t){let r=Object.create(null);for(let n of e.getChildren(z_)){let e=n.getChild(U_),o=n.getChild(F_)||n.getChild(W_);e&&(r[t.read(e.from,e.to)]=o?o.type.id==F_?t.read(o.from+1,o.to-1):t.read(o.from,o.to):"")}return r}function OE(e,t){let r=e.getChild(Q_);return r?t.read(r.from,r.to):" "}function wE(e,t,r){let n;for(let o of r)if(!o.attrs||o.attrs(n||(n=vE(e.node.parent.firstChild,t))))return{parser:o.parser};return null}function AE(e=[],t=[]){let r=[],n=[],o=[],i=[];for(let t of e)("script"==t.tag?r:"style"==t.tag?n:"textarea"==t.tag?o:i).push(t);let a=t.length?Object.create(null):null;for(let e of t)(a[e.name]||(a[e.name]=[])).push(e);return ES(((e,t)=>{let s=e.type.id;if(s==Y_)return wE(e,t,r);if(s==V_)return wE(e,t,n);if(s==X_)return wE(e,t,o);if(s==B_&&i.length){let r,n=e.node,o=n.firstChild,a=o&&OE(o,t);if(a)for(let e of i)if(e.tag==a&&(!e.attrs||e.attrs(r||(r=vE(n,t))))){let t=n.lastChild,r=t.type.id==H_?t.from:n.to;if(r>o.to)return{parser:e.parser,overlay:[{from:o.to,to:r}]}}}if(a&&s==z_){let r,n=e.node;if(r=n.firstChild){let e=a[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=OE(n.parent,t))continue;let e=n.lastChild;if(e.type.id==F_){let t=e.from+1,n=e.lastChild,o=e.to-(n&&n.isError?0:1);if(o>t)return{parser:r.parser,overlay:[{from:t,to:o}]}}else if(e.type.id==W_)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null}))}const xE=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function kE(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}const CE=new KS(((e,t)=>{for(let n=!1,o=0,i=0;;i++){let{next:a}=e;if(kE(a)||45==a||95==a||n&&(r=a)>=48&&r<=57)!n&&(45!=a||i>0)&&(n=!0),o===i&&45==a&&o++,e.advance();else{if(92!=a||10==e.peek(1)){n&&e.acceptToken(40==a?97:2==o&&t.canShift(2)?2:98);break}e.advance(),e.next>-1&&e.advance(),n=!0}}var r})),SE=new KS((e=>{if(xE.includes(e.peek(-1))){let{next:t}=e;(kE(t)||95==t||35==t||46==t||91==t||58==t||45==t||38==t)&&e.acceptToken(96)}})),_E=new KS((e=>{if(!xE.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),kE(t)){do{e.advance()}while(kE(e.next));e.acceptToken(1)}}})),EE=v_({"AtKeyword import charset namespace keyframes media supports":I_.definitionKeyword,"from to selector":I_.keyword,NamespaceName:I_.namespace,KeyframeName:I_.labelName,KeyframeRangeName:I_.operatorKeyword,TagName:I_.tagName,ClassName:I_.className,PseudoClassName:I_.constant(I_.className),IdName:I_.labelName,"FeatureName PropertyName":I_.propertyName,AttributeName:I_.attributeName,NumberLiteral:I_.number,KeywordQuery:I_.keyword,UnaryQueryOp:I_.operatorKeyword,"CallTag ValueName":I_.atom,VariableName:I_.variableName,Callee:I_.operatorKeyword,Unit:I_.unit,"UniversalSelector NestingSelector":I_.definitionOperator,MatchOp:I_.compareOperator,"ChildOp SiblingOp, LogicOp":I_.logicOperator,BinOp:I_.arithmeticOperator,Important:I_.modifier,Comment:I_.blockComment,ColorLiteral:I_.color,"ParenthesizedContent StringLiteral":I_.string,":":I_.punctuation,"PseudoOp #":I_.derefOperator,"; ,":I_.separator,"( )":I_.paren,"[ ]":I_.squareBracket,"{ }":I_.brace}),PE={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},qE={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},TE={__proto__:null,not:128,only:128},jE=p_.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O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!VZQ!c]Q#U!TQ#l!l[#y#R#z$R$j$o${Q#|#TQ$O#WS$a#l$cQ$f#uR$w$bR#x#QQiPR#PwQ!b[Q!jaR#X!VU!^[a!VQ!i`Q#^!]Q#b!_Q$T#_R$U#`",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:114,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[EE],skippedNodes:[0,3,85],repeatNodeCount:10,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;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'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[SE,_E,CE,1,2,3,4,new GS("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:e=>PE[e]||-1},{term:56,get:e=>qE[e]||-1},{term:98,get:e=>TE[e]||-1}],tokenPrec:1169});class RE{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=QE(this,e,t);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(t,this.length,n,1),$E.from(n,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=QE(this,e,t);let r=[];return this.decompose(e,t,r,0),$E.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new DE(this),o=new DE(e);for(let e=t,i=t;;){if(n.next(e),o.next(e),e=0,n.lineBreak!=o.lineBreak||n.done!=o.done||n.value!=o.value)return!1;if(i+=n.value.length,n.done||i>=r)return!0}}iter(e=1){return new DE(this,e)}iterRange(e,t=this.length){return new LE(this,e,t)}iterLines(e,t){let r;if(null==e)r=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new IE(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new ZE(e):$E.from(ZE.split(e,[])):RE.empty}}class ZE extends RE{constructor(e,t=function(e){let t=-1;for(let r of e)t+=r.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,n){for(let o=0;;o++){let i=this.text[o],a=n+i.length;if((t?r:a)>=e)return new BE(n,a,r,i);n=a+1,r++}}decompose(e,t,r,n){let o=e<=0&&t>=this.length?this:new ZE(NE(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=r.pop(),t=ME(o.text,e.text.slice(),0,o.length);if(t.length<=32)r.push(new ZE(t,e.length+o.length));else{let e=t.length>>1;r.push(new ZE(t.slice(0,e)),new ZE(t.slice(e)))}}else r.push(o)}replace(e,t,r){if(!(r instanceof ZE))return super.replace(e,t,r);[e,t]=QE(this,e,t);let n=ME(this.text,ME(r.text,NE(this.text,0,e)),t),o=this.length+r.length-(t-e);return n.length<=32?new ZE(n,o):$E.from(ZE.split(n,[]),o)}sliceString(e,t=this.length,r="\n"){[e,t]=QE(this,e,t);let n="";for(let o=0,i=0;o<=t&&i<this.text.length;i++){let a=this.text[i],s=o+a.length;o>e&&i&&(n+=r),e<s&&t>o&&(n+=a.slice(Math.max(0,e-o),t-o)),o=s+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],n=-1;for(let o of e)r.push(o),n+=o.length+1,32==r.length&&(t.push(new ZE(r,n)),r=[],n=-1);return n>-1&&t.push(new ZE(r,n)),t}}class $E extends RE{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,r,n){for(let o=0;;o++){let i=this.children[o],a=n+i.length,s=r+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,r,n);n=a+1,r=s+1}}decompose(e,t,r,n){for(let o=0,i=0;i<=t&&o<this.children.length;o++){let a=this.children[o],s=i+a.length;if(e<=s&&t>=i){let o=n&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!o?r.push(a):a.decompose(e-i,t-i,r,o)}i=s+1}}replace(e,t,r){if([e,t]=QE(this,e,t),r.lines<this.lines)for(let n=0,o=0;n<this.children.length;n++){let i=this.children[n],a=o+i.length;if(e>=o&&t<=a){let s=i.replace(e-o,t-o,r),l=this.lines-i.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let o=this.children.slice();return o[n]=s,new $E(o,this.length-(t-e)+r.length)}return super.replace(o,a,s)}o=a+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r="\n"){[e,t]=QE(this,e,t);let n="";for(let o=0,i=0;o<this.children.length&&i<=t;o++){let a=this.children[o],s=i+a.length;i>e&&o&&(n+=r),e<s&&t>i&&(n+=a.sliceString(e-i,t-i,r)),i=s+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof $E))return 0;let r=0,[n,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,o+=t){if(n==i||o==a)return r;let s=this.children[n],l=e.children[o];if(s!=l)return r+s.scanIdentical(l,t);r+=s.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let r=0;for(let t of e)r+=t.lines;if(r<32){let r=[];for(let t of e)t.flatten(r);return new ZE(r,t)}let n=Math.max(32,r>>5),o=n<<1,i=n>>1,a=[],s=0,l=-1,c=[];function u(e){let t;if(e.lines>o&&e instanceof $E)for(let t of e.children)u(t);else e.lines>i&&(s>i||!s)?(d(),a.push(e)):e instanceof ZE&&s&&(t=c[c.length-1])instanceof ZE&&e.lines+t.lines<=32?(s+=e.lines,l+=e.length+1,c[c.length-1]=new ZE(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>n&&d(),s+=e.lines,l+=e.length+1,c.push(e))}function d(){0!=s&&(a.push(1==c.length?c[0]:$E.from(c,l)),l=-1,s=c.length=0)}for(let t of e)u(t);return d(),1==a.length?a[0]:new $E(a,t)}}function ME(e,t,r=0,n=1e9){for(let o=0,i=0,a=!0;i<e.length&&o<=n;i++){let s=e[i],l=o+s.length;l>=r&&(l>n&&(s=s.slice(0,n-o)),o<r&&(s=s.slice(r-o)),a?(t[t.length-1]+=s,a=!1):t.push(s)),o=l+1}return t}function NE(e,t,r){return ME(e,[""],t,r)}RE.empty=new ZE([""],0);class DE{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ZE?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,n=this.nodes[r],o=this.offsets[r],i=o>>1,a=n instanceof ZE?n.text.length:n.children.length;if(i==(t>0?a:0)){if(0==r)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[r]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof ZE){let o=n.text[i+(t<0?-1:0)];if(this.offsets[r]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=n.children[i+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof ZE?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class LE{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new DE(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=r?n:t<0?n.slice(n.length-r):n.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class IE{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(RE.prototype[Symbol.iterator]=function(){return this.iter()},DE.prototype[Symbol.iterator]=LE.prototype[Symbol.iterator]=IE.prototype[Symbol.iterator]=function(){return this});class BE{constructor(e,t,r,n){this.from=e,this.to=t,this.number=r,this.text=n}get length(){return this.to-this.from}}function QE(e,t,r){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,r))]}let zE="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;e<zE.length;e++)zE[e]+=zE[e-1];function UE(e){for(let t=1;t<zE.length;t+=2)if(zE[t]>e)return zE[t-1]<=e;return!1}function FE(e){return e>=127462&&e<=127487}const WE=8205;function YE(e,t,r=!0,n=!0){return(r?VE:XE)(e,t,n)}function VE(e,t,r){if(t==e.length)return t;t&&HE(e.charCodeAt(t))&&GE(e.charCodeAt(t-1))&&t--;let n=KE(e,t);for(t+=eP(n);t<e.length;){let o=KE(e,t);if(n==WE||o==WE||r&&UE(o))t+=eP(o),n=o;else{if(!FE(o))break;{let r=0,n=t-2;for(;n>=0&&FE(KE(e,n));)r++,n-=2;if(r%2==0)break;t+=2}}}return t}function XE(e,t,r){for(;t>0;){let n=VE(e,t-2,r);if(n<t)return n;t--}return 0}function HE(e){return e>=56320&&e<57344}function GE(e){return e>=55296&&e<56320}function KE(e,t){let r=e.charCodeAt(t);if(!GE(r)||t+1==e.length)return r;let n=e.charCodeAt(t+1);return HE(n)?n-56320+(r-55296<<10)+65536:r}function JE(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function eP(e){return e<65536?1:2}const tP=/\r\n?|\n/;var rP=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(rP||(rP={}));class nP{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,n=0;t<this.sections.length;){let o=this.sections[t++],i=this.sections[t++];i<0?(e(r,n,o),n+=o):n+=i,r+=o}}iterChangedRanges(e,t=!1){sP(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],n=this.sections[t++];n<0?e.push(r,n):e.push(n,r)}return new nP(e)}composeDesc(e){return this.empty?e:e.empty?this:cP(this,e)}mapDesc(e,t=!1){return e.empty?this:lP(this,e,t)}mapPos(e,t=-1,r=rP.Simple){let n=0,o=0;for(let i=0;i<this.sections.length;){let a=this.sections[i++],s=this.sections[i++],l=n+a;if(s<0){if(l>e)return o+(e-n);o+=a}else{if(r!=rP.Simple&&l>=e&&(r==rP.TrackDel&&n<e&&l>e||r==rP.TrackBefore&&n<e||r==rP.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==n||t<0?o:o+s;o+=s}n=l}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return o}touchesRange(e,t=e){for(let r=0,n=0;r<this.sections.length&&n<=t;){let o=n+this.sections[r++];if(this.sections[r++]>=0&&n<=t&&o>=e)return!(n<e&&o>t)||"cover";n=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+r+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new nP(e)}static create(e){return new nP(e)}}class oP extends nP{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return sP(this,((t,r,n,o,i)=>e=e.replace(n,n+(r-t),i)),!1),e}mapDesc(e,t=!1){return lP(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let n=0,o=0;n<t.length;n+=2){let i=t[n],a=t[n+1];if(a>=0){t[n]=a,t[n+1]=i;let s=n>>1;for(;r.length<s;)r.push(RE.empty);r.push(i?e.slice(o,o+i):RE.empty)}o+=i}return new oP(t,r)}compose(e){return this.empty?e:e.empty?this:cP(this,e,!0)}map(e,t=!1){return e.empty?this:lP(this,e,t,!0)}iterChanges(e,t=!1){sP(this,e,t)}get desc(){return nP.create(this.sections)}filter(e){let t=[],r=[],n=[],o=new uP(this);e:for(let i=0,a=0;;){let s=i==e.length?1e9:e[i++];for(;a<s||a==s&&0==o.len;){if(o.done)break e;let e=Math.min(o.len,s-a);iP(n,e,-1);let i=-1==o.ins?-1:0==o.off?o.ins:0;iP(t,e,i),i>0&&aP(r,t,o.text),o.forward(e),a+=e}let l=e[i++];for(;a<l;){if(o.done)break e;let e=Math.min(o.len,l-a);iP(t,e,-1),iP(n,e,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(e),a+=e}}return{changes:new oP(t,r),filtered:nP.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],n=this.sections[t+1];n<0?e.push(r):0==n?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let n=[],o=[],i=0,a=null;function s(e=!1){if(!e&&!n.length)return;i<t&&iP(n,t-i,-1);let r=new oP(n,o);a=a?a.compose(r.map(a)):r,n=[],o=[],i=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof oP){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:e,to:a=e,insert:c}=l;if(e>a||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let u=c?"string"==typeof c?RE.of(c.split(r||tP)):c:RE.empty,d=u.length;if(e==a&&0==d)return;e<i&&s(),e>i&&iP(n,e-i,-1),iP(n,a-e,d),aP(o,n,u),i=a}}(e),s(!a),a}static empty(e){return new oP(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let n=0;n<e.length;n++){let o=e[n];if("number"==typeof o)t.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;r.length<n;)r.push(RE.empty);r[n]=RE.of(o.slice(1)),t.push(o[0],r[n].length)}}}return new oP(t,r)}static createSet(e,t){return new oP(e,t)}}function iP(e,t,r,n=!1){if(0==t&&r<=0)return;let o=e.length-2;o>=0&&r<=0&&r==e[o+1]?e[o]+=t:0==t&&0==e[o]?e[o+1]+=r:n?(e[o]+=t,e[o+1]+=r):e.push(t,r)}function aP(e,t,r){if(0==r.length)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(r);else{for(;e.length<n;)e.push(RE.empty);e.push(r)}}function sP(e,t,r){let n=e.inserted;for(let o=0,i=0,a=0;a<e.sections.length;){let s=e.sections[a++],l=e.sections[a++];if(l<0)o+=s,i+=s;else{let c=o,u=i,d=RE.empty;for(;c+=s,u+=l,l&&n&&(d=d.append(n[a-2>>1])),!(r||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(o,c,i,u,d),o=c,i=u}}}function lP(e,t,r,n=!1){let o=[],i=n?[]:null,a=new uP(e),s=new uP(t);for(let e=-1;;)if(-1==a.ins&&-1==s.ins){let e=Math.min(a.len,s.len);iP(o,e,-1),a.forward(e),s.forward(e)}else if(s.ins>=0&&(a.ins<0||e==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!r))){let t=s.len;for(iP(o,s.ins,-1);t;){let r=Math.min(a.len,t);a.ins>=0&&e<a.i&&a.len<=r&&(iP(o,0,a.ins),i&&aP(i,o,a.text),e=a.i),a.forward(r),t-=r}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return i?oP.createSet(o,i):nP.create(o);throw new Error("Mismatched change set lengths")}{let t=0,r=a.len;for(;r;)if(-1==s.ins){let e=Math.min(r,s.len);t+=e,r-=e,s.forward(e)}else{if(!(0==s.ins&&s.len<r))break;r-=s.len,s.next()}iP(o,t,e<a.i?a.ins:0),i&&e<a.i&&aP(i,o,a.text),e=a.i,a.forward(a.len-r)}}}function cP(e,t,r=!1){let n=[],o=r?[]:null,i=new uP(e),a=new uP(t);for(let e=!1;;){if(i.done&&a.done)return o?oP.createSet(n,o):nP.create(n);if(0==i.ins)iP(n,i.len,0,e),i.next();else if(0!=a.len||a.done){if(i.done||a.done)throw new Error("Mismatched change set lengths");{let t=Math.min(i.len2,a.len),r=n.length;if(-1==i.ins){let r=-1==a.ins?-1:a.off?0:a.ins;iP(n,t,r,e),o&&r&&aP(o,n,a.text)}else-1==a.ins?(iP(n,i.off?0:i.len,t,e),o&&aP(o,n,i.textBit(t))):(iP(n,i.off?0:i.len,a.off?0:a.ins,e),o&&!a.off&&aP(o,n,a.text));e=(i.ins>t||a.ins>=0&&a.len>t)&&(e||n.length>r),i.forward2(t),a.forward(t)}}else iP(n,0,a.ins,e),o&&aP(o,n,a.text),a.next()}}class uP{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?RE.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?RE.empty:t[r].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class dP{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let r,n;return this.empty?r=n=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),r==this.from&&n==this.to?this:new dP(r,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return pP.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return pP.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return pP.range(e.anchor,e.head)}static create(e,t,r){return new dP(e,t,r)}}class pP{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:pP.create(this.ranges.map((r=>r.map(e,t))),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new pP([this.main],0)}addRange(e,t=!0){return pP.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,pP.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new pP(e.ranges.map((e=>dP.fromJSON(e))),e.main)}static single(e,t=e){return new pP([pP.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let r=0,n=0;n<e.length;n++){let o=e[n];if(o.empty?o.from<=r:o.from<r)return pP.normalized(e.slice(),t);r=o.to}return new pP(e,t)}static cursor(e,t=0,r,n){return dP.create(e,e,(0==t?0:t<0?8:16)|(null==r?7:Math.min(6,r))|(null!=n?n:16777215)<<6)}static range(e,t,r,n){let o=(null!=r?r:16777215)<<6|(null==n?7:Math.min(6,n));return t<e?dP.create(t,e,48|o):dP.create(e,t,(t>e?8:0)|o)}static normalized(e,t=0){let r=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(r);for(let r=1;r<e.length;r++){let n=e[r],o=e[r-1];if(n.empty?n.from<=o.to:n.from<o.to){let i=o.from,a=Math.max(n.to,o.to);r<=t&&t--,e.splice(--r,2,n.anchor>n.head?pP.range(a,i):pP.range(i,a))}}return new pP(e,t)}}function hP(e,t){for(let r of e.ranges)if(r.to>t)throw new RangeError("Selection points outside of document")}let fP=0;class mP{constructor(e,t,r,n,o){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=n,this.id=fP++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}get reader(){return this}static define(e={}){return new mP(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:gP),!!e.static,e.enables)}of(e){return new bP([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bP(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bP(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(r=>t(r.field(e))))}}function gP(e,t){return e==t||e.length==t.length&&e.every(((e,r)=>e===t[r]))}class bP{constructor(e,t,r,n){this.dependencies=e,this.facet=t,this.type=r,this.value=n,this.id=fP++}dynamicSlot(e){var t;let r=this.value,n=this.facet.compareInput,o=this.id,i=e[o]>>1,a=2==this.type,s=!1,l=!1,c=[];for(let r of this.dependencies)"doc"==r?s=!0:"selection"==r?l=!0:0==(1&(null!==(t=e[r.id])&&void 0!==t?t:1))&&c.push(e[r.id]);return{create:e=>(e.values[i]=r(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||vP(e,c)){let t=r(e);if(a?!yP(t,e.values[i],n):!n(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[o];if(null!=l){let o=qP(t,l);if(this.dependencies.every((r=>r instanceof mP?t.facet(r)===e.facet(r):!(r instanceof AP)||t.field(r,!1)==e.field(r,!1)))||(a?yP(s=r(e),o,n):n(s=r(e),o)))return e.values[i]=o,0}else s=r(e);return e.values[i]=s,1}}}}function yP(e,t,r){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}function vP(e,t){let r=!1;for(let n of t)1&PP(e,n)&&(r=!0);return r}function OP(e,t,r){let n=r.map((t=>e[t.id])),o=r.map((e=>e.type)),i=n.filter((e=>!(1&e))),a=e[t.id]>>1;function s(e){let r=[];for(let t=0;t<n.length;t++){let i=qP(e,n[t]);if(2==o[t])for(let e of i)r.push(e);else r.push(i)}return t.combine(r)}return{create(e){for(let t of n)PP(e,t);return e.values[a]=s(e),1},update(e,r){if(!vP(e,i))return 0;let n=s(e);return t.compare(n,e.values[a])?0:(e.values[a]=n,1)},reconfigure(e,o){let i=vP(e,n),l=o.config.facets[t.id],c=o.facet(t);if(l&&!i&&gP(r,l))return e.values[a]=c,0;let u=s(e);return t.compare(u,c)?(e.values[a]=c,0):(e.values[a]=u,1)}}}const wP=mP.define({static:!0});class AP{constructor(e,t,r,n,o){this.id=e,this.createF=t,this.updateF=r,this.compareF=n,this.spec=o,this.provides=void 0}static define(e){let t=new AP(fP++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(wP).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,r)=>{let n=e.values[t],o=this.updateF(n,r);return this.compareF(n,o)?0:(e.values[t]=o,1)},reconfigure:(e,r)=>null!=r.config.address[this.id]?(e.values[t]=r.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,wP.of({field:this,create:e})]}get extension(){return this}}function xP(e){return t=>new CP(t,e)}const kP={highest:xP(0),high:xP(1),default:xP(2),low:xP(3),lowest:xP(4)};class CP{constructor(e,t){this.inner=e,this.prec=t}}class SP{of(e){return new _P(this,e)}reconfigure(e){return SP.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class _P{constructor(e,t){this.compartment=e,this.inner=t}}class EP{constructor(e,t,r,n,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=n,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let n=[],o=Object.create(null),i=new Map;for(let r of function(e,t,r){let n=[[],[],[],[],[]],o=new Map;return function e(i,a){let s=o.get(i);if(null!=s){if(s<=a)return;let e=n[s].indexOf(i);e>-1&&n[s].splice(e,1),i instanceof _P&&r.delete(i.compartment)}if(o.set(i,a),Array.isArray(i))for(let t of i)e(t,a);else if(i instanceof _P){if(r.has(i.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=t.get(i.compartment)||i.inner;r.set(i.compartment,n),e(n,a)}else if(i instanceof CP)e(i.inner,i.prec);else if(i instanceof AP)n[a].push(i),i.provides&&e(i.provides,a);else if(i instanceof bP)n[a].push(i),i.facet.extensions&&e(i.facet.extensions,2);else{let t=i.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${i}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,a)}}(e,2),n.reduce(((e,t)=>e.concat(t)))}(e,t,i))r instanceof AP?n.push(r):(o[r.facet.id]||(o[r.facet.id]=[])).push(r);let a=Object.create(null),s=[],l=[];for(let e of n)a[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==r?void 0:r.config.facets;for(let e in o){let t=o[e],n=t[0].facet,i=c&&c[e]||[];if(t.every((e=>0==e.type)))if(a[n.id]=s.length<<1|1,gP(i,t))s.push(r.facet(n));else{let e=n.combine(t.map((e=>e.value)));s.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)0==e.type?(a[e.id]=s.length<<1|1,s.push(e.value)):(a[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));a[n.id]=l.length<<1,l.push((e=>OP(e,n,t)))}}let u=l.map((e=>e(a)));return new EP(e,i,u,a,s,o)}}function PP(e,t){if(1&t)return 2;let r=t>>1,n=e.status[r];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[r]=4;let o=e.computeSlot(e,e.config.dynamicSlots[r]);return e.status[r]=2|o}function qP(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const TP=mP.define(),jP=mP.define({combine:e=>e.some((e=>e)),static:!0}),RP=mP.define({combine:e=>e.length?e[0]:void 0,static:!0}),ZP=mP.define(),$P=mP.define(),MP=mP.define(),NP=mP.define({combine:e=>!!e.length&&e[0]});class DP{constructor(e,t){this.type=e,this.value=t}static define(){return new LP}}class LP{of(e){return new DP(this,e)}}class IP{constructor(e){this.map=e}of(e){return new BP(this,e)}}class BP{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new BP(this.type,t)}is(e){return this.type==e}static define(e={}){return new IP(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let n of e){let e=n.map(t);e&&r.push(e)}return r}}BP.reconfigure=BP.define(),BP.appendConfig=BP.define();class QP{constructor(e,t,r,n,o,i){this.startState=e,this.changes=t,this.selection=r,this.effects=n,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,r&&hP(r,t.newLength),o.some((e=>e.type==QP.time))||(this.annotations=o.concat(QP.time.of(Date.now())))}static create(e,t,r,n,o,i){return new QP(e,t,r,n,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(QP.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function zP(e,t){let r=[];for(let n=0,o=0;;){let i,a;if(n<e.length&&(o==t.length||t[o]>=e[n]))i=e[n++],a=e[n++];else{if(!(o<t.length))return r;i=t[o++],a=t[o++]}!r.length||r[r.length-1]<i?r.push(i,a):r[r.length-1]<a&&(r[r.length-1]=a)}}function UP(e,t,r){var n;let o,i,a;return r?(o=t.changes,i=oP.empty(t.changes.length),a=e.changes.compose(t.changes)):(o=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(o)),{changes:a,selection:t.selection?t.selection.map(i):null===(n=e.selection)||void 0===n?void 0:n.map(o),effects:BP.mapEffects(e.effects,o).concat(BP.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function FP(e,t,r){let n=t.selection,o=VP(t.annotations);return t.userEvent&&(o=o.concat(QP.userEvent.of(t.userEvent))),{changes:t.changes instanceof oP?t.changes:oP.of(t.changes||[],r,e.facet(RP)),selection:n&&(n instanceof pP?n:pP.single(n.anchor,n.head)),effects:VP(t.effects),annotations:o,scrollIntoView:!!t.scrollIntoView}}function WP(e,t,r){let n=FP(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(r=!1);for(let o=1;o<t.length;o++){!1===t[o].filter&&(r=!1);let i=!!t[o].sequential;n=UP(n,FP(e,t[o],i?n.changes.newLength:e.doc.length),i)}let o=QP.create(e,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return function(e){let t=e.startState,r=t.facet(MP),n=e;for(let o=r.length-1;o>=0;o--){let i=r[o](e);i&&Object.keys(i).length&&(n=UP(n,FP(t,i,e.changes.newLength),!0))}return n==e?e:QP.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(r?function(e){let t=e.startState,r=!0;for(let n of t.facet(ZP)){let t=n(e);if(!1===t){r=!1;break}Array.isArray(t)&&(r=!0===r?t:zP(r,t))}if(!0!==r){let n,o;if(!1===r)o=e.changes.invertedDesc,n=oP.empty(t.doc.length);else{let t=e.changes.filter(r);n=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=QP.create(t,n,e.selection&&e.selection.map(o),BP.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let n=t.facet($P);for(let r=n.length-1;r>=0;r--){let o=n[r](e);e=o instanceof QP?o:Array.isArray(o)&&1==o.length&&o[0]instanceof QP?o[0]:WP(t,VP(o),!1)}return e}(o):o)}QP.time=DP.define(),QP.userEvent=DP.define(),QP.addToHistory=DP.define(),QP.remote=DP.define();const YP=[];function VP(e){return null==e?YP:Array.isArray(e)?e:[e]}var XP=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(XP||(XP={}));const HP=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let GP;try{GP=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(De){}class KP{constructor(e,t,r,n,o,i){this.config=e,this.doc=t,this.selection=r,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)PP(this,e<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(null!=r)return PP(this,r),qP(this,r);if(t)throw new RangeError("Field is not present in this state")}update(...e){return WP(this,e,!0)}applyTransaction(e){let t,r=this.config,{base:n,compartments:o}=r;for(let t of e.effects)t.is(SP.reconfigure)?(r&&(o=new Map,r.compartments.forEach(((e,t)=>o.set(t,e))),r=null),o.set(t.value.compartment,t.value.extension)):t.is(BP.reconfigure)?(r=null,n=t.value):t.is(BP.appendConfig)&&(r=null,n=VP(n).concat(t.value));r?t=e.startState.values.slice():(r=EP.resolve(n,o,this),t=new KP(r,this.doc,this.selection,r.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values);let i=e.startState.facet(jP)?e.newSelection:e.newSelection.asSingle();new KP(r,e.newDoc,i,t,((t,r)=>r.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:pP.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),n=this.changes(r.changes),o=[r.range],i=VP(r.effects);for(let r=1;r<t.ranges.length;r++){let a=e(t.ranges[r]),s=this.changes(a.changes),l=s.map(n);for(let e=0;e<r;e++)o[e]=o[e].map(l);let c=n.mapDesc(s,!0);o.push(a.range.map(c)),n=n.compose(l),i=BP.mapEffects(i,l).concat(BP.mapEffects(VP(a.effects),c))}return{changes:n,selection:pP.create(o,t.mainIndex),effects:i}}changes(e=[]){return e instanceof oP?e:oP.of(e,this.doc.length,this.facet(KP.lineSeparator))}toText(e){return RE.of(e.split(this.facet(KP.lineSeparator)||tP))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(PP(this,t),qP(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let n=e[r];n instanceof AP&&null!=this.config.address[n.id]&&(t[r]=n.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(r)for(let t in r)if(Object.prototype.hasOwnProperty.call(e,t)){let o=r[t],i=e[t];n.push(o.init((e=>o.spec.fromJSON(i,e))))}return KP.create({doc:e.doc,selection:pP.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=EP.resolve(e.extensions||[],new Map),r=e.doc instanceof RE?e.doc:RE.of((e.doc||"").split(t.staticFacet(KP.lineSeparator)||tP)),n=e.selection?e.selection instanceof pP?e.selection:pP.single(e.selection.anchor,e.selection.head):pP.single(0);return hP(n,r.length),t.staticFacet(jP)||(n=n.asSingle()),new KP(t,r,n,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(KP.tabSize)}get lineBreak(){return this.facet(KP.lineSeparator)||"\n"}get readOnly(){return this.facet(NP)}phrase(e,...t){for(let t of this.facet(KP.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,r)=>{if("$"==r)return"$";let n=+(r||1);return!n||n>t.length?e:t[n-1]}))),e}languageDataAt(e,t,r=-1){let n=[];for(let o of this.facet(TP))for(let i of o(this,t,r))Object.prototype.hasOwnProperty.call(i,e)&&n.push(i[e]);return n}charCategorizer(e){return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return XP.Space;if(function(e){if(GP)return GP.test(e);for(let t=0;t<e.length;t++){let r=e[t];if(/\w/.test(r)||r>""&&(r.toUpperCase()!=r.toLowerCase()||HP.test(r)))return!0}return!1}(e))return XP.Word;for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return XP.Word;return XP.Other};var t}wordAt(e){let{text:t,from:r,length:n}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-r,a=e-r;for(;i>0;){let e=YE(t,i,!1);if(o(t.slice(e,i))!=XP.Word)break;i=e}for(;a<n;){let e=YE(t,a);if(o(t.slice(a,e))!=XP.Word)break;a=e}return i==a?null:pP.range(i+r,a+r)}}function JP(e,t,r={}){let n={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=n[e];if(void 0===i)n[e]=o;else if(i===o||void 0===o);else{if(!Object.hasOwnProperty.call(r,e))throw new Error("Config merge conflict for field "+e);n[e]=r[e](i,o)}}for(let e in t)void 0===n[e]&&(n[e]=t[e]);return n}KP.allowMultipleSelections=jP,KP.tabSize=mP.define({combine:e=>e.length?e[0]:4}),KP.lineSeparator=RP,KP.readOnly=NP,KP.phrases=mP.define({compare(e,t){let r=Object.keys(e),n=Object.keys(t);return r.length==n.length&&r.every((r=>e[r]==t[r]))}}),KP.languageData=TP,KP.changeFilter=ZP,KP.transactionFilter=$P,KP.transactionExtender=MP,SP.reconfigure=BP.define();class eq{eq(e){return this==e}range(e,t=e){return tq.create(e,t,this)}}eq.prototype.startSide=eq.prototype.endSide=0,eq.prototype.point=!1,eq.prototype.mapMode=rP.TrackDel;class tq{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new tq(e,t,r)}}function rq(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class nq{constructor(e,t,r,n){this.from=e,this.to=t,this.value=r,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,n=0){let o=r?this.to:this.from;for(let i=n,a=o.length;;){if(i==a)return i;let n=i+a>>1,s=o[n]-e||(r?this.value[n].endSide:this.value[n].startSide)-t;if(n==i)return s>=0?i:a;s>=0?a=n:i=n+1}}between(e,t,r,n){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(r,1e9,!1,o);o<i;o++)if(!1===n(this.from[o]+e,this.to[o]+e,this.value[o]))return!1}map(e,t){let r=[],n=[],o=[],i=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,c,u=this.value[s],d=this.from[s]+e,p=this.to[s]+e;if(d==p){let e=t.mapPos(d,u.startSide,u.mapMode);if(null==e)continue;if(l=c=e,u.startSide!=u.endSide&&(c=t.mapPos(d,u.endSide),c<l))continue}else if(l=t.mapPos(d,u.startSide),c=t.mapPos(p,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(i<0&&(i=l),u.point&&(a=Math.max(a,c-l)),r.push(u),n.push(l-i),o.push(c-i))}return{mapped:r.length?new nq(n,o,r,a):null,pos:i}}}class oq{constructor(e,t,r,n){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=n}static create(e,t,r,n){return new oq(e,t,r,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:n=0,filterTo:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(r&&(t=t.slice().sort(rq)),this.isEmpty)return t.length?oq.of(t):this;let a=new sq(this,null,-1).goto(0),s=0,l=[],c=new iq;for(;a.value||s<t.length;)if(s<t.length&&(a.from-t[s].from||a.startSide-t[s].value.startSide)>=0){let e=t[s++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==t.length||this.chunkEnd(a.chunkIndex)<t[s].from)&&(!i||n>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!i||n>a.to||o<a.from||i(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||l.push(tq.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?oq.empty:this.nextLayer.update({add:l,filter:i,filterFrom:n,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],n=-1;for(let o=0;o<this.chunk.length;o++){let i=this.chunkPos[o],a=this.chunk[o],s=e.touchesRange(i,i+a.length);if(!1===s)n=Math.max(n,a.maxPoint),t.push(a),r.push(e.mapPos(i));else if(!0===s){let{mapped:o,pos:s}=a.map(i,e);o&&(n=Math.max(n,o.maxPoint),t.push(o),r.push(s))}}let o=this.nextLayer.map(e);return 0==t.length?o:new oq(r,t,o||oq.empty,n)}between(e,t,r){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let o=this.chunkPos[n],i=this.chunk[n];if(t>=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,r))return}this.nextLayer.between(e,t,r)}}iter(e=0){return lq.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return lq.from(e).goto(t)}static compare(e,t,r,n,o=-1){let i=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),a=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),s=aq(i,a,r),l=new uq(i,s,o),c=new uq(a,s,o);r.iterGaps(((e,t,r)=>dq(l,e,c,t,r,n))),r.empty&&0==r.length&&dq(l,0,c,0,0,n)}static eq(e,t,r=0,n){null==n&&(n=999999999);let o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(o.length!=i.length)return!1;if(!o.length)return!0;let a=aq(o,i),s=new uq(o,a,0).goto(r),l=new uq(i,a,0).goto(r);for(;;){if(s.to!=l.to||!pq(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>n)return!0;s.next(),l.next()}}static spans(e,t,r,n,o=-1){let i=new uq(e,null,o).goto(t),a=t,s=i.openStart;for(;;){let e=Math.min(i.to,r);if(i.point){let r=i.activeForPoint(i.to),o=i.pointFrom<t?r.length+1:Math.min(r.length,s);n.point(a,e,i.point,r,o,i.pointRank),s=Math.min(i.openEnd(e),r.length)}else e>a&&(n.span(a,e,i.active,s),s=i.openEnd(e));if(i.to>r)return s+(i.point&&i.to>r?1:0);a=i.to,i.next()}}static of(e,t=!1){let r=new iq;for(let n of e instanceof tq?[e]:t?function(e){if(e.length>1)for(let t=e[0],r=1;r<e.length;r++){let n=e[r];if(rq(t,n)>0)return e.slice().sort(rq);t=n}return e}(e):e)r.add(n.from,n.to,n.value);return r.finish()}}oq.empty=new oq([],[],null,-1),oq.empty.nextLayer=oq.empty;class iq{finishChunk(e){this.chunks.push(new nq(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new iq)).add(e,t,r)}addInner(e,t,r){let n=e-this.lastTo||r.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(oq.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=oq.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function aq(e,t,r){let n=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&n.set(t.chunk[e],t.chunkPos[e]);let o=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let i=n.get(e.chunk[t]);null==i||(r?r.mapPos(i):i)!=e.chunkPos[t]||(null==r?void 0:r.touchesRange(i,i+e.chunk[t].length))||o.add(e.chunk[t])}return o}class sq{constructor(e,t,r,n=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class lq{constructor(e){this.heap=e}static from(e,t=null,r=-1){let n=[];for(let o=0;o<e.length;o++)for(let i=e[o];!i.isEmpty;i=i.nextLayer)i.maxPoint>=r&&n.push(new sq(i,t,r,o));return 1==n.length?n[0]:new lq(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)cq(this.heap,e);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)cq(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),cq(this.heap,0)}}}function cq(e,t){for(let r=e[t];;){let n=1+(t<<1);if(n>=e.length)break;let o=e[n];if(n+1<e.length&&o.compare(e[n+1])>=0&&(o=e[n+1],n++),r.compare(o)<0)break;e[n]=r,e[t]=o,t=n}}class uq{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=lq.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){hq(this.active,e),hq(this.activeTo,e),hq(this.activeRank,e),this.minActive=mq(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:n,rank:o}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=o;)t++;fq(this.active,t,r),fq(this.activeTo,t,n),fq(this.activeRank,t,o),e&&fq(e,t,this.cursor.from),this.minActive=mq(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),r&&hq(r,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(r),this.cursor.next()}}}if(r){this.openStart=0;for(let t=r.length-1;t>=0&&r[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function dq(e,t,r,n,o,i){e.goto(t),r.goto(n);let a=n+o,s=n,l=n-t;for(;;){let t=e.to+l-r.to||e.endSide-r.endSide,n=t<0?e.to+l:r.to,o=Math.min(n,a);if(e.point||r.point?e.point&&r.point&&(e.point==r.point||e.point.eq(r.point))&&pq(e.activeForPoint(e.to),r.activeForPoint(r.to))||i.comparePoint(s,o,e.point,r.point):o>s&&!pq(e.active,r.active)&&i.compareRange(s,o,e.active,r.active),n>a)break;s=n,t<=0&&e.next(),t>=0&&r.next()}}function pq(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r]&&!e[r].eq(t[r]))return!1;return!0}function hq(e,t){for(let r=t,n=e.length-1;r<n;r++)e[r]=e[r+1];e.pop()}function fq(e,t,r){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=r}function mq(e,t){let r=-1,n=1e9;for(let o=0;o<t.length;o++)(t[o]-n||e[o].endSide-e[r].endSide)<0&&(r=o,n=t[o]);return r}function gq(e,t,r=e.length){let n=0;for(let o=0;o<r;)9==e.charCodeAt(o)?(n+=t-n%t,o++):(n++,o=YE(e,o));return n}function bq(e,t,r,n){for(let n=0,o=0;;){if(o>=t)return n;if(n==e.length)break;o+=9==e.charCodeAt(n)?r-o%r:1,n=YE(e,n)}return!0===n?-1:e.length}const yq="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),vq="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Oq="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class wq{constructor(e,t){this.rules=[];let{finish:r}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,i,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let r in t){let a=t[r];if(/&/.test(r))o(r.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),a,i);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+r+") should be a primitive value.");o(n(r),a,s,c)}else null!=a&&s.push(r.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+a+";")}(s.length||c)&&i.push((!r||l||a?e:e.map(r)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)o(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Oq[yq]||1;return Oq[yq]=e+1,"ͼ"+e.toString(36)}static mount(e,t,r){let n=e[vq],o=r&&r.nonce;n?o&&n.setNonce(o):n=new xq(e,o),n.mount(Array.isArray(t)?t:[t])}}let Aq=new Map;class xq{constructor(e,t){let r=e.ownerDocument||e,n=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=Aq.get(r);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[vq]=t;this.sheet=new n.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Aq.set(r,this)}else{this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[vq]=this}mount(e){let t=this.sheet,r=0,n=0;for(let o=0;o<e.length;o++){let i=e[o],a=this.modules.indexOf(i);if(a<n&&a>-1&&(this.modules.splice(a,1),n--,a=-1),-1==a){if(this.modules.splice(n++,0,i),t)for(let e=0;e<i.rules.length;e++)t.insertRule(i.rules[e],r++)}else{for(;n<a;)r+=this.modules[n++].rules.length;r+=i.rules.length,n++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var kq={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Cq={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Sq="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),_q="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Eq=0;Eq<10;Eq++)kq[48+Eq]=kq[96+Eq]=String(Eq);for(Eq=1;Eq<=24;Eq++)kq[Eq+111]="F"+Eq;for(Eq=65;Eq<=90;Eq++)kq[Eq]=String.fromCharCode(Eq+32),Cq[Eq]=String.fromCharCode(Eq);for(var Pq in kq)Cq.hasOwnProperty(Pq)||(Cq[Pq]=kq[Pq]);function qq(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Tq(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function jq(e,t){if(!t.anchorNode)return!1;try{return Tq(e,t.anchorNode)}catch(e){return!1}}function Rq(e){return 3==e.nodeType?Uq(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Zq(e,t,r,n){return!!r&&(Mq(e,t,r,n,-1)||Mq(e,t,r,n,1))}function $q(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Mq(e,t,r,n,o){for(;;){if(e==r&&t==n)return!0;if(t==(o<0?0:Nq(e))){if("DIV"==e.nodeName)return!1;let r=e.parentNode;if(!r||1!=r.nodeType)return!1;t=$q(e)+(o<0?0:1),e=r}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?Nq(e):0}}}function Nq(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Dq(e,t){let r=t?e.left:e.right;return{left:r,right:r,top:e.top,bottom:e.bottom}}function Lq(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class Iq{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?Nq(t):0),r,Math.min(e.focusOffset,r?Nq(r):0))}set(e,t,r,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=n}}let Bq,Qq=null;function zq(e){if(e.setActive)return e.setActive();if(Qq)return e.focus(Qq);let t=[];for(let r=e;r&&(t.push(r,r.scrollTop,r.scrollLeft),r!=r.ownerDocument);r=r.parentNode);if(e.focus(null==Qq?{get preventScroll(){return Qq={preventScroll:!0},!0}}:void 0),!Qq){Qq=!1;for(let e=0;e<t.length;){let r=t[e++],n=t[e++],o=t[e++];r.scrollTop!=n&&(r.scrollTop=n),r.scrollLeft!=o&&(r.scrollLeft=o)}}}function Uq(e,t,r=t){let n=Bq||(Bq=document.createRange());return n.setEnd(e,r),n.setStart(e,t),n}function Fq(e,t,r){let n={key:t,code:t,keyCode:r,which:r,cancelable:!0},o=new KeyboardEvent("keydown",n);o.synthetic=!0,e.dispatchEvent(o);let i=new KeyboardEvent("keyup",n);return i.synthetic=!0,e.dispatchEvent(i),o.defaultPrevented||i.defaultPrevented}function Wq(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function Yq(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}class Vq{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new Vq(e.parentNode,$q(e),t)}static after(e,t){return new Vq(e.parentNode,$q(e)+1,t)}}const Xq=[];class Hq{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let r of this.children){if(r==e)return t;t+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let r,n=this.dom,o=null;for(let i of this.children){if(7&i.flags){if(!i.dom&&(r=o?o.nextSibling:n.firstChild)){let e=Hq.get(r);(!e||!e.parent&&e.canReuseDOM(i))&&i.reuseDOM(r)}i.sync(e,t),i.flags&=-8}if(r=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=i.dom&&(t.written=!0),i.dom.parentNode==n)for(;r&&r!=i.dom;)r=Gq(r);else n.insertBefore(i.dom,r);o=i.dom}for(r=o?o.nextSibling:n.firstChild,r&&t&&t.node==n&&(t.written=!0);r;)r=Gq(r)}else if(1&this.flags)for(let r of this.children)7&r.flags&&(r.sync(e,t),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let r;if(e==this.dom)r=this.dom.childNodes[t];else{let n=0==Nq(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}r=n<0?e:e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Hq.get(r);)r=r.nextSibling;if(!r)return this.length;for(let e=0,t=0;;e++){let n=this.children[e];if(n.dom==r)return t;t+=n.length+n.breakAfter}}domBoundsAround(e,t,r=0){let n=-1,o=-1,i=-1,a=-1;for(let s=0,l=r,c=r;s<this.children.length;s++){let r=this.children[s],u=l+r.length;if(l<e&&u>t)return r.domBoundsAround(e,t,l);if(u>=e&&-1==n&&(n=s,o=l),l>t&&r.dom.parentNode==this.dom){i=s,a=c;break}c=u,l=u+r.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i<this.children.length&&i>=0?this.children[i].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Xq){this.markDirty();for(let n=e;n<t;n++){let e=this.children[n];e.parent==this&&r.indexOf(e)<0&&e.destroy()}this.children.splice(e,t-e,...r);for(let e=0;e<r.length;e++)r[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Kq(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,r,n,o,i){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.destroy();this.parent=null}}function Gq(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}Hq.prototype.breakAfter=0;class Kq{constructor(e,t,r){this.children=e,this.pos=t,this.i=r,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function Jq(e,t,r,n,o,i,a,s,l){let{children:c}=e,u=c.length?c[t]:null,d=i.length?i[i.length-1]:null,p=d?d.breakAfter:a;if(!(t==n&&u&&!a&&!p&&i.length<2&&u.merge(r,o,i.length?d:null,0==r,s,l))){if(n<c.length){let e=c[n];e&&(o<e.length||e.breakAfter&&(null==d?void 0:d.breakAfter))?(t==n&&(e=e.split(o),o=0),!p&&d&&e.merge(0,o,d,!0,0,l)?i[i.length-1]=e:((o||e.children.length&&!e.children[0].length)&&e.merge(0,o,null,!1,0,l),i.push(e))):(null==e?void 0:e.breakAfter)&&(d?d.breakAfter=1:a=1),n++}for(u&&(u.breakAfter=a,r>0&&(!a&&i.length&&u.merge(r,u.length,i[0],!1,s,0)?u.breakAfter=i.shift().breakAfter:(r<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(r,u.length,null,!1,s,0),t++));t<n&&i.length;)if(c[n-1].become(i[i.length-1]))n--,i.pop(),l=i.length?0:s;else{if(!c[t].become(i[0]))break;t++,i.shift(),s=i.length?0:l}!i.length&&t&&n<c.length&&!c[t-1].breakAfter&&c[n].merge(0,0,c[t-1],!1,s,l)&&t--,(t<n||i.length)&&e.replaceChildren(t,n,i)}}function eT(e,t,r,n,o,i){let a=e.childCursor(),{i:s,off:l}=a.findPos(r,1),{i:c,off:u}=a.findPos(t,-1),d=t-r;for(let e of n)d+=e.length;e.length+=d,Jq(e,c,u,s,l,n,0,o,i)}let tT="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},rT="undefined"!=typeof document?document:{documentElement:{style:{}}};const nT=/Edge\/(\d+)/.exec(tT.userAgent),oT=/MSIE \d/.test(tT.userAgent),iT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(tT.userAgent),aT=!!(oT||iT||nT),sT=!aT&&/gecko\/(\d+)/i.test(tT.userAgent),lT=!aT&&/Chrome\/(\d+)/.exec(tT.userAgent),cT="webkitFontSmoothing"in rT.documentElement.style,uT=!aT&&/Apple Computer/.test(tT.vendor),dT=uT&&(/Mobile\/\w+/.test(tT.userAgent)||tT.maxTouchPoints>2);var pT={mac:dT||/Mac/.test(tT.platform),windows:/Win/.test(tT.platform),linux:/Linux|X11/.test(tT.platform),ie:aT,ie_version:oT?rT.documentMode||6:iT?+iT[1]:nT?+nT[1]:0,gecko:sT,gecko_version:sT?+(/Firefox\/(\d+)/.exec(tT.userAgent)||[0,0])[1]:0,chrome:!!lT,chrome_version:lT?+lT[1]:0,ios:dT,android:/Android\b/.test(tT.userAgent),webkit:cT,safari:uT,webkit_version:cT?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=rT.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class hT extends Hq{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,r){return!(8&this.flags||r&&(!(r instanceof hT)||this.length-(t-e)+r.length>256||8&r.flags)||(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),0))}split(e){let t=new hT(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Vq(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,r){let n=e.nodeValue.length;t>n&&(t=n);let o=t,i=t,a=0;0==t&&r<0||t==n&&r>=0?pT.chrome||pT.gecko||(t?(o--,a=1):i<n&&(i++,a=-1)):r<0?o--:i<n&&i++;let s=Uq(e,o,i).getClientRects();if(!s.length)return null;let l=s[(a?a<0:r>=0)?0:s.length-1];return pT.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(e=>e.width))||l),a?Dq(l,a<0):l||null}(this.dom,e,t)}}class fT extends Hq{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let e of t)e.setParent(this)}setAttrs(e){if(Wq(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,n,o,i){return!(r&&(!(r instanceof fT&&r.mark.eq(this.mark))||e&&o<=0||t<this.length&&i<=0)||(eT(this,e,t,r?r.children:[],o-1,i-1),this.markDirty(),0))}split(e){let t=[],r=0,n=-1,o=0;for(let i of this.children){let a=r+i.length;a>e&&t.push(r<e?i.split(e-r):i),n<0&&r>=e&&(n=o),r=a,o++}let i=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new fT(this.mark,t,i)}domAtPos(e){return bT(this,e)}coordsAt(e,t){return vT(this,e,t)}}class mT extends Hq{static create(e,t,r){return new mT(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=mT.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,r,n,o,i){return!(r&&(!(r instanceof mT&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(r?r.length:0)+(this.length-t),0))}become(e){return e instanceof mT&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return RE.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,r=t&&t.state.doc,n=this.posAtStart;return r?r.slice(n,n+this.length):RE.empty}domAtPos(e){return(this.length?0==e:this.side>0)?Vq.before(this.dom):Vq.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let n=this.dom.getClientRects(),o=null;if(!n.length)return null;let i=this.side?this.side<0:e>0;for(let t=i?n.length-1:0;o=n[t],!(e>0?0==t:t==n.length-1||o.top<o.bottom);t+=i?-1:1);return Dq(o,!i)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class gT extends Hq{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof gT&&e.side==this.side}split(){return new gT(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Vq.before(this.dom):Vq.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return RE.empty}get isHidden(){return!0}}function bT(e,t){let r=e.dom,{children:n}=e,o=0;for(let e=0;o<n.length;o++){let i=n[o],a=e+i.length;if(!(a==e&&i.getSide()<=0)){if(t>e&&t<a&&i.dom.parentNode==r)return i.domAtPos(t-e);if(t<=e)break;e=a}}for(let e=o;e>0;e--){let t=n[e-1];if(t.dom.parentNode==r)return t.domAtPos(t.length)}for(let e=o;e<n.length;e++){let t=n[e];if(t.dom.parentNode==r)return t.domAtPos(0)}return new Vq(r,0)}function yT(e,t,r){let n,{children:o}=e;r>0&&t instanceof fT&&o.length&&(n=o[o.length-1])instanceof fT&&n.mark.eq(t.mark)?yT(n,t.children[0],r-1):(o.push(t),t.setParent(e)),e.length+=t.length}function vT(e,t,r){let n=null,o=-1,i=null,a=-1;!function e(t,s){for(let l=0,c=0;l<t.children.length&&c<=s;l++){let u=t.children[l],d=c+u.length;d>=s&&(u.children.length?e(u,s-c):(!i||i.isHidden&&r>0)&&(d>s||c==d&&u.getSide()>0)?(i=u,a=s-c):(c<s||c==d&&u.getSide()<0&&!u.isHidden)&&(n=u,o=s-c)),c=d}}(e,t);let s=(r<0?n:i)||n||i;return s?s.coordsAt(Math.max(0,s==n?o:a),r):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let r=Rq(t);return r[r.length-1]||null}(e)}function OT(e,t){for(let r in e)"class"==r&&t.class?t.class+=" "+e.class:"style"==r&&t.style?t.style+=";"+e.style:t[r]=e[r];return t}hT.prototype.children=mT.prototype.children=gT.prototype.children=Xq;const wT=Object.create(null);function AT(e,t,r){if(e==t)return!0;e||(e=wT),t||(t=wT);let n=Object.keys(e),o=Object.keys(t);if(n.length-(r&&n.indexOf(r)>-1?1:0)!=o.length-(r&&o.indexOf(r)>-1?1:0))return!1;for(let i of n)if(i!=r&&(-1==o.indexOf(i)||e[i]!==t[i]))return!1;return!0}function xT(e,t,r){let n=!1;if(t)for(let o in t)r&&o in r||(n=!0,"style"==o?e.style.cssText="":e.removeAttribute(o));if(r)for(let o in r)t&&t[o]==r[o]||(n=!0,"style"==o?e.style.cssText=r[o]:e.setAttribute(o,r[o]));return n}function kT(e){let t=Object.create(null);for(let r=0;r<e.attributes.length;r++){let n=e.attributes[r];t[n.name]=n.value}return t}class CT extends Hq{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,n,o,i){if(r){if(!(r instanceof CT))return!1;this.dom||r.transferDOM(this)}return n&&this.setDeco(r?r.attrs:null),eT(this,e,t,r?r.children:[],o,i),!0}split(e){let t=new CT;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:r,off:n}=this.childPos(e);n&&(t.append(this.children[r].split(n),0),this.children[r].merge(n,this.children[r].length,null,!1,0,0),r++);for(let e=r;e<this.children.length;e++)t.append(this.children[e],0);for(;r>0&&0==this.children[r-1].length;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){AT(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){yT(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=OT(t,this.attrs||{})),r&&(this.attrs=OT({class:r},this.attrs||{}))}domAtPos(e){return bT(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?4&this.flags&&(Wq(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(xT(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&Hq.get(n)instanceof fT;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(r=Hq.get(n))||void 0===r?void 0:r.isEditable)||pT.ios&&this.children.some((e=>e instanceof hT))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let r of this.children){if(!(r instanceof hT)||/[^ -~]/.test(r.text))return null;let n=Rq(r.dom);if(1!=n.length)return null;t+=n[0].width,e=n[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let r=vT(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=r.bottom-r.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let n=(t-e.textHeight)/2;return{top:r.top+n,bottom:r.bottom-n,left:r.left,right:r.left}}}return r}become(e){return!1}covers(){return!0}static find(e,t){for(let r=0,n=0;r<e.children.length;r++){let o=e.children[r],i=n+o.length;if(i>=t){if(o instanceof CT)return o;if(i>t)break}n=i+o.breakAfter}return null}}class ST extends Hq{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,n,o,i){return!(r&&(!(r instanceof ST&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(r?r.length:0)+(this.length-t),0))}domAtPos(e){return 0==e?Vq.before(this.dom):Vq.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let r=new ST(this.widget,t,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return Xq}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):RE.empty}domBoundsAround(){return null}become(e){return e instanceof ST&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:r}=this.deco;return t!=r&&(e<0?t<0:r>0)}}class _T{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}destroy(e){}}var ET=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(ET||(ET={}));class PT extends eq{constructor(e,t,r,n){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=n}get heightRelevant(){return!1}static mark(e){return new qT(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new jT(e,t,t,r,e.widget||null,!1)}static replace(e){let t,r,n=!!e.block;if(e.isBlockGap)t=-5e8,r=4e8;else{let{start:o,end:i}=RT(e,n);t=(o?n?-3e8:-1:5e8)-1,r=1+(i?n?2e8:1:-6e8)}return new jT(e,t,r,n,e.widget||null,!0)}static line(e){return new TT(e)}static set(e,t=!1){return oq.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}PT.none=oq.empty;class qT extends PT{constructor(e){let{start:t,end:r}=RT(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof qT&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(r=e.attrs)||void 0===r?void 0:r.class))&&AT(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}qT.prototype.point=!1;class TT extends PT{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof TT&&this.spec.class==e.spec.class&&AT(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}TT.prototype.mapMode=rP.TrackBefore,TT.prototype.point=!0;class jT extends PT{constructor(e,t,r,n,o,i){super(t,r,o,e),this.block=n,this.isReplace=i,this.mapMode=n?t<=0?rP.TrackBefore:rP.TrackAfter:rP.TrackDel}get type(){return this.startSide!=this.endSide?ET.WidgetRange:this.startSide<=0?ET.WidgetBefore:ET.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof jT&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function RT(e,t=!1){let{inclusiveStart:r,inclusiveEnd:n}=e;return null==r&&(r=e.inclusive),null==n&&(n=e.inclusive),{start:null!=r?r:t,end:null!=n?n:t}}function ZT(e,t,r,n=0){let o=r.length-1;o>=0&&r[o]+n>=e?r[o]=Math.max(r[o],t):r.push(e,t)}jT.prototype.point=!0;class $T{constructor(e,t,r,n){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ST&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new CT),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(MT(new gT(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof ST||this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:r,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(r){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(MT(new hT(this.text.slice(this.textOff,this.textOff+n)),t),r),this.atCursorPos=!0,this.textOff+=n,e-=n,r=0}}span(e,t,r,n){this.buildText(t-e,r,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,r,n,o,i){if(this.disallowBlockEffectsFor[i]&&r instanceof jT){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(r instanceof jT)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ST(r.widget||new NT("div"),a,r));else{let i=mT.create(r.widget||new NT("span"),a,a?0:r.startSide),s=this.atCursorPos&&!i.isEditable&&o<=n.length&&(e<t||r.startSide>0),l=!i.isEditable&&(e<t||o>n.length||r.startSide<=0),c=this.getLine();2!=this.pendingBuffer||s||i.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),s&&(c.append(MT(new gT(1),n),o),o=n.length+Math.max(0,o-n.length)),c.append(MT(i,n),o),this.atCursorPos=l,this.pendingBuffer=l?e<t||o>n.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,r,n,o){let i=new $T(e,t,r,o);return i.openEnd=oq.spans(n,t,r,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function MT(e,t){for(let r of t)e=new fT(r,[e],e.length);return e}class NT extends _T{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const DT=mP.define(),LT=mP.define(),IT=mP.define(),BT=mP.define(),QT=mP.define(),zT=mP.define(),UT=mP.define(),FT=mP.define({combine:e=>e.some((e=>e))}),WT=mP.define({combine:e=>e.some((e=>e))});class YT{constructor(e,t="nearest",r="nearest",n=5,o=5,i=!1){this.range=e,this.y=t,this.x=r,this.yMargin=n,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new YT(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new YT(pP.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const VT=BP.define({map:(e,t)=>e.map(t)});function XT(e,t,r){let n=e.facet(BT);n.length?n[0](t):window.onerror?window.onerror(String(t),r,void 0,void 0,t):r?console.error(r+":",t):console.error(t)}const HT=mP.define({combine:e=>!e.length||e[0]});let GT=0;const KT=mP.define();class JT{constructor(e,t,r,n,o){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=n,this.extension=o(this)}static define(e,t){const{eventHandlers:r,eventObservers:n,provide:o,decorations:i}=t||{};return new JT(GT++,e,r,n,(e=>{let t=[KT.of(e)];return i&&t.push(nj.of((t=>{let r=t.plugin(e);return r?i(r):PT.none}))),o&&t.push(o(e)),t}))}static fromClass(e,t){return JT.define((t=>new e(t)),t)}}class ej{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(XT(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){XT(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){XT(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const tj=mP.define(),rj=mP.define(),nj=mP.define(),oj=mP.define(),ij=mP.define();function aj(e,t,r){let n=e.state.facet(ij);if(!n.length)return n;let o=n.map((t=>t instanceof Function?t(e):t)),i=[];return oq.spans(o,t,r,{point(){},span(e,t,r,n){let o=i;for(let i=r.length-1;i>=0;i--,n--){let a,s=r[i].spec.bidiIsolate;if(null!=s)if(n>0&&o.length&&(a=o[o.length-1]).to==e&&a.direction==s)a.to=t,o=a.inner;else{let r={from:e,to:t,direction:s,inner:[]};o.push(r),o=r.inner}}}}),i}const sj=mP.define();function lj(e){let t=0,r=0,n=0,o=0;for(let i of e.state.facet(sj)){let a=i(e);a&&(null!=a.left&&(t=Math.max(t,a.left)),null!=a.right&&(r=Math.max(r,a.right)),null!=a.top&&(n=Math.max(n,a.top)),null!=a.bottom&&(o=Math.max(o,a.bottom)))}return{left:t,right:r,top:n,bottom:o}}const cj=mP.define();class uj{constructor(e,t,r,n){this.fromA=e,this.toA=t,this.fromB=r,this.toB=n}join(e){return new uj(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>r.toA)){if(n.toA<r.fromA)break;r=r.join(n),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(0==t.length)return e;let r=[];for(let n=0,o=0,i=0,a=0;;n++){let s=n==e.length?null:e[n],l=i-a,c=s?s.fromB:1e9;for(;o<t.length&&t[o]<c;){let e=t[o],n=t[o+1],i=Math.max(a,e),s=Math.min(c,n);if(i<=s&&new uj(i+l,s+l,i,s).addToSet(r),n>c)break;o+=2}if(!s)return r;new uj(s.fromA,s.toA,s.fromB,s.toB).addToSet(r),i=s.toA,a=s.toB}}}class dj{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=oP.empty(this.startState.doc.length);for(let e of r)this.changes=this.changes.compose(e.changes);let n=[];this.changes.iterChangedRanges(((e,t,r,o)=>n.push(new uj(e,t,r,o)))),this.changedRanges=n}static create(e,t,r){return new dj(e,t,r)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var pj=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(pj||(pj={}));const hj=pj.LTR,fj=pj.RTL;function mj(e){let t=[];for(let r=0;r<e.length;r++)t.push(1<<+e[r]);return t}const gj=mj("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),bj=mj("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),yj=Object.create(null),vj=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),r=e.charCodeAt(1);yj[t]=r,yj[r]=-t}const Oj=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class wj{get dir(){return this.level%2?fj:hj}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,r,n){let o=-1;for(let i=0;i<e.length;i++){let a=e[i];if(a.from<=t&&a.to>=t){if(a.level==r)return i;(o<0||(0!=n?n<0?a.from<t:a.to>t:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}function Aj(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],o=t[r];if(n.from!=o.from||n.to!=o.to||n.direction!=o.direction||!Aj(n.inner,o.inner))return!1}return!0}const xj=[];function kj(e,t,r,n,o,i,a){let s=n%2?2:1;if(n%2==o%2)for(let l=t,c=0;l<r;){let t=!0,u=!1;if(c==i.length||l<i[c].from){let e=xj[l];e!=s&&(t=!1,u=16==e)}let d=t||1!=s?null:[],p=t?n:n+1,h=l;e:for(;;)if(c<i.length&&h==i[c].from){if(u)break e;let f=i[c];if(!t)for(let e=f.to,t=c+1;;){if(e==r)break e;if(!(t<i.length&&i[t].from==e)){if(xj[e]==s)break e;break}e=i[t++].to}c++,d?d.push(f):(f.from>l&&a.push(new wj(l,f.from,p)),Cj(e,f.direction==hj!=!(p%2)?n+1:n,o,f.inner,f.from,f.to,a),l=f.to),h=f.to}else{if(h==r||(t?xj[h]!=s:xj[h]==s))break;h++}d?kj(e,l,h,n+1,o,d,a):l<h&&a.push(new wj(l,h,p)),l=h}else for(let l=r,c=i.length;l>t;){let r=!0,u=!1;if(!c||l>i[c-1].to){let e=xj[l-1];e!=s&&(r=!1,u=16==e)}let d=r||1!=s?null:[],p=r?n:n+1,h=l;e:for(;;)if(c&&h==i[c-1].to){if(u)break e;let f=i[--c];if(!r)for(let e=f.from,r=c;;){if(e==t)break e;if(!r||i[r-1].to!=e){if(xj[e-1]==s)break e;break}e=i[--r].from}d?d.push(f):(f.to<l&&a.push(new wj(f.to,l,p)),Cj(e,f.direction==hj!=!(p%2)?n+1:n,o,f.inner,f.from,f.to,a),l=f.from),h=f.from}else{if(h==t||(r?xj[h-1]!=s:xj[h-1]==s))break;h--}d?kj(e,h,l,n+1,o,d,a):h<l&&a.push(new wj(h,l,p)),l=h}}function Cj(e,t,r,n,o,i,a){let s=t%2?2:1;!function(e,t,r,n,o){for(let a=0;a<=n.length;a++){let s=a?n[a-1].to:t,l=a<n.length?n[a].from:r,c=a?256:o;for(let t=s,r=c,n=c;t<l;t++){let o=(i=e.charCodeAt(t))<=247?gj[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?bj[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8203?256:64336<=i&&i<=65023?4:8204==i?256:1;512==o?o=r:8==o&&4==n&&(o=16),xj[t]=4==o?2:o,7&o&&(n=o),r=o}for(let e=s,t=c,n=c;e<l;e++){let o=xj[e];if(128==o)e<l-1&&t==xj[e+1]&&24&t?o=xj[e]=t:xj[e]=256;else if(64==o){let o=e+1;for(;o<l&&64==xj[o];)o++;let i=e&&8==t||o<r&&8==xj[o]?1==n?1:8:256;for(let t=e;t<o;t++)xj[t]=i;e=o-1}else 8==o&&1==n&&(xj[e]=1);t=o,7&o&&(n=o)}}var i}(e,o,i,n,s),function(e,t,r,n,o){let i=1==o?2:1;for(let a=0,s=0,l=0;a<=n.length;a++){let c=a?n[a-1].to:t,u=a<n.length?n[a].from:r;for(let t,r,n,a=c;a<u;a++)if(r=yj[t=e.charCodeAt(a)])if(r<0){for(let e=s-3;e>=0;e-=3)if(vj[e+1]==-r){let t=vj[e+2],r=2&t?o:4&t?1&t?i:o:0;r&&(xj[a]=xj[vj[e]]=r),s=e;break}}else{if(189==vj.length)break;vj[s++]=a,vj[s++]=t,vj[s++]=l}else if(2==(n=xj[a])||1==n){let e=n==o;l=e?0:1;for(let t=s-3;t>=0;t-=3){let r=vj[t+2];if(2&r)break;if(e)vj[t+2]|=2;else{if(4&r)break;vj[t+2]|=4}}}}}(e,o,i,n,s),function(e,t,r,n){for(let o=0,i=n;o<=r.length;o++){let a=o?r[o-1].to:e,s=o<r.length?r[o].from:t;for(let l=a;l<s;){let a=xj[l];if(256==a){let a=l+1;for(;;)if(a==s){if(o==r.length)break;a=r[o++].to,s=o<r.length?r[o].from:t}else{if(256!=xj[a])break;a++}let c=1==i,u=c==(1==(a<t?xj[a]:n))?c?1:2:n;for(let t=a,n=o,i=n?r[n-1].to:e;t>l;)t==i&&(t=r[--n].from,i=n?r[n-1].to:e),xj[--t]=u;l=a}else i=a,l++}}}(o,i,n,s),kj(e,o,i,t,r,n,a)}function Sj(e){return[new wj(0,e,0)]}let _j="";function Ej(e,t,r,n,o){var i;let a=n.head-e.from,s=-1;if(0==a){if(!o||!e.length)return null;t[0].level!=r&&(a=t[0].side(!1,r),s=0)}else if(a==e.length){if(o)return null;let e=t[t.length-1];e.level!=r&&(a=e.side(!0,r),s=t.length-1)}s<0&&(s=wj.find(t,a,null!==(i=n.bidiLevel)&&void 0!==i?i:-1,n.assoc));let l=t[s];a==l.side(o,r)&&(l=t[s+=o?1:-1],a=l.side(!o,r));let c=o==(l.dir==r),u=YE(e.text,a,c);if(_j=e.text.slice(Math.min(a,u),Math.max(a,u)),u!=l.side(o,r))return pP.cursor(u+e.from,c?-1:1,l.level);let d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d||l.level==r?d&&d.level<l.level?pP.cursor(d.side(!o,r)+e.from,o?1:-1,d.level):pP.cursor(u+e.from,o?-1:1,l.level):pP.cursor(o?e.to:e.from,o?-1:1,r)}class Pj extends Hq{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new CT],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new uj(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every((({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let n=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?n=this.domChanged.newSel.head:function(e,t){let r=!1;return t&&e.iterChangedRanges(((e,n)=>{e<t.to&&n>t.from&&(r=!0)})),r}(e.changes,this.hasComposition)||e.selectionSet||(n=e.state.selection.main.head));let o=n>-1?function(e,t,r){let n=Tj(e,r);if(!n)return null;let{node:o,from:i,to:a}=n,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(n.from,n.to)!=s)return null;let l=t.invertedDesc,c=new uj(l.mapPos(i),l.mapPos(a),i,a),u=[];for(let t=o.parentNode;;t=t.parentNode){let r=Hq.get(t);if(r instanceof fT)u.push({node:t,deco:r.mark});else{if(r instanceof CT||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:o,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new qT({inclusive:!0,attributes:kT(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:n}=this.hasComposition;r=new uj(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(pT.ie||pT.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,r){let n=new Rj;return oq.compare(e,t,r,n),n.changes}(this.decorations,this.updateDeco(),e.changes);return r=uj.extendWithRanges(r,i),!!(7&this.flags||0!=r.length)&&(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=pT.chrome||pT.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||n.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof ST&&e.widget instanceof qj&&o.push(e.dom);n.updateGaps(o)}updateChildren(e,t,r){let n=r?r.range.addToSet(e.slice()):e,o=this.childCursor(t);for(let e=n.length-1;;e--){let t=e>=0?n[e]:null;if(!t)break;let i,a,s,l,{fromA:c,toA:u,fromB:d,toB:p}=t;if(r&&r.range.fromB<p&&r.range.toB>d){let e=$T.build(this.view.state.doc,d,r.range.fromB,this.decorations,this.dynamicDecorationMap),t=$T.build(this.view.state.doc,r.range.toB,p,this.decorations,this.dynamicDecorationMap);a=e.breakAtStart,s=e.openStart,l=t.openEnd;let n=this.compositionView(r);t.breakAtStart?n.breakAfter=1:t.content.length&&n.merge(n.length,n.length,t.content[0],!1,t.openStart,0)&&(n.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&n.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),i=e.content.concat(n).concat(t.content)}else({content:i,breakAtStart:a,openStart:s,openEnd:l}=$T.build(this.view.state.doc,d,p,this.decorations,this.dynamicDecorationMap));let{i:h,off:f}=o.findPos(u,1),{i:m,off:g}=o.findPos(c,-1);Jq(this,m,g,h,f,i,a,s,l)}r&&this.fixCompositionDOM(r)}compositionView(e){let t=new hT(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new fT(r,[t],t.length);let r=new CT;return r.append(t,0),r}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let r=Hq.get(e);r&&r!=t&&(r.dom=null),t.setDOM(e)},r=this.childPos(e.range.fromB,1),n=this.children[r.i];t(e.line,n);for(let o=e.marks.length-1;o>=-1;o--)r=n.childPos(r.off,1),n=n.children[r.i],t(o>=0?e.marks[o].node:e.text,n)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let r=this.view.root.activeElement,n=r==this.dom,o=!n&&jq(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(n||t||o))return;let i=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(pT.gecko&&a.empty&&!this.hasComposition&&1==(c=s).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null))),s=l=new Vq(e,0),i=!0}var c;let u=this.view.observer.selectionRange;!i&&u.focusNode&&Zq(s.node,s.offset,u.anchorNode,u.anchorOffset)&&Zq(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore((()=>{pT.android&&pT.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let r=e;r&&r!=t;r=r.assignedSlot||r.parentNode)if(1==r.nodeType&&"false"==r.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=qq(this.view.root);if(e)if(a.empty){if(pT.gecko){let e=(t=s.node,n=s.offset,1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(n<t.childNodes.length&&"false"==t.childNodes[n].contentEditable?2:0));if(e&&3!=e){let t=jj(s.node,s.offset,1==e?1:-1);t&&(s=new Vq(t.node,t.offset))}}e.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=a.bidiLevel)}else if(e.extend){e.collapse(s.node,s.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),t.setEnd(l.node,l.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}var t,n;o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())})),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new Vq(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Vq(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=qq(e.root),{anchorNode:n,anchorOffset:o}=e.observer.selectionRange;if(!(r&&t.empty&&t.assoc&&r.modify))return;let i=CT.find(this,t.head);if(!i)return;let a=i.posAtStart;if(t.head==a||t.head==a+i.length)return;let s=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!s||!l||s.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);r.collapse(c.node,c.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&r.collapse(n,o)}moveToLine(e){let t,r=this.dom;if(e.node!=r)return e;for(let n=e.offset;!t&&n<r.childNodes.length;n++){let e=Hq.get(r.childNodes[n]);e instanceof CT&&(t=e.domAtPos(0))}for(let n=e.offset-1;!t&&n>=0;n--){let e=Hq.get(r.childNodes[n]);e instanceof CT&&(t=e.domAtPos(e.length))}return t?new Vq(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=Hq.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(r<e.length||e instanceof CT)break;t++,r=0}return this.children[t].domAtPos(r)}coordsAt(e,t){let r=null,n=0;for(let o=this.length,i=this.children.length-1;i>=0;i--){let a=this.children[i],s=o-a.breakAfter,l=s-a.length;if(s<e)break;l<=e&&(l<e||a.covers(-1))&&(s>e||a.covers(1))&&(!r||a instanceof CT&&!(r instanceof CT&&t>=0))&&(r=a,n=l),o=l}return r?r.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),n=this.children[t];if(!(n instanceof CT))return null;for(;n.children.length;){let{i:e,off:t}=n.childPos(r,1);for(;;e++){if(e==n.children.length)return null;if((n=n.children[e]).length)break}r=t}if(!(n instanceof hT))return null;let o=YE(n.text,r);if(o==r)return null;let i=Uq(n.dom,r,o).getClientRects();for(let e=0;e<i.length;e++){let t=i[e];if(e==i.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:r,to:n}=e,o=this.view.contentDOM.clientWidth,i=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==pj.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>n)break;if(e>=r){let r=c.dom.getBoundingClientRect();if(t.push(r.height),i){let t=c.dom.lastChild,n=t?Rq(t):[];if(n.length){let t=n[n.length-1],i=s?t.right-r.left:r.right-t.left;i>a&&(a=i,this.minWidth=o,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?pj.RTL:pj.LTR}measureTextSize(){for(let e of this.children)if(e instanceof CT){let t=e.measureTextSize();if(t)return t}let e,t,r,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let o=Rq(n.firstChild)[0];e=n.getBoundingClientRect().height,t=o?o.width/27:7,r=o?o.height:e,n.remove()})),{lineHeight:e,charWidth:t,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Kq(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,n=0;;n++){let o=n==t.viewports.length?null:t.viewports[n],i=o?o.from-1:this.length;if(i>r){let n=(t.lineBlockAt(i).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(PT.replace({widget:new qj(n),block:!0,inclusive:!0,isBlockGap:!0}).range(r,i))}if(!o)break;r=o.to+1}return PT.set(e)}updateDeco(){let e=this.view.state.facet(nj).map(((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e));for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}let t,{range:r}=e,n=this.coordsAt(r.head,r.empty?r.assoc:r.head>r.anchor?-1:1);if(!n)return;!r.empty&&(t=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(n={left:Math.min(n.left,t.left),top:Math.min(n.top,t.top),right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)});let o=lj(this.view),i={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,r,n,o,i,a,s){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,p=u==l.body,h=1,f=1;if(p)e=Lq(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();h=t.width/u.offsetWidth,f=t.height/u.offsetHeight,e={left:t.left,right:t.left+u.clientWidth*h,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==o)t.top<e.top?(g=-(e.top-t.top+a),r>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+a)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+a,r<0&&t.top-g<e.top&&(g=-(e.top+g-t.top+a)));else{let n=t.bottom-t.top,i=e.bottom-e.top;g=("center"==o&&n<=i?t.top+n/2-i/2:"start"==o||"center"==o&&r<0?t.top-a:t.bottom-i+a)-e.top}if("nearest"==n?t.left<e.left?(m=-(e.left-t.left+i),r>0&&t.right>e.right+m&&(m=t.right-e.right+m+i)):t.right>e.right&&(m=t.right-e.right+i,r<0&&t.left<e.left+m&&(m=-(e.left+m-t.left+i))):m=("center"==n?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==n==s?t.left-i:t.right-(e.right-e.left)+i)-e.left,m||g)if(p)c.scrollBy(m,g);else{let e=0,r=0;if(g){let e=u.scrollTop;u.scrollTop+=g/f,r=(u.scrollTop-e)*f}if(m){let t=u.scrollLeft;u.scrollLeft+=m/h,e=(u.scrollLeft-t)*h}t={left:t.left-e,top:t.top-r,right:t.right-e,bottom:t.bottom-r},e&&Math.abs(e-m)<1&&(n="nearest"),r&&Math.abs(r-g)<1&&(o="nearest")}if(p)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,i,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==pj.LTR)}}class qj extends _T{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function Tj(e,t){let r=e.observer.selectionRange,n=r.focusNode&&jj(r.focusNode,r.focusOffset,0);if(!n)return null;let o=t-n.offset;return{from:o,to:o+n.node.nodeValue.length,node:n.node}}function jj(e,t,r){if(r<=0)for(let r=e,n=t;;){if(3==r.nodeType)return{node:r,offset:n};if(!(1==r.nodeType&&n>0))break;r=r.childNodes[n-1],n=Nq(r)}if(r>=0)for(let n=e,o=t;;){if(3==n.nodeType)return{node:n,offset:o};if(!(1==n.nodeType&&o<n.childNodes.length&&r>=0))break;n=n.childNodes[o],o=0}return null}let Rj=class{constructor(){this.changes=[]}compareRange(e,t){ZT(e,t,this.changes)}comparePoint(e,t){ZT(e,t,this.changes)}};function Zj(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function $j(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Mj(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function Nj(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Dj(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Lj(e,t,r){let n,o,i,a,s,l,c,u,d=!1;for(let p=e.firstChild;p;p=p.nextSibling){let e=Rq(p);for(let h=0;h<e.length;h++){let f=e[h];o&&Mj(o,f)&&(f=Nj(Dj(f,o.bottom),o.top));let m=Zj(t,f),g=$j(r,f);if(0==m&&0==g)return 3==p.nodeType?Ij(p,t,r):Lj(p,t,r);if(!n||a>g||a==g&&i>m){n=p,o=f,i=m,a=g;let s=g?r<f.top?-1:1:m?t<f.left?-1:1:0;d=!s||(s>0?h<e.length-1:h>0)}0==m?r>f.bottom&&(!c||c.bottom<f.bottom)?(s=p,c=f):r<f.top&&(!u||u.top>f.top)&&(l=p,u=f):c&&Mj(c,f)?c=Dj(c,f.bottom):u&&Mj(u,f)&&(u=Nj(u,f.top))}}if(c&&c.bottom>=r?(n=s,o=c):u&&u.top<=r&&(n=l,o=u),!n)return{node:e,offset:0};let p=Math.max(o.left,Math.min(o.right,t));return 3==n.nodeType?Ij(n,p,r):d&&"false"!=n.contentEditable?Lj(n,p,r):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,n)+(t>=(o.left+o.right)/2?1:0)}}function Ij(e,t,r){let n=e.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;s<n;s++){let n=Uq(e,s,s+1).getClientRects();for(let l=0;l<n.length;l++){let c=n[l];if(c.top==c.bottom)continue;a||(a=t-c.left);let u=(c.top>r?c.top-r:r-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<i){let r=t>=(c.left+c.right)/2,n=r;if((pT.chrome||pT.gecko)&&Uq(e,s).getBoundingClientRect().left==c.right&&(n=!r),u<=0)return{node:e,offset:s+(n?1:0)};o=s+(n?1:0),i=u}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function Bj(e,t,r,n=-1){var o,i;let a,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,p=d-l;if(p<0)return 0;if(p>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,o=!1;a=e.elementAtHeight(p),a.type!=ET.Text;)for(;p=n>0?a.bottom+t:a.top-t,!(p>=0&&p<=c);){if(o)return r?null:0;o=!0,n=-n}d=l+p;let h=a.from;if(h<e.viewport.from)return 0==e.viewport.from?0:r?null:Qj(e,s,a,u,d);if(h>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:r?null:Qj(e,s,a,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(s.left+1,Math.min(s.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,y=-1;if(g&&0!=(null===(o=e.docView.nearest(g))||void 0===o?void 0:o.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:y}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:y}=t),(!e.contentDOM.contains(b)||pT.safari&&function(e,t,r){let n;if(3!=e.nodeType||t!=(n=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return Uq(e,n-1,n).getBoundingClientRect().left>r}(b,y,u)||pT.chrome&&function(e,t,r){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return r-(1==e.nodeType?e.getBoundingClientRect():Uq(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(b,y,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=CT.find(e.docView,h);if(!t)return p>a.top+a.height/2?a.to:a.from;({node:b,offset:y}=Lj(t.dom,u,d))}let v=e.docView.nearest(b);if(!v)return null;if(v.isWidget&&1==(null===(i=v.dom)||void 0===i?void 0:i.nodeType)){let e=v.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?v.posAtStart:v.posAtEnd}return v.localPosFromDOM(b,y)+v.posAtStart}function Qj(e,t,r,n,o){let i=Math.round((n-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&r.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((o-r.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(r.from,r.to);return r.from+bq(a,i,e.state.tabSize)}function zj(e,t){let r=e.lineBlockAt(t);if(Array.isArray(r.type))for(let e of r.type)if(e.to>t||e.to==t&&(e.to==r.to||e.type==ET.Text))return e;return r}function Uj(e,t,r,n){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let s=t,l=null;;){let t=Ej(o,i,a,s,r),c=_j;if(!t){if(o.number==(r?e.state.doc.lines:1))return s;c="\n",o=e.state.doc.line(o.number+(r?1:-1)),i=e.bidiSpans(o),t=pP.cursor(r?o.from:o.to)}if(l){if(!l(c))return s}else{if(!n)return t;l=n(c)}s=t}}function Fj(e,t,r){for(;;){let n=0;for(let o of e)o.between(t-1,t+1,((e,o,i)=>{if(t>e&&t<o){let i=n||r||(t-e<o-t?-1:1);t=i<0?e:o,n=i}}));if(!n)return t}}function Wj(e,t,r){let n=Fj(e.state.facet(oj).map((t=>t(e))),r.from,t.head>r.from?-1:1);return n==r.from?r:pP.cursor(n,n<r.from?1:-1)}class Yj{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,pT.safari&&e.contentDOM.addEventListener("input",(()=>null)),pT.gecko&&function(e){OR.has(e)||(OR.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r,n=t.target;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(r=Hq.get(n))&&r.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let e of r.observers)e(this.view,t);for(let e of r.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Xj(e),r=this.handlers,n=this.view.contentDOM;for(let e in t)if("scroll"!=e){let o=!t[e].handlers.length,i=r[e];i&&o!=!i.handlers.length&&(n.removeEventListener(e,this.handleEvent),i=null),i||n.addEventListener(e,this.handleEvent,{passive:o})}for(let e in r)"scroll"==e||t[e]||n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(27!=e.keyCode&&Kj.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),pT.android&&pT.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!pT.ios||e.synthetic||e.altKey||e.metaKey||!((t=Hj.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||Gj.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,Fq(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(pT.safari&&!pT.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Vj(e,t){return(r,n)=>{try{return t.call(e,n,r)}catch(e){XT(r.state,e)}}}function Xj(e){let t=Object.create(null);function r(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let n in e.domEventHandlers){let o=e.domEventHandlers[n];o&&r(n).handlers.push(Vj(t.value,o))}if(e&&e.domEventObservers)for(let n in e.domEventObservers){let o=e.domEventObservers[n];o&&r(n).observers.push(Vj(t.value,o))}}for(let e in tR)r(e).handlers.push(tR[e]);for(let e in rR)r(e).observers.push(rR[e]);return t}const Hj=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Gj="dthko",Kj=[16,17,18,20,91,92,224,225];function Jj(e){return.7*Math.max(0,e)+8}class eR{constructor(e,t,r,n){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let r=e.parentNode;r&&r!=t.body;)if(1==r.nodeType){if(r.scrollHeight>r.clientHeight||r.scrollWidth>r.clientWidth)return r;r=r.assignedSlot||r.parentNode}else{if(11!=r.nodeType)break;r=r.host}return null}(e.contentDOM),this.atoms=e.state.facet(oj).map((t=>t(e)));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(KP.allowMultipleSelections)&&function(e,t){let r=e.state.facet(DT);return r.length?r[0](t):pT.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:r}=e.state.selection;if(r.empty)return!1;let n=qq(e.root);if(!n||0==n.rangeCount)return!0;let o=n.getRangeAt(0).getClientRects();for(let e=0;e<o.length;e++){let r=o[e];if(r.left<=t.clientX&&r.right>=t.clientX&&r.top<=t.clientY&&r.bottom>=t.clientY)return!0}return!1}(e,t)||1!=fR(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,n=0,o=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},i=lj(this.view);e.clientX-i.left<=o.left+6?r=-Jj(o.left-e.clientX):e.clientX+i.right>=o.right-6&&(r=Jj(e.clientX-o.right)),e.clientY-i.top<=o.top+6?n=-Jj(o.top-e.clientY):e.clientY+i.bottom>=o.bottom-6&&(n=Jj(e.clientY-o.bottom)),this.setScrollSpeed(r,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;r<e.ranges.length;r++){let n=e.ranges[r],o=null;if(n.empty){let e=Fj(this.atoms,n.from,0);e!=n.from&&(o=pP.cursor(e,-1))}else{let e=Fj(this.atoms,n.from,-1),t=Fj(this.atoms,n.to,1);e==n.from&&t==n.to||(o=pP.range(n.from==n.anchor?e:t,n.from==n.head?e:t))}o&&(t||(t=e.ranges.slice()),t[r]=o)}return t?pP.create(t,e.mainIndex):e}select(e){let{view:t}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection)||r.main.assoc!=t.state.selection.main.assoc&&!1===this.dragging)&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const tR=Object.create(null),rR=Object.create(null),nR=pT.ie&&pT.ie_version<15||pT.ios&&pT.webkit_version<604;function oR(e,t){let r,{state:n}=e,o=1,i=n.toText(t),a=i.lines==n.selection.ranges.length;if(null!=gR&&n.selection.ranges.every((e=>e.empty))&&gR==i.toString()){let e=-1;r=n.changeByRange((r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let l=n.toText((a?i.line(o++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:l},range:pP.cursor(r.from+l.length)}}))}else r=a?n.changeByRange((e=>{let t=i.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:pP.cursor(e.from+t.length)}})):n.replaceSelection(i);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}function iR(e,t,r,n){if(1==n)return pP.cursor(t,r);if(2==n)return function(e,t,r=1){let n=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return pP.cursor(t);0==i?r=1:i==o.length&&(r=-1);let a=i,s=i;r<0?a=YE(o.text,i,!1):s=YE(o.text,i);let l=n(o.text.slice(a,s));for(;a>0;){let e=YE(o.text,a,!1);if(n(o.text.slice(e,a))!=l)break;a=e}for(;s<o.length;){let e=YE(o.text,s);if(n(o.text.slice(s,e))!=l)break;s=e}return pP.range(a+o.from,s+o.from)}(e.state,t,r);{let r=CT.find(e.docView,t),n=e.state.doc.lineAt(r?r.posAtEnd:t),o=r?r.posAtStart:n.from,i=r?r.posAtEnd:n.to;return i<e.state.doc.length&&i==n.to&&i++,pP.range(o,i)}}rR.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},tR.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),rR.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},rR.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},tR.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let r=null;for(let n of e.state.facet(IT))if(r=n(e,t),r)break;if(r||0!=t.button||(r=function(e,t){let r=cR(e,t),n=fR(t),o=e.state.selection;return{update(e){e.docChanged&&(r.pos=e.changes.mapPos(r.pos),o=o.map(e.changes))},get(t,i,a){let s,l=cR(e,t),c=iR(e,l.pos,l.bias,n);if(r.pos!=l.pos&&!i){let t=iR(e,r.pos,r.bias,n),o=Math.min(t.from,c.from),i=Math.max(t.to,c.to);c=o<c.from?pP.range(o,i):pP.range(i,o)}return i?o.replaceRange(o.main.extend(c.from,c.to)):a&&1==n&&o.ranges.length>1&&(s=function(e,t){for(let r=0;r<e.ranges.length;r++){let{from:n,to:o}=e.ranges[r];if(n<=t&&o>=t)return pP.create(e.ranges.slice(0,r).concat(e.ranges.slice(r+1)),e.mainIndex==r?0:e.mainIndex-(e.mainIndex>r?1:0))}return null}(o,l.pos))?s:a?o.addRange(c):pP.create([c])}}}(e,t)),r){let n=!e.hasFocus;e.inputState.startMouseSelection(new eR(e,t,r,n)),n&&e.observer.ignore((()=>zq(e.contentDOM)));let o=e.inputState.mouseSelection;if(o)return o.start(t),!1===o.dragging}return!1};let aR=(e,t)=>e>=t.top&&e<=t.bottom,sR=(e,t,r)=>aR(t,r)&&e>=r.left&&e<=r.right;function lR(e,t,r,n){let o=CT.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&sR(r,n,a))return-1;let s=o.coordsAt(i,1);return s&&sR(r,n,s)?1:a&&aR(n,a)?-1:1}function cR(e,t){let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:r,bias:lR(e,r,t.clientX,t.clientY)}}const uR=pT.ie&&pT.ie_version<=11;let dR=null,pR=0,hR=0;function fR(e){if(!uR)return e.detail;let t=dR,r=hR;return dR=e,hR=Date.now(),pR=!t||r>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(pR+1)%3:1}function mR(e,t,r,n){if(!r)return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=n&&i&&function(e,t){let r=e.state.facet(LT);return r.length?r[0](t):pT.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:r},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}tR.dragstart=(e,t)=>{let{selection:{main:r}}=e.state;if(t.target.draggable){let n=e.docView.nearest(t.target);if(n&&n.isWidget){let e=n.posAtStart,t=e+n.length;(e>=r.to||t<=r.from)&&(r=pP.range(e,t))}}let{inputState:n}=e;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=r,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(r.from,r.to)),t.dataTransfer.effectAllowed="copyMove"),!1},tR.dragend=e=>(e.inputState.draggedContent=null,!1),tR.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let r=t.dataTransfer.files;if(r&&r.length){let n=Array(r.length),o=0,i=()=>{++o==r.length&&mR(e,t,n.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e<r.length;e++){let t=new FileReader;t.onerror=i,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),i()},t.readAsText(r[e])}return!0}{let r=t.dataTransfer.getData("Text");if(r)return mR(e,t,r,!0),!0}return!1},tR.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let r=nR?null:t.clipboardData;return r?(oR(e,r.getData("text/plain")||r.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.remove(),oR(e,r.value)}),50)}(e),!1)};let gR=null;tR.copy=tR.cut=(e,t)=>{let{text:r,ranges:n,linewise:o}=function(e){let t=[],r=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),r.push(n));if(!t.length){let o=-1;for(let{from:n}of e.selection.ranges){let i=e.doc.lineAt(n);i.number>o&&(t.push(i.text),r.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}n=!0}return{text:t.join(e.lineBreak),ranges:r,linewise:n}}(e.state);if(!r&&!o)return!1;gR=o?r:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let i=nR?null:t.clipboardData;return i?(i.clearData(),i.setData("text/plain",r),!0):(function(e,t){let r=e.dom.parentNode;if(!r)return;let n=r.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout((()=>{n.remove(),e.focus()}),50)}(e,r),!1)};const bR=DP.define();function yR(e,t){let r=[];for(let n of e.facet(UT)){let o=n(e,t);o&&r.push(o)}return r?e.update({effects:r,annotations:bR.of(!0)}):null}function vR(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let r=yR(e.state,t);r?e.dispatch(r):e.update([])}}),10)}rR.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),vR(e)},rR.blur=e=>{e.observer.clearSelectionRange(),vR(e)},rR.compositionstart=rR.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},rR.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,pT.chrome&&pT.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},rR.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},tR.beforeinput=(e,t)=>{var r;let n;if(pT.chrome&&pT.android&&(n=Hj.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var r;((null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return!1};const OR=new Set,wR=["pre-wrap","normal","pre-line","break-spaces"];class AR{constructor(e){this.lineWrapping=e,this.doc=RE.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return wR.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let n=e[r];n<0?r++:this.heightSamples[Math.floor(10*n)]||(t=!0,this.heightSamples[Math.floor(10*n)]=!0)}return t}refresh(e,t,r,n,o,i){let a=wR.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=r,this.textHeight=n,this.lineLength=o,s){this.heightSamples={};for(let e=0;e<i.length;e++){let t=i[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return s}}class xR{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class kR{constructor(e,t,r,n,o){this.from=e,this.length=t,this.top=r,this.height=n,this._content=o}get type(){return"number"==typeof this._content?ET.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof jT?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new kR(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var CR=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(CR||(CR={}));const SR=.001;class _R{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>SR&&(e.heightChanged=!0),this.height=t)}replace(e,t,r){return _R.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,n){let o=this,i=r.doc;for(let a=n.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:c,toB:u}=n[a],d=o.lineAt(s,CR.ByPosNoHeight,r.setDoc(t),0,0),p=d.to>=l?d:o.lineAt(l,CR.ByPosNoHeight,r,0,0);for(u+=p.to-l,l=p.to;a>0&&d.from<=n[a-1].toA;)s=n[a-1].fromA,c=n[a-1].fromB,a--,s<d.from&&(d=o.lineAt(s,CR.ByPosNoHeight,r,0,0));c+=d.from-s,s=d.from;let h=RR.build(r.setDoc(i),e,c,u);o=o.replace(s,l,h)}return o.updateHeight(r,0)}static empty(){return new PR(0,0)}static of(e){if(1==e.length)return e[0];let t=0,r=e.length,n=0,o=0;for(;;)if(t==r)if(n>2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),r+=1+o.break,n-=o.size}else{if(!(o>2*n))break;{let t=e[r];t.break?e.splice(r,1,t.left,null,t.right):e.splice(r,1,t.left,t.right),r+=2+t.break,o-=t.size}}else if(n<o){let r=e[t++];r&&(n+=r.size)}else{let t=e[--r];t&&(o+=t.size)}let i=0;return null==e[t-1]?(i=1,t--):null==e[t]&&(i=1,r++),new TR(_R.of(e.slice(0,t)),i,_R.of(e.slice(r)))}}_R.prototype.size=1;class ER extends _R{constructor(e,t,r){super(e,t),this.deco=r}blockAt(e,t,r,n){return new kR(n,this.length,r,this.height,this.deco||0)}lineAt(e,t,r,n,o){return this.blockAt(0,r,n,o)}forEachLine(e,t,r,n,o,i){e<=o+this.length&&t>=o&&i(this.blockAt(0,r,n,o))}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class PR extends ER{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,n){return new kR(n,this.length,r,this.height,this.breaks)}replace(e,t,r){let n=r[0];return 1==r.length&&(n instanceof PR||n instanceof qR&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof qR?n=new PR(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):_R.of(r)}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more?this.setHeight(e,n.heights[n.index++]):(r||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class qR extends _R{constructor(e){super(e,0)}heightMetrics(e,t){let r,n=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-n+1,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);r=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else r=this.height/i;return{firstLine:n,lastLine:o,perLine:r,perChar:a}}blockAt(e,t,r,n){let{firstLine:o,lastLine:i,perLine:a,perChar:s}=this.heightMetrics(t,n);if(t.lineWrapping){let o=n+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),i=t.doc.lineAt(o),l=a+i.length*s,c=Math.max(r,e-l/2);return new kR(i.from,i.length,c,l,0)}{let n=Math.max(0,Math.min(i-o,Math.floor((e-r)/a))),{from:s,length:l}=t.doc.line(o+n);return new kR(s,l,r+a*n,a,0)}}lineAt(e,t,r,n,o){if(t==CR.ByHeight)return this.blockAt(e,r,n,o);if(t==CR.ByPosNoHeight){let{from:t,to:n}=r.doc.lineAt(e);return new kR(t,n-t,0,0,0)}let{firstLine:i,perLine:a,perChar:s}=this.heightMetrics(r,o),l=r.doc.lineAt(e),c=a+l.length*s,u=l.number-i,d=n+a*u+s*(l.from-o-u);return new kR(l.from,l.length,Math.max(n,Math.min(d,n+this.height-c)),c,0)}forEachLine(e,t,r,n,o,i){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(r,o);for(let c=e,u=n;c<=t;){let t=r.doc.lineAt(c);if(c==e){let r=t.number-a;u+=s*r+l*(e-o-r)}let n=s+l*t.length;i(new kR(t.from,t.length,u,n,0)),u+=n,c=t.to+1}}replace(e,t,r){let n=this.length-t;if(n>0){let e=r[r.length-1];e instanceof qR?r[r.length-1]=new qR(e.length+n):r.push(null,new qR(n-1))}if(e>0){let t=r[0];t instanceof qR?r[0]=new qR(e+t.length):r.unshift(new qR(e-1),null)}return _R.of(r)}decomposeLeft(e,t){t.push(new qR(e-1),null)}decomposeRight(e,t){t.push(null,new qR(this.length-e-1))}updateHeight(e,t=0,r=!1,n){let o=t+this.length;if(n&&n.from<=t+this.length&&n.more){let r=[],i=Math.max(t,n.from),a=-1;for(n.from>t&&r.push(new qR(n.from-t-1).updateHeight(e,t));i<=o&&n.more;){let t=e.doc.lineAt(i).length;r.length&&r.push(null);let o=n.heights[n.index++];-1==a?a=o:Math.abs(o-a)>=SR&&(a=-2);let s=new PR(t,o);s.outdated=!1,r.push(s),i+=t+1}i<=o&&r.push(null,new qR(o-i).updateHeight(e,i));let s=_R.of(r);return(a<0||Math.abs(s.height-this.height)>=SR||Math.abs(a-this.heightMetrics(e,t).perLine)>=SR)&&(e.heightChanged=!0),s}return(r||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class TR extends _R{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return 1&this.flags}blockAt(e,t,r,n){let o=r+this.left.height;return e<o?this.left.blockAt(e,t,r,n):this.right.blockAt(e,t,o,n+this.left.length+this.break)}lineAt(e,t,r,n,o){let i=n+this.left.height,a=o+this.left.length+this.break,s=t==CR.ByHeight?e<i:e<a,l=s?this.left.lineAt(e,t,r,n,o):this.right.lineAt(e,t,r,i,a);if(this.break||(s?l.to<a:l.from>a))return l;let c=t==CR.ByPosNoHeight?CR.ByPosNoHeight:CR.ByPos;return s?l.join(this.right.lineAt(a,c,r,i,a)):this.left.lineAt(a,c,r,n,o).join(l)}forEachLine(e,t,r,n,o,i){let a=n+this.left.height,s=o+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,r,n,o,i),t>=s&&this.right.forEachLine(e,t,r,a,s,i);else{let l=this.lineAt(s,CR.ByPos,r,n,o);e<l.from&&this.left.forEachLine(e,l.from-1,r,n,o,i),l.to>=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,r,a,s,i)}}replace(e,t,r){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,r));let o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of r)o.push(e);if(e>0&&jR(o,i-1),t<this.length){let e=o.length;this.decomposeRight(t,o),jR(o,e)}return _R.of(o)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,n=r+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?_R.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,n){let{left:o,right:i}=this,a=t+o.length+this.break,s=null;return n&&n.from<=t+o.length&&n.more?s=o=o.updateHeight(e,t,r,n):o.updateHeight(e,t,r),n&&n.from<=a+i.length&&n.more?s=i=i.updateHeight(e,a,r,n):i.updateHeight(e,a,r),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function jR(e,t){let r,n;null==e[t]&&(r=e[t-1])instanceof qR&&(n=e[t+1])instanceof qR&&e.splice(t-1,3,new qR(r.length+1+n.length))}class RR{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof PR?r.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new PR(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let n=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let i=t-e;r.block?this.addBlock(new ER(i,n,r)):(i||o||n>=5)&&this.addLineDeco(n,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new PR(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new qR(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof PR)return e;let t=new PR(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let n=this.ensureLine();n.length+=r,n.collapsed+=r,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof PR||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new PR(0,-1));let r=e;for(let e of this.nodes)e instanceof PR&&e.updateHeight(this.oracle,r),r+=e?e.length:1;return this.nodes}static build(e,t,r,n){let o=new RR(r,e);return oq.spans(t,r,n,o,0),o.finish(r)}}class ZR{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,n){(e<t||r&&r.heightRelevant||n&&n.heightRelevant)&&ZT(e,t,this.changes,5)}}function $R(e,t){let r=e.getBoundingClientRect(),n=e.ownerDocument,o=n.defaultView||window,i=Math.max(0,r.left),a=Math.min(o.innerWidth,r.right),s=Math.max(0,r.top),l=Math.min(o.innerHeight,r.bottom);for(let t=e.parentNode;t&&t!=n.body;)if(1==t.nodeType){let r=t,n=window.getComputedStyle(r);if((r.scrollHeight>r.clientHeight||r.scrollWidth>r.clientWidth)&&"visible"!=n.overflow){let n=r.getBoundingClientRect();i=Math.max(i,n.left),a=Math.min(a,n.right),s=Math.max(s,n.top),l=t==e.parentNode?n.bottom:Math.min(l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?r.offsetParent:r.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:i-r.left,right:Math.max(i,a)-r.left,top:s-(r.top+t),bottom:Math.max(s,l)-(r.top+t)}}function MR(e,t){let r=e.getBoundingClientRect();return{left:0,right:r.right-r.left,top:t,bottom:r.bottom-(r.top+t)}}class NR{constructor(e,t,r){this.from=e,this.to=t,this.size=r}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],o=t[r];if(n.from!=o.from||n.to!=o.to||n.size!=o.size)return!1}return!0}draw(e,t){return PT.replace({widget:new DR(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class DR extends _T{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class LR{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=UR,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=pj.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(rj).some((e=>"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new AR(t),this.stateDeco=e.facet(nj).filter((e=>"function"!=typeof e)),this.heightMap=_R.empty().applyChanges(this.stateDeco,RE.empty,this.heightOracle.setDoc(e.doc),[new uj(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=PT.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let n=r?t.head:t.anchor;if(!e.some((({from:e,to:t})=>n>=e&&n<=t))){let{from:t,to:r}=this.lineBlockAt(n);e.push(new IR(t,r))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?UR:new FR(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:WR(e,this.scaler))}))}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(nj).filter((e=>"function"!=typeof e));let n=e.changedRanges,o=uj.extendWithRanges(n,function(e,t,r){let n=new ZR;return oq.compare(e,t,r,n,0),n.changes}(r,this.stateDeco,e?e.changes:oP.empty(this.state.doc.length))),i=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=i&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(WT)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),n=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection="rtl"==r.direction?pj.RTL:pj.LTR;let i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,c=0;if(a.width&&a.height){let e=a.width/t.offsetWidth,r=a.height/t.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(a.width-t.offsetWidth)<1)&&(e=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(a.height-t.offsetHeight)<1)&&(r=1),this.scaleX==e&&this.scaleY==r||(this.scaleX=e,this.scaleY=r,l|=8,i=s=!0)}let u=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=Yq(e.scrollDOM);let h=(this.printing?MR:$R)(t,this.paddingTop),f=h.top-this.pixelViewport.top,m=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget)return 0;let b=a.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(t)&&(i=!0),i||n.lineWrapping&&Math.abs(b-this.contentDOMWidth)>n.charWidth){let{lineHeight:r,charWidth:a,textHeight:s}=e.docView.measureTextSize();i=r>0&&n.refresh(o,r,a,s,b/a,t),i&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),n.heightChanged=!1;for(let r of this.viewports){let o=r.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(r);this.heightMap=(i?_R.empty().applyChanges(this.stateDeco,RE.empty,this.heightOracle,[new uj(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,i,new xR(r.from,o))}n.heightChanged&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,o=this.heightOracle,{visibleTop:i,visibleBottom:a}=this,s=new IR(n.lineAt(i-1e3*r,CR.ByHeight,o,0,0).from,n.lineAt(a+1e3*(1-r),CR.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let r,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=n.lineAt(e,CR.ByPos,o,0,0);r="center"==t.y?(a.top+a.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<s.from?a.top:a.bottom-i,s=new IR(n.lineAt(r-500,CR.ByHeight,o,0,0).from,n.lineAt(r+i+500,CR.ByHeight,o,0,0).to)}}return s}mapViewport(e,t){let r=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new IR(this.heightMap.lineAt(r,CR.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,CR.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,CR.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(t,CR.ByPos,this.heightOracle,0,0),{visibleTop:i,visibleBottom:a}=this;return(0==e||n<=i-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&n>i-2e3&&o<a+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let n of e)t.touchesRange(n.from,n.to)||r.push(new NR(t.mapPos(n.from),t.mapPos(n.to),n.size));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,n=r?1e4:2e3,o=n>>1,i=n<<1;if(this.defaultTextDirection!=pj.LTR&&!r)return[];let a=[],s=(n,i,l,c)=>{if(i-n<o)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>n&&e<i)return s(n,e-10,l,c),void s(e+10,i,l,c);let p=function(e,t){for(let r of e)if(t(r))return r}(e,(e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)<o&&Math.abs(e.to-i)<o&&!d.some((t=>e.from<t&&e.to>t))));if(!p){if(i<l.to&&t&&r&&t.visibleRanges.some((e=>e.from<=i&&e.to>=i))){let e=t.moveToLineBoundary(pP.cursor(i),!1,!0).head;e>n&&(i=e)}p=new NR(n,i,this.gapSize(l,n,i,c))}a.push(p)};for(let e of this.viewportLines){if(e.length<i)continue;let t=BR(e.from,e.to,this.stateDeco);if(t.total<i)continue;let o,a,l=this.scrollTarget?this.scrollTarget.range.head:null;if(r){let r,i,s=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let n=zR(t,l),o=((this.visibleBottom-this.visibleTop)/2+s)/e.height;r=n-o,i=n+o}else r=(this.visibleTop-e.top-s)/e.height,i=(this.visibleBottom-e.top+s)/e.height;o=QR(t,r),a=QR(t,i)}else{let e,r,i=t.total*this.heightOracle.charWidth,s=n*this.heightOracle.charWidth;if(null!=l){let n=zR(t,l),o=((this.pixelViewport.right-this.pixelViewport.left)/2+s)/i;e=n-o,r=n+o}else e=(this.pixelViewport.left-s)/i,r=(this.pixelViewport.right+s)/i;o=QR(t,e),a=QR(t,r)}o>e.from&&s(e.from,o,e,t),a<e.to&&s(a,e.to,e,t)}return a}gapSize(e,t,r,n){let o=zR(n,r)-zR(n,t);return this.heightOracle.lineWrapping?e.height*o:n.total*this.heightOracle.charWidth*o}updateLineGaps(e){NR.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=PT.set(e.map((e=>e.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];oq.spans(e,this.viewport.from,this.viewport.to,{span(e,r){t.push({from:e,to:r})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,r)=>e.from!=t[r].from||e.to!=t[r].to));return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||WR(this.heightMap.lineAt(e,CR.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return WR(this.heightMap.lineAt(this.scaler.fromDOM(e),CR.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return WR(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class IR{constructor(e,t){this.from=e,this.to=t}}function BR(e,t,r){let n=[],o=e,i=0;return oq.spans(r,e,t,{span(){},point(e,t){e>o&&(n.push({from:o,to:e}),i+=e-o),o=t}},20),o<t&&(n.push({from:o,to:t}),i+=t-o),{total:i,ranges:n}}function QR({total:e,ranges:t},r){if(r<=0)return t[0].from;if(r>=1)return t[t.length-1].to;let n=Math.floor(e*r);for(let e=0;;e++){let{from:r,to:o}=t[e],i=o-r;if(n<=i)return r+n;n-=i}}function zR(e,t){let r=0;for(let{from:n,to:o}of e.ranges){if(t<=o){r+=t-n;break}r+=o-n}return r/e.total}const UR={toDOM:e=>e,fromDOM:e=>e,scale:1};class FR{constructor(e,t,r){let n=0,o=0,i=0;this.viewports=r.map((({from:r,to:o})=>{let i=t.lineAt(r,CR.ByPos,e,0,0).top,a=t.lineAt(o,CR.ByPos,e,0,0).bottom;return n+=a-i,{from:r,to:o,top:i,bottom:a,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(t.height-n);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let t=0,r=0,n=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return n+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,n=o.domBottom}}fromDOM(e){for(let t=0,r=0,n=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return r+(e-n)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,n=o.domBottom}}}function WR(e,t){if(1==t.scale)return e;let r=t.toDOM(e.top),n=t.toDOM(e.bottom);return new kR(e.from,e.length,r,n-r,Array.isArray(e._content)?e._content.map((e=>WR(e,t))):e._content)}const YR=mP.define({combine:e=>e.join(" ")}),VR=mP.define({combine:e=>e.indexOf(!0)>-1}),XR=wq.newName(),HR=wq.newName(),GR=wq.newName(),KR={"&light":"."+HR,"&dark":"."+GR};function JR(e,t,r){return new wq(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!r||!r[t])throw new RangeError(`Unsupported selector: ${t}`);return r[t]})):e+" "+t})}const eZ=JR("."+XR,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},KR),tZ="";class rZ{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(KP.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=tZ}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let n=e;;){this.findPointBefore(r,n);let e=this.text.length;this.readNode(n);let o=n.nextSibling;if(o==t)break;let i=Hq.get(n),a=Hq.get(o);(i&&a?i.breakAfter:(i?i.breakAfter:oZ(n))||oZ(o)&&("BR"!=n.nodeName||n.cmIgnore)&&this.text.length>e)&&this.lineBreak(),n=o}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let o,i=-1,a=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(o=n.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(r,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);r=i+a}}readNode(e){if(e.cmIgnore)return;let t=Hq.get(e),r=t&&t.overrideDOMText;if(null!=r){this.findPointInside(e,r.length);for(let e=r.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(3==e.nodeType?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(nZ(e,r.node,r.offset)?t:0))}}function nZ(e,t,r){for(;;){if(!t||r<Nq(t))return!1;if(t==e)return!0;r=$q(t)+1,t=t.parentNode}}function oZ(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class iZ{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class aZ{constructor(e,t,r,n){this.typeOver=n,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:i}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let t=o||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:r,anchorOffset:n,focusNode:o,focusOffset:i}=e.observer.selectionRange;return r&&(t.push(new iZ(r,n)),o==r&&i==n||t.push(new iZ(o,i))),t}(e),r=new rZ(t,e.state);r.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=r.text,this.newSel=function(e,t){if(0==e.length)return null;let r=e[0].pos,n=2==e.length?e[1].pos:r;return r>-1&&n>-1?pP.single(r+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,r=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!Tq(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!Tq(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=pP.single(n,r)}}}function sZ(e,t){let r,{newSel:n}=t,o=e.state.selection.main,i=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:n,to:a}=t.bounds,s=o.from,l=null;(8===i||pT.android&&t.text.length<a-n)&&(s=o.to,l="end");let c=function(e,t,r,n){let o=Math.min(e.length,t.length),i=0;for(;i<o&&e.charCodeAt(i)==t.charCodeAt(i);)i++;if(i==o&&e.length==t.length)return null;let a=e.length,s=t.length;for(;a>0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;return"end"==n&&(r-=a+Math.max(0,i-Math.min(a,s))-i),a<i&&e.length<t.length?(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i):s<i&&(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i),{from:i,toA:a,toB:s}}(e.state.doc.sliceString(n,a,tZ),t.text,s-n,l);c&&(pT.chrome&&13==i&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==tZ+tZ&&c.toB--,r={from:n+c.from,to:n+c.toA,insert:RE.of(t.text.slice(c.from,c.toB).split(tZ))})}else n&&(!e.hasFocus&&e.state.facet(HT)||n.main.eq(o))&&(n=null);if(!r&&!n)return!1;if(!r&&t.typeOver&&!o.empty&&n&&n.main.empty?r={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,o.to)}:r&&r.from>=o.from&&r.to<=o.to&&(r.from!=o.from||r.to!=o.to)&&o.to-o.from-(r.to-r.from)<=4?r={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,r.from).append(r.insert).append(e.state.doc.slice(r.to,o.to))}:(pT.mac||pT.android)&&r&&r.from==r.to&&r.from==o.head-1&&/^\. ?$/.test(r.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(n&&2==r.insert.length&&(n=pP.single(n.main.anchor-1,n.main.head-1)),r={from:o.from,to:o.to,insert:RE.of([" "])}):pT.chrome&&r&&r.from==r.to&&r.from==o.head&&"\n "==r.insert.toString()&&e.lineWrapping&&(n&&(n=pP.single(n.main.anchor-1,n.main.head-1)),r={from:o.from,to:o.to,insert:RE.of([" "])}),r){if(pT.ios&&e.inputState.flushIOSKey())return!0;if(pT.android&&(r.from==o.from&&r.to==o.to&&1==r.insert.length&&2==r.insert.lines&&Fq(e.contentDOM,"Enter",13)||(r.from==o.from-1&&r.to==o.to&&0==r.insert.length||8==i&&r.insert.length<r.to-r.from&&r.to>o.head)&&Fq(e.contentDOM,"Backspace",8)||r.from==o.from&&r.to==o.to+1&&0==r.insert.length&&Fq(e.contentDOM,"Delete",46)))return!0;let t,a=r.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>t||(t=function(e,t,r){let n,o=e.state,i=o.selection.main;if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let r=i.from<t.from?o.sliceDoc(i.from,t.from):"",a=i.to>t.to?o.sliceDoc(t.to,i.to):"";n=o.replaceSelection(e.state.toText(r+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=o.changes(t),s=r&&r.main.to<=a.newLength?r.main:void 0;if(o.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=i.to&&t.to>=i.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=r&&Tj(e,r.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(i.head);let d=i.to-t.to,p=i.to-i.from;n=o.changeByRange((r=>{if(r.from==i.from&&r.to==i.to)return{changes:a,range:s||r.map(a)};let n=r.to-d,u=n-c.length;if(r.to-r.from!=p||e.state.sliceDoc(u,n)!=c||r.to>=l.from&&r.from<=l.to)return{range:r};let h=o.changes({from:u,to:n,insert:t.insert}),f=r.to-i.to;return{changes:h,range:s?pP.range(Math.max(0,s.anchor+f),Math.max(0,s.head+f)):r.map(h)}}))}else n={changes:a,selection:s&&o.selection.replaceRange(s)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),o.update(n,{userEvent:a,scrollIntoView:!0})}(e,r,n));return e.state.facet(zT).some((t=>t(e,r.from,r.to,a,s)))||e.dispatch(s()),!0}if(n&&!n.main.eq(o)){let t=!1,r="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),r=e.inputState.lastSelectionOrigin),e.dispatch({selection:n,scrollIntoView:t,userEvent:r}),!0}return!1}const lZ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},cZ=pT.ie&&pT.ie_version<=11;class uZ{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Iq,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(pT.ie&&pT.ie_version<=11||pT.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),cZ&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,r)=>t!=e[r])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,n=this.selectionRange;if(r.state.facet(HT)?r.root.activeElement!=this.dom:!jq(r.dom,n))return;let o=n.anchorNode&&r.docView.nearest(n.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(pT.ie&&pT.ie_version<=11||pT.android&&pT.chrome)&&!r.state.selection.main.empty&&n.focusNode&&Zq(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=pT.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),!t)return null;let n=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);return Zq(s.node,s.offset,i,a)&&([n,o,i,a]=[i,a,n,o]),{anchorNode:n,anchorOffset:o,focusNode:i,focusOffset:a}}(this.view)||qq(e.root);if(!t||this.selectionRange.eq(t))return!1;let r=jq(this.dom,t);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let r=t.focusNode,n=t.focusOffset;if(!r||t.anchorNode!=r||t.anchorOffset!=n)return!1;for(n=Math.min(n,Nq(r));;)if(n){if(1!=r.nodeType)return!1;let e=r.childNodes[n-1];"false"==e.contentEditable?n--:(r=e,n=Nq(r))}else{if(r==e)return!0;n=$q(r),r=r.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(1==r.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else{if(11!=r.nodeType)break;r=r.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,lZ),cZ&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),cZ&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Fq(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(r=this.delayedAndroidKey)||void 0===r?void 0:r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,n=!1;for(let o of e){let e=this.readMutation(o);e&&(e.typeOver&&(n=!0),-1==t?({from:t,to:r}=e):(t=Math.min(e.from,t),r=Math.max(e.to,r)))}return{from:t,to:r,typeOver:n}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),n=this.selectionChanged&&jq(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new aZ(this.view,e,t,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,n=sZ(this.view,t);return this.view.state==r&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let r=dZ(t,e.previousSibling||e.target.previousSibling,-1),n=dZ(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(r=this.resizeScroll)||void 0===r||r.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function dZ(e,t,r){for(;t;){let n=Hq.get(t);if(n&&n.parent==e)return n;let o=t.parentNode;t=o!=e.dom?o:r>0?t.nextSibling:t.previousSibling}return null}class pZ{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach((e=>t(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new LR(e.state||KP.create(e)),e.scrollTo&&e.scrollTo.is(VT)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(KT).map((e=>new ej(e)));for(let e of this.plugins)e.update(this);this.observer=new uZ(this),this.inputState=new Yj(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Pj(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof QP?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,r=!1,n=!1,o=this.state;for(let t of e){if(t.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=t.state}if(this.destroyed)return void(this.viewState.state=o);let i=this.hasFocus,a=0,s=null;e.some((e=>e.annotation(bR)))?(this.inputState.notifiedFocused=i,a=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,s=yR(o,i),s||(a=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(KP.phrases)!=this.state.facet(KP.phrases))return this.setState(o);t=dj.create(this,o,e),t.flags|=a;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new YT(e.empty?e:pP.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(VT)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=mZ.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),r=this.docView.update(t),this.state.facet(cj)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(YR)!=t.state.facet(YR)&&(this.viewState.mustMeasureContent=!0),(r||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(QT))try{e(t)}catch(e){XT(this.state,e,"update listener")}(s||c)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),c&&!sZ(this,c)&&l.force&&Fq(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new LR(e),this.plugins=e.facet(KT).map((e=>new ej(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Pj(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(KT),r=e.state.facet(KT);if(t!=r){let n=[];for(let o of r){let r=t.indexOf(o);if(r<0)n.push(new ej(o));else{let t=this.plugins[r];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,n=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:i}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(Yq(r))o=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(n);o=e.from,i=e.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map((e=>{try{return e.read(this)}catch(e){return XT(this.state,e),fZ}})),c=dj.create(this,this.state,[]),u=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let e=0;e<s.length;e++)if(l[e]!=fZ)try{let t=s[e];t.write&&t.write(l[e],this)}catch(e){XT(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}{let e=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-i;if(e>1||e<-1){n+=e,r.scrollTop=n/this.scaleY,i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(QT))e(t)}get themeClasses(){return XR+" "+(this.state.facet(VR)?GR:HR)+" "+this.state.facet(YR)}updateAttrs(){let e=gZ(this,tj,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(HT)?"true":"false",class:"cm-content",style:`${pT.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),gZ(this,rj,t);let r=this.observer.ignore((()=>{let r=xT(this.contentDOM,this.contentAttrs,t),n=xT(this.dom,this.editorAttrs,e);return r||n}));return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let e of r.effects)e.is(pZ.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(cj);let e=this.state.facet(pZ.cspNonce);wq.mount(this.root,this.styleModules.concat(eZ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((t=>t.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wj(this,e,Uj(this,e,t,r))}moveByGroup(e,t){return Wj(this,e,Uj(this,e,t,(t=>function(e,t,r){let n=e.state.charCategorizer(t),o=n(r);return e=>{let t=n(e);return o==XP.Space&&(o=t),o==t}}(this,e.head,t))))}moveToLineBoundary(e,t,r=!0){return function(e,t,r,n){let o=zj(e,t.head),i=n&&o.type==ET.Text&&(e.lineWrapping||o.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(o.from),a=e.posAtCoords({x:r==(n==pj.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=a)return pP.cursor(a,r?-1:1)}return pP.cursor(r?o.to:o.from,r?-1:1)}(this,e,t,r)}moveVertically(e,t,r){return Wj(this,e,function(e,t,r,n){let o=t.head,i=r?1:-1;if(o==(r?e.state.doc.length:0))return pP.cursor(o,t.assoc);let a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(o,t.assoc||-1),u=e.documentTop;if(c)null==s&&(s=c.left-l.left),a=i<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-t.from))),a=(i<0?t.top:t.bottom)+u}let d=l.left+s,p=null!=n?n:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let r=a+(p+t)*i,n=Bj(e,{x:d,y:r},!1,i);if(r<l.top||r>l.bottom||(i<0?n<o:n>o)){let t=e.docView.coordsForChar(n),o=!t||r<t.top?-1:1;return pP.cursor(n,o,void 0,s)}}}(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Bj(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let n=this.state.doc.lineAt(e),o=this.bidiSpans(n);return Dq(r,o[wj.find(o,e-n.from,-1,t)].dir==pj.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(FT)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>hZ)return Sj(e.length);let t,r=this.textDirectionAt(e.from);for(let n of this.bidiCache)if(n.from==e.from&&n.dir==r&&(n.fresh||Aj(n.isolates,t=aj(this,e.from,e.to))))return n.order;t||(t=aj(this,e.from,e.to));let n=function(e,t,r){if(!e)return[new wj(0,0,t==fj?1:0)];if(t==hj&&!r.length&&!Oj.test(e))return Sj(e.length);if(r.length)for(;e.length>xj.length;)xj[xj.length]=256;let n=[],o=t==hj?0:1;return Cj(e,o,o,r,0,e.length,n),n}(e.text,r,t);return this.bidiCache.push(new mZ(e.from,e.to,r,t,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pT.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{zq(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return VT.of(new YT("number"==typeof e?pP.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return VT.of(new YT(pP.cursor(r.from),"start","start",r.top-e,t,!0))}static domEventHandlers(e){return JT.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return JT.define((()=>({})),{eventObservers:e})}static theme(e,t){let r=wq.newName(),n=[YR.of(r),cj.of(JR(`.${r}`,e))];return t&&t.dark&&n.push(VR.of(!0)),n}static baseTheme(e){return kP.lowest(cj.of(JR("."+XR,e,KR)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),n=r&&Hq.get(r)||Hq.get(e);return(null===(t=null==n?void 0:n.rootView)||void 0===t?void 0:t.view)||null}}pZ.styleModule=cj,pZ.inputHandler=zT,pZ.focusChangeEffect=UT,pZ.perLineTextDirection=FT,pZ.exceptionSink=BT,pZ.updateListener=QT,pZ.editable=HT,pZ.mouseSelectionStyle=IT,pZ.dragMovesSelection=LT,pZ.clickAddsSelectionRange=DT,pZ.decorations=nj,pZ.atomicRanges=oj,pZ.bidiIsolatedRanges=ij,pZ.scrollMargins=sj,pZ.darkTheme=VR,pZ.cspNonce=mP.define({combine:e=>e.length?e[0]:""}),pZ.contentAttributes=rj,pZ.editorAttributes=tj,pZ.lineWrapping=pZ.contentAttributes.of({class:"cm-lineWrapping"}),pZ.announce=BP.define();const hZ=4096,fZ={};class mZ{constructor(e,t,r,n,o,i){this.from=e,this.to=t,this.dir=r,this.isolates=n,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let r=[],n=e.length?e[e.length-1].dir:pj.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let i=e[o];i.dir!=n||t.touchesRange(i.from,i.to)||r.push(new mZ(t.mapPos(i.from,1),t.mapPos(i.to,-1),i.dir,i.isolates,!1,i.order))}return r}}function gZ(e,t,r){for(let n=e.state.facet(t),o=n.length-1;o>=0;o--){let t=n[o],i="function"==typeof t?t(e):t;i&&OT(i,r)}return r}const bZ=pT.mac?"mac":pT.windows?"win":pT.linux?"linux":"key";function yZ(e,t,r){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==r&&t.shiftKey&&(e="Shift-"+e),e}const vZ=kP.default(pZ.domEventHandlers({keydown:(e,t)=>CZ(AZ(t.state),e,t,"editor")})),OZ=mP.define({enables:vZ}),wZ=new WeakMap;function AZ(e){let t=e.facet(OZ),r=wZ.get(t);return r||wZ.set(t,r=function(e,t=bZ){let r=Object.create(null),n=Object.create(null),o=(e,t)=>{let r=n[e];if(null==r)n[e]=t;else if(r!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,n,i,a,s)=>{var l,c;let u=r[e]||(r[e]=Object.create(null)),d=n.split(/ (?!$)/).map((e=>function(e,t){const r=e.split(/-(?!$)/);let n,o,i,a,s=r[r.length-1];"Space"==s&&(s=" ");for(let e=0;e<r.length-1;++e){const s=r[e];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))o=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==t?a=!0:o=!0}}return n&&(s="Alt-"+s),o&&(s="Ctrl-"+s),a&&(s="Meta-"+s),i&&(s="Shift-"+s),s}(e,t)));for(let t=1;t<d.length;t++){let r=d.slice(0,t).join(" ");o(r,!0),u[r]||(u[r]={preventDefault:!0,stopPropagation:!1,run:[t=>{let n=xZ={view:t,prefix:r,scope:e};return setTimeout((()=>{xZ==n&&(xZ=null)}),kZ),!0}]})}let p=d.join(" ");o(p,!1);let h=u[p]||(u[p]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});i&&h.run.push(i),a&&(h.preventDefault=!0),s&&(h.stopPropagation=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=r[t]||(r[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(n.any)}let o=n[t]||n.key;if(o)for(let t of e)i(t,o,n.run,n.preventDefault,n.stopPropagation),n.shift&&i(t,"Shift-"+o,n.shift,n.preventDefault,n.stopPropagation)}return r}(t.reduce(((e,t)=>e.concat(t)),[]))),r}let xZ=null;const kZ=4e3;function CZ(e,t,r,n){let o=function(e){var t=!(Sq&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||_q&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Cq:kq)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=eP(KE(o,0))==o.length&&" "!=o,a="",s=!1,l=!1,c=!1;xZ&&xZ.view==r&&xZ.scope==n&&(a=xZ.prefix+" ",Kj.indexOf(t.keyCode)<0&&(l=!0,xZ=null));let u,d,p=new Set,h=e=>{if(e){for(let n of e.run)if(!p.has(n)&&(p.add(n),n(r,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[n];return f&&(h(f[a+yZ(o,t,!i)])?s=!0:i&&(t.altKey||t.metaKey||t.ctrlKey)&&!(pT.windows&&t.ctrlKey&&t.altKey)&&(u=kq[t.keyCode])&&u!=o?(h(f[a+yZ(u,t,!0)])||t.shiftKey&&(d=Cq[t.keyCode])!=o&&d!=u&&h(f[a+yZ(d,t,!1)]))&&(s=!0):i&&t.shiftKey&&h(f[a+yZ(o,t,!0)])&&(s=!0),!s&&h(f._any)&&(s=!0)),l&&(s=!0),s&&c&&t.stopPropagation(),s}class SZ{constructor(e,t,r,n,o){this.className=e,this.left=t,this.top=r,this.width=n,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let n=e.coordsAtPos(r.head,r.assoc||1);if(!n)return[];let o=_Z(e);return[new SZ(t,n.left-o.left,n.top-o.top,null,n.bottom-n.top)]}return function(e,t,r){if(r.to<=e.viewport.from||r.from>=e.viewport.to)return[];let n=Math.max(r.from,e.viewport.from),o=Math.min(r.to,e.viewport.to),i=e.textDirection==pj.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=_Z(e),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),p=s.right-(u?parseInt(u.paddingRight):0),h=zj(e,n),f=zj(e,o),m=h.type==ET.Text?h:null,g=f.type==ET.Text?f:null;if(m&&(e.lineWrapping||h.widgetLineBreaks)&&(m=EZ(e,n,m)),g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=EZ(e,o,g)),m&&g&&m.from==g.from)return y(v(r.from,r.to,m));{let t=m?v(r.from,null,m):O(h,!1),n=g?v(null,r.to,g):O(f,!0),o=[];return(m||h).to<(g||f).from-(m&&g?1:0)||h.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<n.top?o.push(b(d,t.bottom,p,n.top)):t.bottom<n.top&&e.elementAtHeight((t.bottom+n.top)/2).type==ET.Text&&(t.bottom=n.top=(t.bottom+n.top)/2),y(t).concat(o).concat(y(n))}function b(e,r,n,o){return new SZ(t,e-l.left,r-l.top-.01,n-e,o-r+.01)}function y({top:e,bottom:t,horizontal:r}){let n=[];for(let o=0;o<r.length;o+=2)n.push(b(r[o],e,r[o+1],t));return n}function v(t,r,n){let o=1e9,a=-1e9,s=[];function l(t,r,l,c,u){let h=e.coordsAtPos(t,t==n.to?-2:2),f=e.coordsAtPos(l,l==n.from?2:-2);h&&f&&(o=Math.min(h.top,f.top,o),a=Math.max(h.bottom,f.bottom,a),u==pj.LTR?s.push(i&&r?d:h.left,i&&c?p:f.right):s.push(!i&&c?d:f.left,!i&&r?p:h.right))}let c=null!=t?t:n.from,u=null!=r?r:n.to;for(let n of e.visibleRanges)if(n.to>c&&n.from<u)for(let o=Math.max(n.from,c),i=Math.min(n.to,u);;){let n=e.state.doc.lineAt(o);for(let a of e.bidiSpans(n)){let e=a.from+n.from,s=a.to+n.from;if(e>=i)break;s>o&&l(Math.max(e,o),null==t&&e<=c,Math.min(s,i),null==r&&s>=u,a.dir)}if(o=n.to+1,o>=i)break}return 0==s.length&&l(c,null==t,u,null==r,e.textDirection),{top:o,bottom:a,horizontal:s}}function O(e,t){let r=s.top+(t?e.top:e.bottom);return{top:r,bottom:r,horizontal:[]}}}(e,t,r)}}function _Z(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==pj.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function EZ(e,t,r){let n=pP.cursor(t);return{from:Math.max(r.from,e.moveToLineBoundary(n,!1,!0).from),to:Math.min(r.to,e.moveToLineBoundary(n,!0,!0).from),type:ET.Text}}class PZ{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(qZ)!=e.state.facet(qZ)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let t=0,r=e.facet(qZ);for(;t<r.length&&r[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;e==this.scaleX&&t==this.scaleY||(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some(((e,t)=>!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,r=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[r].constructor&&n.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const qZ=mP.define();function TZ(e){return[JT.define((t=>new PZ(t,e))),qZ.of(e)]}const jZ=!pT.ios,RZ=mP.define({combine:e=>JP(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function ZZ(e){return e.startState.facet(RZ)!=e.state.facet(RZ)}const $Z=TZ({above:!0,markers(e){let{state:t}=e,r=t.facet(RZ),n=[];for(let o of t.selection.ranges){let i=o==t.selection.main;if(o.empty?!i||jZ:r.drawRangeCursor){let t=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",r=o.empty?o:pP.cursor(o.head,o.head>o.anchor?-1:1);for(let o of SZ.forRange(e,t,r))n.push(o)}}return n},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let r=ZZ(e);return r&&MZ(e.state,t),e.docChanged||e.selectionSet||r},mount(e,t){MZ(t.state,e)},class:"cm-cursorLayer"});function MZ(e,t){t.style.animationDuration=e.facet(RZ).cursorBlinkRate+"ms"}const NZ=TZ({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:SZ.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||ZZ(e),class:"cm-selectionLayer"}),DZ={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};jZ&&(DZ[".cm-line"].caretColor="transparent !important",DZ[".cm-content"]={caretColor:"transparent !important"});const LZ=kP.highest(pZ.theme(DZ)),IZ=BP.define({map:(e,t)=>null==e?null:t.mapPos(e)}),BZ=AP.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(IZ)?t.value:e),e))}),QZ=JT.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let r=e.state.field(BZ);null==r?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(BZ)!=r||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(BZ),r=null!=t&&e.coordsAtPos(t);if(!r)return null;let n=e.scrollDOM.getBoundingClientRect();return{left:r.left-n.left+e.scrollDOM.scrollLeft*e.scaleX,top:r.top-n.top+e.scrollDOM.scrollTop*e.scaleY,height:r.bottom-r.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:r}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/r+"px",this.cursor.style.height=e.height/r+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(BZ)!=e&&this.view.dispatch({effects:IZ.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function zZ(e,t,r,n,o){t.lastIndex=0;for(let i,a=e.iterRange(r,n),s=r;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}class UZ{constructor(e){const{regexp:t,decoration:r,decorate:n,boundary:o,maxLength:i=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,n)this.addMatch=(e,t,r,o)=>n(o,r,r+e[0].length,e,t);else if("function"==typeof r)this.addMatch=(e,t,n,o)=>{let i=r(e,t,n);i&&o(n,n+e[0].length,i)};else{if(!r)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,n,o)=>o(n,n+e[0].length,r)}this.boundary=o,this.maxLength=i}createDeco(e){let t=new iq,r=t.add.bind(t);for(let{from:t,to:n}of function(e,t){let r=e.visibleRanges;if(1==r.length&&r[0].from==e.viewport.from&&r[0].to==e.viewport.to)return r;let n=[];for(let{from:o,to:i}of r)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),n.length&&n[n.length-1].to>=o?n[n.length-1].to=i:n.push({from:o,to:i});return n}(e,this.maxLength))zZ(e.state.doc,this.regexp,t,n,((t,n)=>this.addMatch(n,e,t,r)));return t.finish()}updateDeco(e,t){let r=1e9,n=-1;return e.docChanged&&e.changes.iterChanges(((t,o,i,a)=>{a>e.view.viewport.from&&i<e.view.viewport.to&&(r=Math.min(i,r),n=Math.max(a,n))})),e.viewportChanged||n-r>1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),r,n):t}updateRange(e,t,r,n){for(let o of e.visibleRanges){let i=Math.max(o.from,r),a=Math.min(o.to,n);if(a>i){let r=e.state.doc.lineAt(i),n=r.to<a?e.state.doc.lineAt(a):r,s=Math.max(o.from,r.from),l=Math.min(o.to,n.to);if(this.boundary){for(;i>r.from;i--)if(this.boundary.test(r.text[i-1-r.from])){s=i;break}for(;a<n.to;a++)if(this.boundary.test(n.text[a-n.from])){l=a;break}}let c,u=[],d=(e,t,r)=>u.push(r.range(e,t));if(r==n)for(this.regexp.lastIndex=s-r.from;(c=this.regexp.exec(r.text))&&c.index<l-r.from;)this.addMatch(c,e,c.index+r.from,d);else zZ(e.state.doc,this.regexp,s,l,((t,r)=>this.addMatch(r,e,t,d)));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>e<s||t>l,add:u})}}return t}}const FZ=null!=/x/.unicode?"gu":"g",WZ=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",FZ),YZ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let VZ=null;const XZ=mP.define({combine(e){let t=JP(e,{render:null,specialChars:WZ,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==VZ&&"undefined"!=typeof document&&document.body){let t=document.body.style;VZ=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return VZ||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,FZ)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,FZ)),t}});let HZ=null;class GZ extends _T{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"":String.fromCharCode(9216+e)}(this.code),r=e.state.phrase("Control character")+" "+(YZ[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,r,t);if(n)return n;let o=document.createElement("span");return o.textContent=t,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class KZ extends _T{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const JZ=PT.line({class:"cm-activeLine"}),e$=JT.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,r=[];for(let n of e.state.selection.ranges){let o=e.lineBlockAt(n.head);o.from>t&&(r.push(JZ.range(o.from)),t=o.from)}return PT.set(r)}},{decorations:e=>e.decorations});class t$ extends _T{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Rq(e.firstChild):[];if(!t.length)return null;let r=window.getComputedStyle(e.parentNode),n=Dq(t[0],"rtl"!=r.direction),o=parseInt(r.lineHeight);return n.bottom-n.top>1.5*o?{left:n.left,right:n.right,top:n.top,bottom:n.top+o}:n}ignoreEvent(){return!1}}const r$=2e3;function n$(e,t){let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(r),o=r-n.from,i=o>r$?-1:o==n.length?function(e,t){let r=e.coordsAtPos(e.viewport.from);return r?Math.round(Math.abs((r.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):gq(n.text,e.state.tabSize,r-n.from);return{line:n.number,col:i,off:o}}const o$={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},i$={style:"cursor: crosshair"},a$="-10000px";class s${constructor(e,t,r){this.facet=t,this.createTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e)),this.tooltipViews=this.tooltips.map(r)}update(e,t){var r;let n=e.state.facet(this.facet),o=n.filter((e=>e));if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],a=t?[]:null;for(let r=0;r<o.length;r++){let n=o[r],s=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(s=e)}if(s<0)i[r]=this.createTooltipView(n),a&&(a[r]=!!n.above);else{let n=i[r]=this.tooltipViews[s];a&&(a[r]=t[s]),n.update&&n.update(e)}}}for(let e of this.tooltipViews)i.indexOf(e)<0&&(e.dom.remove(),null===(r=e.destroy)||void 0===r||r.call(e));return t&&(a.forEach(((e,r)=>t[r]=e)),t.length=a.length),this.input=n,this.tooltips=o,this.tooltipViews=i,!0}}function l$(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const c$=mP.define({combine:e=>{var t,r,n;return{position:pT.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(r=e.find((e=>e.parent)))||void 0===r?void 0:r.parent)||null,tooltipSpace:(null===(n=e.find((e=>e.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||l$}}}),u$=new WeakMap,d$=JT.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(c$);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new s$(e,f$,(e=>this.createTooltip(e))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let r=t||e.geometryChanged,n=e.state.facet(c$);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;r=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);r=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);r&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top=a$,t.dom.style.left="0px",this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect(),t=1,r=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(pT.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(1!=this.view.scaleX||1!=this.view.scaleY)n=!0;else if(e.style.top==a$&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position)if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,r=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:r}=this.view.viewState);return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let r=this.manager.tooltipViews[t];return r.getCoords?r.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(c$).tooltipSpace(this.view),scaleX:t,scaleY:r,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:r,space:n,scaleX:o,scaleY:i}=e,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],c=this.manager.tooltipViews[s],{dom:u}=c,d=e.pos[s],p=e.size[s];if(!d||d.bottom<=Math.max(r.top,n.top)||d.top>=Math.min(r.bottom,n.bottom)||d.right<Math.max(r.left,n.left)-.1||d.left>Math.min(r.right,n.right)+.1){u.style.top=a$;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,m=p.right-p.left,g=null!==(t=u$.get(c))&&void 0!==t?t:p.bottom-p.top,b=c.offset||h$,y=this.view.textDirection==pj.LTR,v=p.width>n.right-n.left?y?n.left:n.right-p.width:y?Math.min(d.left-(h?14:0)+b.x,n.right-m):Math.max(n.left,d.left-m+(h?14:0)-b.x),O=this.above[s];!l.strictSide&&(O?d.top-(p.bottom-p.top)-b.y<n.top:d.bottom+(p.bottom-p.top)+b.y>n.bottom)&&O==n.bottom-d.bottom>d.top-n.top&&(O=this.above[s]=!O);let w=(O?d.top-n.top:n.bottom-d.bottom)-f;if(w<g&&!1!==c.resize){if(w<this.view.defaultLineHeight){u.style.top=a$;continue}u$.set(c,g),u.style.height=(g=w)/i+"px"}else u.style.height&&(u.style.height="");let A=O?d.top-g-f-b.y:d.bottom+f+b.y,x=v+m;if(!0!==c.overlap)for(let e of a)e.left<x&&e.right>v&&e.top<A+g&&e.bottom>A&&(A=O?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(u.style.top=(A-e.parent.top)/i+"px",u.style.left=(v-e.parent.left)/o+"px"):(u.style.top=A/i+"px",u.style.left=v/o+"px"),h){let e=d.left+(y?b.x:-b.x)-(v+14-7);h.style.left=e/o+"px"}!0!==c.overlap&&a.push({left:v,top:A,right:x,bottom:A+g}),u.classList.toggle("cm-tooltip-above",O),u.classList.toggle("cm-tooltip-below",!O),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=a$}},{eventObservers:{scroll(){this.maybeMeasure()}}}),p$=pZ.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),h$={x:0,y:0},f$=mP.define({enables:[d$,p$]}),m$=mP.define();class g${static create(e){return new g$(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new s$(e,m$,(e=>this.createHostedView(e)))}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let n=r[e];if(void 0!==n)if(void 0===t)t=n;else if(t!==n)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const b$=f$.compute([m$],(e=>{let t=e.facet(m$).filter((e=>e));return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:g$.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class y${constructor(e,t,r,n,o){this.view=e,this.source=t,this.field=r,this.setHover=n,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,r=e.docView.nearest(t.target);if(!r)return;let n,o=1;if(r instanceof mT)n=r.posAtStart;else{if(n=e.posAtCoords(t),null==n)return;let r=e.coordsAtPos(n);if(!r||t.y<r.top||t.y>r.bottom||t.x<r.left-e.defaultCharacterWidth||t.x>r.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(n)).find((e=>e.from<=n&&e.to>=n)),a=i&&i.dir==pj.RTL?-1:1;o=t.x<r.left?-a:a}let i=this.source(e,n,o);if(null==i?void 0:i.then){let t=this.pending={pos:n};i.then((r=>{this.pending==t&&(this.pending=null,r&&e.dispatch({effects:this.setHover.of(r)}))}),(t=>XT(e.state,t,"hover tooltip")))}else i&&e.dispatch({effects:this.setHover.of(i)})}get tooltip(){let e=this.view.plugin(d$),t=e?e.manager.tooltips.findIndex((e=>e.create==g$.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:n}=this;if(r&&n&&!function(e,t){let r=e.getBoundingClientRect();return t.clientX>=r.left-v$&&t.clientX<=r.right+v$&&t.clientY>=r.top-v$&&t.clientY<=r.bottom+v$}(n.dom,e)||this.pending){let{pos:n}=r||this.pending,o=null!==(t=null==r?void 0:r.end)&&void 0!==t?t:n;(n==o?this.view.posAtCoords(this.lastMove)==n:function(e,t,r,n,o,i){let a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>n||a.right<n||a.top>o||Math.min(a.bottom,s)<o)return!1;let l=e.posAtCoords({x:n,y:o},!1);return l>=t&&l<=r}(this.view,n,o,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of(null)})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const v$=4;function O$(e,t={}){let r=BP.define(),n=AP.define({create:()=>null,update(e,n){if(e&&(t.hideOnChange&&(n.docChanged||n.selection)||t.hideOn&&t.hideOn(n,e)))return null;if(e&&n.docChanged){let t=n.changes.mapPos(e.pos,-1,rP.TrackDel);if(null==t)return null;let r=Object.assign(Object.create(null),e);r.pos=t,null!=e.end&&(r.end=n.changes.mapPos(e.end)),e=r}for(let t of n.effects)t.is(r)&&(e=t.value),t.is(A$)&&(e=null);return e},provide:e=>m$.from(e)});return[n,JT.define((o=>new y$(o,e,n,r,t.hoverTime||300))),b$]}function w$(e,t){let r=e.plugin(d$);if(!r)return null;let n=r.manager.tooltips.indexOf(t);return n<0?null:r.manager.tooltipViews[n]}const A$=BP.define(),x$=mP.define({combine(e){let t,r;for(let n of e)t=t||n.topContainer,r=r||n.bottomContainer;return{topContainer:t,bottomContainer:r}}});function k$(e,t){let r=e.plugin(C$),n=r?r.specs.indexOf(t):-1;return n>-1?r.panels[n]:null}const C$=JT.fromClass(class{constructor(e){this.input=e.state.facet(E$),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(x$);this.top=new S$(e,!0,t.topContainer),this.bottom=new S$(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(x$);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new S$(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new S$(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let r=e.state.facet(E$);if(r!=this.input){let t=r.filter((e=>e)),n=[],o=[],i=[],a=[];for(let r of t){let t,s=this.specs.indexOf(r);s<0?(t=r(e.view),a.push(t)):(t=this.panels[s],t.update&&t.update(e)),n.push(t),(t.top?o:i).push(t)}this.specs=t,this.panels=n,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>pZ.scrollMargins.of((t=>{let r=t.plugin(e);return r&&{top:r.top.scrollMargin(),bottom:r.bottom.scrollMargin()}}))});class S${constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=_$(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=_$(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function _$(e){let t=e.nextSibling;return e.remove(),t}const E$=mP.define({enables:C$});class P$ extends eq{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}P$.prototype.elementClass="",P$.prototype.toDOM=void 0,P$.prototype.mapMode=rP.TrackBefore,P$.prototype.startSide=P$.prototype.endSide=-1,P$.prototype.point=!0;const q$=mP.define(),T$={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>oq.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},j$=mP.define();function R$(e){return[$$(),j$.of(Object.assign(Object.assign({},T$),e))]}const Z$=mP.define({combine:e=>e.some((e=>e))});function $$(e){let t=[M$];return e&&!1===e.fixed&&t.push(Z$.of(!0)),t}const M$=JT.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(j$).map((t=>new I$(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(Z$),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,r=e.view.viewport,n=Math.min(t.to,r.to)-Math.max(t.from,r.from);this.syncGutters(n<.8*(r.to-r.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Z$)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let r=oq.iter(this.view.state.facet(q$),this.view.viewport.from),n=[],o=this.gutters.map((e=>new L$(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(e.type)){let t=!0;for(let i of e.type)if(i.type==ET.Text&&t){D$(r,n,i.from);for(let e of o)e.line(this.view,i,n);t=!1}else if(i.widget)for(let e of o)e.widget(this.view,i)}else if(e.type==ET.Text){D$(r,n,e.from);for(let t of o)t.line(this.view,e,n)}else if(e.widget)for(let t of o)t.widget(this.view,e);for(let e of o)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(j$),r=e.state.facet(j$),n=e.docChanged||e.heightChanged||e.viewportChanged||!oq.eq(e.startState.facet(q$),e.state.facet(q$),e.view.viewport.from,e.view.viewport.to);if(t==r)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let o=[];for(let n of r){let r=t.indexOf(n);r<0?o.push(new I$(this.view,n)):(this.gutters[r].update(e),o.push(this.gutters[r]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)this.dom.appendChild(e.dom);this.gutters=o}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>pZ.scrollMargins.of((t=>{let r=t.plugin(e);return r&&0!=r.gutters.length&&r.fixed?t.textDirection==pj.LTR?{left:r.dom.offsetWidth*t.scaleX}:{right:r.dom.offsetWidth*t.scaleX}:null}))});function N$(e){return Array.isArray(e)?e:[e]}function D$(e,t,r){for(;e.value&&e.from<=r;)e.from==r&&t.push(e.value),e.next()}class L${constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=oq.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:n}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==n.elements.length){let t=new B$(e,i,o,r);n.elements.push(t),n.dom.appendChild(t.dom)}else n.elements[this.i].update(e,i,o,r);this.height=t.bottom,this.i++}line(e,t,r){let n=[];D$(this.cursor,n,t.from),r.length&&(n=n.concat(r));let o=this.gutter.config.lineMarker(e,t,n);o&&n.unshift(o);let i=this.gutter;(0!=n.length||i.config.renderEmptyElements)&&this.addElement(e,t,n)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t);r&&this.addElement(e,t,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class I${constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,(n=>{let o,i=n.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=n.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,a,n)&&n.preventDefault()}));this.markers=N$(t.markers(e)),t.initialSpacer&&(this.spacer=new B$(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=N$(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let r=e.view.viewport;return!oq.eq(this.markers,t,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class B${constructor(e,t,r,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,n)}update(e,t,r,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].compare(t[r]))return!1;return!0}(this.markers,n)||this.setMarkers(e,n)}setMarkers(e,t){let r="cm-gutterElement",n=this.dom.firstChild;for(let o=0,i=0;;){let a=i,s=o<t.length?t[o++]:null,l=!1;if(s){let e=s.elementClass;e&&(r+=" "+e);for(let e=i;e<this.markers.length;e++)if(this.markers[e].compare(s)){a=e,l=!0;break}}else a=this.markers.length;for(;i<a;){let e=this.markers[i++];if(e.toDOM){e.destroy(n);let t=n.nextSibling;n.remove(),n=t}}if(!s)break;s.toDOM&&(l?n=n.nextSibling:this.dom.insertBefore(s.toDOM(e),n)),l&&i++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}const Q$=mP.define(),z$=mP.define({combine:e=>JP(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let e in t){let n=r[e],o=t[e];r[e]=n?(e,t,r)=>n(e,t,r)||o(e,t,r):o}return r}})});class U$ extends P${constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function F$(e,t){return e.state.facet(z$).formatNumber(t,e.state)}const W$=j$.compute([z$],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(Q$),lineMarker:(e,t,r)=>r.some((e=>e.toDOM))?null:new U$(F$(e,e.state.doc.lineAt(t.from).number)),widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(z$)!=e.state.facet(z$),initialSpacer:e=>new U$(F$(e,Y$(e.state.doc.lines))),updateSpacer(e,t){let r=F$(t.view,Y$(t.view.state.doc.lines));return r==e.number?e:new U$(r)},domEventHandlers:e.facet(z$).domEventHandlers})));function Y$(e){let t=9;for(;t<e;)t=10*t+9;return t}const V$=new class extends P${constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},X$=q$.compute(["selection"],(e=>{let t=[],r=-1;for(let n of e.selection.ranges){let o=e.doc.lineAt(n.head).from;o>r&&(r=o,t.push(V$.range(o)))}return oq.of(t)}));var H$;const G$=new KC;function K$(e){return mP.define({combine:e?t=>t.concat(e):void 0})}const J$=new KC;class eM{constructor(e,t,r=[],n=""){this.data=e,this.name=n,KP.prototype.hasOwnProperty("tree")||Object.defineProperty(KP.prototype,"tree",{get(){return nM(this)}}),this.parser=t,this.extension=[pM.of(this),KP.languageData.of(((e,t,r)=>{let n=tM(e,t,r),o=n.type.prop(G$);if(!o)return[];let i=e.facet(o),a=n.type.prop(J$);if(a){let o=n.resolve(t-n.from,r);for(let t of a)if(t.test(o,e)){let r=e.facet(t.facet);return"replace"==t.type?r:r.concat(i)}}return i}))].concat(r)}isActiveAt(e,t,r=-1){return tM(e,t,r).type.prop(G$)==this.data}findRegions(e){let t=e.facet(pM);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],n=(e,t)=>{if(e.prop(G$)==this.data)return void r.push({from:t,to:t+e.length});let o=e.prop(KC.mounted);if(o){if(o.tree.prop(G$)==this.data){if(o.overlay)for(let e of o.overlay)r.push({from:e.from+t,to:e.to+t});else r.push({from:t,to:t+e.length});return}if(o.overlay){let e=r.length;if(n(o.tree,o.overlay[0].from+t),r.length>e)return}}for(let r=0;r<e.children.length;r++){let o=e.children[r];o instanceof aS&&n(o,e.positions[r]+t)}};return n(nM(e),0),r}get allowsNesting(){return!0}}function tM(e,t,r){let n=e.facet(pM),o=nM(e).topNode;if(!n||n.allowsNesting)for(let e=o;e;e=e.enter(t,r,iS.ExcludeBuffers))e.type.isTop&&(o=e);return o}eM.setState=BP.define();class rM extends eM{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=K$(e.languageData);return new rM(t,e.parser.configure({props:[G$.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new rM(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nM(e){let t=e.field(eM.state,!1);return t?t.tree:aS.empty}class oM{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let iM=null;class aM{constructor(e,t,r=[],n,o,i,a,s){this.parser=e,this.state=t,this.fragments=r,this.tree=n,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new aM(e,t,[],aS.empty,0,r,[],null)}startParse(){return this.parser.startParse(new oM(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=aS.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var r;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(CS.addTree(n,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(r=this.parse.stoppedAt)&&void 0!==r?r:this.state.doc.length,this.tree=n,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(CS.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=iM;iM=this;try{return e()}finally{iM=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=sM(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:n,treeLen:o,viewport:i,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,r,n,o)=>t.push({fromA:e,toA:r,fromB:n,toB:o}))),r=CS.applyChanges(r,t),n=aS.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){a=[];for(let t of this.skipped){let r=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);r<n&&a.push({from:r,to:n})}}}return new aM(this.parser,t,r,n,o,i,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:r,to:n}=this.skipped[t];r<e.to&&n>e.from&&(this.fragments=sM(this.fragments,r,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends SS{createParse(t,r,n){let o=n[0].from,i=n[n.length-1].to;return{parsedPos:o,advance(){let t=iM;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new aS(tS.none,[],[],i-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return iM}}function sM(e,t,r){return CS.applyChanges(e,[{fromA:t,toA:r,fromB:t,toB:r}])}class lM{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new lM(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=aM.create(e.facet(pM).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new lM(r)}}eM.state=AP.define({create:lM.init,update(e,t){for(let e of t.effects)if(e.is(eM.setState))return e.value;return t.startState.facet(pM)!=t.state.facet(pM)?lM.init(t.state):e.apply(t)}});let cM=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(cM=e=>{let t=-1,r=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(r):cancelIdleCallback(t)});const uM="undefined"!=typeof navigator&&(null===(H$=navigator.scheduling)||void 0===H$?void 0:H$.isInputPending)?()=>navigator.scheduling.isInputPending():null,dM=JT.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(eM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(eM.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=cM(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:n}}=this.view,o=r.field(eM.state);if(o.tree==o.context.tree&&o.context.isDone(n+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!uM?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<n&&r.doc.length>n+1e3,s=o.context.work((()=>uM&&uM()||Date.now()>i),n+(a?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:eM.setState.of(new lM(o.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>XT(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),pM=mP.define({combine:e=>e.length?e[0]:null,enables:e=>[eM.state,dM,pZ.contentAttributes.compute([e],(t=>{let r=t.facet(e);return r&&r.name?{"data-language":r.name}:{}}))]});class hM{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class fM{constructor(e,t,r,n,o,i=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=n,this.loadFunc=o,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((e=>this.support=e),(e=>{throw this.loading=null,e})))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new fM(e.name,(e.alias||[]).concat(e.name).map((e=>e.toLowerCase())),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let r of e)if(r.filename&&r.filename.test(t))return r;let r=/\.([^.]+)$/.exec(t);if(r)for(let t of e)if(t.extensions.indexOf(r[1])>-1)return t;return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let r of e)if(r.alias.some((e=>e==t)))return r;if(r)for(let r of e)for(let e of r.alias){let n=t.indexOf(e);if(n>-1&&(e.length>2||!/\w/.test(t[n-1])&&!/\w/.test(t[n+e.length])))return r}return null}}const mM=mP.define(),gM=mP.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function bM(e){let t=e.facet(gM);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function yM(e,t){let r="",n=e.tabSize,o=e.facet(gM)[0];if("\t"==o){for(;t>=n;)r+="\t",t-=n;o=" "}for(let e=0;e<t;e++)r+=o;return r}function vM(e,t){e instanceof KP&&(e=new OM(e));for(let r of e.state.facet(mM)){let n=r(e,t);if(void 0!==n)return n}let r=nM(e.state);return r.length>=t?function(e,t,r){let n=t.resolveStack(r),o=n.node.enterUnfinishedNodesBefore(r);if(o!=n.node){let e=[];for(let t=o;t!=n.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)n={node:e[t],next:n}}return AM(n,e,r)}(e,r,t):null}class OM{constructor(e,t={}){this.state=e,this.options=t,this.unit=bM(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:o}=this.options;return null!=n&&n>=r.from&&n<=r.to?o&&n==e?{text:"",from:e}:(t<0?n<e:n<=e)?{text:r.text.slice(n-r.from),from:n}:{text:r.text.slice(0,n-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:n}=this.lineAt(e,t);return r.slice(e-n,Math.min(r.length,e+100-n))}column(e,t=1){let{text:r,from:n}=this.lineAt(e,t),o=this.countColumn(r,e-n),i=this.options.overrideIndentation?this.options.overrideIndentation(n):-1;return i>-1&&(o+=i-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,t=e.length){return gq(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:n}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let e=o(n);if(e>-1)return e}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const wM=new KC;function AM(e,t,r){for(let n=e;n;n=n.next){let e=xM(n.node);if(e)return e(CM.create(t,r,n))}return 0}function xM(e){let t=e.type.prop(wM);if(t)return t;let r,n=e.firstChild;if(n&&(r=n.type.prop(KC.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>EM(e,!0,1,void 0,n&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?kM:null}function kM(){return 0}class CM extends OM{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new CM(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(SM(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return AM(this.context.next,this.base,this.pos)}}function SM(e,t){for(let r=t;r;r=r.parent)if(e==r)return!0;return!1}function _M({closing:e,align:t=!0,units:r=1}){return n=>EM(n,t,r,e)}function EM(e,t,r,n,o){let i=e.textAfter,a=i.match(/^\s*/)[0].length,s=n&&i.slice(a,a+n.length)==n||o==e.pos+a,l=t?function(e){let t=e.node,r=t.childAfter(t.from),n=t.lastChild;if(!r)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(r.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=r.to;;){let o=t.childAfter(e);if(!o||o==n)return null;if(!o.type.isSkipped)return o.from<a?r:null;e=o.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*r)}function PM({except:e,units:t=1}={}){return r=>{let n=e&&e.test(r.textAfter);return r.baseIndent+(n?0:t*r.unit)}}const qM=mP.define(),TM=new KC;function jM(e){let t=e.firstChild,r=e.lastChild;return t&&t.to<r.from?{from:t.to,to:r.type.isError?e.to:r.from}:null}function RM(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function ZM(e,t,r){for(let n of e.facet(qM)){let o=n(e,t,r);if(o)return o}return function(e,t,r){let n=nM(e);if(n.length<r)return null;let o=null;for(let i=n.resolveStack(r,1);i;i=i.next){let a=i.node;if(a.to<=r||a.from>r)continue;if(o&&a.from<t)break;let s=a.type.prop(TM);if(s&&(a.to<n.length-50||n.length==e.doc.length||!RM(a))){let n=s(a,e);n&&n.from<=r&&n.from>=t&&n.to>r&&(o=n)}}return o}(e,t,r)}function $M(e,t){let r=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return r>=n?void 0:{from:r,to:n}}const MM=BP.define({map:$M}),NM=BP.define({map:$M});function DM(e){let t=[];for(let{head:r}of e.state.selection.ranges)t.some((e=>e.from<=r&&e.to>=r))||t.push(e.lineBlockAt(r));return t}const LM=AP.define({create:()=>PT.none,update(e,t){e=e.map(t.changes);for(let r of t.effects)if(r.is(MM)&&!BM(e,r.value.from,r.value.to)){let{preparePlaceholder:n}=t.state.facet(WM),o=n?PT.replace({widget:new HM(n(t.state,r.value))}):XM;e=e.update({add:[o.range(r.value.from,r.value.to)]})}else r.is(NM)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(t.selection){let r=!1,{head:n}=t.selection.main;e.between(n,n,((e,t)=>{e<n&&t>n&&(r=!0)})),r&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>pZ.decorations.from(e),toJSON(e,t){let r=[];return e.between(0,t.doc.length,((e,t)=>{r.push(e,t)})),r},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let r=0;r<e.length;){let n=e[r++],o=e[r++];if("number"!=typeof n||"number"!=typeof o)throw new RangeError("Invalid JSON for fold state");t.push(XM.range(n,o))}return PT.set(t,!0)}});function IM(e,t,r){var n;let o=null;return null===(n=e.field(LM,!1))||void 0===n||n.between(t,r,((e,t)=>{(!o||o.from>e)&&(o={from:e,to:t})})),o}function BM(e,t,r){let n=!1;return e.between(t,t,((e,o)=>{e==t&&o==r&&(n=!0)})),n}function QM(e,t){return e.field(LM,!1)?t:t.concat(BP.appendConfig.of(YM()))}function zM(e,t,r=!0){let n=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return pZ.announce.of(`${e.state.phrase(r?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${o}.`)}const UM=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of DM(e)){let r=ZM(e.state,t.from,t.to);if(r)return e.dispatch({effects:QM(e.state,[MM.of(r),zM(e,r)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(LM,!1))return!1;let t=[];for(let r of DM(e)){let n=IM(e.state,r.from,r.to);n&&t.push(NM.of(n),zM(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,r=[];for(let n=0;n<t.doc.length;){let o=e.lineBlockAt(n),i=ZM(t,o.from,o.to);i&&r.push(MM.of(i)),n=(i?e.lineBlockAt(i.to):o).to+1}return r.length&&e.dispatch({effects:QM(e.state,r)}),!!r.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(LM,!1);if(!t||!t.size)return!1;let r=[];return t.between(0,e.state.doc.length,((e,t)=>{r.push(NM.of({from:e,to:t}))})),e.dispatch({effects:r}),!0}}],FM={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},WM=mP.define({combine:e=>JP(e,FM)});function YM(e){let t=[LM,JM];return e&&t.push(WM.of(e)),t}function VM(e,t){let{state:r}=e,n=r.facet(WM),o=t=>{let r=e.lineBlockAt(e.posAtDOM(t.target)),n=IM(e.state,r.from,r.to);n&&e.dispatch({effects:NM.of(n)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,o,t);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",r.phrase("folded code")),i.title=r.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const XM=PT.replace({widget:new class extends _T{toDOM(e){return VM(e,null)}}});class HM extends _T{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return VM(e,this.value)}}const GM={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class KM extends P${constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}const JM=pZ.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class eN{constructor(e,t){let r;function n(e){let t=wq.newName();return(r||(r=Object.create(null)))["."+t]=e,t}this.specs=e;const o="string"==typeof t.all?t.all:t.all?n(t.all):void 0,i=t.scope;this.scope=i instanceof eM?e=>e.prop(G$)==i.data:i?e=>e==i:void 0,this.style=A_(e.map((e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))}))),{all:o}).style,this.module=r?new wq(r):null,this.themeType=t.themeType}static define(e,t){return new eN(e,t||{})}}const tN=mP.define(),rN=mP.define({combine:e=>e.length?[e[0]]:null});function nN(e){let t=e.facet(tN);return t.length?t:e.facet(rN)}function oN(e,t){let r,n=[aN];return e instanceof eN&&(e.module&&n.push(pZ.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(rN.of(e)):r?n.push(tN.computeN([pZ.darkTheme],(t=>t.facet(pZ.darkTheme)==("dark"==r)?[e]:[]))):n.push(tN.of(e)),n}class iN{constructor(e){this.markCache=Object.create(null),this.tree=nM(e.state),this.decorations=this.buildDeco(e,nN(e.state))}update(e){let t=nM(e.state),r=nN(e.state),n=r!=nN(e.startState);t.length<e.view.viewport.to&&!n&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r))}buildDeco(e,t){if(!t||!this.tree.length)return PT.none;let r=new iq;for(let{from:n,to:o}of e.visibleRanges)x_(this.tree,t,((e,t,n)=>{r.add(e,t,this.markCache[n]||(this.markCache[n]=PT.mark({class:n})))}),n,o);return r.finish()}}const aN=kP.high(JT.fromClass(iN,{decorations:e=>e.decorations})),sN=eN.define([{tag:I_.meta,color:"#404740"},{tag:I_.link,textDecoration:"underline"},{tag:I_.heading,textDecoration:"underline",fontWeight:"bold"},{tag:I_.emphasis,fontStyle:"italic"},{tag:I_.strong,fontWeight:"bold"},{tag:I_.strikethrough,textDecoration:"line-through"},{tag:I_.keyword,color:"#708"},{tag:[I_.atom,I_.bool,I_.url,I_.contentSeparator,I_.labelName],color:"#219"},{tag:[I_.literal,I_.inserted],color:"#164"},{tag:[I_.string,I_.deleted],color:"#a11"},{tag:[I_.regexp,I_.escape,I_.special(I_.string)],color:"#e40"},{tag:I_.definition(I_.variableName),color:"#00f"},{tag:I_.local(I_.variableName),color:"#30a"},{tag:[I_.typeName,I_.namespace],color:"#085"},{tag:I_.className,color:"#167"},{tag:[I_.special(I_.variableName),I_.macroName],color:"#256"},{tag:I_.definition(I_.propertyName),color:"#00c"},{tag:I_.comment,color:"#940"},{tag:I_.invalid,color:"#f00"}]),lN=pZ.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),cN=1e4,uN="()[]{}",dN=mP.define({combine:e=>JP(e,{afterCursor:!0,brackets:uN,maxScanDistance:cN,renderMatch:fN})}),pN=PT.mark({class:"cm-matchingBracket"}),hN=PT.mark({class:"cm-nonmatchingBracket"});function fN(e){let t=[],r=e.matched?pN:hN;return t.push(r.range(e.start.from,e.start.to)),e.end&&t.push(r.range(e.end.from,e.end.to)),t}const mN=AP.define({create:()=>PT.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let r=[],n=t.state.facet(dN);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=ON(t.state,e.head,-1,n)||e.head>0&&ON(t.state,e.head-1,1,n)||n.afterCursor&&(ON(t.state,e.head,1,n)||e.head<t.state.doc.length&&ON(t.state,e.head+1,-1,n));o&&(r=r.concat(n.renderMatch(o,t.state)))}return PT.set(r,!0)},provide:e=>pZ.decorations.from(e)}),gN=[mN,lN],bN=new KC;function yN(e,t,r){let n=e.prop(t<0?KC.openedBy:KC.closedBy);if(n)return n;if(1==e.name.length){let n=r.indexOf(e.name);if(n>-1&&n%2==(t<0?1:0))return[r[n+t]]}return null}function vN(e){let t=e.type.prop(bN);return t?t(e.node):e}function ON(e,t,r,n={}){let o=n.maxScanDistance||cN,i=n.brackets||uN,a=nM(e),s=a.resolveInner(t,r);for(let e=s;e;e=e.parent){let n=yN(e.type,r,i);if(n&&e.from<e.to){let o=vN(e);if(o&&(r>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return wN(0,0,r,e,o,n,i)}}return function(e,t,r,n,o,i,a){let s=r<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=r>0)return null;let c={from:r<0?t-1:t,to:r>0?t+1:t},u=e.doc.iterRange(t,r>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=i;){let i=u.value;r<0&&(e+=i.length);let s=t+e*r;for(let e=r>0?0:i.length-1,t=r>0?i.length:-1;e!=t;e+=r){let t=a.indexOf(i[e]);if(!(t<0||n.resolveInner(s+e,1).type!=o))if(t%2==0==r>0)d++;else{if(1==d)return{start:c,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};d--}}r>0&&(e+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,r,a,s.type,o,i)}function wN(e,t,r,n,o,i,a){let s=n.parent,l={from:o.from,to:o.to},c=0,u=null==s?void 0:s.cursor();if(u&&(r<0?u.childBefore(n.from):u.childAfter(n.to)))do{if(r<0?u.to<=n.from:u.from>=n.to){if(0==c&&i.indexOf(u.type.name)>-1&&u.from<u.to){let e=vN(u);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(yN(u.type,r,a))c++;else if(yN(u.type,-r,a)){if(0==c){let e=vN(u);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(r<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const AN=Object.create(null),xN=[tS.none],kN=[],CN=Object.create(null),SN=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])SN[e]=EN(AN,t);function _N(e,t){kN.indexOf(e)>-1||(kN.push(e),console.warn(t))}function EN(e,t){let r=[];for(let n of t.split(" ")){let t=[];for(let r of n.split(".")){let n=e[r]||I_[r];n?"function"==typeof n?t.length?t=t.map(n):_N(r,`Modifier ${r} used at start of tag`):t.length?_N(r,`Tag ${r} used as modifier`):t=Array.isArray(n)?n:[n]:_N(r,`Unknown highlighting tag ${r}`)}for(let e of t)r.push(e)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),o=n+" "+r.map((e=>e.id)),i=CN[o];if(i)return i.id;let a=CN[o]=tS.define({id:xN.length,name:n,props:[v_({[n]:r})]});return xN.push(a),a.id}let PN=null;function qN(){if(!PN&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],r=new Set;for(let n in e)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof e[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))),r.has(n)||(t.push(n),r.add(n)));PN=t.sort().map((e=>({type:"property",label:e})))}return PN||[]}const TN=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((e=>({type:"class",label:e}))),jN=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((e=>({type:"keyword",label:e}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((e=>({type:"constant",label:e})))),RN=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((e=>({type:"type",label:e}))),ZN=/^(\w[\w-]*|-\w[\w-]*|)$/,$N=/^-(-[\w-]*)?$/,MN=new kS,NN=["Declaration"];function DN(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function LN(e,t,r){if(t.to-t.from>4096){let n=MN.get(t);if(n)return n;let o=[],i=new Set,a=t.cursor(iS.IncludeAnonymous);if(a.firstChild())do{for(let t of LN(e,a.node,r))i.has(t.label)||(i.add(t.label),o.push(t))}while(a.nextSibling());return MN.set(t,o),o}{let n=[],o=new Set;return t.cursor().iterate((t=>{var i;if(r(t)&&t.matchContext(NN)&&":"==(null===(i=t.node.nextSibling)||void 0===i?void 0:i.name)){let r=e.sliceString(t.from,t.to);o.has(r)||(o.add(r),n.push({label:r,type:"variable"}))}})),n}}const IN=e=>t=>{let{state:r,pos:n}=t,o=nM(r).resolveInner(n,-1),i=o.type.isError&&o.from==o.to-1&&"-"==r.doc.sliceString(o.from,o.to);if("PropertyName"==o.name||(i||"TagName"==o.name)&&/^(Block|Styles)$/.test(o.resolve(o.to).name))return{from:o.from,options:qN(),validFor:ZN};if("ValueName"==o.name)return{from:o.from,options:jN,validFor:ZN};if("PseudoClassName"==o.name)return{from:o.from,options:TN,validFor:ZN};if(e(o)||(t.explicit||i)&&function(e,t){var r;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let n=null===(r=e.parent)||void 0===r?void 0:r.firstChild;return"Callee"==(null==n?void 0:n.name)&&"var"==t.sliceString(n.from,n.to)}(o,r.doc))return{from:e(o)||i?o.from:n,options:LN(r.doc,DN(o),e),validFor:$N};if("TagName"==o.name){for(let{parent:e}=o;e;e=e.parent)if("Block"==e.name)return{from:o.from,options:qN(),validFor:ZN};return{from:o.from,options:RN,validFor:ZN}}if(!t.explicit)return null;let a=o.resolve(n),s=a.childBefore(n);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:n,options:TN,validFor:ZN}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:n,options:jN,validFor:ZN}:"Block"==a.name||"Styles"==a.name?{from:n,options:qN(),validFor:ZN}:null},BN=IN((e=>"VariableName"==e.name)),QN=rM.define({name:"css",parser:jE.configure({props:[wM.add({Declaration:PM()}),TM.add({"Block KeyframeList":jM})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),zN=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],UN=new d_({start:!1,shift:(e,t)=>3==t||4==t||311==t?e:312==t,strict:!1}),FN=new KS(((e,t)=>{let{next:r}=e;(125==r||-1==r||t.context)&&e.acceptToken(309)}),{contextual:!0,fallback:!0}),WN=new KS(((e,t)=>{let r,{next:n}=e;zN.indexOf(n)>-1||(47!=n||47!=(r=e.peek(1))&&42!=r)&&(125==n||59==n||-1==n||t.context||e.acceptToken(308))}),{contextual:!0}),YN=new KS(((e,t)=>{let{next:r}=e;if((43==r||45==r)&&(e.advance(),r==e.next)){e.advance();let r=!t.context&&t.canShift(1);e.acceptToken(r?1:2)}}),{contextual:!0}),VN=v_({"get set async static":I_.modifier,"for while do if else switch try catch finally return throw break continue default case":I_.controlKeyword,"in of await yield void typeof delete instanceof":I_.operatorKeyword,"let var const using function class extends":I_.definitionKeyword,"import export from":I_.moduleKeyword,"with debugger as new":I_.keyword,TemplateString:I_.special(I_.string),super:I_.atom,BooleanLiteral:I_.bool,this:I_.self,null:I_.null,Star:I_.modifier,VariableName:I_.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":I_.function(I_.variableName),VariableDefinition:I_.definition(I_.variableName),Label:I_.labelName,PropertyName:I_.propertyName,PrivatePropertyName:I_.special(I_.propertyName),"CallExpression/MemberExpression/PropertyName":I_.function(I_.propertyName),"FunctionDeclaration/VariableDefinition":I_.function(I_.definition(I_.variableName)),"ClassDeclaration/VariableDefinition":I_.definition(I_.className),PropertyDefinition:I_.definition(I_.propertyName),PrivatePropertyDefinition:I_.definition(I_.special(I_.propertyName)),UpdateOp:I_.updateOperator,"LineComment Hashbang":I_.lineComment,BlockComment:I_.blockComment,Number:I_.number,String:I_.string,Escape:I_.escape,ArithOp:I_.arithmeticOperator,LogicOp:I_.logicOperator,BitOp:I_.bitwiseOperator,CompareOp:I_.compareOperator,RegExp:I_.regexp,Equals:I_.definitionOperator,Arrow:I_.function(I_.punctuation),": Spread":I_.punctuation,"( )":I_.paren,"[ ]":I_.squareBracket,"{ }":I_.brace,"InterpolationStart InterpolationEnd":I_.special(I_.brace),".":I_.derefOperator,", ;":I_.separator,"@":I_.meta,TypeName:I_.typeName,TypeDefinition:I_.definition(I_.typeName),"type enum interface implements namespace module declare":I_.definitionKeyword,"abstract global Privacy readonly override":I_.modifier,"is keyof unique infer":I_.operatorKeyword,JSXAttributeValue:I_.attributeValue,JSXText:I_.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":I_.angleBracket,"JSXIdentifier JSXNameSpacedName":I_.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":I_.attributeName,"JSXBuiltin/JSXIdentifier":I_.standard(I_.tagName)}),XN={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},HN={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},GN={__proto__:null,"<":139},KN=p_.deserialize({version:14,states:"$<UO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[QUO'#DwO0fQUO'#EPOOQ(CY'#EX'#EXO1PQSO'#EUOOQO'#Ej'#EjOOQO'#Id'#IdO1XQSO'#GlO1dQSO'#EiO1iQSO'#EiO3kQ(CjO'#JiO6[Q(CjO'#JjO6xQSO'#FXO6}Q#tO'#FpOOQ(CY'#Fa'#FaO7YO&jO'#FaO7hQ,UO'#FwO9UQSO'#FvOOQ(CY'#Jj'#JjOOQ(CW'#Ji'#JiO9ZQSO'#GpOOQQ'#KU'#KUO9fQSO'#IQO9kQ(C[O'#IROOQQ'#JV'#JVOOQQ'#IV'#IVQ`QUOOO`QUOOO%[QUO'#DoO9sQUO'#D{O9zQUO'#D}O9aQSO'#GlO:RQ,UO'#CmO:aQSO'#EhO:lQSO'#EsO:qQ,UO'#F`O;`QSO'#GlOOQO'#KV'#KVO;eQSO'#KVO;sQSO'#GtO;sQSO'#GuO;sQSO'#GwO9aQSO'#GzO<jQSO'#G}O>RQSO'#CcO>cQSO'#HZO>kQSO'#HaO>kQSO'#HcO`QUO'#HeO>kQSO'#HgO>kQSO'#HjO>pQSO'#HpO>uQ(C]O'#HvO%[QUO'#HxO?QQ(C]O'#HzO?]Q(C]O'#H|O9kQ(C[O'#IOO?hQ(CjO'#CgO@jQWO'#DgQOQSOOO%[QUO'#D}OAQQSO'#EQO:RQ,UO'#EhOA]QSO'#EhOAhQ`O'#F`OOQQ'#Ce'#CeOOQ(CW'#Dl'#DlOOQ(CW'#Jm'#JmO%[QUO'#JmOOQO'#Jq'#JqOOQO'#Ia'#IaOBhQWO'#EaOOQ(CW'#E`'#E`OCdQ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!tQ'Z-Y1[5]S'Q!e-QQ'f!rS'p!u!xS'r!y5_S,}'R'YS-i'g'hQ-k'iQ2b-WR2p-jR(t#wR(w#xQ!fQT-X'Z-Y]!qQ!r'Z-Y1[5]Q#o]R'd:dT#jZ%bS#iZ%bS%hm,dU(a#g#h#kS-}(b(cQ.R(dQ0c+TQ2u.OU2v.P.Q.SS6c2w2xR8h6d`#]W#V#Y%e'}(W+Q-xr#fZm#g#h#k%b(b(c(d+T.O.P.Q.S2w2x6dQ1q,dQ2X,zQ6Q2PQ8`6RT;w'S+RT#`W%eS#_W%eS(O#V(WS(T#Y+QS-P'S+RT-s'}-xT'X!e%fQ$kfR)s$pT)h$k)iR3r.zT*X$x*ZR*a${Q0g+]Q2z.ZQ5`1^Q6h3OQ7z5cQ8k6gQ9Y7yQ9l8jQ9}9[Q:V9nQ:[:OR:_:WnqOXst!Z#c%j&m&o&p&r,h,m1w1zQ&g!VR,]&dtmOXst!U!V!Z#c%j&d&m&o&p&r,h,m1w1zR,d&jT%im,dR1W+|R,[&bQ&Q|R+t&RR+j%{T&k!W&nT&l!W&nT1y,m1z",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:371,context:UN,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,"(",144,"JSXStartTag",156,"JSXStartTag JSXStartCloseTag"],["closedBy",34,"InterpolationEnd",45,"]",56,"}",71,")",145,"JSXSelfCloseEndTag JSXEndTag",161,"JSXEndTag"]],propSources:[VN],skippedNodes:[0,3,4,270],repeatNodeCount:37,tokenData:"$Fl(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Nu!`!a$#a!a!b$(n!b!c$,m!c!}Er!}#O$-w#O#P$/R#P#Q$4j#Q#R$5t#R#SEr#S#T$7R#T#o$8]#o#p$<m#p#q$=c#q#r$>s#r#s$@P#s$f%Z$f$g+g$g#BYEr#BY#BZ$AZ#BZ$ISEr$IS$I_$AZ$I_$I|Er$I|$I}$Df$I}$JO$Df$JO$JTEr$JT$JU$AZ$JU$KVEr$KV$KW$AZ$KW&FUEr&FU&FV$AZ&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AZ?HUOEr(n%d_$e&j'}p(Q!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$e&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$e&j(Q!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Q!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$e&j'}pOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r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#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(Z~~",141,332),new GS("j~RQYZXz{^~^O'w~~aP!P!Qd~iO'x~~",25,314)],topRules:{Script:[0,5],SingleExpression:[1,268],SingleClassItem:[2,269]},dialects:{jsx:14548,ts:14550},dynamicPrecedences:{67:1,77:1,79:1,164:1,192:1},specialized:[{term:318,get:e=>XN[e]||-1},{term:334,get:e=>HN[e]||-1},{term:68,get:e=>GN[e]||-1}],tokenPrec:14574});class JN{constructor(e,t,r){this.state=e,this.pos=t,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let t=nM(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),n=t.text.slice(r-t.from,this.pos-t.from),o=n.search(oD(e,!1));return o<0?null:{from:r+o,to:this.pos,text:n.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function eD(e){let t=Object.keys(e).join(""),r=/\w/.test(t);return r&&(t=t.replace(/\w/g,"")),`[${r?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function tD(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[r,n]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),r=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e<n.length;e++)r[n[e]]=!0}let n=eD(t)+eD(r)+"*$";return[new RegExp("^"+n),new RegExp(n)]}(t);return e=>{let o=e.matchBefore(n);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:r}:null}}class rD{constructor(e,t,r,n){this.completion=e,this.source=t,this.match=r,this.score=n}}function nD(e){return e.selection.main.from}function oD(e,t){var r;let{source:n}=e,o=t&&"^"!=n[0],i="$"!=n[n.length-1];return o||i?new RegExp(`${o?"^":""}(?:${n})${i?"$":""}`,null!==(r=e.flags)&&void 0!==r?r:e.ignoreCase?"i":""):e}const iD=DP.define(),aD=new WeakMap;function sD(e){if(!Array.isArray(e))return e;let t=aD.get(e);return t||aD.set(e,t=tD(e)),t}const lD=BP.define(),cD=BP.define();class uD{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=KE(e,t),n=eP(r);this.chars.push(r);let o=e.slice(t,t+n),i=o.toUpperCase();this.folded.push(KE(i==o?o.toLowerCase():i,0)),t+=n}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,!0}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;let{chars:t,folded:r,any:n,precise:o,byWord:i}=this;if(1==t.length){let n=KE(e,0),o=eP(n),i=o==e.length?0:-100;if(n==t[0]);else{if(n!=r[0])return!1;i+=-200}return this.ret(i,[0,o])}let a=e.indexOf(this.pattern);if(0==a)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,l=0;if(a<0){for(let o=0,i=Math.min(e.length,200);o<i&&l<s;){let i=KE(e,o);i!=t[l]&&i!=r[l]||(n[l++]=o),o+=eP(i)}if(l<s)return!1}let c=0,u=0,d=!1,p=0,h=-1,f=-1,m=/[a-z]/.test(e),g=!0;for(let n=0,l=Math.min(e.length,200),b=0;n<l&&u<s;){let l=KE(e,n);a<0&&(c<s&&l==t[c]&&(o[c++]=n),p<s&&(l==t[p]||l==r[p]?(0==p&&(h=n),f=n+1,p++):p=0));let y,v=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=JE(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!n||1==v&&m||0==b&&0!=v)&&(t[u]==l||r[u]==l&&(d=!0)?i[u++]=n:i.length&&(g=!1)),b=v,n+=eP(l)}return u==s&&0==i[0]&&g?this.result((d?-200:0)-100,i,e):p==s&&0==h?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==s?this.ret(-900-e.length,[h,f]):u==s?this.result((d?-200:0)-100-700+(g?0:-1100),i,e):2!=t.length&&this.result((n[0]?-700:0)-200-1100,n,e)}result(e,t,r){let n=[],o=0;for(let e of t){let t=e+(this.astral?eP(KE(r,e)):1);o&&n[o-1]==e?n[o-1]=t:(n[o++]=e,n[o++]=t)}return this.ret(e-r.length,n)}}const dD=mP.define({combine:e=>JP(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hD,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>pD(e(r),t(r)),optionClass:(e,t)=>r=>pD(e(r),t(r)),addToOptions:(e,t)=>e.concat(t)})});function pD(e,t){return e?t?e+" "+t:e:t}function hD(e,t,r,n,o,i){let a,s,l=e.textDirection==pj.RTL,c=l,u=!1,d="top",p=t.left-o.left,h=o.right-t.right,f=n.right-n.left,m=n.bottom-n.top;if(c&&p<Math.min(f,h)?c=!1:!c&&h<Math.min(f,p)&&(c=!0),f<=(c?p:h))a=Math.max(o.top,Math.min(r.top,o.bottom-m))-t.top,s=Math.min(400,c?p:h);else{u=!0,s=Math.min(400,(l?t.right:o.right-t.left)-30);let e=o.bottom-t.bottom;e>=m||e>t.top?a=r.bottom-t.top:(d="bottom",a=t.bottom-r.top)}return{style:`${d}: ${a/((t.bottom-t.top)/i.offsetHeight)}px; max-width: ${s/((t.right-t.left)/i.offsetWidth)}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":c?"left":"right")}}function fD(e,t,r){if(e<=r)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/r);return{from:e*r,to:(e+1)*r}}let n=Math.floor((e-t)/r);return{from:e-(n+1)*r,to:e-n*r}}class mD{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:o,selected:i}=n.open,a=e.state.facet(dD);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,r,n){let o=document.createElement("span");o.className="cm-completionLabel";let i=e.displayLabel||e.label,a=0;for(let e=0;e<n.length;){let t=n[e++],r=n[e++];t>a&&o.appendChild(document.createTextNode(i.slice(a,t)));let s=o.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(i.slice(t,r))),s.className="cm-completionMatchedText",a=r}return a<i.length&&o.appendChild(document.createTextNode(i.slice(a))),o},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=fD(o.length,i,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(r=>{let{options:n}=e.state.field(t).open;for(let t,o=r.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(t=/-(\d+)$/.exec(o.id))&&+t[1]<n.length)return this.applyCompletion(e,n[+t[1]]),void r.preventDefault()})),this.dom.addEventListener("focusout",(t=>{let r=e.state.field(this.stateField,!1);r&&r.tooltip&&e.state.facet(dD).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:cD.of(null)})})),this.showOptions(o,n.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let r=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=n){let{options:o,selected:i,disabled:a}=r.open;n.open&&n.open.options==o||(this.range=fD(o.length,i,e.state.facet(dD).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=(null===(t=n.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=fD(t.options.length,t.selected,this.view.state.facet(dD).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:n}=r;if(!n)return;let o="string"==typeof n?document.createTextNode(n):n(r);if(!o)return;"then"in o?o.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)})).catch((e=>XT(this.view.state,e,"completion info"))):this.addInfoPane(o,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",null!=e.nodeType)r.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:n}=e;r.appendChild(t),this.infoDestroy=n||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,n=this.range.from;r;r=r.nextSibling,n++)"LI"==r.nodeName&&r.id?n==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected"):n--;return t&&function(e,t){let r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o=r.height/e.offsetHeight;n.top<r.top?e.scrollTop-=(r.top-n.top)/o:n.bottom>r.bottom&&(e.scrollTop+=(n.bottom-r.bottom)/o)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),o=this.space;if(!o){let e=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return n.top>Math.min(o.bottom,t.bottom)-10||n.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(dD).positionInfo(this.view,t,n,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,r){const n=document.createElement("ul");n.id=t,n.setAttribute("role","listbox"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let i=r.from;i<r.to;i++){let{completion:a,match:s}=e[i],{section:l}=a;if(l){let e="string"==typeof l?l:l.name;e!=o&&(i>r.from||0==r.from)&&(o=e,"string"!=typeof l&&l.header?n.appendChild(l.header(l)):n.appendChild(document.createElement("completion-section")).textContent=e)}const c=n.appendChild(document.createElement("li"));c.id=t+"-"+i,c.setAttribute("role","option");let u=this.optionClass(a);u&&(c.className=u);for(let e of this.optionContent){let t=e(a,this.view.state,this.view,s);t&&c.appendChild(t)}}return r.from&&n.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&n.classList.add("cm-completionListIncompleteBottom"),n}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function gD(e,t){return r=>new mD(r,e,t)}function bD(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class yD{constructor(e,t,r,n,o,i){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=n,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new yD(this.options,wD(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,n,o){let i=function(e,t){let r=[],n=null,o=e=>{r.push(e);let{section:t}=e.completion;if(t){n||(n=[]);let e="string"==typeof t?t:t.name;n.some((t=>t.name==e))||n.push("string"==typeof t?{name:e}:t)}};for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(!1===n.result.filter)for(let t of n.result.options)o(new rD(t,n.source,e?e(t):[],1e9-r.length));else{let r=new uD(t.sliceDoc(n.from,n.to));for(let t of n.result.options)if(r.match(t.label)){let i=t.displayLabel?e?e(t,r.matched):[]:r.matched;o(new rD(t,n.source,i,r.score+(t.boost||0)))}}}if(n){let e=Object.create(null),t=0,o=(e,t)=>{var r,n;return(null!==(r=e.rank)&&void 0!==r?r:1e9)-(null!==(n=t.rank)&&void 0!==n?n:1e9)||(e.name<t.name?-1:1)};for(let r of n.sort(o))t-=1e5,e[r.name]=t;for(let t of r){let{section:r}=t.completion;r&&(t.score+=e["string"==typeof r?r:r.name])}}let i=[],a=null,s=t.facet(dD).compareCompletions;for(let e of r.sort(((e,t)=>t.score-e.score||s(e.completion,t.completion)))){let t=e.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?i.push(e):bD(e.completion)>bD(a)&&(i[i.length-1]=e),a=e.completion}return i}(e,t);if(!i.length)return n&&e.some((e=>1==e.state))?new yD(n.options,n.attrs,n.tooltip,n.timestamp,n.selected,!0):null;let a=t.facet(dD).selectOnOpen?0:-1;if(n&&n.selected!=a&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;t<i.length;t++)if(i[t].completion==e){a=t;break}}return new yD(i,wD(r,a),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:qD,above:o.aboveCursor},n?n.timestamp:Date.now(),a,!1)}map(e){return new yD(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class vD{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new vD(AD,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,r=t.facet(dD),n=(r.override||t.languageDataAt("autocomplete",nD(t)).map(sD)).map((t=>(this.active.find((e=>e.source==t))||new kD(t,this.active.some((e=>0!=e.state))?1:0)).update(e,r)));n.length==this.active.length&&n.every(((e,t)=>e==this.active[t]))&&(n=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||n.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let r=0,n=0;;){for(;r<e.length&&!e[r].hasResult;)r++;for(;n<t.length&&!t[n].hasResult;)n++;let o=r==e.length,i=n==t.length;if(o||i)return o==i;if(e[r++].result!=t[n++].result)return!1}}(n,this.active)?o=yD.build(n,t,this.id,o,r):o&&o.disabled&&!n.some((e=>1==e.state))&&(o=null),!o&&n.every((e=>1!=e.state))&&n.some((e=>e.hasResult()))&&(n=n.map((e=>e.hasResult()?new kD(e.source,0):e)));for(let t of e.effects)t.is(_D)&&(o=o&&o.setSelected(t.value,this.id));return n==this.active&&o==this.open?this:new vD(n,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:OD}}const OD={"aria-autocomplete":"list"};function wD(e,t){let r={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(r["aria-activedescendant"]=e+"-"+t),r}const AD=[];function xD(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class kD{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=xD(e),n=this;r?n=n.handleUserEvent(e,r,t):e.docChanged?n=n.handleChange(e):e.selection&&0!=n.state&&(n=new kD(n.source,0));for(let t of e.effects)if(t.is(lD))n=new kD(n.source,1,t.value?nD(e.state):-1);else if(t.is(cD))n=new kD(n.source,0);else if(t.is(SD))for(let e of t.value)e.source==n.source&&(n=e);return n}handleUserEvent(e,t,r){return"delete"!=t&&r.activateOnTyping?new kD(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(nD(e.startState))?new kD(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new kD(this.source,this.state,e.mapPos(this.explicitPos))}}class CD extends kD{constructor(e,t,r,n,o){super(e,2,t),this.result=r,this.from=n,this.to=o}hasResult(){return!0}handleUserEvent(e,t,r){var n;let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),a=nD(e.state);if((this.explicitPos<0?a<=o:a<this.from)||a>i||"delete"==t&&nD(e.startState)==this.from)return new kD(this.source,"input"==t&&r.activateOnTyping?1:0);let s,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,r,n){if(!e)return!1;let o=t.sliceDoc(r,n);return"function"==typeof e?e(o,r,n,t):oD(e,!0).test(o)}(this.result.validFor,e.state,o,i)?new CD(this.source,l,this.result,o,i):this.result.update&&(s=this.result.update(this.result,o,i,new JN(e.state,a,l>=0)))?new CD(this.source,l,s,s.from,null!==(n=s.to)&&void 0!==n?n:nD(e.state)):new kD(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new kD(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new CD(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const SD=BP.define({map:(e,t)=>e.map((e=>e.map(t)))}),_D=BP.define(),ED=AP.define({create:()=>vD.start(),update:(e,t)=>e.update(t),provide:e=>[f$.from(e,(e=>e.tooltip)),pZ.contentAttributes.from(e,(e=>e.attrs))]});function PD(e,t){const r=t.completion.apply||t.completion.label;let n=e.state.field(ED).active.find((e=>e.source==t.source));return n instanceof CD&&("string"==typeof r?e.dispatch(Object.assign(Object.assign({},function(e,t,r,n){let{main:o}=e.selection,i=r-o.from,a=n-o.from;return Object.assign(Object.assign({},e.changeByRange((s=>s!=o&&r!=n&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(r,n)?{range:s}:{changes:{from:s.from+i,to:n==o.from?s.to:s.from+a,insert:t},range:pP.cursor(s.from+i+t.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,r,n.from,n.to)),{annotations:iD.of(t.completion)})):r(e,t.completion,n.from,n.to),!0)}const qD=gD(ED,PD);function TD(e,t="option"){return r=>{let n=r.state.field(ED,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<r.state.facet(dD).interactionDelay)return!1;let o,i=1;"page"==t&&(o=w$(r,n.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=n.open.options,s=n.open.selected>-1?n.open.selected+i*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),r.dispatch({effects:_D.of(s)}),!0}}class jD{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const RD=JT.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(ED).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(ED);if(!e.selectionSet&&!e.docChanged&&e.startState.field(ED)==t)return;let r=e.transactions.some((e=>(e.selection||e.docChanged)&&!xD(e)));for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){XT(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==xD(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(ED);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,r=nD(t),n=new JN(t,r,e.explicitPos==r),o=new jD(e,n);this.running.push(o),Promise.resolve(e.source(n)).then((e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:cD.of(null)}),XT(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(dD).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],r=this.view.state.facet(dD);for(let n=0;n<this.running.length;n++){let o=this.running[n];if(void 0===o.done)continue;if(this.running.splice(n--,1),o.done){let n=new CD(o.active.source,o.active.explicitPos,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:nD(o.updates.length?o.updates[0].startState:this.view.state));for(let e of o.updates)n=n.update(e,r);if(n.hasResult()){t.push(n);continue}}let i=this.view.state.field(ED).active.find((e=>e.source==o.active.source));if(i&&1==i.state)if(null==o.done){let e=new kD(o.active.source,0);for(let t of o.updates)e=e.update(t,r);1!=e.state&&t.push(e)}else this.startQuery(i)}t.length&&this.view.dispatch({effects:SD.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(ED,!1);if(t&&t.tooltip&&this.view.state.facet(dD).closeOnBlur){let r=t.open&&w$(this.view,t.open.tooltip);r&&r.dom.contains(e.relatedTarget)||this.view.dispatch({effects:cD.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:lD.of(!1)})),20),this.composing=0}}}),ZD=pZ.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class $D{constructor(e,t,r,n){this.field=e,this.line=t,this.from=r,this.to=n}}class MD{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,rP.TrackDel),r=e.mapPos(this.to,1,rP.TrackDel);return null==t||null==r?null:new MD(this.field,t,r)}}class ND{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],n=[t],o=e.doc.lineAt(t),i=/^\s*/.exec(o.text)[0];for(let o of this.lines){if(r.length){let r=i,a=/^\t*/.exec(o)[0].length;for(let t=0;t<a;t++)r+=e.facet(gM);n.push(t+r.length-a),o=r+o.slice(a)}r.push(o),t+=o.length+1}let a=this.fieldPositions.map((e=>new MD(e.field,n[e.line]+e.from,n[e.line]+e.to)));return{text:r,ranges:a}}static parse(e){let t,r=[],n=[],o=[];for(let i of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(i);){let e=t[1]?+t[1]:null,a=t[2]||t[3]||"",s=-1;for(let t=0;t<r.length;t++)(null!=e?r[t].seq==e:a&&r[t].name==a)&&(s=t);if(s<0){let t=0;for(;t<r.length&&(null==e||null!=r[t].seq&&r[t].seq<e);)t++;r.splice(t,0,{seq:e,name:a}),s=t;for(let e of o)e.field>=s&&e.field++}o.push(new $D(s,n.length,t.index,t.index+a.length)),i=i.slice(0,t.index)+a+i.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(i);){i=i.slice(0,e.index)+e[1]+i.slice(e.index+e[0].length);for(let t of o)t.line==n.length&&t.from>e.index&&(t.from--,t.to--)}n.push(i)}return new ND(n,o)}}let DD=PT.widget({widget:new class extends _T{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),LD=PT.mark({class:"cm-snippetField"});class ID{constructor(e,t){this.ranges=e,this.active=t,this.deco=PT.set(e.map((e=>(e.from==e.to?DD:LD).range(e.from,e.to))))}map(e){let t=[];for(let r of this.ranges){let n=r.map(e);if(!n)return null;t.push(n)}return new ID(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const BD=BP.define({map:(e,t)=>e&&e.map(t)}),QD=BP.define(),zD=AP.define({create:()=>null,update(e,t){for(let r of t.effects){if(r.is(BD))return r.value;if(r.is(QD)&&e)return new ID(e.ranges,r.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>pZ.decorations.from(e,(e=>e?e.deco:PT.none))});function UD(e,t){return pP.create(e.filter((e=>e.field==t)).map((e=>pP.range(e.from,e.to))))}function FD(e){let t=ND.parse(e);return(e,r,n,o)=>{let{text:i,ranges:a}=t.instantiate(e.state,n),s={changes:{from:n,to:o,insert:RE.of(i)},scrollIntoView:!0,annotations:r?iD.of(r):void 0};if(a.length&&(s.selection=UD(a,0)),a.length>1){let t=new ID(a,0),r=s.effects=[BD.of(t)];void 0===e.state.field(zD,!1)&&r.push(BP.appendConfig.of([zD,XD,GD,ZD]))}e.dispatch(e.state.update(s))}}function WD(e){return({state:t,dispatch:r})=>{let n=t.field(zD,!1);if(!n||e<0&&0==n.active)return!1;let o=n.active+e,i=e>0&&!n.ranges.some((t=>t.field==o+e));return r(t.update({selection:UD(n.ranges,o),effects:BD.of(i?null:new ID(n.ranges,o)),scrollIntoView:!0})),!0}}const YD=[{key:"Tab",run:WD(1),shift:WD(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(zD,!1)&&(t(e.update({effects:BD.of(null)})),!0)}],VD=mP.define({combine:e=>e.length?e[0]:YD}),XD=kP.highest(OZ.compute([VD],(e=>e.facet(VD))));function HD(e,t){return Object.assign(Object.assign({},t),{apply:FD(e)})}const GD=pZ.domEventHandlers({mousedown(e,t){let r,n=t.state.field(zD,!1);if(!n||null==(r=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let o=n.ranges.find((e=>e.from<=r&&e.to>=r));return!(!o||o.field==n.active||(t.dispatch({selection:UD(n.ranges,o.field),effects:BD.of(n.ranges.some((e=>e.field>o.field))?new ID(n.ranges,o.field):null),scrollIntoView:!0}),0))}}),KD={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},JD=BP.define({map(e,t){let r=t.mapPos(e,-1,rP.TrackAfter);return null==r?void 0:r}}),eL=new class extends eq{};eL.startSide=1,eL.endSide=-1;const tL=AP.define({create:()=>oq.empty,update(e,t){if(e=e.map(t.changes),t.selection){let r=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=r.from&&e<=r.to})}for(let r of t.effects)r.is(JD)&&(e=e.update({add:[eL.range(r.value,r.value+1)]}));return e}}),rL="()[]{}<>";function nL(e){for(let t=0;t<8;t+=2)if(rL.charCodeAt(t)==e)return rL.charAt(t+1);return JE(e<128?e:e+1)}function oL(e,t){return e.languageDataAt("closeBrackets",t)[0]||KD}const iL="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),aL=pZ.inputHandler.of(((e,t,r,n)=>{if((iL?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(n.length>2||2==n.length&&1==eP(KE(n,0))||t!=o.from||r!=o.to)return!1;let i=function(e,t){let r=oL(e,e.selection.main.head),n=r.brackets||KD.brackets;for(let o of n){let i=nL(KE(o,0));if(t==o)return i==o?pL(e,o,n.indexOf(o+o+o)>-1,r):uL(e,o,i,r.before||KD.before);if(t==i&&lL(e,e.selection.main.from))return dL(e,0,i)}return null}(e.state,n);return!!i&&(e.dispatch(i),!0)})),sL=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=oL(e,e.selection.main.head).brackets||KD.brackets,n=null,o=e.changeByRange((t=>{if(t.empty){let n=function(e,t){let r=e.sliceString(t-2,t);return eP(KE(r,0))==r.length?r:r.slice(1)}(e.doc,t.head);for(let o of r)if(o==n&&cL(e.doc,t.head)==nL(KE(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:pP.cursor(t.head-o.length)}}return{range:n=t}}));return n||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!n}}];function lL(e,t){let r=!1;return e.field(tL).between(0,e.doc.length,(e=>{e==t&&(r=!0)})),r}function cL(e,t){let r=e.sliceString(t,t+2);return r.slice(0,eP(KE(r,0)))}function uL(e,t,r,n){let o=null,i=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:r,from:i.to}],effects:JD.of(i.to+t.length),range:pP.range(i.anchor+t.length,i.head+t.length)};let a=cL(e.doc,i.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:t+r,from:i.head},effects:JD.of(i.head+t.length),range:pP.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function dL(e,t,r){let n=null,o=e.changeByRange((t=>t.empty&&cL(e.doc,t.head)==r?{changes:{from:t.head,to:t.head+r.length,insert:r},range:pP.cursor(t.head+r.length)}:n={range:t}));return n?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function pL(e,t,r,n){let o=n.stringPrefixes||KD.stringPrefixes,i=null,a=e.changeByRange((n=>{if(!n.empty)return{changes:[{insert:t,from:n.from},{insert:t,from:n.to}],effects:JD.of(n.to+t.length),range:pP.range(n.anchor+t.length,n.head+t.length)};let a,s=n.head,l=cL(e.doc,s);if(l==t){if(hL(e,s))return{changes:{insert:t+t,from:s},effects:JD.of(s+t.length),range:pP.cursor(s+t.length)};if(lL(e,s)){let n=r&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+n.length,insert:n},range:pP.cursor(s+n.length)}}}else{if(r&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=fL(e,s-2*t.length,o))>-1&&hL(e,a))return{changes:{insert:t+t+t+t,from:s},effects:JD.of(s+t.length),range:pP.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=XP.Word&&fL(e,s,o)>-1&&!function(e,t,r,n){let o=nM(e).resolveInner(t,-1),i=n.reduce(((e,t)=>Math.max(e,t.length)),0);for(let a=0;a<5;a++){let a=e.sliceDoc(o.from,Math.min(o.to,o.from+r.length+i)),s=a.indexOf(r);if(!s||s>-1&&n.indexOf(a.slice(0,s))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>r.length+s;){if(e.sliceDoc(t.to-r.length,t.to)==r)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:JD.of(s+t.length),range:pP.cursor(s+t.length)}}return{range:i=n}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function hL(e,t){let r=nM(e).resolveInner(t+1);return r.parent&&r.from==t}function fL(e,t,r){let n=e.charCategorizer(t);if(n(e.sliceDoc(t-1,t))!=XP.Word)return t;for(let o of r){let r=t-o.length;if(e.sliceDoc(r,t)==o&&n(e.sliceDoc(r-1,r))!=XP.Word)return r}return-1}const mL=[{key:"Ctrl-Space",run:e=>!!e.state.field(ED,!1)&&(e.dispatch({effects:lD.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(ED,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:cD.of(null)}),0))}},{key:"ArrowDown",run:TD(!0)},{key:"ArrowUp",run:TD(!1)},{key:"PageDown",run:TD(!0,"page")},{key:"PageUp",run:TD(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(ED,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(dD).interactionDelay)&&PD(e,t.open.options[t.open.selected])}}],gL=kP.highest(OZ.computeN([dD],(e=>e.facet(dD).defaultKeymap?[mL]:[]))),bL=[HD("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),HD("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),HD("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),HD("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),HD("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),HD("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),HD("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),HD("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),HD("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),HD('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),HD('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],yL=bL.concat([HD("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),HD("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),HD("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),vL=new kS,OL=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wL(e){return(t,r)=>{let n=t.node.getChild("VariableDefinition");return n&&r(n,e),!0}}const AL=["FunctionDeclaration"],xL={FunctionDeclaration:wL("function"),ClassDeclaration:wL("class"),ClassExpression:()=>!0,EnumDeclaration:wL("constant"),TypeAliasDeclaration:wL("type"),NamespaceDeclaration:wL("namespace"),VariableDefinition(e,t){e.matchContext(AL)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function kL(e,t){let r=vL.get(t);if(r)return r;let n=[],o=!0;function i(t,r){let o=e.sliceString(t.from,t.to);n.push({label:o,type:r})}return t.cursor(iS.IncludeAnonymous).iterate((t=>{if(o)o=!1;else if(t.name){let e=xL[t.name];if(e&&e(t,i)||OL.has(t.name))return!1}else if(t.to-t.from>8192){for(let r of kL(e,t.node))n.push(r);return!1}})),vL.set(t,n),n}const CL=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,SL=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function _L(e){let t=nM(e.state).resolveInner(e.pos,-1);if(SL.indexOf(t.name)>-1)return null;let r="VariableName"==t.name||t.to-t.from<20&&CL.test(e.state.sliceDoc(t.from,t.to));if(!r&&!e.explicit)return null;let n=[];for(let r=t;r;r=r.parent)OL.has(r.name)&&(n=n.concat(kL(e.state.doc,r)));return{options:n,from:r?t.from:e.pos,validFor:CL}}const EL=rM.define({name:"javascript",parser:KN.configure({props:[wM.add({IfStatement:PM({except:/^\s*({|else\b)/}),TryStatement:PM({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,r=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(r?0:n?1:2)*e.unit},Block:_M({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":PM({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),TM.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":jM,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),PL={test:e=>/^JSX/.test(e.name),facet:K$({commentTokens:{block:{open:"{/*",close:"*/}"}}})},qL=EL.configure({dialect:"ts"},"typescript"),TL=EL.configure({dialect:"jsx",props:[J$.add((e=>e.isTop?[PL]:void 0))]}),jL=EL.configure({dialect:"jsx ts",props:[J$.add((e=>e.isTop?[PL]:void 0))]},"typescript");let RL=e=>({label:e,type:"keyword"});const ZL="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(RL),$L=ZL.concat(["declare","implements","private","protected","public"].map(RL));function ML(e={}){let t=e.jsx?e.typescript?jL:TL:e.typescript?qL:EL,r=e.typescript?yL.concat($L):bL.concat(ZL);return new hM(t,[EL.data.of({autocomplete:(n=SL,o=tD(r),e=>{for(let t=nM(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(n.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return o(e)})}),EL.data.of({autocomplete:_L}),e.jsx?LL:[]]);var n,o}function NL(e,t,r=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,r));return""}const DL="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),LL=pZ.inputHandler.of(((e,t,r,n,o)=>{if((DL?e.composing:e.compositionStarted)||e.state.readOnly||t!=r||">"!=n&&"/"!=n||!EL.isActiveAt(e.state,t,-1))return!1;let i=o(),{state:a}=i,s=a.changeByRange((e=>{var t;let r,{head:o}=e,i=nM(a).resolveInner(o-1,-1);if("JSXStartTag"==i.name&&(i=i.parent),a.doc.sliceString(o-1,o)!=n||"JSXAttributeValue"==i.name&&i.to>o);else{if(">"==n&&"JSXFragmentTag"==i.name)return{range:e,changes:{from:o,insert:"</>"}};if("/"==n&&"JSXStartCloseTag"==i.name){let e=i.parent,n=e.parent;if(n&&e.from==o-2&&((r=NL(a.doc,n.firstChild,o))||"JSXFragmentTag"==(null===(t=n.firstChild)||void 0===t?void 0:t.name))){let e=`${r}>`;return{range:pP.cursor(o+e.length,-1),changes:{from:o,insert:e}}}}else if(">"==n){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(i);if(t&&!/^\/?>|^<\//.test(a.doc.sliceString(o,o+2))&&(r=NL(a.doc,t,o)))return{range:e,changes:{from:o,insert:`</${r}>`}}}}return{range:e}}));return!s.changes.empty&&(e.dispatch([i,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),IL=["_blank","_self","_top","_parent"],BL=["ascii","utf-8","utf-16","latin1","latin1"],QL=["get","post","put","delete"],zL=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],UL=["true","false"],FL={},WL={a:{attrs:{href:null,ping:null,type:null,media:null,target:IL,hreflang:null}},abbr:FL,address:FL,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:FL,aside:FL,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:FL,base:{attrs:{href:null,target:IL}},bdi:FL,bdo:FL,blockquote:{attrs:{cite:null}},body:FL,br:FL,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:zL,formmethod:QL,formnovalidate:["novalidate"],formtarget:IL,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:FL,center:FL,cite:FL,code:FL,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:FL,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:FL,div:FL,dl:FL,dt:FL,em:FL,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:FL,figure:FL,footer:FL,form:{attrs:{action:null,name:null,"accept-charset":BL,autocomplete:["on","off"],enctype:zL,method:QL,novalidate:["novalidate"],target:IL}},h1:FL,h2:FL,h3:FL,h4:FL,h5:FL,h6:FL,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:FL,hgroup:FL,hr:FL,html:{attrs:{manifest:null}},i:FL,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:zL,formmethod:QL,formnovalidate:["novalidate"],formtarget:IL,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:FL,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:FL,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:FL,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:BL,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:FL,noscript:FL,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:FL,param:{attrs:{name:null,value:null}},pre:FL,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:FL,rt:FL,ruby:FL,samp:FL,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:BL}},section:FL,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:FL,source:{attrs:{src:null,type:null,media:null}},span:FL,strong:FL,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:FL,summary:FL,sup:FL,table:FL,tbody:FL,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:FL,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:FL,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:FL,time:{attrs:{datetime:null}},title:FL,tr:FL,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:FL,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:FL},YL={accesskey:null,class:null,contenteditable:UL,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:UL,autocorrect:UL,autocapitalize:UL,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":UL,"aria-autocomplete":["inline","list","both","none"],"aria-busy":UL,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":UL,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":UL,"aria-hidden":UL,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":UL,"aria-multiselectable":UL,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":UL,"aria-relevant":null,"aria-required":UL,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},VL="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((e=>"on"+e));for(let e of VL)YL[e]=null;class XL{constructor(e,t){this.tags=Object.assign(Object.assign({},WL),e),this.globalAttrs=Object.assign(Object.assign({},YL),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function HL(e,t,r=e.length){if(!t)return"";let n=t.firstChild,o=n&&n.getChild("TagName");return o?e.sliceString(o.from,Math.min(o.to,r)):""}function GL(e,t=!1){for(;e;e=e.parent)if("Element"==e.name){if(!t)return e;t=!1}return null}function KL(e,t,r){let n=r.tags[HL(e,GL(t))];return(null==n?void 0:n.children)||r.allTags}function JL(e,t){let r=[];for(let n=GL(t);n&&!n.type.isTop;n=GL(n.parent)){let o=HL(e,n);if(o&&"CloseTag"==n.lastChild.name)break;o&&r.indexOf(o)<0&&("EndTag"==t.name||t.from>=n.firstChild.to)&&r.push(o)}return r}XL.default=new XL;const eI=/^[:\-\.\w\u00b7-\uffff]*$/;function tI(e,t,r,n,o){let i=/\s*>/.test(e.sliceDoc(o,o+5))?"":">",a=GL(r,!0);return{from:n,to:o,options:KL(e.doc,a,t).map((e=>({label:e,type:"type"}))).concat(JL(e.doc,r).map(((e,t)=>({label:"/"+e,apply:"/"+e+i,type:"type",boost:99-t})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function rI(e,t,r,n){let o=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:JL(e.doc,t).map(((e,t)=>({label:e,apply:e+o,type:"type",boost:99-t}))),validFor:eI}}function nI(e,t){let{state:r,pos:n}=t,o=nM(r).resolveInner(n,-1),i=o.resolve(n);for(let e,t=n;i==o&&(e=o.childBefore(t));){let r=e.lastChild;if(!r||!r.type.isError||r.from<r.to)break;i=o=e,t=r.from}return"TagName"==o.name?o.parent&&/CloseTag$/.test(o.parent.name)?rI(r,o,o.from,n):tI(r,e,o,o.from,n):"StartTag"==o.name?tI(r,e,o,n,n):"StartCloseTag"==o.name||"IncompleteCloseTag"==o.name?rI(r,o,n,n):t.explicit&&("OpenTag"==o.name||"SelfClosingTag"==o.name)||"AttributeName"==o.name?function(e,t,r,n,o){let i=GL(r),a=i?t.tags[HL(e.doc,i)]:null,s=a&&a.attrs?Object.keys(a.attrs):[];return{from:n,to:o,options:(a&&!1===a.globalAttrs?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map((e=>({label:e,type:"property"}))),validFor:eI}}(r,e,o,"AttributeName"==o.name?o.from:n,n):"Is"==o.name||"AttributeValue"==o.name||"UnquotedAttributeValue"==o.name?function(e,t,r,n,o){var i;let a,s=null===(i=r.parent)||void 0===i?void 0:i.getChild("AttributeName"),l=[];if(s){let i=e.sliceDoc(s.from,s.to),c=t.globalAttrs[i];if(!c){let n=GL(r),o=n?t.tags[HL(e.doc,n)]:null;c=(null==o?void 0:o.attrs)&&o.attrs[i]}if(c){let t=e.sliceDoc(n,o).toLowerCase(),r='"',i='"';/^['"]/.test(t)?(a='"'==t[0]?/^[^"]*$/:/^[^']*$/,r="",i=e.sliceDoc(o,o+1)==t[0]?"":t[0],t=t.slice(1),n++):a=/^[^\s<>='"]*$/;for(let e of c)l.push({label:e,apply:r+e+i,type:"constant"})}}return{from:n,to:o,options:l,validFor:a}}(r,e,o,"Is"==o.name?n:o.from,n):!t.explicit||"Element"!=i.name&&"Text"!=i.name&&"Document"!=i.name?null:function(e,t,r,n){let o=[],i=0;for(let n of KL(e.doc,r,t))o.push({label:"<"+n,type:"type"});for(let t of JL(e.doc,r))o.push({label:"</"+t+">",type:"type",boost:99-i++});return{from:n,to:n,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(r,e,o,n)}function oI(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new XL(t,r):XL.default;return e=>nI(n,e)}const iI=EL.parser.configure({top:"SingleExpression"}),aI=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:qL.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:TL.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:jL.parser},{tag:"script",attrs:e=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type),parser:iI},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:EL.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:QN.parser}],sI=[{name:"style",parser:QN.parser.configure({top:"Styles"})}].concat(VL.map((e=>({name:e,parser:EL.parser})))),lI=rM.define({name:"html",parser:yE.configure({props:[wM.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t,r=null;for(let t=e.node;;){let e=t.lastChild;if(!e||"Element"!=e.name||e.to!=t.to)break;r=t=e}return r&&(!(t=r.lastChild)||"CloseTag"!=t.name&&"SelfClosingTag"!=t.name)?e.lineIndent(r.from)+e.unit:null}}),TM.add({Element(e){let t=e.firstChild,r=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==r.name?r.from:e.to}:null}}),bN.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),cI=lI.configure({wrap:AE(aI,sI)});function uI(e={}){let t,r="";!1===e.matchClosingTags&&(r="noMatch"),!0===e.selfClosingTags&&(r=(r?r+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=AE((e.nestedLanguages||[]).concat(aI),(e.nestedAttributes||[]).concat(sI)));let n=t?lI.configure({wrap:t,dialect:r}):r?cI.configure({dialect:r}):cI;return new hM(n,[cI.data.of({autocomplete:oI(e)}),!1!==e.autoCloseTags?pI:[],ML().support,new hM(QN,QN.data.of({autocomplete:BN})).support])}const dI=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),pI=pZ.inputHandler.of(((e,t,r,n,o)=>{if(e.composing||e.state.readOnly||t!=r||">"!=n&&"/"!=n||!cI.isActiveAt(e.state,t,-1))return!1;let i=o(),{state:a}=i,s=a.changeByRange((e=>{var t,r,o;let i,s=a.doc.sliceString(e.from-1,e.to)==n,{head:l}=e,c=nM(a).resolveInner(l-1,-1);if("TagName"!=c.name&&"StartTag"!=c.name||(c=c.parent),s&&">"==n&&"OpenTag"==c.name){if("CloseTag"!=(null===(r=null===(t=c.parent)||void 0===t?void 0:t.lastChild)||void 0===r?void 0:r.name)&&(i=HL(a.doc,c.parent,l))&&!dI.has(i))return{range:e,changes:{from:l,to:l+(">"===a.doc.sliceString(l,l+1)?1:0),insert:`</${i}>`}}}else if(s&&"/"==n&&"IncompleteCloseTag"==c.name){let e=c.parent;if(c.from==l-2&&"CloseTag"!=(null===(o=e.lastChild)||void 0===o?void 0:o.name)&&(i=HL(a.doc,e,l))&&!dI.has(i)){let e=l+(">"===a.doc.sliceString(l,l+1)?1:0),t=`${i}>`;return{range:pP.cursor(l+t.length,-1),changes:{from:l,to:e,insert:t}}}}return{range:e}}));return!s.changes.empty&&(e.dispatch([i,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function hI(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let o=e(t,r);return!!o&&(n(r.update(o)),!0)}}const fI=hI(OI,0),mI=hI(vI,0),gI=hI(((e,t)=>vI(e,t,function(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),o=r.to<=n.to?n:e.doc.lineAt(r.to),i=t.length-1;i>=0&&t[i].to>n.from?t[i].to=o.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:o.to})}return t}(t))),0);function bI(e,t){let r=e.languageDataAt("commentTokens",t);return r.length?r[0]:{}}const yI=50;function vI(e,t,r=t.selection.ranges){let n=r.map((e=>bI(t,e.from).block));if(!n.every((e=>e)))return null;let o=r.map(((e,r)=>function(e,{open:t,close:r},n,o){let i,a,s=e.sliceDoc(n-yI,n),l=e.sliceDoc(o,o+yI),c=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(l)[0].length,d=s.length-c;if(s.slice(d-t.length,d)==t&&l.slice(u,u+r.length)==r)return{open:{pos:n-c,margin:c&&1},close:{pos:o+u,margin:u&&1}};o-n<=2*yI?i=a=e.sliceDoc(n,o):(i=e.sliceDoc(n,n+yI),a=e.sliceDoc(o-yI,o));let p=/^\s*/.exec(i)[0].length,h=/\s*$/.exec(a)[0].length,f=a.length-h-r.length;return i.slice(p,p+t.length)==t&&a.slice(f,f+r.length)==r?{open:{pos:n+p+t.length,margin:/\s/.test(i.charAt(p+t.length))?1:0},close:{pos:o-h-r.length,margin:/\s/.test(a.charAt(f-1))?1:0}}:null}(t,n[r],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(r.map(((e,t)=>o[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,r=0;r<o.length;r++)if(t=o[r]){let o=n[r],{open:i,close:a}=t;e.push({from:i.pos-o.open.length,to:i.pos+i.margin},{from:a.pos-a.margin,to:a.pos+o.close.length})}return{changes:e}}return null}function OI(e,t,r=t.selection.ranges){let n=[],o=-1;for(let{from:e,to:i}of r){let r=n.length,a=1e9,s=bI(t,e).line;if(s){for(let r=e;r<=i;){let l=t.doc.lineAt(r);if(l.from>o&&(e==i||i>l.from)){o=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,r=l.text.slice(e,e+s.length)==s?e:-1;e<l.text.length&&e<a&&(a=e),n.push({line:l,comment:r,token:s,indent:e,empty:t,single:!1})}r=l.to+1}if(a<1e9)for(let e=r;e<n.length;e++)n[e].indent<n[e].line.text.length&&(n[e].indent=a);n.length==r+1&&(n[r].single=!0)}}if(2!=e&&n.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:r,indent:o,empty:i,single:a}of n)!a&&i||e.push({from:t.from+o,insert:r+" "});let r=t.changes(e);return{changes:r,selection:t.selection.map(r,1)}}if(1!=e&&n.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:r,token:o}of n)if(r>=0){let n=t.from+r,i=n+o.length;" "==t.text[i-t.from]&&i++,e.push({from:n,to:i})}return{changes:e}}return null}const wI=DP.define(),AI=DP.define(),xI=mP.define(),kI=mP.define({combine:e=>JP(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,n)=>e(r,n)||t(r,n)})}),CI=AP.define({create:()=>BI.empty,update(e,t){let r=t.state.facet(kI),n=t.annotation(wI);if(n){let o=TI.fromTransaction(t,n.selection),i=n.side,a=0==i?e.undone:e.done;return a=o?jI(a,a.length,r.minDepth,o):MI(a,t.startState.selection),new BI(0==i?n.rest:a,0==i?a:n.rest)}let o=t.annotation(AI);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(QP.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=TI.fromTransaction(t),a=t.annotation(QP.time),s=t.annotation(QP.userEvent);return i?e=e.addChanges(i,a,s,r,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,r.newGroupDelay)),"full"!=o&&"after"!=o||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new BI(e.done.map(TI.fromJSON),e.undone.map(TI.fromJSON))});function SI(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let o=r.field(CI,!1);if(!o)return!1;let i=o.pop(e,r,t);return!!i&&(n(i),!0)}}const _I=SI(0,!1),EI=SI(1,!1),PI=SI(0,!0),qI=SI(1,!0);class TI{constructor(e,t,r,n,o){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=n,this.selectionsAfter=o}setSelAfter(e){return new TI(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(r=this.startSelection)||void 0===r?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new TI(e.changes&&oP.fromJSON(e.changes),[],e.mapped&&nP.fromJSON(e.mapped),e.startSelection&&pP.fromJSON(e.startSelection),e.selectionsAfter.map(pP.fromJSON))}static fromTransaction(e,t){let r=ZI;for(let t of e.startState.facet(xI)){let n=t(e);n.length&&(r=r.concat(n))}return!r.length&&e.changes.empty?null:new TI(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,ZI)}static selection(e){return new TI(void 0,ZI,void 0,void 0,e)}}function jI(e,t,r,n){let o=t+1>r+20?t-r-1:0,i=e.slice(o,t);return i.push(n),i}function RI(e,t){return e.length?t.length?e.concat(t):e:t}const ZI=[],$I=200;function MI(e,t){if(e.length){let r=e[e.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-$I));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),jI(e,e.length-1,1e9,r.setSelAfter(n)))}return[TI.selection([t])]}function NI(e){let t=e[e.length-1],r=e.slice();return r[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),r}function DI(e,t){if(!e.length)return e;let r=e.length,n=ZI;for(;r;){let o=LI(e[r-1],t,n);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,r);return t[r-1]=o,t}t=o.mapped,r--,n=o.selectionsAfter}return n.length?[TI.selection(n)]:ZI}function LI(e,t,r){let n=RI(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):ZI,r);if(!e.changes)return TI.selection(n);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new TI(o,BP.mapEffects(e.effects,t),a,e.startSelection.map(i),n)}const II=/^(input\.type|delete)($|\.)/;class BI{constructor(e,t,r=0,n=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=n}isolate(){return this.prevTime?new BI(this.done,this.undone):this}addChanges(e,t,r,n,o){let i=this.done,a=i[i.length-1];return i=a&&a.changes&&!a.changes.empty&&e.changes&&(!r||II.test(r))&&(!a.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(o,function(e,t){let r=[],n=!1;return e.iterChangedRanges(((e,t)=>r.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e<r.length;){let t=r[e++],a=r[e++];i>=t&&o<=a&&(n=!0)}})),n}(a.changes,e.changes))||"input.type.compose"==r)?jI(i,i.length-1,n.minDepth,new TI(e.changes.compose(a.changes),RI(e.effects,a.effects),a.mapped,a.startSelection,ZI)):jI(i,i.length,n.minDepth,e),new BI(i,ZI,t,r)}addSelection(e,t,r,n){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:ZI;return o.length>0&&t-this.prevTime<n&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&function(e,t){return e.ranges.length==t.ranges.length&&0===e.ranges.filter(((e,r)=>e.empty!=t.ranges[r].empty)).length}(o[o.length-1],e)?this:new BI(MI(this.done,e),this.undone,t,r)}addMapping(e){return new BI(DI(this.done,e),DI(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let n=0==e?this.done:this.undone;if(0==n.length)return null;let o=n[n.length-1],i=o.selectionsAfter[0]||t.selection;if(r&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:wI.of({side:e,rest:NI(n),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let r=1==n.length?ZI:n.slice(0,n.length-1);return o.mapped&&(r=DI(r,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:wI.of({side:e,rest:r,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}BI.empty=new BI(ZI,ZI);const QI=[{key:"Mod-z",run:_I,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:EI,preventDefault:!0},{linux:"Ctrl-Shift-z",run:EI,preventDefault:!0},{key:"Mod-u",run:PI,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:qI,preventDefault:!0}];function zI(e,t){return pP.create(e.ranges.map(t),e.mainIndex)}function UI(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function FI({state:e,dispatch:t},r){let n=zI(e.selection,r);return!n.eq(e.selection)&&(t(UI(e,n)),!0)}function WI(e,t){return pP.cursor(t?e.to:e.from)}function YI(e,t){return FI(e,(r=>r.empty?e.moveByChar(r,t):WI(r,t)))}function VI(e){return e.textDirectionAt(e.state.selection.main.head)==pj.LTR}const XI=e=>YI(e,!VI(e)),HI=e=>YI(e,VI(e));function GI(e,t){return FI(e,(r=>r.empty?e.moveByGroup(r,t):WI(r,t)))}function KI(e,t,r){if(t.type.prop(r))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function JI(e,t,r){let n,o,i=nM(e).resolveInner(t.head),a=r?KC.closedBy:KC.openedBy;for(let n=t.head;;){let t=r?i.childAfter(n):i.childBefore(n);if(!t)break;KI(e,t,a)?i=t:n=r?t.to:t.from}return o=i.type.prop(a)&&(n=r?ON(e,i.from,1):ON(e,i.to,-1))&&n.matched?r?n.end.to:n.end.from:r?i.to:i.from,pP.cursor(o,r?-1:1)}function eB(e,t){return FI(e,(r=>{if(!r.empty)return WI(r,t);let n=e.moveVertically(r,t);return n.head!=r.head?n:e.moveToLineBoundary(r,t)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const tB=e=>eB(e,!1),rB=e=>eB(e,!0);function nB(e){let t,r=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,o=0;if(r){for(let t of e.state.facet(pZ.scrollMargins)){let r=t(e);(null==r?void 0:r.top)&&(n=Math.max(null==r?void 0:r.top,n)),(null==r?void 0:r.bottom)&&(o=Math.max(null==r?void 0:r.bottom,o))}t=e.scrollDOM.clientHeight-n-o}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:o,selfScroll:r,height:Math.max(e.defaultLineHeight,t-5)}}function oB(e,t){let r,n=nB(e),{state:o}=e,i=zI(o.selection,(r=>r.empty?e.moveVertically(r,t,n.height):WI(r,t)));if(i.eq(o.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(o.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+n.marginTop,l=a.bottom-n.marginBottom;t&&t.top>s&&t.bottom<l&&(r=pZ.scrollIntoView(i.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(UI(o,i),{effects:r}),!0}const iB=e=>oB(e,!1),aB=e=>oB(e,!0);function sB(e,t,r){let n=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,r);if(o.head==t.head&&o.head!=(r?n.to:n.from)&&(o=e.moveToLineBoundary(t,r,!1)),!r&&o.head==n.from&&n.length){let r=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&t.head!=n.from+r&&(o=pP.cursor(n.from+r))}return o}function lB(e,t){let r=zI(e.state.selection,(e=>{let r=t(e);return pP.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)}));return!r.eq(e.state.selection)&&(e.dispatch(UI(e.state,r)),!0)}function cB(e,t){return lB(e,(r=>e.moveByChar(r,t)))}const uB=e=>cB(e,!VI(e)),dB=e=>cB(e,VI(e));function pB(e,t){return lB(e,(r=>e.moveByGroup(r,t)))}function hB(e,t){return lB(e,(r=>e.moveVertically(r,t)))}const fB=e=>hB(e,!1),mB=e=>hB(e,!0);function gB(e,t){return lB(e,(r=>e.moveVertically(r,t,nB(e).height)))}const bB=e=>gB(e,!1),yB=e=>gB(e,!0),vB=({state:e,dispatch:t})=>(t(UI(e,{anchor:0})),!0),OB=({state:e,dispatch:t})=>(t(UI(e,{anchor:e.doc.length})),!0),wB=({state:e,dispatch:t})=>(t(UI(e,{anchor:e.selection.main.anchor,head:0})),!0),AB=({state:e,dispatch:t})=>(t(UI(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function xB(e,t){if(e.state.readOnly)return!1;let r="delete.selection",{state:n}=e,o=n.changeByRange((n=>{let{from:o,to:i}=n;if(o==i){let a=t(n);a<o?(r="delete.backward",a=kB(e,a,!1)):a>o&&(r="delete.forward",a=kB(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=kB(e,o,!1),i=kB(e,i,!0);return o==i?{range:n}:{changes:{from:o,to:i},range:pP.cursor(o,o<n.head?-1:1)}}));return!o.changes.empty&&(e.dispatch(n.update(o,{scrollIntoView:!0,userEvent:r,effects:"delete.selection"==r?pZ.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function kB(e,t,r){if(e instanceof pZ)for(let n of e.state.facet(pZ.atomicRanges).map((t=>t(e))))n.between(t,t,((e,n)=>{e<t&&n>t&&(t=r?n:e)}));return t}const CB=(e,t)=>xB(e,(r=>{let n,o,i=r.from,{state:a}=e,s=a.doc.lineAt(i);if(!t&&i>s.from&&i<s.from+200&&!/[^ \t]/.test(n=s.text.slice(0,i-s.from))){if("\t"==n[n.length-1])return i-1;let e=gq(n,a.tabSize)%bM(a)||bM(a);for(let t=0;t<e&&" "==n[n.length-1-t];t++)i--;o=i}else o=YE(s.text,i-s.from,t,t)+s.from,o==i&&s.number!=(t?a.doc.lines:1)?o+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(s.text.slice(o-s.from,i-s.from))&&(o=YE(s.text,o-s.from,!1,!1)+s.from);return o})),SB=e=>CB(e,!1),_B=e=>CB(e,!0),EB=(e,t)=>xB(e,(r=>{let n=r.head,{state:o}=e,i=o.doc.lineAt(n),a=o.charCategorizer(n);for(let e=null;;){if(n==(t?i.to:i.from)){n==r.head&&i.number!=(t?o.doc.lines:1)&&(n+=t?1:-1);break}let s=YE(i.text,n-i.from,t)+i.from,l=i.text.slice(Math.min(n,s)-i.from,Math.max(n,s)-i.from),c=a(l);if(null!=e&&c!=e)break;" "==l&&n==r.head||(e=c),n=s}return n})),PB=e=>EB(e,!1);function qB(e){let t=[],r=-1;for(let n of e.selection.ranges){let o=e.doc.lineAt(n.from),i=e.doc.lineAt(n.to);if(n.empty||n.to!=i.from||(i=e.doc.lineAt(n.to-1)),r>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(n)}else t.push({from:o.from,to:i.to,ranges:[n]});r=i.number+1}return t}function TB(e,t,r){if(e.readOnly)return!1;let n=[],o=[];for(let t of qB(e)){if(r?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(r?t.to+1:t.from-1),a=i.length+1;if(r){n.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let r of t.ranges)o.push(pP.range(Math.min(e.doc.length,r.anchor+a),Math.min(e.doc.length,r.head+a)))}else{n.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(pP.range(e.anchor-a,e.head-a))}}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:pP.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function jB(e,t,r){if(e.readOnly)return!1;let n=[];for(let t of qB(e))r?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const RB=$B(!1),ZB=$B(!0);function $B(e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let n=t.changeByRange((r=>{let{from:n,to:o}=r,i=t.doc.lineAt(n),a=!e&&n==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let r,n=nM(e).resolveInner(t),o=n.childBefore(t),i=n.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(r=o.type.prop(KC.closedBy))&&r.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(t,n);e&&(n=o=(o<=i.to?i:t.doc.lineAt(o)).to);let s=new OM(t,{simulateBreak:n,simulateDoubleBreak:!!a}),l=vM(s,n);for(null==l&&(l=gq(/^\s*/.exec(t.doc.lineAt(n).text)[0],t.tabSize));o<i.to&&/\s/.test(i.text[o-i.from]);)o++;a?({from:n,to:o}=a):n>i.from&&n<i.from+100&&!/\S/.test(i.text.slice(0,n))&&(n=i.from);let c=["",yM(t,l)];return a&&c.push(yM(t,s.lineIndent(i.from,-1))),{changes:{from:n,to:o,insert:RE.of(c)},range:pP.cursor(n+1+c[1].length)}}));return r(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function MB(e,t){let r=-1;return e.changeByRange((n=>{let o=[];for(let i=n.from;i<=n.to;){let a=e.doc.lineAt(i);a.number>r&&(n.empty||n.to>a.from)&&(t(a,o,n),r=a.number),i=a.to+1}let i=e.changes(o);return{changes:o,range:pP.range(i.mapPos(n.anchor,1),i.mapPos(n.head,1))}}))}const NB=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(MB(e,((t,r)=>{r.push({from:t.from,insert:e.facet(gM)})})),{userEvent:"input.indent"})),!0),DB=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(MB(e,((t,r)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let o=gq(n,e.tabSize),i=0,a=yM(e,Math.max(0,o-bM(e)));for(;i<n.length&&i<a.length&&n.charCodeAt(i)==a.charCodeAt(i);)i++;r.push({from:t.from+i,to:t.from+n.length,insert:a.slice(i)})})),{userEvent:"delete.dedent"})),!0),LB=[{key:"Ctrl-b",run:XI,shift:uB,preventDefault:!0},{key:"Ctrl-f",run:HI,shift:dB},{key:"Ctrl-p",run:tB,shift:fB},{key:"Ctrl-n",run:rB,shift:mB},{key:"Ctrl-a",run:e=>FI(e,(t=>pP.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>lB(e,(t=>pP.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>FI(e,(t=>pP.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>lB(e,(t=>pP.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:_B},{key:"Ctrl-h",run:SB},{key:"Ctrl-k",run:e=>xB(e,(t=>{let r=e.lineBlockAt(t.head).to;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}))},{key:"Ctrl-Alt-h",run:PB},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:RE.of(["",""])},range:pP.cursor(e.from)})));return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let r=t.from,n=e.doc.lineAt(r),o=r==n.from?r-1:YE(n.text,r-n.from,!1)+n.from,i=r==n.to?r+1:YE(n.text,r-n.from,!0)+n.from;return{changes:{from:o,to:i,insert:e.doc.slice(r,i).append(e.doc.slice(o,r))},range:pP.cursor(i)}}));return!r.changes.empty&&(t(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:aB}],IB=[{key:"ArrowLeft",run:XI,shift:uB,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>GI(e,!VI(e)),shift:e=>pB(e,!VI(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>FI(e,(t=>sB(e,t,!VI(e)))),shift:e=>lB(e,(t=>sB(e,t,!VI(e)))),preventDefault:!0},{key:"ArrowRight",run:HI,shift:dB,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>GI(e,VI(e)),shift:e=>pB(e,VI(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>FI(e,(t=>sB(e,t,VI(e)))),shift:e=>lB(e,(t=>sB(e,t,VI(e)))),preventDefault:!0},{key:"ArrowUp",run:tB,shift:fB,preventDefault:!0},{mac:"Cmd-ArrowUp",run:vB,shift:wB},{mac:"Ctrl-ArrowUp",run:iB,shift:bB},{key:"ArrowDown",run:rB,shift:mB,preventDefault:!0},{mac:"Cmd-ArrowDown",run:OB,shift:AB},{mac:"Ctrl-ArrowDown",run:aB,shift:yB},{key:"PageUp",run:iB,shift:bB},{key:"PageDown",run:aB,shift:yB},{key:"Home",run:e=>FI(e,(t=>sB(e,t,!1))),shift:e=>lB(e,(t=>sB(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:vB,shift:wB},{key:"End",run:e=>FI(e,(t=>sB(e,t,!0))),shift:e=>lB(e,(t=>sB(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:OB,shift:AB},{key:"Enter",run:RB},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:SB,shift:SB},{key:"Delete",run:_B},{key:"Mod-Backspace",mac:"Alt-Backspace",run:PB},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>EB(e,!0)},{mac:"Mod-Backspace",run:e=>xB(e,(t=>{let r=e.moveToLineBoundary(t,!1).head;return t.head>r?r:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>xB(e,(t=>{let r=e.moveToLineBoundary(t,!0).head;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}))}].concat(LB.map((e=>({mac:e.key,run:e.run,shift:e.shift})))),BB=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>FI(e,(t=>JI(e.state,t,!VI(e)))),shift:e=>lB(e,(t=>JI(e.state,t,!VI(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>FI(e,(t=>JI(e.state,t,VI(e)))),shift:e=>lB(e,(t=>JI(e.state,t,VI(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>TB(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>jB(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>TB(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>jB(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let r=e.selection,n=null;return r.ranges.length>1?n=pP.create([r.main]):r.main.empty||(n=pP.create([pP.cursor(r.main.head)])),!!n&&(t(UI(e,n)),!0)}},{key:"Mod-Enter",run:ZB},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let r=qB(e).map((({from:t,to:r})=>pP.range(t,Math.min(r+1,e.doc.length))));return t(e.update({selection:pP.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let r=zI(e.selection,(t=>{var r;for(let n=nM(e).resolveStack(t.from,1);n;n=n.next){let{node:e}=n;if((e.from<t.from&&e.to>=t.to||e.to>t.to&&e.from<=t.from)&&(null===(r=e.parent)||void 0===r?void 0:r.parent))return pP.range(e.to,e.from)}return t}));return t(UI(e,r)),!0},preventDefault:!0},{key:"Mod-[",run:DB},{key:"Mod-]",run:NB},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Object.create(null),n=new OM(e,{overrideIndentation:e=>{let t=r[e];return null==t?-1:t}}),o=MB(e,((t,o,i)=>{let a=vM(n,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=yM(e,a);(s!=l||i.from<t.from+s.length)&&(r[t.from]=a,o.push({from:t.from,to:t.from+s.length,insert:l}))}));return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,r=t.changes(qB(t).map((({from:e,to:r})=>(e>0?e--:r<t.doc.length&&r++,{from:e,to:r})))),n=zI(t.selection,(t=>e.moveVertically(t,!0))).map(r);return e.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,r){let n=!1,o=zI(e.selection,(t=>{let o=ON(e,t.head,-1)||ON(e,t.head,1)||t.head>0&&ON(e,t.head-1,1)||t.head<e.doc.length&&ON(e,t.head+1,-1);if(!o||!o.end)return t;n=!0;let i=o.start.from==t.head?o.end.to:o.end.from;return r?pP.range(t.anchor,i):pP.cursor(i)}));return!!n&&(t(UI(e,o)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=bI(e.state,r.from);return n.line?fI(e):!!n.block&&gI(e)}},{key:"Alt-A",run:mI}].concat(IB),QB={key:"Tab",run:NB,shift:DB};function zB(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,r=arguments[1];if(r&&"object"==typeof r&&null==r.nodeType&&!Array.isArray(r)){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var o=r[n];"string"==typeof o?e.setAttribute(n,o):null!=o&&(e[n]=o)}t++}for(;t<arguments.length;t++)UB(e,arguments[t]);return e}function UB(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var r=0;r<t.length;r++)UB(e,t[r])}}const FB="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class WB{constructor(e,t,r=0,n=e.length,o,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,n),this.bufferStart=r,this.normalize=o?e=>o(FB(e)):FB,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return KE(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=JE(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=eP(e);let n=this.normalize(t);for(let e=0,o=r;;e++){let i=n.charCodeAt(e),a=this.match(i,o);if(e==n.length-1){if(a)return this.value=a,this;break}o==r&&e<t.length&&t.charCodeAt(e)==i&&o++}}}match(e,t){let r=null;for(let n=0;n<this.matches.length;n+=2){let o=this.matches[n],i=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[n+1],to:t+1}:(this.matches[n]++,i=!0)),i||(this.matches.splice(n,2),n-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?r={from:t,to:t+1}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(WB.prototype[Symbol.iterator]=function(){return this});const YB={from:-1,to:-1,match:/.*/.exec("")},VB="gm"+(null==/x/.unicode?"":"u");class XB{constructor(e,t,r,n=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=YB,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new KB(e,t,r,n,o);this.re=new RegExp(t,VB+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.iter=e.iter();let i=e.lineAt(n);this.curLineStart=i.from,this.matchPos=JB(e,n),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,n=r+t[0].length;if(this.matchPos=JB(this.text,n+(r==n?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<n||r>this.value.to)&&(!this.test||this.test(r,n,t)))return this.value={from:r,to:n,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const HB=new WeakMap;class GB{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let n=HB.get(e);if(!n||n.from>=r||n.to<=t){let n=new GB(t,e.sliceString(t,r));return HB.set(e,n),n}if(n.from==t&&n.to==r)return n;let{text:o,from:i}=n;return i>t&&(o=e.sliceString(t,i)+o,i=t),n.to<r&&(o+=e.sliceString(n.to,r)),HB.set(e,new GB(i,o)),new GB(t,o.slice(t-i,r-i))}}class KB{constructor(e,t,r,n,o){this.text=e,this.to=o,this.done=!1,this.value=YB,this.matchPos=JB(e,n),this.re=new RegExp(t,VB+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.flat=GB.get(e,n,this.chunkEnd(n+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,r=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,r,t)))return this.value={from:e,to:r,match:t},this.matchPos=JB(this.text,r+(e==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=GB.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function JB(e,t){if(t>=e.length)return t;let r,n=e.lineAt(t);for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function eQ(e){let t=zB("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function r(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:n}=e,o=n.doc.lineAt(n.selection.main.head),[,i,a,s,l]=r,c=s?+s.slice(1):0,u=a?+a:o.number;if(a&&l){let e=u/100;i&&(e=e*("-"==i?-1:1)+o.number/n.doc.lines),u=Math.round(n.doc.lines*e)}else a&&i&&(u=u*("-"==i?-1:1)+o.number);let d=n.doc.line(Math.max(1,Math.min(n.doc.lines,u))),p=pP.cursor(d.from+Math.max(0,Math.min(c,d.length)));e.dispatch({effects:[tQ.of(!1),pZ.scrollIntoView(p.from,{y:"center"})],selection:p}),e.focus()}return{dom:zB("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:tQ.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},zB("label",e.state.phrase("Go to line"),": ",t)," ",zB("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(XB.prototype[Symbol.iterator]=KB.prototype[Symbol.iterator]=function(){return this});const tQ=BP.define(),rQ=AP.define({create:()=>!0,update(e,t){for(let r of t.effects)r.is(tQ)&&(e=r.value);return e},provide:e=>E$.from(e,(e=>e?eQ:null))}),nQ=pZ.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),oQ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},iQ=mP.define({combine:e=>JP(e,oQ,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),aQ=PT.mark({class:"cm-selectionMatch"}),sQ=PT.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lQ(e,t,r,n){return!(0!=r&&e(t.sliceDoc(r-1,r))==XP.Word||n!=t.doc.length&&e(t.sliceDoc(n,n+1))==XP.Word)}const cQ=JT.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(iQ),{state:r}=e,n=r.selection;if(n.ranges.length>1)return PT.none;let o,i=n.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return PT.none;let e=r.wordAt(i.head);if(!e)return PT.none;a=r.charCategorizer(i.head),o=r.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return PT.none;if(t.wholeWords){if(o=r.sliceDoc(i.from,i.to),a=r.charCategorizer(i.head),!lQ(a,r,i.from,i.to)||!function(e,t,r,n){return e(t.sliceDoc(r,r+1))==XP.Word&&e(t.sliceDoc(n-1,n))==XP.Word}(a,r,i.from,i.to))return PT.none}else if(o=r.sliceDoc(i.from,i.to).trim(),!o)return PT.none}let s=[];for(let n of e.visibleRanges){let e=new WB(r.doc,o,n.from,n.to);for(;!e.next().done;){let{from:n,to:o}=e.value;if((!a||lQ(a,r,n,o))&&(i.empty&&n<=i.from&&o>=i.to?s.push(sQ.range(n,o)):(n>=i.to||o<=i.from)&&s.push(aQ.range(n,o)),s.length>t.maxMatches))return PT.none}}return PT.set(s)}},{decorations:e=>e.decorations}),uQ=pZ.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),dQ=mP.define({combine:e=>JP(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new IQ(e),scrollToMatch:e=>pZ.scrollIntoView(e)})});class pQ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,VB),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new vQ(this):new mQ(this)}getCursor(e,t=0,r){let n=e.doc?e:KP.create({doc:e});return null==r&&(r=n.doc.length),this.regexp?gQ(this,n,t,r):fQ(this,n,t,r)}}class hQ{constructor(e){this.spec=e}}function fQ(e,t,r,n){return new WB(t.doc,e.unquoted,r,n,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(r,n,o,i)=>((i>r||i+o.length<n)&&(i=Math.max(0,r-2),o=e.sliceString(i,Math.min(e.length,n+2))),!(t(bQ(o,r-i))==XP.Word&&t(yQ(o,r-i))==XP.Word||t(yQ(o,n-i))==XP.Word&&t(bQ(o,n-i))==XP.Word))}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}class mQ extends hQ{constructor(e){super(e)}nextMatch(e,t,r){let n=fQ(this.spec,e,r,e.doc.length).nextOverlapping();return n.done&&(n=fQ(this.spec,e,0,t).nextOverlapping()),n.done?null:n.value}prevMatchInRange(e,t,r){for(let n=r;;){let r=Math.max(t,n-1e4-this.spec.unquoted.length),o=fQ(this.spec,e,r,n),i=null;for(;!o.nextOverlapping().done;)i=o.value;if(i)return i;if(r==t)return null;n-=1e4}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=fQ(this.spec,e,0,e.doc.length),n=[];for(;!r.next().done;){if(n.length>=t)return null;n.push(r.value)}return n}highlight(e,t,r,n){let o=fQ(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)n(o.value.from,o.value.to)}}function gQ(e,t,r,n){return new XB(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,r)=>!r[0].length||(o(bQ(r.input,r.index))!=XP.Word||o(yQ(r.input,r.index))!=XP.Word)&&(o(yQ(r.input,r.index+r[0].length))!=XP.Word||o(bQ(r.input,r.index+r[0].length))!=XP.Word)):void 0},r,n);var o}function bQ(e,t){return e.slice(YE(e,t,!1),t)}function yQ(e,t){return e.slice(t,YE(e,t))}class vQ extends hQ{nextMatch(e,t,r){let n=gQ(this.spec,e,r,e.doc.length).next();return n.done&&(n=gQ(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,r){for(let n=1;;n++){let o=Math.max(t,r-1e4*n),i=gQ(this.spec,e,o,r),a=null;for(;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,r)=>"$"==r?"$":"&"==r?e.match[0]:"0"!=r&&+r<e.match.length?e.match[r]:t))}matchAll(e,t){let r=gQ(this.spec,e,0,e.doc.length),n=[];for(;!r.next().done;){if(n.length>=t)return null;n.push(r.value)}return n}highlight(e,t,r,n){let o=gQ(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)n(o.value.from,o.value.to)}}const OQ=BP.define(),wQ=BP.define(),AQ=AP.define({create:e=>new xQ(ZQ(e).create(),null),update(e,t){for(let r of t.effects)r.is(OQ)?e=new xQ(r.value.create(),e.panel):r.is(wQ)&&(e=new xQ(e.query,r.value?RQ:null));return e},provide:e=>E$.from(e,(e=>e.panel))});class xQ{constructor(e,t){this.query=e,this.panel=t}}const kQ=PT.mark({class:"cm-searchMatch"}),CQ=PT.mark({class:"cm-searchMatch cm-searchMatch-selected"}),SQ=JT.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(AQ))}update(e){let t=e.state.field(AQ);(t!=e.startState.field(AQ)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return PT.none;let{view:r}=this,n=new iq;for(let t=0,o=r.visibleRanges,i=o.length;t<i;t++){let{from:a,to:s}=o[t];for(;t<i-1&&s>o[t+1].from-500;)s=o[++t].to;e.highlight(r.state,a,s,((e,t)=>{let o=r.state.selection.ranges.some((r=>r.from==e&&r.to==t));n.add(e,t,o?CQ:kQ)}))}return n.finish()}},{decorations:e=>e.decorations});function _Q(e){return t=>{let r=t.state.field(AQ,!1);return r&&r.query.spec.valid?e(t,r):NQ(t)}}const EQ=_Q(((e,{query:t})=>{let{to:r}=e.state.selection.main,n=t.nextMatch(e.state,r,r);if(!n)return!1;let o=pP.single(n.from,n.to),i=e.state.facet(dQ);return e.dispatch({selection:o,effects:[UQ(e,n),i.scrollToMatch(o.main,e)],userEvent:"select.search"}),MQ(e),!0})),PQ=_Q(((e,{query:t})=>{let{state:r}=e,{from:n}=r.selection.main,o=t.prevMatch(r,n,n);if(!o)return!1;let i=pP.single(o.from,o.to),a=e.state.facet(dQ);return e.dispatch({selection:i,effects:[UQ(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),MQ(e),!0})),qQ=_Q(((e,{query:t})=>{let r=t.matchAll(e.state,1e3);return!(!r||!r.length||(e.dispatch({selection:pP.create(r.map((e=>pP.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),TQ=_Q(((e,{query:t})=>{let{state:r}=e,{from:n,to:o}=r.selection.main;if(r.readOnly)return!1;let i=t.nextMatch(r,n,n);if(!i)return!1;let a,s,l=[],c=[];if(i.from==n&&i.to==o&&(s=r.toText(t.getReplacement(i)),l.push({from:i.from,to:i.to,insert:s}),i=t.nextMatch(r,i.from,i.to),c.push(pZ.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(n).number)+"."))),i){let t=0==l.length||l[0].from>=i.to?0:i.to-i.from-s.length;a=pP.single(i.from-t,i.to-t),c.push(UQ(e,i)),c.push(r.facet(dQ).scrollToMatch(a.main,e))}return e.dispatch({changes:l,selection:a,effects:c,userEvent:"input.replace"}),!0})),jQ=_Q(((e,{query:t})=>{if(e.state.readOnly)return!1;let r=t.matchAll(e.state,1e9).map((e=>{let{from:r,to:n}=e;return{from:r,to:n,insert:t.getReplacement(e)}}));if(!r.length)return!1;let n=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:pZ.announce.of(n),userEvent:"input.replace.all"}),!0}));function RQ(e){return e.state.facet(dQ).createPanel(e)}function ZQ(e,t){var r,n,o,i,a;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let c=e.facet(dQ);return new pQ({search:(null!==(r=null==t?void 0:t.literal)&&void 0!==r?r:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==t?void 0:t.caseSensitive)&&void 0!==n?n:c.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:c.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:c.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:c.wholeWord})}function $Q(e){let t=k$(e,RQ);return t&&t.dom.querySelector("[main-field]")}function MQ(e){let t=$Q(e);t&&t==e.root.activeElement&&t.select()}const NQ=e=>{let t=e.state.field(AQ,!1);if(t&&t.panel){let r=$Q(e);if(r&&r!=e.root.activeElement){let n=ZQ(e.state,t.query.spec);n.valid&&e.dispatch({effects:OQ.of(n)}),r.focus(),r.select()}}else e.dispatch({effects:[wQ.of(!0),t?OQ.of(ZQ(e.state,t.query.spec)):BP.appendConfig.of(WQ)]});return!0},DQ=e=>{let t=e.state.field(AQ,!1);if(!t||!t.panel)return!1;let r=k$(e,RQ);return r&&r.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:wQ.of(!1)}),!0},LQ=[{key:"Mod-f",run:NQ,scope:"editor search-panel"},{key:"F3",run:EQ,shift:PQ,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:EQ,shift:PQ,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:DQ,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:n,to:o}=r.main,i=[],a=0;for(let t=new WB(e.doc,e.sliceDoc(n,o));!t.next().done;){if(i.length>1e3)return!1;t.value.from==n&&(a=i.length),i.push(pP.range(t.value.from,t.value.to))}return t(e.update({selection:pP.create(i,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=k$(e,eQ);if(!t){let r=[tQ.of(!0)];null==e.state.field(rQ,!1)&&r.push(BP.appendConfig.of([rQ,nQ])),e.dispatch({effects:r}),t=k$(e,eQ)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:r}=e,n=pP.create(r.ranges.map((t=>e.wordAt(t.head)||pP.cursor(t.head))),r.mainIndex);return!n.eq(r)&&(t(e.update({selection:n})),!0)})({state:e,dispatch:t});let n=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=n)))return!1;let o=function(e,t){let{main:r,ranges:n}=e.selection,o=e.wordAt(r.head),i=o&&o.from==r.from&&o.to==r.to;for(let r=!1,o=new WB(e.doc,t,n[n.length-1].to);;){if(o.next(),!o.done){if(r&&n.some((e=>e.from==o.value.from)))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(r)return null;o=new WB(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),r=!0}}(e,n);return!!o&&(t(e.update({selection:e.selection.addRange(pP.range(o.from,o.to),!1),effects:pZ.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class IQ{constructor(e){this.view=e;let t=this.query=e.state.field(AQ).query.spec;function r(e,t,r){return zB("button",{class:"cm-button",name:e,onclick:t,type:"button"},r)}this.commit=this.commit.bind(this),this.searchField=zB("input",{value:t.search,placeholder:BQ(e,"Find"),"aria-label":BQ(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=zB("input",{value:t.replace,placeholder:BQ(e,"Replace"),"aria-label":BQ(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=zB("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=zB("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=zB("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=zB("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,r("next",(()=>EQ(e)),[BQ(e,"next")]),r("prev",(()=>PQ(e)),[BQ(e,"previous")]),r("select",(()=>qQ(e)),[BQ(e,"all")]),zB("label",null,[this.caseField,BQ(e,"match case")]),zB("label",null,[this.reField,BQ(e,"regexp")]),zB("label",null,[this.wordField,BQ(e,"by word")]),...e.state.readOnly?[]:[zB("br"),this.replaceField,r("replace",(()=>TQ(e)),[BQ(e,"replace")]),r("replaceAll",(()=>jQ(e)),[BQ(e,"replace all")])],zB("button",{name:"close",onclick:()=>DQ(e),"aria-label":BQ(e,"close"),type:"button"},["×"])])}commit(){let e=new pQ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:OQ.of(e)}))}keydown(e){var t,r;r=e,CZ(AZ((t=this.view).state),r,t,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?PQ:EQ)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),TQ(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(OQ)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(dQ).top}}function BQ(e,t){return e.state.phrase(t)}const QQ=30,zQ=/[\s\.,:;?!]/;function UQ(e,{from:t,to:r}){let n=e.state.doc.lineAt(t),o=e.state.doc.lineAt(r).to,i=Math.max(n.from,t-QQ),a=Math.min(o,r+QQ),s=e.state.sliceDoc(i,a);if(i!=n.from)for(let e=0;e<QQ;e++)if(!zQ.test(s[e+1])&&zQ.test(s[e])){s=s.slice(e);break}if(a!=o)for(let e=s.length-1;e>s.length-QQ;e--)if(!zQ.test(s[e-1])&&zQ.test(s[e])){s=s.slice(0,e);break}return pZ.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${n.number}.`)}const FQ=pZ.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),WQ=[AQ,kP.low(SQ),FQ];class YQ{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class VQ{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let n=e,o=r.facet(iz).markerFilter;o&&(n=o(n));let i=PT.set(n.map((e=>e.from==e.to||e.from==e.to-1&&r.doc.lineAt(e.from).to==e.from?PT.widget({widget:new lz(e),diagnostic:e}).range(e.from):PT.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to))),!0);return new VQ(i,t,XQ(i))}}function XQ(e,t=null,r=0){let n=null;return e.between(r,1e9,((e,r,{spec:o})=>{if(!t||o.diagnostic==t)return n=new YQ(e,r,o.diagnostic),!1})),n}const HQ=BP.define(),GQ=BP.define(),KQ=BP.define(),JQ=AP.define({create:()=>new VQ(PT.none,null,null),update(e,t){if(t.docChanged){let r=e.diagnostics.map(t.changes),n=null;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);n=XQ(r,e.selected.diagnostic,o)||XQ(r,null,o)}e=new VQ(r,e.panel,n)}for(let r of t.effects)r.is(HQ)?e=VQ.init(r.value,e.panel,t.state):r.is(GQ)?e=new VQ(e.diagnostics,r.value?uz.open:null,e.selected):r.is(KQ)&&(e=new VQ(e.diagnostics,e.panel,r.value));return e},provide:e=>[E$.from(e,(e=>e.panel)),pZ.decorations.from(e,(e=>e.diagnostics))]}),ez=PT.mark({class:"cm-lintRange cm-lintRange-active"});function tz(e,t,r){let{diagnostics:n}=e.state.field(JQ),o=[],i=2e8,a=0;n.between(t-(r<0?1:0),t+(r>0?1:0),((e,n,{spec:s})=>{t>=e&&t<=n&&(e==n||(t>e||r>0)&&(t<n||r<0))&&(o.push(s.diagnostic),i=Math.min(e,i),a=Math.max(n,a))}));let s=e.state.facet(iz).tooltipFilter;return s&&(o=s(o)),o.length?{pos:i,end:a,above:e.state.doc.lineAt(i).to<a,create:()=>({dom:rz(e,o)})}:null}function rz(e,t){return zB("ul",{class:"cm-tooltip-lint"},t.map((t=>sz(e,t,!1))))}const nz=e=>{let t=e.state.field(JQ,!1);return!(!t||!t.panel||(e.dispatch({effects:GQ.of(!1)}),0))},oz=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(JQ,!1);var r,n;t&&t.panel||e.dispatch({effects:(r=e.state,n=[GQ.of(!0)],r.field(JQ,!1)?n:n.concat(BP.appendConfig.of(hz)))});let o=k$(e,uz.open);return o&&o.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(JQ,!1);if(!t)return!1;let r=e.state.selection.main,n=t.diagnostics.iter(r.to+1);return!(!n.value&&(n=t.diagnostics.iter(0),!n.value||n.from==r.from&&n.to==r.to)||(e.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),0))}}],iz=mP.define({combine:e=>Object.assign({sources:e.map((e=>e.source))},JP(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))});function az(e){let t=[];if(e)e:for(let{name:r}of e){for(let e=0;e<r.length;e++){let n=r[e];if(/[a-zA-Z]/.test(n)&&!t.some((e=>e.toLowerCase()==n.toLowerCase()))){t.push(n);continue e}}t.push("")}return t}function sz(e,t,r){var n;let o=r?az(t.actions):[];return zB("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},zB("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(n=t.actions)||void 0===n?void 0:n.map(((r,n)=>{let i=!1,a=n=>{if(n.preventDefault(),i)return;i=!0;let o=XQ(e.state.field(JQ).diagnostics,t);o&&r.apply(e,o.from,o.to)},{name:s}=r,l=o[n]?s.indexOf(o[n]):-1,c=l<0?s:[s.slice(0,l),zB("u",s.slice(l,l+1)),s.slice(l+1)];return zB("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${o[n]})"`}.`},c)})),t.source&&zB("div",{class:"cm-diagnosticSource"},t.source))}class lz extends _T{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return zB("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class cz{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=sz(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class uz{constructor(e){this.view=e,this.items=[],this.list=zB("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)nz(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:r}=this.items[this.selectedIndex],n=az(r.actions);for(let o=0;o<n.length;o++)if(n[o].toUpperCase().charCodeAt(0)==t.keyCode){let t=XQ(this.view.state.field(JQ).diagnostics,r);t&&r.actions[o].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=zB("div",{class:"cm-panel-lint"},this.list,zB("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>nz(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(JQ).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(JQ),r=0,n=!1,o=null;for(e.between(0,this.view.state.doc.length,((e,i,{spec:a})=>{let s,l=-1;for(let e=r;e<this.items.length;e++)if(this.items[e].diagnostic==a.diagnostic){l=e;break}l<0?(s=new cz(this.view,a.diagnostic),this.items.splice(r,0,s),n=!0):(s=this.items[l],l>r&&(this.items.splice(r,l-r),n=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),o=s):s.dom.hasAttribute("aria-selected")&&s.dom.removeAttribute("aria-selected"),r++}));r<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)n=!0,this.items.pop();0==this.items.length&&(this.items.push(new cz(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),n=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let r=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/r:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/r)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=XQ(this.view.state.field(JQ).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:KQ.of(t)})}static open(e){return new uz(e)}}function dz(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const pz=pZ.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:dz("#d11")},".cm-lintRange-warning":{backgroundImage:dz("orange")},".cm-lintRange-info":{backgroundImage:dz("#999")},".cm-lintRange-hint":{backgroundImage:dz("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),hz=[JQ,pZ.decorations.compute([JQ],(e=>{let{selected:t,panel:r}=e.field(JQ);return t&&r&&t.from!=t.to?PT.set([ez.range(t.from,t.to)]):PT.none})),O$(tz,{hideOn:function(e,t){let r=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(HQ)))&&!e.changes.touchesRange(r.from,r.to))}}),pz];var fz=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,r=[];!1!==e.closeBracketsKeymap&&(r=r.concat(sL)),!1!==e.defaultKeymap&&(r=r.concat(BB)),!1!==e.searchKeymap&&(r=r.concat(LQ)),!1!==e.historyKeymap&&(r=r.concat(QI)),!1!==e.foldKeymap&&(r=r.concat(UM)),!1!==e.completionKeymap&&(r=r.concat(mL)),!1!==e.lintKeymap&&(r=r.concat(oz));var n=[];return!1!==e.lineNumbers&&n.push(function(e={}){return[z$.of(e),$$(),W$]}()),!1!==e.highlightActiveLineGutter&&n.push(X$),!1!==e.highlightSpecialChars&&n.push(function(e={}){return[XZ.of(e),HZ||(HZ=JT.fromClass(class{constructor(e){this.view=e,this.decorations=PT.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(XZ)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new UZ({regexp:e.specialChars,decoration:(t,r,n)=>{let{doc:o}=r.state,i=KE(t[0],0);if(9==i){let e=o.lineAt(n),t=r.state.tabSize,i=gq(e.text,t,n-e.from);return PT.replace({widget:new KZ((t-i%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=PT.replace({widget:new GZ(e,i)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(XZ);e.startState.facet(XZ)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&n.push(function(e={}){return[CI,kI.of(e),pZ.domEventHandlers({beforeinput(e,t){let r="historyUndo"==e.inputType?_I:"historyRedo"==e.inputType?EI:null;return!!r&&(e.preventDefault(),r(t))}})]}()),!1!==e.foldGutter&&n.push(function(e={}){let t=Object.assign(Object.assign({},GM),e),r=new KM(t,!0),n=new KM(t,!1),o=JT.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(pM)!=e.state.facet(pM)||e.startState.field(LM,!1)!=e.state.field(LM,!1)||nM(e.startState)!=nM(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new iq;for(let o of e.viewportLineBlocks){let i=IM(e.state,o.from,o.to)?n:ZM(e.state,o.from,o.to)?r:null;i&&t.add(o.from,o.from,i)}return t.finish()}}),{domEventHandlers:i}=t;return[o,R$({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||oq.empty},initialSpacer:()=>new KM(t,!1),domEventHandlers:Object.assign(Object.assign({},i),{click:(e,t,r)=>{if(i.click&&i.click(e,t,r))return!0;let n=IM(e.state,t.from,t.to);if(n)return e.dispatch({effects:NM.of(n)}),!0;let o=ZM(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:MM.of(o)}),!0)}})}),YM()]}()),!1!==e.drawSelection&&n.push(function(e={}){return[RZ.of(e),$Z,NZ,LZ,WT.of(!0)]}()),!1!==e.dropCursor&&n.push([BZ,QZ]),!1!==e.allowMultipleSelections&&n.push(KP.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&n.push(KP.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let r=e.newDoc,{head:n}=e.newSelection.main,o=r.lineAt(n);if(n>o.from+200)return e;let i=r.sliceString(o.from,n);if(!t.some((e=>e.test(i))))return e;let{state:a}=e,s=-1,l=[];for(let{head:e}of a.selection.ranges){let t=a.doc.lineAt(e);if(t.from==s)continue;s=t.from;let r=vM(a,t.from);if(null==r)continue;let n=/^\s*/.exec(t.text)[0],o=yM(a,r);n!=o&&l.push({from:t.from,to:t.from+n.length,insert:o})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&n.push(oN(sN,{fallback:!0})),!1!==e.bracketMatching&&n.push(function(e={}){return[dN.of(e),gN]}()),!1!==e.closeBrackets&&n.push([aL,tL]),!1!==e.autocompletion&&n.push(function(e={}){return[ED,dD.of(e),RD,gL,ZD]}()),!1!==e.rectangularSelection&&n.push(function(e){let t=e=>e.altKey&&0==e.button;return pZ.mouseSelectionStyle.of(((e,r)=>t(r)?function(e,t){let r=n$(e,t),n=e.state.selection;return r?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(r.line).from),o=e.state.doc.lineAt(t);r={line:o.number,col:r.col,off:Math.min(r.off,o.length)},n=n.map(e.changes)}},get(t,o,i){let a=n$(e,t);if(!a)return n;let s=function(e,t,r){let n=Math.min(t.line,r.line),o=Math.max(t.line,r.line),i=[];if(t.off>r$||r.off>r$||t.col<0||r.col<0){let a=Math.min(t.off,r.off),s=Math.max(t.off,r.off);for(let t=n;t<=o;t++){let r=e.doc.line(t);r.length<=s&&i.push(pP.range(r.from+a,r.to+s))}}else{let a=Math.min(t.col,r.col),s=Math.max(t.col,r.col);for(let t=n;t<=o;t++){let r=e.doc.line(t),n=bq(r.text,a,e.tabSize,!0);if(n<0)i.push(pP.cursor(r.to));else{let t=bq(r.text,s,e.tabSize);i.push(pP.range(r.from+n,r.from+t))}}}return i}(e.state,r,a);return s.length?i?pP.create(s.concat(n.ranges)):pP.create(s):n}}:null}(e,r):null))}()),!1!==t&&n.push(function(e={}){let[t,r]=o$[e.key||"Alt"],n=JT.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||r(e))},keyup(e){e.keyCode!=t&&r(e)||this.set(!1)},mousemove(e){this.set(r(e))}}});return[n,pZ.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(n))||void 0===t?void 0:t.isDown)?i$:null}))]}()),!1!==e.highlightActiveLine&&n.push(e$),!1!==e.highlightSelectionMatches&&n.push(function(e){let t=[uQ,cQ];return t}()),e.tabSize&&"number"==typeof e.tabSize&&n.push(gM.of(" ".repeat(e.tabSize))),n.concat([OZ.of(r.flat())]).filter(Boolean)};const mz="#e06c75",gz="#abb2bf",bz="#7d8799",yz="#d19a66",vz="#2c313a",Oz="#282c34",wz="#353a42",Az="#528bff",xz=[pZ.theme({"&":{color:gz,backgroundColor:Oz},".cm-content":{caretColor:Az},".cm-cursor, .cm-dropCursor":{borderLeftColor:Az},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:gz},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Oz,color:bz,border:"none"},".cm-activeLineGutter":{backgroundColor:vz},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:wz},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:wz,borderBottomColor:wz},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:vz,color:gz}}},{dark:!0}),oN(eN.define([{tag:I_.keyword,color:"#c678dd"},{tag:[I_.name,I_.deleted,I_.character,I_.propertyName,I_.macroName],color:mz},{tag:[I_.function(I_.variableName),I_.labelName],color:"#61afef"},{tag:[I_.color,I_.constant(I_.name),I_.standard(I_.name)],color:yz},{tag:[I_.definition(I_.name),I_.separator],color:gz},{tag:[I_.typeName,I_.className,I_.number,I_.changed,I_.annotation,I_.modifier,I_.self,I_.namespace],color:"#e5c07b"},{tag:[I_.operator,I_.operatorKeyword,I_.url,I_.escape,I_.regexp,I_.link,I_.special(I_.string)],color:"#56b6c2"},{tag:[I_.meta,I_.comment],color:bz},{tag:I_.strong,fontWeight:"bold"},{tag:I_.emphasis,fontStyle:"italic"},{tag:I_.strikethrough,textDecoration:"line-through"},{tag:I_.link,color:bz,textDecoration:"underline"},{tag:I_.heading,fontWeight:"bold",color:mz},{tag:[I_.atom,I_.bool,I_.special(I_.variableName)],color:yz},{tag:[I_.processingInstruction,I_.string,I_.inserted],color:"#98c379"},{tag:I_.invalid,color:"#ffffff"}]))];var kz=pZ.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Cz=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:r=!0,readOnly:n=!1,theme:o="light",placeholder:i="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(OZ.of([QB])),a&&("boolean"==typeof a?s.unshift(fz()):s.unshift(fz(a))),i&&s.unshift(function(e){return JT.fromClass(class{constructor(t){this.view=t,this.placeholder=e?PT.set([PT.widget({widget:new t$(e),side:1}).range(0)]):PT.none}get decorations(){return this.view.state.doc.length?PT.none:this.placeholder}},{decorations:e=>e.decorations})}(i)),o){case"light":s.push(kz);break;case"dark":s.push(xz);break;case"none":break;default:s.push(o)}return!1===r&&s.push(pZ.editable.of(!1)),n&&s.push(KP.readOnly.of(!0)),[...s]},Sz=DP.define(),_z=[],Ez=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Pz=(0,r.forwardRef)(((n,o)=>{var{className:i,value:a="",selection:l,extensions:c=[],onChange:u,onStatistics:d,onCreateEditor:p,onUpdate:h,autoFocus:f,theme:m="light",height:g,minHeight:b,maxHeight:y,width:v,minWidth:O,maxWidth:w,basicSetup:A,placeholder:x,indentWithTab:k,editable:C,readOnly:S,root:_,initialState:E}=n,P=(0,t.Z)(n,Ez),q=(0,r.useRef)(null),{state:T,view:j,container:R}=function(e){var{value:t,selection:n,onChange:o,onStatistics:i,onCreateEditor:a,onUpdate:s,extensions:l=_z,autoFocus:c,theme:u="light",height:d=null,minHeight:p=null,maxHeight:h=null,width:f=null,minWidth:m=null,maxWidth:g=null,placeholder:b="",editable:y=!0,readOnly:v=!1,indentWithTab:O=!0,basicSetup:w=!0,root:A,initialState:x}=e,[k,C]=(0,r.useState)(),[S,_]=(0,r.useState)(),[E,P]=(0,r.useState)(),q=pZ.theme({"&":{height:d,minHeight:p,maxHeight:h,width:f,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),T=pZ.updateListener.of((e=>{if(e.docChanged&&"function"==typeof o&&!e.transactions.some((e=>e.annotation(Sz)))){var t=e.state.doc.toString();o(t,e)}i&&i((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),j=[T,q,...Cz({theme:u,editable:y,readOnly:v,placeholder:b,indentWithTab:O,basicSetup:w})];return s&&"function"==typeof s&&j.push(pZ.updateListener.of(s)),j=j.concat(l),(0,r.useEffect)((()=>{if(k&&!E){var e={doc:t,selection:n,extensions:j},r=x?KP.fromJSON(x.json,e,x.fields):KP.create(e);if(P(r),!S){var o=new pZ({state:r,parent:k,root:A});_(o),a&&a(o,r)}}return()=>{S&&(P(void 0),_(void 0))}}),[k,E]),(0,r.useEffect)((()=>C(e.container)),[e.container]),(0,r.useEffect)((()=>()=>{S&&(S.destroy(),_(void 0))}),[S]),(0,r.useEffect)((()=>{c&&S&&S.focus()}),[c,S]),(0,r.useEffect)((()=>{S&&S.dispatch({effects:BP.reconfigure.of(j)})}),[u,l,d,p,h,f,m,g,b,y,v,O,w,o,s]),(0,r.useEffect)((()=>{if(void 0!==t){var e=S?S.state.doc.toString():"";S&&t!==e&&S.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[Sz.of(!0)]})}}),[t,S]),{state:E,setState:P,view:S,setView:_,container:k,setContainer:C}}({container:q.current,root:_,value:a,autoFocus:f,theme:m,height:g,minHeight:b,maxHeight:y,width:v,minWidth:O,maxWidth:w,basicSetup:A,placeholder:x,indentWithTab:k,editable:C,readOnly:S,selection:l,onChange:u,onStatistics:d,onCreateEditor:p,onUpdate:h,extensions:c,initialState:E});if((0,r.useImperativeHandle)(o,(()=>({editor:q.current,state:T,view:j})),[q,R,T,j]),"string"!=typeof a)throw new Error("value must be typeof string but got "+typeof a);var Z="string"==typeof m?"cm-theme-"+m:"cm-theme";return(0,s.jsx)("div",(0,e.Z)({ref:q,className:Z+(i?" "+i:"")},P))}));Pz.displayName="CodeMirror";const qz=Pz,Tz=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement(qz,{readOnly:o,value:e,extensions:[uI(),pZ.lineWrapping],onChange:e=>t?.({value:e}),id:r,role:"textbox","data-testid":"code-editor",height:"300px",width:"100%"}),jz=v_({String:I_.string,Number:I_.number,"True False":I_.bool,PropertyName:I_.propertyName,Null:I_.null,",":I_.separator,"[ ]":I_.squareBracket,"{ }":I_.brace}),Rz=p_.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[jz],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Zz=rM.define({name:"json",parser:Rz.configure({props:[wM.add({Object:PM({except:/^\s*\}/}),Array:PM({except:/^\s*\]/})}),TM.add({"Object Array":jM})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}}),$z=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement(qz,{readOnly:o,value:e,extensions:[new hM(Zz),pZ.lineWrapping],onChange:e=>t?.({value:e}),id:r,role:"textbox","data-testid":"code-editor",height:"300px",width:"100%"});class Mz{static create(e,t,r,n,o){return new Mz(e,t,r,n+(n<<8)+e+(t<<4)|0,o,[],[])}constructor(e,t,r,n,o,i,a){this.type=e,this.value=t,this.from=r,this.hash=n,this.end=o,this.children=i,this.positions=a,this.hashProp=[[KC.contextHash,n]]}addChild(e,t){e.prop(KC.contextHash)!=this.hash&&(e=new aS(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new aS(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,r)=>new aS(tS.none,e,t,r,this.hashProp)})}}var Nz;!function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.URL=33]="URL",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel"}(Nz||(Nz={}));class Dz{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class Lz{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return zz(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let n=t;n<e;n++)r+=9==this.text.charCodeAt(n)?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=9==this.text.charCodeAt(t)?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function Iz(e,t,r){if(r.pos==r.text.length||e!=t.block&&r.indent>=t.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(e.type==Nz.OrderedList?Hz:Xz)(r,t,!1);return n>0&&(e.type!=Nz.BulletList||Yz(r,t,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==e.value}const Bz={[Nz.Blockquote]:(e,t,r)=>62==r.next&&(r.markers.push(kU(Nz.QuoteMark,t.lineStart+r.pos,t.lineStart+r.pos+1)),r.moveBase(r.pos+(Qz(r.text.charCodeAt(r.pos+1))?2:1)),e.end=t.lineStart+r.text.length,!0),[Nz.ListItem]:(e,t,r)=>!(r.indent<r.baseIndent+e.value&&r.next>-1||(r.moveBaseColumn(r.baseIndent+e.value),0)),[Nz.OrderedList]:Iz,[Nz.BulletList]:Iz,[Nz.Document]:()=>!0};function Qz(e){return 32==e||9==e||10==e||13==e}function zz(e,t=0){for(;t<e.length&&Qz(e.charCodeAt(t));)t++;return t}function Uz(e,t,r){for(;t>r&&Qz(e.charCodeAt(t-1));)t--;return t}function Fz(e){if(96!=e.next&&126!=e.next)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(96==e.next)for(let r=t;r<e.text.length;r++)if(96==e.text.charCodeAt(r))return-1;return t}function Wz(e){return 62!=e.next?-1:32==e.text.charCodeAt(e.pos+1)?2:1}function Yz(e,t,r){if(42!=e.next&&45!=e.next&&95!=e.next)return-1;let n=1;for(let t=e.pos+1;t<e.text.length;t++){let r=e.text.charCodeAt(t);if(r==e.next)n++;else if(!Qz(r))return-1}return r&&45==e.next&&Kz(e)>-1&&e.depth==t.stack.length||n<3?-1:1}function Vz(e,t){for(let r=e.stack.length-1;r>=0;r--)if(e.stack[r].type==t)return!0;return!1}function Xz(e,t,r){return 45!=e.next&&43!=e.next&&42!=e.next||e.pos!=e.text.length-1&&!Qz(e.text.charCodeAt(e.pos+1))||!(!r||Vz(t,Nz.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?-1:1}function Hz(e,t,r){let n=e.pos,o=e.next;for(;o>=48&&o<=57;){if(n++,n==e.text.length)return-1;o=e.text.charCodeAt(n)}return n==e.pos||n>e.pos+9||46!=o&&41!=o||n<e.text.length-1&&!Qz(e.text.charCodeAt(n+1))||r&&!Vz(t,Nz.OrderedList)&&(e.skipSpace(n+1)==e.text.length||n>e.pos+1||49!=e.next)?-1:n+1-e.pos}function Gz(e){if(35!=e.next)return-1;let t=e.pos+1;for(;t<e.text.length&&35==e.text.charCodeAt(t);)t++;if(t<e.text.length&&32!=e.text.charCodeAt(t))return-1;let r=t-e.pos;return r>6?-1:r}function Kz(e){if(45!=e.next&&61!=e.next||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let r=t;for(;t<e.text.length&&Qz(e.text.charCodeAt(t));)t++;return t==e.text.length?r:-1}const Jz=/^[ \t]*$/,eU=/-->/,tU=/\?>/,rU=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,eU],[/^\s*<\?/,tU],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Jz],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Jz]];function nU(e,t,r){if(60!=e.next)return-1;let n=e.text.slice(e.pos);for(let e=0,t=rU.length-(r?1:0);e<t;e++)if(rU[e][0].test(n))return e;return-1}function oU(e,t){let r=e.countIndent(t,e.pos,e.indent),n=e.countIndent(e.skipSpace(t),t,r);return n>=r+5?r+1:n}function iU(e,t,r){let n=e.length-1;n>=0&&e[n].to==t&&e[n].type==Nz.CodeText?e[n].to=r:e.push(kU(Nz.CodeText,t,r))}const aU={LinkReference:void 0,IndentedCode(e,t){let r=t.baseIndent+4;if(t.indent<r)return!1;let n=t.findColumn(r),o=e.lineStart+n,i=e.lineStart+t.text.length,a=[],s=[];for(iU(a,o,i);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){iU(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else{if(t.indent<r)break;{if(s.length){for(let e of s)e.type==Nz.CodeText?iU(a,e.from,e.to):a.push(e);s=[]}iU(a,e.lineStart-1,e.lineStart);for(let e of t.markers)a.push(e);i=e.lineStart+t.text.length;let r=e.lineStart+t.findColumn(t.baseIndent+4);r<i&&iU(a,r,i)}}return s.length&&(s=s.filter((e=>e.type!=Nz.CodeText)),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(a,-o).finish(Nz.CodeBlock,i-o),o),!0},FencedCode(e,t){let r=Fz(t);if(r<0)return!1;let n=e.lineStart+t.pos,o=t.next,i=r-t.pos,a=t.skipSpace(r),s=Uz(t.text,t.text.length,a),l=[kU(Nz.CodeMark,n,n+i)];a<s&&l.push(kU(Nz.CodeInfo,e.lineStart+a,e.lineStart+s));for(let r=!0;e.nextLine()&&t.depth>=e.stack.length;r=!1){let n=t.pos;if(t.indent-t.baseIndent<4)for(;n<t.text.length&&t.text.charCodeAt(n)==o;)n++;if(n-t.pos>=i&&t.skipSpace(n)==t.text.length){for(let e of t.markers)l.push(e);l.push(kU(Nz.CodeMark,e.lineStart+t.pos,e.lineStart+n)),e.nextLine();break}{r||iU(l,e.lineStart-1,e.lineStart);for(let e of t.markers)l.push(e);let n=e.lineStart+t.basePos,o=e.lineStart+t.text.length;n<o&&iU(l,n,o)}}return e.addNode(e.buffer.writeElements(l,-n).finish(Nz.FencedCode,e.prevLineEnd()-n),n),!0},Blockquote(e,t){let r=Wz(t);return!(r<0)&&(e.startContext(Nz.Blockquote,t.pos),e.addNode(Nz.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+r),null)},HorizontalRule(e,t){if(Yz(t,e,!1)<0)return!1;let r=e.lineStart+t.pos;return e.nextLine(),e.addNode(Nz.HorizontalRule,r),!0},BulletList(e,t){let r=Xz(t,e,!1);if(r<0)return!1;e.block.type!=Nz.BulletList&&e.startContext(Nz.BulletList,t.basePos,t.next);let n=oU(t,t.pos+1);return e.startContext(Nz.ListItem,t.basePos,n-t.baseIndent),e.addNode(Nz.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+r),t.moveBaseColumn(n),null},OrderedList(e,t){let r=Hz(t,e,!1);if(r<0)return!1;e.block.type!=Nz.OrderedList&&e.startContext(Nz.OrderedList,t.basePos,t.text.charCodeAt(t.pos+r-1));let n=oU(t,t.pos+r);return e.startContext(Nz.ListItem,t.basePos,n-t.baseIndent),e.addNode(Nz.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+r),t.moveBaseColumn(n),null},ATXHeading(e,t){let r=Gz(t);if(r<0)return!1;let n=t.pos,o=e.lineStart+n,i=Uz(t.text,t.text.length,n),a=i;for(;a>n&&t.text.charCodeAt(a-1)==t.next;)a--;a!=i&&a!=n&&Qz(t.text.charCodeAt(a-1))||(a=t.text.length);let s=e.buffer.write(Nz.HeaderMark,0,r).writeElements(e.parser.parseInline(t.text.slice(n+r+1,a),o+r+1),-o);a<t.text.length&&s.write(Nz.HeaderMark,a-n,i-n);let l=s.finish(Nz.ATXHeading1-1+r,t.text.length-n);return e.nextLine(),e.addNode(l,o),!0},HTMLBlock(e,t){let r=nU(t,0,!1);if(r<0)return!1;let n=e.lineStart+t.pos,o=rU[r][1],i=[],a=o!=Jz;for(;!o.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){a=!1;break}for(let e of t.markers)i.push(e)}a&&e.nextLine();let s=o==eU?Nz.CommentBlock:o==tU?Nz.ProcessingInstructionBlock:Nz.HTMLBlock,l=e.prevLineEnd();return e.addNode(e.buffer.writeElements(i,-n).finish(s,l-n),n),!0},SetextHeading:void 0};class sU{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(-1==this.stage)return!1;let n=r.content+"\n"+t.scrub(),o=this.advance(n);return o>-1&&o<n.length&&this.complete(e,r,o)}finish(e,t){return(2==this.stage||3==this.stage)&&zz(t.content,this.pos)==t.content.length&&this.complete(e,t,t.content.length)}complete(e,t,r){return e.addLeafElement(t,kU(Nz.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(!1===e&&(this.stage=-1),!1)}advance(e){for(;;){if(-1==this.stage)return-1;if(0==this.stage){if(!this.nextStage($U(e,this.pos,this.start,!0)))return-1;if(58!=e.charCodeAt(this.pos))return this.stage=-1;this.elts.push(kU(Nz.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else{if(1!=this.stage){if(2==this.stage){let t=zz(e,this.pos),r=0;if(t>this.pos){let n=ZU(e,t,this.start);if(n){let t=lU(e,n.to-this.start);t>0&&(this.nextStage(n),r=t)}}return r||(r=lU(e,this.pos)),r>0&&r<e.length?r:-1}return lU(e,this.pos)}if(!this.nextStage(RU(e,zz(e,this.pos),this.start)))return-1}}}}function lU(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(10==r)break;if(!Qz(r))return-1}return t}class cU{nextLine(e,t,r){let n=t.depth<e.stack.length?-1:Kz(t),o=t.next;if(n<0)return!1;let i=kU(Nz.HeaderMark,e.lineStart+t.pos,e.lineStart+n);return e.nextLine(),e.addLeafElement(r,kU(61==o?Nz.SetextHeading1:Nz.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),i])),!0}finish(){return!1}}const uU={LinkReference:(e,t)=>91==t.content.charCodeAt(0)?new sU(t):null,SetextHeading:()=>new cU},dU=[(e,t)=>Gz(t)>=0,(e,t)=>Fz(t)>=0,(e,t)=>Wz(t)>=0,(e,t)=>Xz(t,e,!0)>=0,(e,t)=>Hz(t,e,!0)>=0,(e,t)=>Yz(t,e,!0)>=0,(e,t)=>nU(t,0,!0)>=0],pU={text:"",end:0};class hU{constructor(e,t,r,n){this.parser=e,this.input=t,this.ranges=n,this.line=new Lz,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=n[n.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=n[0].from,this.block=Mz.create(Nz.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new LU(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(null!=this.stoppedAt&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(;e.depth<this.stack.length;)this.finishContext();for(let t of e.markers)this.addNode(t.type,t.from,t.to);if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let t of this.parser.blockParsers)if(t){let r=t(this,e);if(0!=r){if(1==r)return null;e.forward();continue e}}break}let t=new Dz(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let r=e(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4)for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e;for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+="\n"+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return!!t&&(this.absoluteLineStart+=t,this.lineStart=IU(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0)}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=pU;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let n=this.ranges[r].from,o=this.lineChunkAt(n);t.end=n+o.length,t.text=t.text.slice(0,this.ranges[r-1].to-e)+o,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],r=this.parser.skipContextMarkup[t.type];if(!r)throw new Error("Unhandled block context "+Nz[t.type]);if(!r(t,this,e))break;e.forward()}}lineChunkAt(e){let t,r=this.input.chunk(e);if(this.input.lineChunks)t="\n"==r?"":r;else{let e=r.indexOf("\n");t=e<0?r:r.slice(0,e)}return e+t.length>this.to?t.slice(0,this.to-e):t}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=Mz.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){"number"==typeof e&&(e=new aS(this.parser.nodeSet.types[e],OU,OU,(null!=r?r:this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(NU(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?fU(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=NU(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Nz.Paragraph,e.content.length),e.start)}elt(e,t,r,n){return"string"==typeof e?kU(this.parser.getNodeType(e),t,r,n):new xU(e,t)}get buffer(){return new wU(this.parser.nodeSet)}}function fU(e,t,r,n,o){let i=e[t].to,a=[],s=[],l=r.from+n;function c(r,o){for(;o?r>=i:r>i;){let o=e[t+1].from-i;n+=o,r+=o,t++,i=e[t].to}}for(let u=r.firstChild;u;u=u.nextSibling){c(u.from+n,!0);let r,d=u.from+n,p=o.get(u.tree);p?r=p:u.to+n>i?(r=fU(e,t,u,n,o),c(u.to+n,!1)):r=u.toTree(),a.push(r),s.push(d-l)}return c(r.to+n,!1),new aS(r.type,a,s,r.to+n-l,r.tree?r.tree.propValues:void 0)}class mU extends SS{constructor(e,t,r,n,o,i,a,s,l){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=n,this.endLeafBlock=o,this.skipContextMarkup=i,this.inlineParsers=a,this.inlineNames=s,this.wrappers=l,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,r){let n=new hU(this,e,t,r);for(let o of this.wrappers)n=o(n,e,t,r);return n}configure(e){let t=bU(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:n}=this,o=this.blockParsers.slice(),i=this.leafBlockParsers.slice(),a=this.blockNames.slice(),s=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),u=this.wrappers;if(gU(t.defineNodes)){n=Object.assign({},n);let e,o=r.types.slice();for(let r of t.defineNodes){let{name:t,block:i,composite:a,style:s}="string"==typeof r?{name:r}:r;if(o.some((e=>e.name==t)))continue;a&&(n[o.length]=(e,t,r)=>a(t,r,e.value));let l=o.length,c=a?["Block","BlockContext"]:i?l>=Nz.ATXHeading1&&l<=Nz.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;o.push(tS.define({id:l,name:t,props:c&&[[KC.group,c]]})),s&&(e||(e={}),Array.isArray(s)||s instanceof g_?e[t]=s:Object.assign(e,s))}r=new rS(o),e&&(r=r.extend(v_(e)))}if(gU(t.props)&&(r=r.extend(...t.props)),gU(t.remove))for(let e of t.remove){let t=this.blockNames.indexOf(e),r=this.inlineNames.indexOf(e);t>-1&&(o[t]=i[t]=void 0),r>-1&&(s[r]=void 0)}if(gU(t.parseBlock))for(let e of t.parseBlock){let t=a.indexOf(e.name);if(t>-1)o[t]=e.parse,i[t]=e.leaf;else{let t=e.before?yU(a,e.before):e.after?yU(a,e.after)+1:a.length-1;o.splice(t,0,e.parse),i.splice(t,0,e.leaf),a.splice(t,0,e.name)}e.endLeaf&&c.push(e.endLeaf)}if(gU(t.parseInline))for(let e of t.parseInline){let t=l.indexOf(e.name);if(t>-1)s[t]=e.parse;else{let t=e.before?yU(l,e.before):e.after?yU(l,e.after)+1:l.length-1;s.splice(t,0,e.parse),l.splice(t,0,e.name)}}return t.wrap&&(u=u.concat(t.wrap)),new mU(r,o,i,a,c,n,s,l,u)}getNodeType(e){let t=this.nodeTypes[e];if(null==t)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new MU(this,e,t);e:for(let e=t;e<r.end;){let t=r.char(e);for(let n of this.inlineParsers)if(n){let o=n(r,t,e);if(o>=0){e=o;continue e}}e++}return r.resolveMarkers(0)}}function gU(e){return null!=e&&e.length>0}function bU(e){if(!Array.isArray(e))return e;if(0==e.length)return null;let t=bU(e[0]);if(1==e.length)return t;let r=bU(e.slice(1));if(!r||!t)return t||r;let n=(e,t)=>(e||OU).concat(t||OU),o=t.wrap,i=r.wrap;return{props:n(t.props,r.props),defineNodes:n(t.defineNodes,r.defineNodes),parseBlock:n(t.parseBlock,r.parseBlock),parseInline:n(t.parseInline,r.parseInline),remove:n(t.remove,r.remove),wrap:o?i?(e,t,r,n)=>o(i(e,t,r,n),t,r,n):o:i}}function yU(e,t){let r=e.indexOf(t);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return r}let vU=[tS.none];for(let e,t=1;e=Nz[t];t++)vU[t]=tS.define({id:t,name:e,props:t>=Nz.Escape?[]:[[KC.group,t in Bz?["Block","BlockContext"]:["Block","LeafBlock"]]],top:"Document"==e});const OU=[];class wU{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,n=0){return this.content.push(e,t,r,4+4*n),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return aS.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}class AU{constructor(e,t,r,n=OU){this.type=e,this.from=t,this.to=r,this.children=n}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new wU(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class xU{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return OU}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function kU(e,t,r,n){return new AU(e,t,r,n)}const CU={resolve:"Emphasis",mark:"EmphasisMark"},SU={resolve:"Emphasis",mark:"EmphasisMark"},_U={},EU={};class PU{constructor(e,t,r,n){this.type=e,this.from=t,this.to=r,this.side=n}}let qU=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{qU=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch(De){}const TU={Escape(e,t,r){if(92!=t||r==e.end-1)return-1;let n=e.char(r+1);for(let t=0;t<32;t++)if("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".charCodeAt(t)==n)return e.append(kU(Nz.Escape,r,r+2));return-1},Entity(e,t,r){if(38!=t)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(r+1,r+31));return n?e.append(kU(Nz.Entity,r,r+1+n[0].length)):-1},InlineCode(e,t,r){if(96!=t||r&&96==e.char(r-1))return-1;let n=r+1;for(;n<e.end&&96==e.char(n);)n++;let o=n-r,i=0;for(;n<e.end;n++)if(96==e.char(n)){if(i++,i==o&&96!=e.char(n+1))return e.append(kU(Nz.InlineCode,r,n+1,[kU(Nz.CodeMark,r,r+o),kU(Nz.CodeMark,n+1-o,n+1)]))}else i=0;return-1},HTMLTag(e,t,r){if(60!=t||r==e.end-1)return-1;let n=e.slice(r+1,e.end),o=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(o)return e.append(kU(Nz.URL,r,r+1+o[0].length));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return e.append(kU(Nz.Comment,r,r+1+i[0].length));let a=/^\?[^]*?\?>/.exec(n);if(a)return e.append(kU(Nz.ProcessingInstruction,r,r+1+a[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return s?e.append(kU(Nz.HTMLTag,r,r+1+s[0].length)):-1},Emphasis(e,t,r){if(95!=t&&42!=t)return-1;let n=r+1;for(;e.char(n)==t;)n++;let o=e.slice(r-1,r),i=e.slice(n,n+1),a=qU.test(o),s=qU.test(i),l=/\s|^$/.test(o),c=/\s|^$/.test(i),u=!c&&(!s||l||a),d=!l&&(!a||c||s),p=u&&(42==t||!d||a),h=d&&(42==t||!u||s);return e.append(new PU(95==t?CU:SU,r,n,(p?1:0)|(h?2:0)))},HardBreak(e,t,r){if(92==t&&10==e.char(r+1))return e.append(kU(Nz.HardBreak,r,r+2));if(32==t){let t=r+1;for(;32==e.char(t);)t++;if(10==e.char(t)&&t>=r+2)return e.append(kU(Nz.HardBreak,r,t+1))}return-1},Link:(e,t,r)=>91==t?e.append(new PU(_U,r,r+1,1)):-1,Image:(e,t,r)=>33==t&&91==e.char(r+1)?e.append(new PU(EU,r,r+2,1)):-1,LinkEnd(e,t,r){if(93!=t)return-1;for(let t=e.parts.length-1;t>=0;t--){let n=e.parts[t];if(n instanceof PU&&(n.type==_U||n.type==EU)){if(!n.side||e.skipSpace(n.to)==r&&!/[(\[]/.test(e.slice(r+1,r+2)))return e.parts[t]=null,-1;let o=e.takeContent(t),i=e.parts[t]=jU(e,o,n.type==_U?Nz.Link:Nz.Image,n.from,r+1);if(n.type==_U)for(let r=0;r<t;r++){let t=e.parts[r];t instanceof PU&&t.type==_U&&(t.side=0)}return i.to}}return-1}};function jU(e,t,r,n,o){let{text:i}=e,a=e.char(o),s=o;if(t.unshift(kU(Nz.LinkMark,n,n+(r==Nz.Image?2:1))),t.push(kU(Nz.LinkMark,o-1,o)),40==a){let r,n=e.skipSpace(o+1),a=RU(i,n-e.offset,e.offset);a&&(n=e.skipSpace(a.to),r=ZU(i,n-e.offset,e.offset),r&&(n=e.skipSpace(r.to))),41==e.char(n)&&(t.push(kU(Nz.LinkMark,o,o+1)),s=n+1,a&&t.push(a),r&&t.push(r),t.push(kU(Nz.LinkMark,n,s)))}else if(91==a){let r=$U(i,o-e.offset,e.offset,!1);r&&(t.push(r),s=r.to)}return kU(r,n,s,t)}function RU(e,t,r){if(60==e.charCodeAt(t)){for(let n=t+1;n<e.length;n++){let o=e.charCodeAt(n);if(62==o)return kU(Nz.URL,t+r,n+1+r);if(60==o||10==o)return!1}return null}{let n=0,o=t;for(let t=!1;o<e.length;o++){let r=e.charCodeAt(o);if(Qz(r))break;if(t)t=!1;else if(40==r)n++;else if(41==r){if(!n)break;n--}else 92==r&&(t=!0)}return o>t?kU(Nz.URL,t+r,o+r):o==e.length&&null}}function ZU(e,t,r){let n=e.charCodeAt(t);if(39!=n&&34!=n&&40!=n)return!1;let o=40==n?41:n;for(let n=t+1,i=!1;n<e.length;n++){let a=e.charCodeAt(n);if(i)i=!1;else{if(a==o)return kU(Nz.LinkTitle,t+r,n+1+r);92==a&&(i=!0)}}return null}function $U(e,t,r,n){for(let o=!1,i=t+1,a=Math.min(e.length,i+999);i<a;i++){let a=e.charCodeAt(i);if(o)o=!1;else{if(93==a)return!n&&kU(Nz.LinkLabel,t+r,i+1+r);if(n&&!Qz(a)&&(n=!1),91==a)return!1;92==a&&(o=!0)}}return null}class MU{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,n,o){return this.append(new PU(e,t,r,(n?1:0)|(o?2:0)))}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let r=this.parts[t];if(!(r instanceof PU&&r.type.resolve&&2&r.side))continue;let n,o=r.type==CU||r.type==SU,i=r.to-r.from,a=t-1;for(;a>=e;a--){let e=this.parts[a];if(e instanceof PU&&1&e.side&&e.type==r.type&&!(o&&(1&r.side||2&e.side)&&(e.to-e.from+i)%3==0&&((e.to-e.from)%3||i%3))){n=e;break}}if(!n)continue;let s=r.type.resolve,l=[],c=n.from,u=r.to;if(o){let e=Math.min(2,n.to-n.from,i);c=n.to-e,u=r.from+e,s=1==e?"Emphasis":"StrongEmphasis"}n.type.mark&&l.push(this.elt(n.type.mark,c,n.to));for(let e=a+1;e<t;e++)this.parts[e]instanceof AU&&l.push(this.parts[e]),this.parts[e]=null;r.type.mark&&l.push(this.elt(r.type.mark,r.from,u));let d=this.elt(s,c,u,l);this.parts[a]=o&&n.from!=c?new PU(n.type,n.from,c,n.side):null,(this.parts[t]=o&&r.to!=u?new PU(r.type,u,r.to,r.side):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let r=e;r<this.parts.length;r++){let e=this.parts[r];e instanceof AU&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof PU&&r.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return zz(this.text,e-this.offset)+this.offset}elt(e,t,r,n){return"string"==typeof e?kU(this.parser.getNodeType(e),t,r,n):new xU(e,t)}}function NU(e,t){if(!t.length)return e;if(!e.length)return t;let r=e.slice(),n=0;for(let e of t){for(;n<r.length&&r[n].to<e.to;)n++;if(n<r.length&&r[n].from<e.from){let t=r[n];t instanceof AU&&(r[n]=new AU(t.type,t.from,t.to,NU(t.children,[e])))}else r.splice(n++,0,e)}return r}const DU=[Nz.CodeBlock,Nz.ListItem,Nz.OrderedList,Nz.BulletList];class LU{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&"\n"!=this.input.read(e-1,e);)e--;this.fragmentEnd=e?e-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let n=e+this.fragment.offset;for(;r.to<=n;)if(!r.parent())return!1;for(;;){if(r.from>=n)return this.fragment.from<=t;if(!r.childAfter(n))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(KC.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,i=o,a=e.block.children.length,s=i,l=a;for(;;){if(t.to-r>n){if(t.type.isAnonymous&&t.firstChild())continue;break}let o=IU(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,o);else{let r=new aS(e.parser.nodeSet.types[Nz.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(r,t.tree),e.addNode(r,o)}if(t.type.is("Block")&&(DU.indexOf(t.type.id)<0?(i=t.to-r,a=e.block.children.length):(i=s,a=l,s=t.to-r,l=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return i-o}}function IU(e,t){let r=e;for(let n=1;n<t.length;n++){let o=t[n-1].to,i=t[n].from;o<e&&(r-=i-o)}return r}const BU=v_({"Blockquote/...":I_.quote,HorizontalRule:I_.contentSeparator,"ATXHeading1/... SetextHeading1/...":I_.heading1,"ATXHeading2/... SetextHeading2/...":I_.heading2,"ATXHeading3/...":I_.heading3,"ATXHeading4/...":I_.heading4,"ATXHeading5/...":I_.heading5,"ATXHeading6/...":I_.heading6,"Comment CommentBlock":I_.comment,Escape:I_.escape,Entity:I_.character,"Emphasis/...":I_.emphasis,"StrongEmphasis/...":I_.strong,"Link/... Image/...":I_.link,"OrderedList/... BulletList/...":I_.list,"BlockQuote/...":I_.quote,"InlineCode CodeText":I_.monospace,URL:I_.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":I_.processingInstruction,"CodeInfo LinkLabel":I_.labelName,LinkTitle:I_.string,Paragraph:I_.content}),QU=new mU(new rS(vU).extend(BU),Object.keys(aU).map((e=>aU[e])),Object.keys(aU).map((e=>uU[e])),Object.keys(aU),dU,Bz,Object.keys(TU).map((e=>TU[e])),Object.keys(TU),[]);function zU(e,t,r){let n=[];for(let o=e.firstChild,i=t;;o=o.nextSibling){let e=o?o.from:r;if(e>i&&n.push({from:i,to:e}),!o)break;i=o.to}return n}const UU={resolve:"Strikethrough",mark:"StrikethroughMark"},FU={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":I_.strikethrough}},{name:"StrikethroughMark",style:I_.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,r){if(126!=t||126!=e.char(r+1)||126==e.char(r+2))return-1;let n=e.slice(r-1,r),o=e.slice(r+2,r+3),i=/\s|^$/.test(n),a=/\s|^$/.test(o),s=qU.test(n),l=qU.test(o);return e.addDelimiter(UU,r,r+2,!a&&(!l||i||s),!i&&(!s||a||l))},after:"Emphasis"}]};function WU(e,t,r=0,n,o=0){let i=0,a=!0,s=-1,l=-1,c=!1,u=()=>{n.push(e.elt("TableCell",o+s,o+l,e.parser.parseInline(t.slice(s,l),o+s)))};for(let d=r;d<t.length;d++){let r=t.charCodeAt(d);124!=r||c?(c||32!=r&&9!=r)&&(s<0&&(s=d),l=d+1):((!a||s>-1)&&i++,a=!1,n&&(s>-1&&u(),n.push(e.elt("TableDelimiter",d+o,d+o+1))),s=l=-1),c=!c&&92==r}return s>-1&&(i++,n&&u()),i}function YU(e,t){for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);if(124==t)return!0;92==t&&r++}return!1}const VU=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class XU{constructor(){this.rows=null}nextLine(e,t,r){if(null==this.rows){let n;if(this.rows=!1,(45==t.next||58==t.next||124==t.next)&&VU.test(n=t.text.slice(t.pos))){let o=[];WU(e,r.content,0,o,r.start)==WU(e,n,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,o),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];WU(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return!!this.rows&&(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0)}}const HU={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":I_.heading}},"TableRow",{name:"TableCell",style:I_.content},{name:"TableDelimiter",style:I_.processingInstruction}],parseBlock:[{name:"Table",leaf:(e,t)=>YU(t.content,0)?new XU:null,endLeaf(e,t,r){if(r.parsers.some((e=>e instanceof XU))||!YU(t.text,t.basePos))return!1;let n=e.scanLine(e.absoluteLineEnd+1).text;return VU.test(n)&&WU(e,t.text,t.basePos)==WU(e,n,t.basePos)},before:"SetextHeading"}]};class GU{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const KU={defineNodes:[{name:"Task",block:!0,style:I_.list},{name:"TaskMarker",style:I_.atom}],parseBlock:[{name:"TaskList",leaf:(e,t)=>/^\[[ xX]\][ \t]/.test(t.content)&&"ListItem"==e.parentType().name?new GU:null,after:"SetextHeading"}]},JU=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,eF=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,tF=/[\w-]+\.[\w-]+($|\/)/,rF=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,nF=/\/[a-zA-Z\d@.]+/gy;function oF(e,t,r,n){let o=0;for(let i=t;i<r;i++)e[i]==n&&o++;return o}function iF(e,t){rF.lastIndex=t;let r=rF.exec(e);if(!r)return-1;let n=r[0][r[0].length-1];return"_"==n||"-"==n?-1:t+r[0].length-("."==n?1:0)}const aF={parseInline:[{name:"Autolink",parse(e,t,r){let n=r-e.offset;JU.lastIndex=n;let o=JU.exec(e.text),i=-1;return o?(o[1]||o[2]?i=function(e,t){eF.lastIndex=t;let r=eF.exec(e);if(!r||tF.exec(r[0])[0].indexOf("_")>-1)return-1;let n=t+r[0].length;for(;;){let r,o=e[n-1];if(/[?!.,:*_~]/.test(o)||")"==o&&oF(e,t,n,")")>oF(e,t,n,"("))n--;else{if(";"!=o||!(r=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))break;n=t+r.index}}return n}(e.text,n+o[0].length):o[3]?i=iF(e.text,n):(i=iF(e.text,n+o[0].length),i>-1&&"xmpp:"==o[0]&&(nF.lastIndex=i,o=nF.exec(e.text),o&&(i=o.index+o[0].length))),i<0?-1:(e.addElement(e.elt("URL",r,i+e.offset)),i+e.offset)):-1}}]},sF=[HU,KU,FU,aF];function lF(e,t,r){return(n,o,i)=>{if(o!=e||n.char(i+1)==e)return-1;let a=[n.elt(r,i,i+1)];for(let o=i+1;o<n.end;o++){let s=n.char(o);if(s==e)return n.addElement(n.elt(t,i,o+1,a.concat(n.elt(r,o,o+1))));if(92==s&&a.push(n.elt("Escape",o,2+o++)),Qz(s))break}return-1}}const cF={defineNodes:[{name:"Superscript",style:I_.special(I_.content)},{name:"SuperscriptMark",style:I_.processingInstruction}],parseInline:[{name:"Superscript",parse:lF(94,"Superscript","SuperscriptMark")}]},uF={defineNodes:[{name:"Subscript",style:I_.special(I_.content)},{name:"SubscriptMark",style:I_.processingInstruction}],parseInline:[{name:"Subscript",parse:lF(126,"Subscript","SubscriptMark")}]},dF={defineNodes:[{name:"Emoji",style:I_.character}],parseInline:[{name:"Emoji",parse(e,t,r){let n;return 58==t&&(n=/^[a-zA-Z_0-9]+:/.exec(e.slice(r+1,e.end)))?e.addElement(e.elt("Emoji",r,r+1+n[0].length)):-1}}]},pF=K$({commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}}}),hF=new KC,fF=QU.configure({props:[TM.add((e=>!e.is("Block")||e.is("Document")||null!=mF(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to}))),hF.add(mF),wM.add({Document:()=>null}),G$.add({Document:pF})]});function mF(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function gF(e,t){let r=e;for(;;){let e,n=r.nextSibling;if(!n||null!=(e=mF(n.type))&&e<=t)break;r=n}return r.to}const bF=qM.of(((e,t,r)=>{for(let n=nM(e).resolveInner(r,-1);n&&!(n.from<t);n=n.parent){let e=n.type.prop(hF);if(null==e)continue;let t=gF(n,e);if(t>r)return{from:r,to:t}}return null}));function yF(e){return new eM(pF,e,[bF],"markdown")}const vF=yF(fF),OF=yF(fF.configure([sF,uF,cF,dF,{props:[TM.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));class wF{constructor(e,t,r,n,o,i,a){this.node=e,this.from=t,this.to=r,this.spaceBefore=n,this.spaceAfter=o,this.type=i,this.item=a}blank(e,t=!0){let r=this.spaceBefore+("Blockquote"==this.node.name?">":"");if(null!=e){for(;r.length<e;)r+=" ";return r}for(let e=this.to-this.from-r.length-this.spaceAfter.length;e>0;e--)r+=" ";return r+(t?this.spaceAfter:"")}marker(e,t){let r="OrderedList"==this.node.name?String(+xF(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function AF(e,t){let r=[];for(let t=e;t&&"Document"!=t.name;t=t.parent)"ListItem"!=t.name&&"Blockquote"!=t.name&&"FencedCode"!=t.name||r.push(t);let n=[];for(let e=r.length-1;e>=0;e--){let o,i=r[e],a=t.lineAt(i.from),s=i.from-a.from;if("FencedCode"==i.name)n.push(new wF(i,s,s,"","","",null));else if("Blockquote"==i.name&&(o=/^ *>( ?)/.exec(a.text.slice(s))))n.push(new wF(i,s,s+o[0].length,"",o[1],">",null));else if("ListItem"==i.name&&"OrderedList"==i.parent.name&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(s)))){let e=o[3],t=o[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),n.push(new wF(i.parent,s,s+t,o[1],e,o[2],i))}else if("ListItem"==i.name&&"BulletList"==i.parent.name&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(s)))){let e=o[4],t=o[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let r=o[2];o[3]&&(r+=o[3].replace(/[xX]/," ")),n.push(new wF(i.parent,s,s+t,o[1],e,r,i))}}return n}function xF(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function kF(e,t,r,n=0){for(let o=-1,i=e;;){if("ListItem"==i.name){let e=xF(i,t),a=+e[2];if(o>=0){if(a!=o+1)return;r.push({from:i.from+e[1].length,to:i.from+e[0].length,insert:String(o+2+n)})}o=a}let e=i.nextSibling;if(!e)break;i=e}}function CF(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||"\t"!=t.facet(gM))return e;let n="";for(let t=gq(e,4,r);t>0;)t>=4?(n+="\t",t-=4):(n+=" ",t--);return n+e.slice(r)}function SF(e){return"QuoteMark"==e.name||"ListMark"==e.name}const _F=[{key:"Enter",run:({state:e,dispatch:t})=>{let r=nM(e),{doc:n}=e,o=null,i=e.changeByRange((t=>{if(!t.empty||!OF.isActiveAt(e,t.from))return o={range:t};let i=t.from,a=n.lineAt(i),s=AF(r.resolveInner(i,-1),n);for(;s.length&&s[s.length-1].from>i-a.from;)s.pop();if(!s.length)return o={range:t};let l=s[s.length-1];if(l.to-l.spaceAfter.length>i-a.from)return o={range:t};let c=i>=l.to-l.spaceAfter.length&&!/\S/.test(a.text.slice(l.to));if(l.item&&c){if(l.node.firstChild.to>=i||a.from>0&&!/[^\s>]/.test(n.lineAt(a.from-1).text)){let e,t=s.length>1?s[s.length-2]:null,r="";t&&t.item?(e=a.from+t.from,r=t.marker(n,1)):e=a.from+(t?t.to:0);let o=[{from:e,to:i,insert:r}];return"OrderedList"==l.node.name&&kF(l.item,n,o,-2),t&&"OrderedList"==t.node.name&&kF(t.item,n,o),{range:pP.cursor(e+r.length),changes:o}}{let t="";for(let e=0,r=s.length-2;e<=r;e++)t+=s[e].blank(e<r?gq(a.text,4,s[e+1].from)-t.length:null,e<r);return t=CF(t,e),{range:pP.cursor(i+t.length+1),changes:{from:a.from,insert:t+e.lineBreak}}}}if("Blockquote"==l.node.name&&c&&a.from){let r=n.lineAt(a.from-1),o=/>\s*$/.exec(r.text);if(o&&o.index==l.from){let n=e.changes([{from:r.from+o.index,to:r.to},{from:a.from+l.from,to:a.to}]);return{range:t.map(n),changes:n}}}let u=[];"OrderedList"==l.node.name&&kF(l.item,n,u);let d=l.item&&l.item.from<a.from,p="";if(!d||/^[\s\d.)\-+*>]*/.exec(a.text)[0].length>=l.to)for(let e=0,t=s.length-1;e<=t;e++)p+=e!=t||d?s[e].blank(e<t?gq(a.text,4,s[e+1].from)-p.length:null):s[e].marker(n,1);let h=i;for(;h>a.from&&/\s/.test(a.text.charAt(h-a.from-1));)h--;return p=CF(p,e),u.push({from:h,to:i,insert:e.lineBreak+p}),{range:pP.cursor(h+p.length+1),changes:u}}));return!o&&(t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0)}},{key:"Backspace",run:({state:e,dispatch:t})=>{let r=nM(e),n=null,o=e.changeByRange((t=>{let o=t.from,{doc:i}=e;if(t.empty&&OF.isActiveAt(e,t.from)){let t=i.lineAt(o),n=AF(function(e,t){let r=e.resolveInner(t,-1),n=t;SF(r)&&(n=r.from,r=r.parent);for(let e;e=r.childBefore(n);)if(SF(e))n=e.from;else{if("OrderedList"!=e.name&&"BulletList"!=e.name)break;r=e.lastChild,n=r.to}return r}(r,o),i);if(n.length){let r=n[n.length-1],i=r.to-r.spaceAfter.length+(r.spaceAfter?1:0);if(o-t.from>i&&!/\S/.test(t.text.slice(i,o-t.from)))return{range:pP.cursor(t.from+i),changes:{from:t.from+i,to:o}};if(o-t.from==i&&(!r.item||t.from<=r.item.from||!/\S/.test(t.text.slice(0,r.to)))){let n=t.from+r.from;if(r.item&&r.node.from<r.item.from&&/\S/.test(t.text.slice(r.from,r.to))){let o=r.blank(gq(t.text,4,r.to)-gq(t.text,4,r.from));return n==t.from&&(o=CF(o,e)),{range:pP.cursor(n+o.length),changes:{from:n,to:t.from+r.to,insert:o}}}if(n<o)return{range:pP.cursor(n),changes:{from:n,to:o}}}}}return n={range:t}}));return!n&&(t(e.update(o,{scrollIntoView:!0,userEvent:"delete"})),!0)}}],EF=uI({matchClosingTags:!1});function PF(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:o}=vF,completeHTMLTags:i=!0}=e;if(!(o instanceof mU))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let a,s=e.extensions?[e.extensions]:[],l=[EF.support];r instanceof hM?(l.push(r.support),a=r.language):r&&(a=r);let c=t||a?(u=t,d=a,e=>{if(e&&u){let t=null;if(e=/\S*/.exec(e)[0],t="function"==typeof u?u(e):fM.matchLanguageName(u,e,!0),t instanceof fM)return t.support?t.support.language.parser:aM.getSkippingParser(t.load());if(t)return t.parser}return d?d.parser:null}):void 0;var u,d;s.push(function(e){let{codeParser:t,htmlParser:r}=e,n=ES(((e,n)=>{let o=e.type.id;if(!t||o!=Nz.CodeBlock&&o!=Nz.FencedCode){if(r&&(o==Nz.HTMLBlock||o==Nz.HTMLTag))return{parser:r,overlay:zU(e.node,e.from,e.to)}}else{let r="";if(o==Nz.FencedCode){let t=e.node.getChild(Nz.CodeInfo);t&&(r=n.read(t.from,t.to))}let i=t(r);if(i)return{parser:i,overlay:e=>e.type.id==Nz.CodeText}}return null}));return{wrap:n}}({codeParser:c,htmlParser:EF.language.parser})),n&&l.push(kP.high(OZ.of(_F)));let p=yF(o.configure(s));return i&&l.push(p.data.of({autocomplete:qF})),new hM(p,l)}function qF(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let o=nM(t).resolveInner(r,-1);for(;o&&!o.type.isTop;){if("CodeBlock"==o.name||"FencedCode"==o.name||"ProcessingInstructionBlock"==o.name||"CommentBlock"==o.name||"Link"==o.name||"Image"==o.name)return null;o=o.parent}return{from:r-n[0].length,to:r,options:jF(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let TF=null;function jF(){if(TF)return TF;let e=(t=new JN(KP.create({extensions:EF}),0,!0),nI(XL.default,t));var t;return TF=e?e.options:[]}const RF=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement(qz,{readOnly:o,value:e,onChange:e=>t?.({value:e}),extensions:[PF({base:OF}),oN(sN),oN(eN.define([{tag:I_.heading1,fontSize:"24px"},{tag:I_.heading2,fontSize:"20px"},{tag:I_.heading3,fontSize:"16px"}])),pZ.lineWrapping],id:r,role:"textbox","data-testid":"markdown-editor",height:"300px",width:"100%"});var ZF=__webpack_require__(4290),$F=__webpack_require__.n(ZF),MF=__webpack_require__(202),NF={};NF.styleTagTransform=j(),NF.setAttributes=E(),NF.insert=S().bind(null,"head"),NF.domAPI=k(),NF.insertStyleElement=q(),A()(MF.Z,NF),MF.Z&&MF.Z.locals&&MF.Z.locals;var DF=__webpack_require__(6013),LF={};LF.styleTagTransform=j(),LF.setAttributes=E(),LF.insert=S().bind(null,"head"),LF.domAPI=k(),LF.insertStyleElement=q(),A()(DF.Z,LF),DF.Z&&DF.Z.locals&&DF.Z.locals;const IF=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement($F(),{readOnly:o,theme:"snow",value:e,onChange:e=>t?.({value:e}),style:{height:"300px",paddingBottom:"41px",width:"100%"},id:r,modules:{clipboard:{matchVisual:!1}},"data-testid":"richtext-editor"});var BF=__webpack_require__(9391);var QF=__webpack_require__(2806),zF={};zF.styleTagTransform=j(),zF.setAttributes=E(),zF.insert=S().bind(null,"head"),zF.domAPI=k(),zF.insertStyleElement=q(),A()(QF.Z,zF);const UF=QF.Z&&QF.Z.locals?QF.Z.locals:void 0,FF=[{value:"",text:"",phone:""},{value:"DE",text:"Germany",phone:"49"},{value:"AF",text:"Afghanistan",phone:"93"},{value:"AL",text:"Albania",phone:"355"},{value:"DZ",text:"Algeria",phone:"213"},{value:"AX",text:"Alland Islands",phone:"358"},{value:"AS",text:"American Samoa",phone:"1-684"},{value:"AD",text:"Andorra",phone:"376"},{value:"AO",text:"Angola",phone:"244"},{value:"AI",text:"Anguilla",phone:"1-264"},{value:"AQ",text:"Antarctica",phone:"672"},{value:"AG",text:"Antigua and Barbuda",phone:"1-268"},{value:"AR",text:"Argentina",phone:"54"},{value:"AM",text:"Armenia",phone:"374"},{value:"AW",text:"Aruba",phone:"297"},{value:"AU",text:"Australia",phone:"61"},{value:"AT",text:"Austria",phone:"43"},{value:"AZ",text:"Azerbaijan",phone:"994"},{value:"BS",text:"Bahamas",phone:"1-242"},{value:"BH",text:"Bahrain",phone:"973"},{value:"BD",text:"Bangladesh",phone:"880"},{value:"BB",text:"Barbados",phone:"1-246"},{value:"BY",text:"Belarus",phone:"375"},{value:"BE",text:"Belgium",phone:"32"},{value:"BZ",text:"Belize",phone:"501"},{value:"BJ",text:"Benin",phone:"229"},{value:"BM",text:"Bermuda",phone:"1-441"},{value:"BT",text:"Bhutan",phone:"975"},{value:"BO",text:"Bolivia",phone:"591"},{value:"BA",text:"Bosnia and Herzegovina",phone:"387"},{value:"BW",text:"Botswana",phone:"267"},{value:"BV",text:"Bouvet Island",phone:"47"},{value:"BR",text:"Brazil",phone:"55"},{value:"IO",text:"British Indian Ocean Territory",phone:"246"},{value:"VG",text:"British Virgin Islands",phone:"1-284"},{value:"BN",text:"Brunei Darussalam",phone:"673"},{value:"BG",text:"Bulgaria",phone:"359"},{value:"BF",text:"Burkina Faso",phone:"226"},{value:"BI",text:"Burundi",phone:"257"},{value:"KH",text:"Cambodia",phone:"855"},{value:"CM",text:"Cameroon",phone:"237"},{value:"CA",text:"Canada",phone:"1"},{value:"CV",text:"Cape Verde",phone:"238"},{value:"KY",text:"Cayman Islands",phone:"1-345"},{value:"CF",text:"Central African Republic",phone:"236"},{value:"TD",text:"Chad",phone:"235"},{value:"CL",text:"Chile",phone:"56"},{value:"CN",text:"China",phone:"86"},{value:"CX",text:"Christmas Island",phone:"61"},{value:"CC",text:"Cocos (Keeling) Islands",phone:"61"},{value:"CO",text:"Colombia",phone:"57"},{value:"KM",text:"Comoros",phone:"269"},{value:"CD",text:"Congo, Democratic Republic of the",phone:"243"},{value:"CG",text:"Congo, Republic of the",phone:"242"},{value:"CK",text:"Cook Islands",phone:"682"},{value:"CR",text:"Costa Rica",phone:"506"},{value:"CI",text:"Cote d'Ivoire",phone:"225"},{value:"HR",text:"Croatia",phone:"385"},{value:"CU",text:"Cuba",phone:"53"},{value:"CW",text:"Curacao",phone:"599"},{value:"CY",text:"Cyprus",phone:"357"},{value:"CZ",text:"Czech Republic",phone:"420"},{value:"DK",text:"Denmark",phone:"45"},{value:"DJ",text:"Djibouti",phone:"253"},{value:"DM",text:"Dominica",phone:"1-767"},{value:"DO",text:"Dominican Republic",phone:"1-809"},{value:"EC",text:"Ecuador",phone:"593"},{value:"EG",text:"Egypt",phone:"20"},{value:"SV",text:"El Salvador",phone:"503"},{value:"GQ",text:"Equatorial Guinea",phone:"240"},{value:"ER",text:"Eritrea",phone:"291"},{value:"EE",text:"Estonia",phone:"372"},{value:"ET",text:"Ethiopia",phone:"251"},{value:"FK",text:"Falkland Islands (Malvinas)",phone:"500"},{value:"FO",text:"Faroe Islands",phone:"298"},{value:"FJ",text:"Fiji",phone:"679"},{value:"FI",text:"Finland",phone:"358"},{value:"FR",text:"France",phone:"33"},{value:"GF",text:"French Guiana",phone:"594"},{value:"PF",text:"French Polynesia",phone:"689"},{value:"TF",text:"French Southern Territories",phone:"262"},{value:"GA",text:"Gabon",phone:"241"},{value:"GM",text:"Gambia",phone:"220"},{value:"GE",text:"Georgia",phone:"995"},{value:"GH",text:"Ghana",phone:"233"},{value:"GI",text:"Gibraltar",phone:"350"},{value:"GR",text:"Greece",phone:"30"},{value:"GL",text:"Greenland",phone:"299"},{value:"GD",text:"Grenada",phone:"1-473"},{value:"GP",text:"Guadeloupe",phone:"590"},{value:"GU",text:"Guam",phone:"1-671"},{value:"GT",text:"Guatemala",phone:"502"},{value:"GG",text:"Guernsey",phone:"44"},{value:"GN",text:"Guinea",phone:"224"},{value:"GW",text:"Guinea-Bissau",phone:"245"},{value:"GY",text:"Guyana",phone:"592"},{value:"HT",text:"Haiti",phone:"509"},{value:"HM",text:"Heard Island and McDonald Islands",phone:"672"},{value:"VA",text:"Holy See (Vatican City State)",phone:"379"},{value:"HN",text:"Honduras",phone:"504"},{value:"HK",text:"Hong Kong",phone:"852"},{value:"HU",text:"Hungary",phone:"36"},{value:"IS",text:"Iceland",phone:"354"},{value:"IN",text:"India",phone:"91"},{value:"ID",text:"Indonesia",phone:"62"},{value:"IR",text:"Iran, Islamic Republic of",phone:"98"},{value:"IQ",text:"Iraq",phone:"964"},{value:"IE",text:"Ireland",phone:"353"},{value:"IM",text:"Isle of Man",phone:"44"},{value:"IL",text:"Israel",phone:"972"},{value:"IT",text:"Italy",phone:"39"},{value:"JM",text:"Jamaica",phone:"1-876"},{value:"JP",text:"Japan",phone:"81"},{value:"JE",text:"Jersey",phone:"44"},{value:"JO",text:"Jordan",phone:"962"},{value:"KZ",text:"Kazakhstan",phone:"7"},{value:"KE",text:"Kenya",phone:"254"},{value:"KI",text:"Kiribati",phone:"686"},{value:"KP",text:"Korea, Democratic People's Republic of",phone:"850"},{value:"KR",text:"Korea, Republic of",phone:"82"},{value:"XK",text:"Kosovo",phone:"383"},{value:"KW",text:"Kuwait",phone:"965"},{value:"KG",text:"Kyrgyzstan",phone:"996"},{value:"LA",text:"Lao People's Democratic Republic",phone:"856"},{value:"LV",text:"Latvia",phone:"371"},{value:"LB",text:"Lebanon",phone:"961"},{value:"LS",text:"Lesotho",phone:"266"},{value:"LR",text:"Liberia",phone:"231"},{value:"LY",text:"Libya",phone:"218"},{value:"LI",text:"Liechtenstein",phone:"423"},{value:"LT",text:"Lithuania",phone:"370"},{value:"LU",text:"Luxembourg",phone:"352"},{value:"MO",text:"Macao",phone:"853"},{value:"MK",text:"Macedonia, the Former Yugoslav Republic of",phone:"389"},{value:"MG",text:"Madagascar",phone:"261"},{value:"MW",text:"Malawi",phone:"265"},{value:"MY",text:"Malaysia",phone:"60"},{value:"MV",text:"Maldives",phone:"960"},{value:"ML",text:"Mali",phone:"223"},{value:"MT",text:"Malta",phone:"356"},{value:"MH",text:"Marshall Islands",phone:"692"},{value:"MQ",text:"Martinique",phone:"596"},{value:"MR",text:"Mauritania",phone:"222"},{value:"MU",text:"Mauritius",phone:"230"},{value:"YT",text:"Mayotte",phone:"262"},{value:"MX",text:"Mexico",phone:"52"},{value:"FM",text:"Micronesia, Federated States of",phone:"691"},{value:"MD",text:"Moldova, Republic of",phone:"373"},{value:"MC",text:"Monaco",phone:"377"},{value:"MN",text:"Mongolia",phone:"976"},{value:"ME",text:"Montenegro",phone:"382"},{value:"MS",text:"Montserrat",phone:"1-664"},{value:"MA",text:"Morocco",phone:"212"},{value:"MZ",text:"Mozambique",phone:"258"},{value:"MM",text:"Myanmar",phone:"95"},{value:"NA",text:"Namibia",phone:"264"},{value:"NR",text:"Nauru",phone:"674"},{value:"NP",text:"Nepal",phone:"977"},{value:"NL",text:"Netherlands",phone:"31"},{value:"NC",text:"New Caledonia",phone:"687"},{value:"NZ",text:"New Zealand",phone:"64"},{value:"NI",text:"Nicaragua",phone:"505"},{value:"NE",text:"Niger",phone:"227"},{value:"NG",text:"Nigeria",phone:"234"},{value:"NU",text:"Niue",phone:"683"},{value:"NF",text:"Norfolk Island",phone:"672"},{value:"MP",text:"Northern Mariana Islands",phone:"1-670"},{value:"NO",text:"Norway",phone:"47"},{value:"OM",text:"Oman",phone:"968"},{value:"PK",text:"Pakistan",phone:"92"},{value:"PW",text:"Palau",phone:"680"},{value:"PS",text:"Palestine, State of",phone:"970"},{value:"PA",text:"Panama",phone:"507"},{value:"PG",text:"Papua New Guinea",phone:"675"},{value:"PY",text:"Paraguay",phone:"595"},{value:"PE",text:"Peru",phone:"51"},{value:"PH",text:"Philippines",phone:"63"},{value:"PN",text:"Pitcairn",phone:"870"},{value:"PL",text:"Poland",phone:"48"},{value:"PT",text:"Portugal",phone:"351"},{value:"PR",text:"Puerto Rico",phone:"1"},{value:"QA",text:"Qatar",phone:"974"},{value:"RE",text:"Reunion",phone:"262"},{value:"RO",text:"Romania",phone:"40"},{value:"RU",text:"Russian Federation",phone:"7"},{value:"RW",text:"Rwanda",phone:"250"},{value:"BL",text:"Saint Barthelemy",phone:"590"},{value:"SH",text:"Saint Helena",phone:"290"},{value:"KN",text:"Saint Kitts and Nevis",phone:"1-869"},{value:"LC",text:"Saint Lucia",phone:"1-758"},{value:"MF",text:"Saint Martin (French part)",phone:"590"},{value:"PM",text:"Saint Pierre and Miquelon",phone:"508"},{value:"VC",text:"Saint Vincent and the Grenadines",phone:"1-784"},{value:"WS",text:"Samoa",phone:"685"},{value:"SM",text:"San Marino",phone:"378"},{value:"ST",text:"Sao Tome and Principe",phone:"239"},{value:"SA",text:"Saudi Arabia",phone:"966"},{value:"SN",text:"Senegal",phone:"221"},{value:"RS",text:"Serbia",phone:"381"},{value:"SC",text:"Seychelles",phone:"248"},{value:"SL",text:"Sierra Leone",phone:"232"},{value:"SG",text:"Singapore",phone:"65"},{value:"SX",text:"Sint Maarten (Dutch part)",phone:"1-721"},{value:"SK",text:"Slovakia",phone:"421"},{value:"SI",text:"Slovenia",phone:"386"},{value:"SB",text:"Solomon Islands",phone:"677"},{value:"SO",text:"Somalia",phone:"252"},{value:"ZA",text:"South Africa",phone:"27"},{value:"GS",text:"South Georgia and the South Sandwich Islands",phone:"500"},{value:"SS",text:"South Sudan",phone:"211"},{value:"ES",text:"Spain",phone:"34"},{value:"LK",text:"Sri Lanka",phone:"94"},{value:"SD",text:"Sudan",phone:"249"},{value:"SR",text:"Suriname",phone:"597"},{value:"SJ",text:"Svalbard and Jan Mayen",phone:"47"},{value:"SZ",text:"Swaziland",phone:"268"},{value:"SE",text:"Sweden",phone:"46"},{value:"CH",text:"Switzerland",phone:"41"},{value:"SY",text:"Syrian Arab Republic",phone:"963"},{value:"TW",text:"Taiwan, Province of China",phone:"886"},{value:"TJ",text:"Tajikistan",phone:"992"},{value:"TH",text:"Thailand",phone:"66"},{value:"TL",text:"Timor-Leste",phone:"670"},{value:"TG",text:"Togo",phone:"228"},{value:"TK",text:"Tokelau",phone:"690"},{value:"TO",text:"Tonga",phone:"676"},{value:"TT",text:"Trinidad and Tobago",phone:"1-868"},{value:"TN",text:"Tunisia",phone:"216"},{value:"TR",text:"Turkey",phone:"90"},{value:"TM",text:"Turkmenistan",phone:"993"},{value:"TC",text:"Turks and Caicos Islands",phone:"1-649"},{value:"TV",text:"Tuvalu",phone:"688"},{value:"VI",text:"US Virgin Islands",phone:"1-340"},{value:"UG",text:"Uganda",phone:"256"},{value:"UA",text:"Ukraine",phone:"380"},{value:"AE",text:"United Arab Emirates",phone:"971"},{value:"GB",text:"United Kingdom",phone:"44"},{value:"TZ",text:"United Republic of Tanzania",phone:"255"},{value:"US",text:"United States",phone:"1"},{value:"UY",text:"Uruguay",phone:"598"},{value:"UZ",text:"Uzbekistan",phone:"998"},{value:"VU",text:"Vanuatu",phone:"678"},{value:"VE",text:"Venezuela",phone:"58"},{value:"VN",text:"Vietnam",phone:"84"},{value:"WF",text:"Wallis and Futuna",phone:"681"},{value:"EH",text:"Western Sahara",phone:"212"},{value:"YE",text:"Yemen",phone:"967"},{value:"ZM",text:"Zambia",phone:"260"},{value:"ZW",text:"Zimbabwe",phone:"263"}],WF=[{control:Do,query:e=>"input"===e.control,matchCount:1},{control:({...e})=>{const{id:t,control:r,onChangeValue:o,objectPathId:i}=e,{value:a="","custom-attributes":s,error:l,...c}=r,{options:u}=s,d=l?"error":"",p=u.map((e=>({label:e.text||e.value,value:e.value}))),h=p.find((e=>e.value===a))||{label:a,value:a},f="number"===c.type||"date"===c.type,m=i||t,g=s?.defaultValue,{textColor:b,setHasEdited:y}=an({onChangeValue:o,query:g,objectPathId:m,value:a}),v=e=>{const t=e.target;"number"===t.type&&t.blur()};return n().createElement(JO,{className:`${xk["form-control"]}`,freeSolo:!0,id:t,value:h,inputValue:a,options:p,readOnly:s?.readOnly,size:"small",onInputChange:(e,t)=>(e=>{y(!0),o({value:e})})(t),getOptionLabel:e=>e.value||"",renderOption:(e,t)=>n().createElement(Fb,{component:"li",...e},t.label),renderInput:e=>n().createElement(Ok,{...e,className:xk[d],variant:"outlined",...Hr()(c,["displayName","control","error","defaultValue"]),...Hr()(s,["defaultValue"]),inputProps:{...e.inputProps},onWheel:v,sx:{"& input":{color:b,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0}},"& .MuiAutocomplete-endAdornment":{right:f?"35px !important":"9px"}}})})},query:e=>"input"===e.control&&!!e?.["custom-attributes"]?.options,matchCount:2},{control:({onChangeValue:e,...t})=>{const{control:o,id:i,objectPathId:a}=t,{value:s="","custom-attributes":l,error:c}=o,u=a||i,d=c?"error":"",p=l?.defaultValue,{textColor:h,setHasEdited:f}=an({onChangeValue:e,query:p,objectPathId:u,value:s}),m=l?.genAiPrompts,{toggleRerendered:g}=(0,r.useContext)(O.L8),b=o.type,y=l?.editor,v=l?.subType,w=l?.readOnly;(0,r.useEffect)((()=>{const t=(0,BF.K)(s,v,y,"initial");e({value:t||""})}),[g]);const A=(()=>{switch(y){case"richtext":return IF;case"markdown":return RF;default:return"html"===b?Tz:"json"===b?$z:VC}})();return n().createElement("div",{className:`${cC.textarea} textarea-control`,"data-testid":`textarea-${u}`},n().createElement("div",{className:cC.textareaWithBorder},n().createElement(YC,{aiActions:m,inputControl:n().createElement(A,{control:o,errorClass:d,textColor:h,setHasEdited:f,value:s,onChangeValue:e,onChange:e,id:u,readOnly:w}),AiResponseControl:A,onAcceptAiResponse:e,objectPathId:u})))},query:e=>"textarea"===e.control,matchCount:1},{control:Fk,query:e=>"select"===e.control&&!e.multiple,matchCount:2},{control:({onChangeValue:e,controlProps:t,id:o,control:i})=>{const[a,s]=(0,r.useState)([]),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(""),{options:p,error:h,"custom-attributes":f}=i,m=h?"error":"";(0,r.useEffect)((()=>{const t=p.map((e=>({label:e.text,value:e.value}))),r=p.filter((e=>e.selected)).map((e=>({label:e.text,value:e.value})));s(t),g(r);const n=(e=>e.map((e=>e.selected?e.value:null)).filter((e=>!!e)))(p);e({value:n})}),[]);const g=t=>{(t=>{const{optionValues:r,updatedOptions:n}=((e,t)=>{if(!e||!t)return{optionValues:[],updatedOptions:[]};const r=e.map((e=>({...e,selected:t.some((t=>t.value===e.value))}))),n=r.filter((e=>e.selected)).map((e=>e.value));return{optionValues:1===n?.length?n[0]:n,updatedOptions:r}})(p,t);e({options:n,value:r},((e,t)=>Array.isArray(t)?t:void 0))})(t),c(t)};return n().createElement(JO,{multiple:!0,className:tC["multi-select-container"],id:o,readOnly:f?.readOnly,"data-testid":"multiselect__container",size:"small",sx:t?.selectProps?.sx,value:l,onChange:(e,t)=>g(t),isOptionEqualToValue:(e,t)=>e.value===t.value,inputValue:u,onInputChange:(e,t)=>d(t),options:a,getOptionLabel:e=>e.label,ListboxProps:{sx:{"& .MuiAutocomplete-option":{minHeight:"40px"}}},renderInput:e=>n().createElement(Ok,{...e,className:tC[m],variant:"outlined",sx:{"& .MuiInputBase-root":{minHeight:"40px","& .MuiChip-root":{maxWidth:"calc(100% - 50px)"}},...t?.selectProps?.textField?.sx}})})},query:e=>"select"===e.control&&e.multiple,matchCount:2},{control:({onChangeValue:e,...t})=>{const{control:o,id:i,objectPathId:a}=t,{selected:s=!1}=o,l=o.value||"on",c=a||i;(0,r.useEffect)((()=>{e({value:o.selected?l:""})}),[]);const u=Object.assign(Hr()(t,["objectPathId","checked","control","displayName","error"]),{name:c,value:l,type:o.control,role:o.control});return n().createElement(Vr,{className:`${Jr["form-control"]} ${rn["checkbox-container"]}`,id:c,color:"default",checked:s,readOnly:o["custom-attributes"]?.readOnly,onClick:()=>{e({selected:!o.selected,value:o.selected?"":l})},inputProps:u,sx:{marginLeft:"-11px",color:"rgba(0,0,0,0.54)","&:checked":{color:"rgba(0,0,0,0.54)"}}})},query:e=>"checkbox"===e.control,matchCount:1},{control:({onChangeValue:e,controlProps:t,...o})=>{const{control:i,id:a,objectPathId:s,...l}=o,{value:c="","custom-attributes":u,error:d,...p}=i,h=d?"error":"",[f,m]=(0,r.useState)(!1),g=s||a,b=()=>m((e=>!e));return n().createElement("div",{className:aC["password-container"]},n().createElement("input",{role:"textbox",className:`${Jr["form-control"]} ${aC["password-input"]} ${aC[h]}`,id:g,"data-testid":"password-input__input",name:g,value:c,onChange:t=>{e({value:t.target.value})},...u,...Hr()(p,["displayName","control","error"]),...Hr()(l),type:f?"text":"password",style:t?.inputProps?.style}),n().createElement("button",{className:aC["toggle-icon"],type:"button"},f?n().createElement(nC.Z,{"data-testid":"password-input__visibility-off-icon",onClick:b}):n().createElement(rC.Z,{"data-testid":"password-input__visibility-icon",onClick:b})))},query:e=>"input"===e.control&&"password"===e.type,matchCount:2},{control:Kk,query:e=>"input"===e.control&&!!e?.["custom-attributes"]?.["mrn-ref"]&&!e?.["custom-attributes"]?.mrnPreview,matchCount:3},{control:Kk,query:e=>"input"===e.control&&!!e?.["custom-attributes"]?.mrnSources&&!e?.["custom-attributes"]?.mrnPreview,matchCount:3},{control:({...e})=>{const{control:t,onChangeValue:o}=e,{"custom-attributes":i,error:a,value:s}=t,{fileUploaderConfig:l}=(0,r.useContext)(O.L8);if(!l)throw new Error("fileUploaderConfig Prop is not defined");const{info:c,endpoints:u,language:d,previewUrl:p,authorizationHeader:h}=l,f={value:s,info:c,error:a?.message,tags:i?.tags,type:i?.media,readOnly:i?.readonly,mode:"stateful",endpoints:u,language:d,onUploadSuccess:e=>o({value:e,error:""}),previewUrl:p,authorizationHeader:h};return n().createElement("div",{"data-testid":"fileuploader__widget"},n().createElement(Mb,{...f}))},query:e=>"input"===e.control&&"url"===e.type&&!!e?.["custom-attributes"]?.media,matchCount:3},{control:({...e})=>{const{id:t,control:o,objectPathId:i,groupIsRequired:a,isInGroup:s,controlProps:l}=e,{"custom-attributes":c,displayName:u,controls:d,required:p}=o,h=Object.entries(d)?.length??0,f=Number(c?.defaultCollapseThreshold),m=0===h||f<=h,[g,b]=(0,r.useState)(!m),y=i||t,v=s?p||a:p||ey({controls:d}),O=l?.groupProps?.style??{},w=l?.groupProps?.label?.style??{},A=g?{}:{display:"none",visibility:"hidden"};return n().createElement("div",{className:ny["form-group-container"],id:t,"data-testid":t,style:O},n().createElement("div",{className:ny["group-header"]},n().createElement("h3",{className:`${ny["control-label-group"]} ${_r["control-label-group"]}`,style:w},u),n().createElement(Hb,{isOpen:g,onClick:()=>b((e=>!e))})),n().createElement("div",{role:"group",style:A},d&&Object.entries(d).map((([e,r])=>{const o=`${y}.controls.${e}`;return n().createElement(n().Fragment,{key:o},n().createElement(KF,{key:t,formControl:r,id:t,objectPathId:o,groupIsRequired:v,isInGroup:!0,controlProps:l}))}))))},query:e=>"group"===e.control,matchCount:1},{control:({...e})=>{const{id:t,control:o,objectPathId:i}=e,{displayName:a,controls:s}=o,[l,c]=(0,r.useState)(!0),u=(0,r.useRef)(null),d=i||t,{from:p,to:h}=s,{updateControl:f}=(0,r.useContext)(O.L8),m=e=>e.toLocaleString("default",{year:"numeric"})+"-"+e.toLocaleString("default",{month:"2-digit"})+"-"+e.toLocaleString("default",{day:"2-digit"}),g={id:t,objectPathId:`${d}.controls.from`,control:p,hasClearButton:!0},b=(e,r)=>{f(g.objectPathId||t,kr()({},g.control,e,r))},y={id:t,objectPathId:`${d}.controls.to`,control:h,hasClearButton:!0},v=g.control?.required||y.control?.required,w=(e,r)=>{f(y.objectPathId||t,kr()({},y.control,e,r))},A=e=>{e.preventDefault(),c(!1),u.current.scrollIntoView({behavior:"smooth"})};D(u,(()=>{c(!0)}));const x={handleDateChange:(e,t)=>{b({value:m(e.startDate)}),w({value:m(e.endDate)}),!t&&c(!0)},setHidden:c,hidden:l,from:g.control.value,to:y.control.value};return n().createElement(Lo,{ref:u,"data-testid":"dateRangeGroup__Container"},n().createElement(Io,{"data-testid":"dateRangeGroup__displayName"},a,v&&" *"),n().createElement(Bo,{hidden:l},n().createElement(Do,{"data-testid":"dateRangeGroup__inputFrom",onClearCallback:()=>{b({value:""})},onClick:e=>A(e),onChangeValue:b,...g}),n().createElement(Do,{"data-testid":"dateRangeGroup__inputTo",onClearCallback:()=>{w({value:""})},onClick:e=>A(e),onChangeValue:w,...y}),n().createElement(Xo,{...x})))},query:e=>"group"===e.control&&"dateRange"===e?.["custom-attributes"]?.type,matchCount:2},{control:({...e})=>{const{id:t,control:r,objectPathId:o,groupIsRequired:i,isInGroup:a,controlProps:s}=e,{displayName:l,controls:c,required:u}=r,d="string"==typeof c.country?.value&&c.country?.value.toLowerCase(),p=`${ny["form-group-container"]} ${UF["address-group-container"]}`;let h=`${UF.address} ${_r.address}`;h=d&&UF[d]?`${h} ${UF[d]}`:`${h} ${UF["address-default"]}`;const f=o||t,m=a?u||i:u||ey({controls:c}),g=(e,r)=>{const o=`${f}.controls.${e}`;return r.placeholder=r.placeholder||r.displayName,"country"===e&&r&&(r.control="select",r.options=FF),n().createElement(n().Fragment,{key:o},n().createElement(KF,{key:t,formControl:r,hideLabel:!0,id:t,objectPathId:o,groupIsRequired:m,isInGroup:!0,controlProps:s}))},b=s?.addressProps?.style??{},y=s?.addressProps?.label?.style??{},v=s?.addressProps?.container?.style??{};return n().createElement("div",{className:p,id:t,"data-testid":t,style:b},n().createElement("h3",{className:`${UF["control-label-group"]} ${_r["control-label-group"]}`,style:y},l),n().createElement("div",{className:h,style:v},g("streetName",c.streetName),g("houseNumber",c.houseNumber),g("postalCode",c.postalCode),g("locality",c.locality),g("country",c.country)))},query:e=>"group"===e.control&&"address"===e?.["custom-attributes"]?.type,matchCount:2},{control:({...e})=>{const{id:t,control:o,objectPathId:i,groupIsRequired:a,controlProps:s}=e,{addListItem:l,removeListItem:c,moveListItemUp:u,moveListItemDown:d}=(0,r.useContext)(O.L8),{"custom-attributes":p,displayName:h,items:f,template:m,required:g}=o,b=f?.length??0,y=Number(p?.defaultCollapseThreshold),w=0===b||y<=b,[A,x]=(0,r.useState)(!w),k=i||t,C=m&&Object.entries(m).length>1,S=g?h+" *":h,_=C?"form-list-multiple-items":"form-list-single-item",E=!C&&m&&Object.values(m)?.[0]?.displayName||S||"",P=s?.listProps?.style??{},q=s?.listProps?.label?.style??{},T=s?.listProps?.container?.style??{},j=s?.listProps?.addButton?.sx??{},R=A?{}:{display:"none",visibility:"hidden"};return n().createElement("div",{className:_r["list-container"],"data-testid":"form-list",key:t,style:P},n().createElement("div",{className:_r["list-header"]},n().createElement("div",{className:_r["list-header-label-button"]},n().createElement("label",{"data-testid":"list-control-label",className:_r["list-label"],style:q},S),n().createElement(Fb,{"data-testid":E,className:v()("formbuilder_add-button",Jb["xhtml-form-button"]),role:"alert",onClick:()=>{l(k),x(!0)},sx:j},n().createElement(te.Z,{sx:{fontSize:20},"data-testid":"form-list__add-icon"})," ",E)),n().createElement(Hb,{itemsCount:b,isOpen:A,onClick:()=>x((e=>!e))})),n().createElement("div",{id:_,"data-testid":"form-list-children",role:"list",className:v()(_r[_],_r["list-children-container"]),"data-title":E,style:{...R,...T}},f?.map(((e,t)=>{if(!e)return null;const r=t===f.length-1,o=0===t,l=f.length>1;return n().createElement("div",{className:_r["form-list"],"data-testid":"form-list-child-element",role:"listitem","data-is-filled":!0,key:`${i}-${t}`},e&&Object.entries(e)?.map((([e,r])=>((e,t,r)=>{const o=`${k}.items.[${r||0}].${e}`;return n().createElement(KF,{key:o,formControl:t,id:e,objectPathId:o,hideLabel:!C,groupIsRequired:a,controlProps:s})})(e,r,t))),n().createElement("button",{type:"button",className:v()(Jb["xhtml-form-button"],Jb["remove-item"],_r["remove-item"]),"data-testid":"form-list__remove-list-item-button",onClick:()=>c(k,t)},n().createElement(Wb.A,null)),n().createElement("div",{className:_r["sort-buttons"]},n().createElement("button",{type:"button",className:v()([_r.sortBtn,_r.sortUp]),onClick:()=>u(k,t),disabled:o||!l},n().createElement(Yt.s,{"data-testid":"form-list__sort-up-button"})),n().createElement("button",{type:"button",className:v()([_r.sortBtn,_r.sortDown]),onClick:()=>d(k,t),disabled:r||!l},n().createElement(Wt.R,{"data-testid":"form-list__sort-down-button"}))))}))))},query:e=>"list"===e.control,matchCount:1}],YF=WF,VF=Ro.div`
|
678
|
+
`,QC=({onBack:e,onRetry:t})=>n().createElement(ZC,null,n().createElement($C,null,n().createElement(MC,null,n().createElement(RC,null)),n().createElement(NC,null,n().createElement("p",null,"Sorry, but the request has encountered",n().createElement("br",null)," an issue. We're working on fixing it.",n().createElement("br",null)," Please try again later."),n().createElement(DC,null,n().createElement(IC,{onClick:e},n().createElement("p",null,"Back"),n().createElement(TC.W,{size:16,style:{transform:"scaleX(-1)"}})),n().createElement(BC,{onClick:t},n().createElement("p",null,"Retry"),n().createElement(TC.W,{size:16}))))),n().createElement(LC,null,n().createElement(jC,null))),zC=()=>n().createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n().createElement("g",{id:"Vector"},n().createElement("path",{d:"M2.00001 1.38288L4.00438 0.223145V2.53387L2.00001 3.68923V1.38288Z",fill:"white"}),n().createElement("path",{d:"M4.00438 2.53387V0.223145L6.00437 1.38288V3.68923L4.00438 2.53387Z",fill:"white"}),n().createElement("path",{d:"M4.00438 9.47487V7.15977L2.00001 8.31513V10.6259L4.00438 9.47487Z",fill:"white"}),n().createElement("path",{d:"M6.00438 10.6258L4.00438 9.47487L2.00001 10.6259L4.00438 11.7768L6.00438 10.6258Z",fill:"white"}),n().createElement("path",{d:"M5.99563 10.6257L7.99563 11.7767V9.47468L5.99563 8.31495V10.6257Z",fill:"white"}),n().createElement("path",{d:"M7.99563 9.47468V11.7767L10 10.6257V8.31495L7.99563 9.47468Z",fill:"white"}),n().createElement("path",{d:"M2 6.00857L2.00001 8.31513L0 7.15955V4.84883L2 6.00857Z",fill:"white"}),n().createElement("path",{d:"M4.00438 4.84903L2 6.00857L0 4.84883L2 3.69805L4.00438 4.84903Z",fill:"white"}),n().createElement("path",{d:"M10 3.68932L7.99563 4.84906V2.53396L10 1.37422V3.68932Z",fill:"white"}),n().createElement("path",{d:"M10 1.37422L7.99563 2.53396L5.99563 1.37413L7.99563 0.223145L10 1.37422Z",fill:"white"}),n().createElement("path",{d:"M12 4.849L10 3.68932L10 5.99998L12 7.15534V4.849Z",fill:"white"}),n().createElement("path",{d:"M12 7.15534L10 5.99998L7.99563 7.15527L10 8.31495L12 7.15534Z",fill:"white"}))),UC=({action:e,objectPathId:t,isLoading:r,isDisabled:o,index:i,onClick:a})=>{const{resolvedQuery:s}=(0,nn.Z)({query:e.promptTemplate,objectPathId:t});return n().createElement("button",{onClick:()=>{r||a(s,e.profile,i)},className:`${mC.actionButton} ${r?mC.actionButtonLoading:""}`,disabled:o,"data-testid":"textarea-ai-wrapper-action-button",type:"button"},n().createElement("p",null,e.displayValue),r&&n().createElement(zC,null))},FC=({AiResponseControl:e,aiActions:t,inputControl:r,objectPathId:o,aiResponse:i,isError:a,isLoading:s,loadingActionIndex:l,modalOpen:c,onModalToggle:u,handleAccept:d,handleAiActionClick:p,handleDiscard:h,handleBack:f,handleRetry:m})=>n().createElement("div",{className:v()(mC.aiWrapperContainer,{[mC.expanded]:c}),"data-testid":"textarea-ai-wrapper"},n().createElement("div",{className:mC.aiWrapperContentContainer},n().createElement("div",{className:`${mC.aiWrapperContentWrapper} aiWrapperContentWrapper`},a.state?n().createElement(QC,{onBack:f,onRetry:m}):n().createElement(n().Fragment,null,r,i&&n().createElement("div",{className:mC.aiResponseInputControlContainer,"data-testid":"textarea-ai-response-container"},n().createElement(e,{value:i.message,readonly:!0})))),i&&n().createElement("div",{className:mC.aiWrapperActionsContainer,"data-testid":"textarea-ai-wrapper-response-actions"},n().createElement("button",{onClick:h,className:mC.discardButton,"data-testid":"textarea-ai-wrapper-discard-button",type:"button"},n().createElement("p",null,"Discard Changes"),n().createElement("i",{className:"fas fa-times"})),n().createElement("button",{onClick:d,className:mC.acceptButton,"data-testid":"textarea-ai-wrapper-accept-button",type:"button"},n().createElement("p",null,"Accept Changes"),n().createElement("i",{className:"fas fa-check"})))),n().createElement("div",{className:mC.aiWrapperFooterContainer,"data-testid":"textarea-ai-wrapper-footer"},n().createElement("div",{className:mC.footerAiIcon},t?.length>0&&n().createElement(EC,{title:"Powered by Artificial Intelligence",arrow:!0,componentsProps:{arrow:{sx:{color:"#333"}},tooltip:{sx:{backgroundColor:"#333",color:"white"}}}},n().createElement("i",{className:"fas fa-sparkles fa-lg"}))),n().createElement("div",{className:mC.aiActionsContainer,"data-testid":"textarea-ai-wrapper-actions"},t?.map(((e,t)=>n().createElement(UC,{key:t,onClick:p,action:e,objectPathId:o,isLoading:s&&l===t,isDisabled:s&&l!==t,index:t}))),!c&&n().createElement(qC.U,{size:18,className:mC.expandButton,"data-testid":"textarea-ai-wrapper-expand-button",onClick:u}),c&&n().createElement(PC.o,{size:18,className:mC.expandButton,"data-testid":"textarea-ai-wrapper-close-button",onClick:u})))),WC={position:"fixed",display:"flex",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 32px)",height:"calc(100% - 32px)",bgcolor:"background.paper",borderRadius:"4px"},YC=({...e})=>{const{onAcceptAiResponse:t}=e,o={...uC({onAcceptAiResponse:t}),...e},[i,a]=(0,r.useState)(!1),s=()=>a((e=>!e));return n().createElement(n().Fragment,null,!i&&n().createElement(FC,{...o,modalOpen:i,onModalToggle:s}),n().createElement(bx,{open:i},n().createElement(Fb,{sx:WC},n().createElement(FC,{...o,modalOpen:i,onModalToggle:s}))))},VC=({value:e,onChange:t,id:r,readOnly:o,control:i,errorClass:a,textColor:s})=>{const{"custom-attributes":l,error:c,...u}=i??{};return n().createElement(sw,{role:"textbox","data-testid":`textarea-control-${r}`,className:`${Jr["form-control"]} ${cC[a]}`,id:r,name:r,style:{flex:"1",maxHeight:400,resize:"vertical",overflow:"auto",color:s,width:"100%"},value:e,readOnly:o,onChange:e=>{t?.({value:e.target.value,hasEdited:"edited"})},...Hr()(l,["defaultValue"]),...Hr()(u,["displayName","control","error","defaultValue"])})},XC=1024;let HC=0;class GC{constructor(e,t){this.from=e,this.to=t}}class KC{constructor(e={}){this.id=HC++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=tS.match(e)),t=>{let r=e(t);return void 0===r?null:[this,r]}}}KC.closedBy=new KC({deserialize:e=>e.split(" ")}),KC.openedBy=new KC({deserialize:e=>e.split(" ")}),KC.group=new KC({deserialize:e=>e.split(" ")}),KC.contextHash=new KC({perNode:!0}),KC.lookAhead=new KC({perNode:!0}),KC.mounted=new KC({perNode:!0});class JC{constructor(e,t,r){this.tree=e,this.overlay=t,this.parser=r}static get(e){return e&&e.props&&e.props[KC.mounted.id]}}const eS=Object.create(null);class tS{constructor(e,t,r,n=0){this.name=e,this.props=t,this.id=r,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):eS,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new tS(e.name||"",t,e.id,r);if(e.props)for(let r of e.props)if(Array.isArray(r)||(r=r(n)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(KC.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let n of r.split(" "))t[n]=e[r];return e=>{for(let r=e.prop(KC.group),n=-1;n<(r?r.length:0);n++){let o=t[n<0?e.name:r[n]];if(o)return o}}}}tS.none=new tS("",Object.create(null),0,8);class rS{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let n=null;for(let t of e){let e=t(r);e&&(n||(n=Object.assign({},r.props)),n[e[0].id]=e[1])}t.push(n?new tS(r.name,n,r.id,r.flags):r)}return new rS(t)}}const nS=new WeakMap,oS=new WeakMap;var iS;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(iS||(iS={}));class aS{constructor(e,t,r,n,o){if(this.type=e,this.children=t,this.positions=r,this.length=n,this.props=null,o&&o.length){this.props=Object.create(null);for(let[e,t]of o)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=JC.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let r=e.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new vS(this.topNode,e)}cursorAt(e,t=0,r=0){let n=nS.get(this)||this.topNode,o=new vS(n);return o.moveTo(e,t),nS.set(this,o._tree),o}get topNode(){return new pS(this,0,0,null)}resolve(e,t=0){let r=uS(nS.get(this)||this.topNode,e,t,!1);return nS.set(this,r),r}resolveInner(e,t=0){let r=uS(oS.get(this)||this.topNode,e,t,!0);return oS.set(this,r),r}resolveStack(e,t=0){return function(e,t,r){let n=e.resolveInner(t,r),o=null;for(let e=n instanceof pS?n:n.context.parent;e;e=e.parent)if(e.index<0){let i=e.parent;(o||(o=[n])).push(i.resolve(t,r)),e=i}else{let i=JC.get(e.tree);if(i&&i.overlay&&i.overlay[0].from<=t&&i.overlay[i.overlay.length-1].to>=t){let a=new pS(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[n])).push(uS(a,t,r,!1))}}return o?bS(o):n}(this,e,t)}iterate(e){let{enter:t,leave:r,from:n=0,to:o=this.length}=e,i=e.mode||0,a=(i&iS.IncludeAnonymous)>0;for(let e=this.cursor(i|iS.IncludeAnonymous);;){let i=!1;if(e.from<=o&&e.to>=n&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&r&&(a||!e.type.isAnonymous)&&r(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:xS(tS.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,r)=>new aS(this.type,e,t,r,this.propValues)),e.makeTree||((e,t,r)=>new aS(tS.none,e,t,r)))}static build(e){return function(e){var t;let{buffer:r,nodeSet:n,maxBufferLength:o=XC,reused:i=[],minRepeatType:a=n.types.length}=e,s=Array.isArray(r)?new sS(r,r.length):r,l=n.types,c=0,u=0;function d(e,t,r,g,b,y){let{id:v,start:O,end:w,size:A}=s,x=u;for(;A<0;){if(s.next(),-1==A){let t=i[v];return r.push(t),void g.push(O-e)}if(-3==A)return void(c=v);if(-4==A)return void(u=v);throw new RangeError(`Unrecognized record size: ${A}`)}let k,C,S=l[v],_=O-e;if(w-O<=o&&(C=function(e,t){let r=s.fork(),n=0,i=0,l=0,c=r.end-o,u={size:0,start:0,skip:0};e:for(let o=r.pos-e;r.pos>o;){let e=r.size;if(r.id==t&&e>=0){u.size=n,u.start=i,u.skip=l,l+=4,n+=4,r.next();continue}let s=r.pos-e;if(e<0||s<o||r.start<c)break;let d=r.id>=a?4:0,p=r.start;for(r.next();r.pos>s;){if(r.size<0){if(-3!=r.size)break e;d+=4}else r.id>=a&&(d+=4);r.next()}i=p,n+=e,l+=d}return(t<0||n==e)&&(u.size=n,u.start=i,u.skip=l),u.size>4?u:void 0}(s.pos-t,b))){let t=new Uint16Array(C.size-C.skip),r=s.pos-C.size,o=t.length;for(;s.pos>r;)o=m(C.start,t,o);k=new lS(t,w-C.start,n),_=C.start-e}else{let e=s.pos-A;s.next();let t=[],r=[],n=v>=a?v:-1,i=0,l=w;for(;s.pos>e;)n>=0&&s.id==n&&s.size>=0?(s.end<=l-o&&(h(t,r,O,i,s.end,l,n,x),i=t.length,l=s.end),s.next()):y>2500?p(O,e,t,r):d(O,e,t,r,n,y+1);if(n>=0&&i>0&&i<t.length&&h(t,r,O,i,O,l,n,x),t.reverse(),r.reverse(),n>-1&&i>0){let e=function(e){return(t,r,n)=>{let o,i,a=0,s=t.length-1;if(s>=0&&(o=t[s])instanceof aS){if(!s&&o.type==e&&o.length==n)return o;(i=o.prop(KC.lookAhead))&&(a=r[s]+o.length+i)}return f(e,t,r,n,a)}}(S);k=xS(S,t,r,0,t.length,0,w-O,e,e)}else k=f(S,t,r,w-O,x-w)}r.push(k),g.push(_)}function p(e,t,r,i){let a=[],l=0,c=-1;for(;s.pos>t;){let{id:e,start:t,end:r,size:n}=s;if(n>4)s.next();else{if(c>-1&&t<c)break;c<0&&(c=r-o),a.push(e,t,r),l++,s.next()}}if(l){let t=new Uint16Array(4*l),o=a[a.length-2];for(let e=a.length-3,r=0;e>=0;e-=3)t[r++]=a[e],t[r++]=a[e+1]-o,t[r++]=a[e+2]-o,t[r++]=r;r.push(new lS(t,a[2]-o,n)),i.push(o-e)}}function h(e,t,r,o,i,a,s,l){let c=[],u=[];for(;e.length>o;)c.push(e.pop()),u.push(t.pop()+r-i);e.push(f(n.types[s],c,u,a-i,l-a)),t.push(i-r)}function f(e,t,r,n,o=0,i){if(c){let e=[KC.contextHash,c];i=i?[e].concat(i):[e]}if(o>25){let e=[KC.lookAhead,o];i=i?[e].concat(i):[e]}return new aS(e,t,r,n,i)}function m(e,t,r){let{id:n,start:o,end:i,size:l}=s;if(s.next(),l>=0&&n<a){let a=r;if(l>4){let n=s.pos-(l-4);for(;s.pos>n;)r=m(e,t,r)}t[--r]=a,t[--r]=i-e,t[--r]=o-e,t[--r]=n}else-3==l?c=n:-4==l&&(u=n);return r}let g=[],b=[];for(;s.pos>0;)d(e.start||0,e.bufferStart||0,g,b,-1,0);let y=null!==(t=e.length)&&void 0!==t?t:g.length?b[0]+g[0].length:0;return new aS(l[e.topID],g.reverse(),b.reverse(),y)}(e)}}aS.empty=new aS(tS.none,[],[],0);class sS{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new sS(this.buffer,this.index)}}class lS{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return tS.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],n=this.set.types[t],o=n.name;if(/\W/.test(o)&&!n.isError&&(o=JSON.stringify(o)),r==(e+=4))return o;let i=[];for(;e<r;)i.push(this.childString(e)),e=this.buffer[e+3];return o+"("+i.join(",")+")"}findChild(e,t,r,n,o){let{buffer:i}=this,a=-1;for(let s=e;s!=t&&!(cS(o,n,i[s+1],i[s+2])&&(a=s,r>0));s=i[s+3]);return a}slice(e,t,r){let n=this.buffer,o=new Uint16Array(t-e),i=0;for(let a=e,s=0;a<t;){o[s++]=n[a++],o[s++]=n[a++]-r;let t=o[s++]=n[a++]-r;o[s++]=n[a++]-e,i=Math.max(i,t)}return new lS(o,i,this.set)}}function cS(e,t,r,n){switch(e){case-2:return r<t;case-1:return n>=t&&r<t;case 0:return r<t&&n>t;case 1:return r<=t&&n>t;case 2:return n>t;case 4:return!0}}function uS(e,t,r,n){for(var o;e.from==e.to||(r<1?e.from>=t:e.from>t)||(r>-1?e.to<=t:e.to<t);){let t=!n&&e instanceof pS&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=n?0:iS.IgnoreOverlays;if(n)for(let n=e,a=n.parent;a;n=a,a=n.parent)n instanceof pS&&n.index<0&&(null===(o=a.enter(t,r,i))||void 0===o?void 0:o.from)!=n.from&&(e=a);for(;;){let n=e.enter(t,r,i);if(!n)return e;e=n}}class dS{cursor(e=0){return new vS(this,e)}getChild(e,t=null,r=null){let n=hS(this,e,t,r);return n.length?n[0]:null}getChildren(e,t=null,r=null){return hS(this,e,t,r)}resolve(e,t=0){return uS(this,e,t,!1)}resolveInner(e,t=0){return uS(this,e,t,!0)}matchContext(e){return fS(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(r=t,t=e.prevSibling):t=e}return r}get node(){return this}get next(){return this.parent}}class pS extends dS{constructor(e,t,r,n){super(),this._tree=e,this.from=t,this.index=r,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,n,o=0){for(let i=this;;){for(let{children:a,positions:s}=i._tree,l=t>0?a.length:-1;e!=l;e+=t){let l=a[e],c=s[e]+i.from;if(cS(n,r,c,c+l.length))if(l instanceof lS){if(o&iS.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,r-c,n);if(a>-1)return new gS(new mS(i,l,e,c),null,a)}else if(o&iS.IncludeAnonymous||!l.type.isAnonymous||OS(l)){let a;if(!(o&iS.IgnoreMounts)&&(a=JC.get(l))&&!a.overlay)return new pS(a.tree,c,e,i);let s=new pS(l,c,e,i);return o&iS.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,r,n)}}if(o&iS.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,r=0){let n;if(!(r&iS.IgnoreOverlays)&&(n=JC.get(this._tree))&&n.overlay){let r=e-this.from;for(let{from:e,to:o}of n.overlay)if((t>0?e<=r:e<r)&&(t<0?o>=r:o>r))return new pS(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function hS(e,t,r,n){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=r)for(;!o.type.is(r);)if(!o.nextSibling())return i;for(;;){if(null!=n&&o.type.is(n))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==n?i:[]}}function fS(e,t,r=t.length-1){for(let n=e.parent;r>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}class mS{constructor(e,t,r,n){this.parent=e,this.buffer=t,this.index=r,this.start=n}}class gS extends dS{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:n}=this.context,o=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,r);return o<0?null:new gS(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,r=0){if(r&iS.ExcludeBuffers)return null;let{buffer:n}=this.context,o=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new gS(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new gS(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new gS(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,n=this.index+4,o=r.buffer[this.index+3];if(o>n){let i=r.buffer[this.index+1];e.push(r.slice(n,o,i)),t.push(0)}return new aS(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function bS(e){if(!e.length)return null;let t=0,r=e[0];for(let n=1;n<e.length;n++){let o=e[n];(o.from>r.from||o.to<r.to)&&(r=o,t=n)}let n=r instanceof pS&&r.index<0?null:r.parent,o=e.slice();return n?o[t]=n:o.splice(t,1),new yS(o,r)}class yS{constructor(e,t){this.heads=e,this.node=t}get next(){return bS(this.heads)}}class vS{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof pS)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:r,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=r+n.buffer[e+1],this.to=r+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof pS?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:n}=this.buffer,o=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,r);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?!(r&iS.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&iS.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&iS.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let e=r<0?0:this.stack[r]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(e)}return r<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(n.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:r}=n)}else({index:t,_parent:r}=this._tree);for(;r;({index:t,_parent:r}=r))if(t>-1)for(let n=t+e,o=e<0?-1:r._tree.children.length;n!=o;n+=e){let e=r._tree.children[n];if(this.mode&iS.IncludeAnonymous||e instanceof lS||!e.type.isAnonymous||OS(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let n=this.index,o=this.stack.length;o>=0;){for(let i=e;i;i=i._parent)if(i.index==n){if(n==this.index)return i;t=i,r=o+1;break e}n=this.stack[--o]}for(let e=r;e<this.stack.length;e++)t=new gS(this.buffer,t,this.stack[e]);return this.bufferNode=new gS(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let n=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){r++;continue}this.type.isAnonymous||(n=!0)}for(;n&&t&&t(this),n=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,n=!0}}}matchContext(e){if(!this.buffer)return fS(this.node,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let n=e.length-1,o=this.stack.length-1;n>=0;o--){if(o<0)return fS(this.node,e,n);let i=r[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}}function OS(e){return e.children.some((e=>e instanceof lS||!e.type.isAnonymous||OS(e)))}const wS=new WeakMap;function AS(e,t){if(!e.isAnonymous||t instanceof lS||t.type!=e)return 1;let r=wS.get(t);if(null==r){r=1;for(let n of t.children){if(n.type!=e||!(n instanceof aS)){r=1;break}r+=AS(e,n)}wS.set(t,r)}return r}function xS(e,t,r,n,o,i,a,s,l){let c=0;for(let r=n;r<o;r++)c+=AS(e,t[r]);let u=Math.ceil(1.5*c/8),d=[],p=[];return function t(r,n,o,a,s){for(let c=o;c<a;){let o=c,h=n[c],f=AS(e,r[c]);for(c++;c<a;c++){let t=AS(e,r[c]);if(f+t>=u)break;f+=t}if(c==o+1){if(f>u){let e=r[o];t(e.children,e.positions,0,e.children.length,n[o]+s);continue}d.push(r[o])}else{let t=n[c-1]+r[c-1].length-h;d.push(xS(e,r,n,o,c,h,t,null,l))}p.push(h+s-i)}}(t,r,n,o,0),(s||l)(d,p,a)}class kS{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof gS?this.setBuffer(e.context.buffer,e.index,t):e instanceof pS&&this.map.set(e.tree,t)}get(e){return e instanceof gS?this.getBuffer(e.context.buffer,e.index):e instanceof pS?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class CS{constructor(e,t,r,n,o=!1,i=!1){this.from=e,this.to=t,this.tree=r,this.offset=n,this.open=(o?1:0)|(i?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],r=!1){let n=[new CS(0,e.length,e,0,!1,r)];for(let r of t)r.to>e.length&&n.push(r);return n}static applyChanges(e,t,r=128){if(!t.length)return e;let n=[],o=1,i=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let c=a<t.length?t[a]:null,u=c?c.fromA:1e9;if(u-s>=r)for(;i&&i.from<u;){let t=i;if(s>=t.from||u<=t.to||l){let e=Math.max(t.from,s)-l,r=Math.min(t.to,u)-l;t=e>=r?null:new CS(e,r,t.tree,t.offset+l,a>0,!!c)}if(t&&n.push(t),i.to>u)break;i=o<e.length?e[o++]:null}if(!c)break;s=c.toA,l=c.toA-c.toB}return n}}class SS{startParse(e,t,r){return"string"==typeof e&&(e=new _S(e)),r=r?r.length?r.map((e=>new GC(e.from,e.to))):[new GC(0,0)]:[new GC(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let n=this.startParse(e,t,r);for(;;){let e=n.advance();if(e)return e}}}class _S{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function ES(e){return(t,r,n,o)=>new RS(t,e,r,n,o)}class PS{constructor(e,t,r,n,o){this.parser=e,this.parse=t,this.overlay=r,this.target=n,this.from=o}}function qS(e){if(!e.length||e.some((e=>e.from>=e.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class TS{constructor(e,t,r,n,o,i,a){this.parser=e,this.predicate=t,this.mounts=r,this.index=n,this.start=o,this.target=i,this.prev=a,this.depth=0,this.ranges=[]}}const jS=new KC({perNode:!0});class RS{constructor(e,t,r,n,o){this.nest=t,this.input=r,this.fragments=n,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new aS(e.type,e.children,e.positions,e.length,e.propValues.concat([[jS,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[KC.mounted.id]=new JC(t,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new DS(this.fragments),t=null,r=null,n=new vS(new pS(this.baseTree,this.ranges[0].from,0,null),iS.IncludeAnonymous|iS.IgnoreMounts);e:for(let o,i;;){let a,s=!0;if(null!=this.stoppedAt&&n.from>=this.stoppedAt)s=!1;else if(e.hasNode(n)){if(t){let e=t.mounts.find((e=>e.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay));if(e)for(let r of e.mount.overlay){let o=r.from+e.pos,i=r.to+e.pos;o>=n.from&&i<=n.to&&!t.ranges.some((e=>e.from<i&&e.to>o))&&t.ranges.push({from:o,to:i})}}s=!1}else if(r&&(i=ZS(r.ranges,n.from,n.to)))s=2!=i;else if(!n.type.isAnonymous&&(o=this.nest(n,this.input))&&(n.from<n.to||!o.overlay)){n.tree||MS(n);let i=e.findMounts(n.from,o.parser);if("function"==typeof o.overlay)t=new TS(o.parser,o.overlay,i,this.inner.length,n.from,n.tree,t);else{let e=LS(this.ranges,o.overlay||(n.from<n.to?[new GC(n.from,n.to)]:[]));e.length&&qS(e),!e.length&&o.overlay||this.inner.push(new PS(o.parser,e.length?o.parser.startParse(this.input,BS(i,e),e):o.parser.startParse(""),o.overlay?o.overlay.map((e=>new GC(e.from-n.from,e.to-n.from))):null,n.tree,e.length?e[0].from:n.from)),o.overlay?e.length&&(r={ranges:e,depth:0,prev:r}):s=!1}}else t&&(a=t.predicate(n))&&(!0===a&&(a=new GC(n.from,n.to)),a.from<a.to&&t.ranges.push(a));if(s&&n.firstChild())t&&t.depth++,r&&r.depth++;else for(;!n.nextSibling();){if(!n.parent())break e;if(t&&! --t.depth){let e=LS(this.ranges,t.ranges);e.length&&(qS(e),this.inner.splice(t.index,0,new PS(t.parser,t.parser.startParse(this.input,BS(t.mounts,e),e),t.ranges.map((e=>new GC(e.from-t.start,e.to-t.start))),t.target,e[0].from))),t=t.prev}r&&! --r.depth&&(r=r.prev)}}}}function ZS(e,t,r){for(let n of e){if(n.from>=r)break;if(n.to>t)return n.from<=t&&n.to>=r?2:1}return 0}function $S(e,t,r,n,o,i){if(t<r){let a=e.buffer[t+1];n.push(e.slice(t,r,a)),o.push(a-i)}}function MS(e){let{node:t}=e,r=[];do{r.push(e.index),e.parent()}while(!e.tree);let n=0,o=e.tree,i=0;for(;i=o.positions[n]+e.from,!(i<=t.from&&i+o.children[n].length>=t.to);n++);let a=o.children[n],s=a.buffer,l=[n];o.children[n]=function e(n,o,i,c,u,d){let p=r[d],h=[],f=[];$S(a,n,p,h,f,c);let m=s[p+1],g=s[p+2];l.push(h.length);let b=d?e(p+4,s[p+3],a.set.types[s[p]],m,g-m,d-1):t.toTree();return h.push(b),f.push(m-c),$S(a,s[p+3],o,h,f,c),new aS(i,h,f,u)}(0,s.length,tS.none,0,a.length,r.length-1);for(let t of l){let r=e.tree.children[t],n=e.tree.positions[t];e.yield(new pS(r,n+e.from,t,e._tree))}}class NS{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(iS.IncludeAnonymous|iS.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,iS.IgnoreOverlays|iS.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof aS))break;t=t.children[0]}return!1}}class DS{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=null!==(t=r.tree.prop(jS))&&void 0!==t?t:r.to,this.inner=new NS(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(jS))&&void 0!==e?e:t.to,this.inner=new NS(t.tree,-t.offset)}}findMounts(e,t){var r;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let o=null===(r=e.tree)||void 0===r?void 0:r.prop(KC.mounted);if(o&&o.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let r=this.fragments[t];if(r.from>=e.to)break;r.tree==this.curFrag.tree&&n.push({frag:r,pos:e.from-r.offset,mount:o})}}}return n}}function LS(e,t){let r=null,n=t;for(let o=1,i=0;o<e.length;o++){let a=e[o-1].to,s=e[o].from;for(;i<n.length;i++){let e=n[i];if(e.from>=s)break;e.to<=a||(r||(n=r=t.slice()),e.from<a?(r[i]=new GC(e.from,a),e.to>s&&r.splice(i+1,0,new GC(s,e.to))):e.to>s?r[i--]=new GC(s,e.to):r.splice(i--,1))}}return n}function IS(e,t,r,n){let o=0,i=0,a=!1,s=!1,l=-1e9,c=[];for(;;){let u=o==e.length?1e9:a?e[o].to:e[o].from,d=i==t.length?1e9:s?t[i].to:t[i].from;if(a!=s){let e=Math.max(l,r),t=Math.min(u,d,n);e<t&&c.push(new GC(e,t))}if(l=Math.min(u,d),1e9==l)break;u==l&&(a?(a=!1,o++):a=!0),d==l&&(s?(s=!1,i++):s=!0)}return c}function BS(e,t){let r=[];for(let{pos:n,mount:o,frag:i}of e){let e=n+(o.overlay?o.overlay[0].from:0),a=e+o.tree.length,s=Math.max(i.from,e),l=Math.min(i.to,a);if(o.overlay){let a=IS(t,o.overlay.map((e=>new GC(e.from+n,e.to+n))),s,l);for(let t=0,n=s;;t++){let s=t==a.length,c=s?l:a[t].from;if(c>n&&r.push(new CS(n,c,o.tree,-e,i.from>=n||i.openStart,i.to<=c||i.openEnd)),s)break;n=a[t].to}}else r.push(new CS(s,l,o.tree,-e,i.from>=e||i.openStart,i.to<=a||i.openEnd))}return r}class QS{constructor(e,t,r,n,o,i,a,s,l,c=0,u){this.p=e,this.stack=t,this.state=r,this.reducePos=n,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let n=e.parser.context;return new QS(e,[],t,r,r,0,[],0,n?new zS(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,n=65535&e,{parser:o}=this.p,i=o.dynamicPrecedence(n);if(i&&(this.score+=i),0==r)return this.pushState(o.getGoto(this.state,n,!0),this.reducePos),n<o.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,4,!0),void this.reduceContext(n,this.reducePos);let a=this.stack.length-3*(r-1)-(262144&e?6:0),s=a?this.stack[a-2]:this.p.ranges[0].from,l=this.reducePos-s;l>=2e3&&!(null===(t=this.p.parser.nodeSet.types[n])||void 0===t?void 0:t.isAnonymous)&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=l));let c=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-c;if(n<o.minRepeatTerm||131072&e){let e=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=o.getGoto(e,n,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,r,n=4,o=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,n=this.buffer.length;if(0==n&&e.parent&&(n=e.bufferBase-e.parent.bufferBase,e=e.parent),n>0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==r)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=r)}}if(o&&this.pos!=r){let o=this.buffer.length;if(o>0&&0!=this.buffer[o-4])for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,n>4&&(n-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=n}else this.buffer.push(e,t,r,n)}shift(e,t,r,n){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let o=e,{parser:i}=this.p;(n>this.pos||t<=i.maxNode)&&(this.pos=n,i.stateFlag(o,1)||(this.reducePos=n)),this.pushState(o,r),this.shiftContext(t,r),t<=i.maxNode&&this.buffer.push(t,r,n,4)}else this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4)}apply(e,t,r,n){65536&e?this.reduce(e):this.shift(e,t,r,n)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(r,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new QS(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new US(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==r)return!1;if(0==(65536&r))return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let n,o=0;o<t.length;o+=2)(n=t[o+1])!=this.state&&this.p.parser.hasAction(n,e)&&r.push(t[o],n);if(this.stack.length<120)for(let e=0;r.length<8&&e<t.length;e+=2){let n=t[e+1];r.some(((e,t)=>1&t&&e==n))||r.push(t[e],n)}t=r}let r=[];for(let e=0;e<t.length&&r.length<4;e+=2){let n=t[e+1];if(n==this.state)continue;let o=this.split();o.pushState(n,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[e],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(0==(65536&t))return!1;if(!e.validAction(this.state,t)){let r=t>>19,n=65535&t,o=this.stack.length-3*r;if(o<0||e.getGoto(this.stack[o],n,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(n,o)=>{if(!t.includes(n))return t.push(n),e.allActions(n,(t=>{if(393216&t);else if(65536&t){let r=(t>>19)-o;if(r>1){let n=65535&t,o=this.stack.length-3*r;if(o>=0&&e.getGoto(this.stack[o],n,!1)>=0)return r<<19|65536|n}}else{let e=r(t,o+1);if(null!=e)return e}}))};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new zS(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class zS{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class US{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,r=e>>19;0==r?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(r-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class FS{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new FS(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new FS(this.stack,this.pos,this.index)}}function WS(e,t=Uint16Array){if("string"!=typeof e)return e;let r=null;for(let n=0,o=0;n<e.length;){let i=0;for(;;){let t=e.charCodeAt(n++),r=!1;if(126==t){i=65535;break}t>=92&&t--,t>=34&&t--;let o=t-32;if(o>=46&&(o-=46,r=!0),i+=o,r)break;i*=46}r?r[o++]=i:r=new t(i)}return r}class YS{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const VS=new YS;class XS{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=VS,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,n=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!n)return null;let e=this.ranges[--n];o-=r.from-e.to,r=e}for(;t<0?o>r.to:o>=r.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];o+=e.from-r.to,r=e}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,r,n=this.chunkOff+e;if(n>=0&&n<this.chunk.length)t=this.pos+e,r=this.chunk.charCodeAt(n);else{let n=this.resolveOffset(e,1);if(null==n)return-1;if(t=n,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,n=this.range;for(;n.to<=t;)n=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(null==r||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=VS,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(r+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return r}}class HS{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;JS(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}HS.prototype.contextual=HS.prototype.fallback=HS.prototype.extend=!1;class GS{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data="string"==typeof e?WS(e):e}token(e,t){let r=e.pos,n=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(JS(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(r||n++,null==o)break;e.reset(o,e.token)}n&&(e.reset(r,e.token),e.acceptToken(this.elseToken,n))}}GS.prototype.contextual=HS.prototype.fallback=HS.prototype.extend=!1;class KS{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function JS(e,t,r,n,o,i){let a=0,s=1<<n,{dialect:l}=r.p.parser;e:for(;0!=(s&e[a]);){let r=e[a+1];for(let n=a+3;n<r;n+=2)if((e[n+1]&s)>0){let r=e[n];if(l.allows(r)&&(-1==t.token.value||t.token.value==r||t_(r,t.token.value,o,i))){t.acceptToken(r);break}}let n=t.next,c=0,u=e[a+2];if(!(t.next<0&&u>c&&65535==e[r+3*u-3])){for(;c<u;){let o=c+u>>1,i=r+o+(o<<1),s=e[i],l=e[i+1]||65536;if(n<s)u=o;else{if(!(n>=l)){a=e[i+2],t.advance();continue e}c=o+1}}break}a=e[r+3*u-1]}}function e_(e,t,r){for(let n,o=t;65535!=(n=e[o]);o++)if(n==r)return o-t;return-1}function t_(e,t,r,n){let o=e_(r,n,t);return o<0||e_(r,n,e)<o}const r_="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let n_=null;function o_(e,t,r){let n=e.cursor(iS.IncludeAnonymous);for(n.moveTo(t);;)if(!(r<0?n.childBefore(t):n.childAfter(t)))for(;;){if((r<0?n.to<t:n.from>t)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:e.length}}class i_{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?o_(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?o_(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],n=this.index[t];if(n==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[n],i=this.start[t]+r.positions[n];if(i>e)return this.nextStart=i,null;if(o instanceof aS){if(i==e){if(i<this.safeFrom)return null;let e=i+o.length;if(e<=this.safeTo){let t=o.prop(KC.lookAhead);if(!t||e+t<this.fragment.to)return o}}this.index[t]++,i+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}}}class a_{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new YS))}getActions(e){let t=0,r=null,{parser:n}=e.p,{tokenizers:o}=n,i=n.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let n=0;n<o.length;n++){if(0==(1<<n&i))continue;let l=o[n],c=this.tokens[n];if((!r||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=i||c.context!=a)&&(this.updateCachedToken(c,l,e),c.mask=i,c.context=a),c.lookAhead>c.end+25&&(s=Math.max(c.lookAhead,s)),0!=c.value)){let n=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(r=c,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),r||e.pos!=this.stream.end||(r=new YS,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new YS,{pos:r,p:n}=e;return t.start=r,t.end=Math.min(r+1,n.stream.end),t.value=r==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,r){let n=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(n,e),r),e.value>-1){let{parser:t}=r.p;for(let n=0;n<t.specialized.length;n++)if(t.specialized[n]==e.value){let o=t.specializers[n](this.stream.read(e.start,e.end),r);if(o>=0&&r.p.parser.dialect.allows(o>>1)){0==(1&o)?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,r,n){for(let t=0;t<n;t+=3)if(this.actions[t]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=r,n}addActions(e,t,r,n){let{state:o}=e,{parser:i}=e.p,{data:a}=i;for(let e=0;e<2;e++)for(let s=i.stateSlot(o,e?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==n&&2==a[s+1]&&(n=this.putAction(h_(a,s+2),t,r,n));break}s=h_(a,s+2)}a[s]==t&&(n=this.putAction(h_(a,s+1),t,r,n))}return n}}class s_{constructor(e,t,r,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new XS(t,n),this.tokens=new a_(e,this.stream),this.topTerm=e.top[1];let{from:o}=n[0];this.stacks=[QS.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>4*e.bufferLength?new i_(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,r=this.stacks,n=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==r.length){let[e]=r;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;i<r.length;i++){let a=r[i];for(;;){if(this.tokens.mainToken=null,a.pos>n)o.push(a);else{if(this.advanceStack(a,o,r))continue;{e||(e=[],t=[]),e.push(a);let r=this.tokens.getMainToken(a);t.push(r.value,r.end)}}break}}if(!o.length){let t=e&&function(e){let t=null;for(let r of e){let e=r.p.stoppedAt;(r.pos==r.p.stream.end||null!=e&&r.pos>e)&&r.p.parser.stateFlag(r.state,2)&&(!t||t.score<r.score)&&(t=r)}return t}(e);if(t)return r_&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw r_&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&e){let r=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,o);if(r)return r_&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(o.length>e)for(o.sort(((e,t)=>t.score-e.score));o.length>e;)o.pop();o.some((e=>e.reducePos>n))&&this.recovering--}else if(o.length>1){e:for(let e=0;e<o.length-1;e++){let t=o[e];for(let r=e+1;r<o.length;r++){let n=o[r];if(t.sameState(n)||t.buffer.length>500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){o.splice(e--,1);continue e}o.splice(r--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let e=1;e<o.length;e++)o[e].pos<this.minStackPos&&(this.minStackPos=o[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let n=e.pos,{parser:o}=this,i=r_?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,r=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(n);a;){let n=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(n>-1&&a.length&&(!t||(a.prop(KC.contextHash)||0)==r))return e.useNode(a,n),r_&&console.log(i+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof aS)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof aS&&0==a.positions[0]))break;a=s}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),r_&&console.log(i+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;a<s.length;){let l=s[a++],c=s[a++],u=s[a++],d=a==s.length||!r,p=d?e:e.split(),h=this.tokens.mainToken;if(p.apply(l,c,h?h.start:p.pos,u),r_&&console.log(i+this.stackID(p)+` (via ${0==(65536&l)?"shift":`reduce of ${o.getName(65535&l)}`} for ${o.getName(c)} @ ${n}${p==e?"":", split"})`),d)return!0;p.pos>n?t.push(p):r.push(p)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return l_(e,t),!0}}runRecovery(e,t,r){let n=null,o=!1;for(let i=0;i<e.length;i++){let a=e[i],s=t[i<<1],l=t[1+(i<<1)],c=r_?this.stackID(a)+" -> ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),r_&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))continue}let u=a.split(),d=c;for(let e=0;u.forceReduce()&&e<10&&(r_&&console.log(d+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,r));e++)r_&&(d=this.stackID(u)+" -> ");for(let e of a.recoverByInsert(s))r_&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,r);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),r_&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),l_(a,r)):(!n||n.score<a.score)&&(n=a)}return n}stackToTree(e){return e.close(),aS.build({buffer:FS.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(n_||(n_=new WeakMap)).get(e);return t||n_.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function l_(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(n.pos==e.pos&&n.sameState(e))return void(t[r].score<e.score&&(t[r]=e))}t.push(e)}class c_{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||0==this.disabled[e]}}const u_=e=>e;class d_{constructor(e){this.start=e.start,this.shift=e.shift||u_,this.reduce=e.reduce||u_,this.reuse=e.reuse||u_,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class p_ extends SS{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let r=0;r<e.repeatNodeCount;r++)t.push("");let r=Object.keys(e.topRules).map((t=>e.topRules[t][1])),n=[];for(let e=0;e<t.length;e++)n.push([]);function o(e,t,r){n[e].push([t,t.deserialize(String(r))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=KC[e]);for(let r=1;r<t.length;){let n=t[r++];if(n>=0)o(n,e,t[r++]);else{let i=t[r+-n];for(let a=-n;a>0;a--)o(t[r++],e,i);r++}}}this.nodeSet=new rS(t.map(((t,o)=>tS.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:n[o],top:r.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=XC;let i=WS(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(f_),this.states=WS(e.states,Uint32Array),this.data=WS(e.stateData),this.goto=WS(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map((e=>"number"==typeof e?new HS(i,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let n=new s_(this,e,t,r);for(let o of this.wrappers)n=o(n,e,t,r);return n}getGoto(e,t,r=!1){let n=this.goto;if(t>=n[0])return-1;for(let o=n[t+1];;){let t=n[o++],i=1&t,a=n[o++];if(i&&r)return a;for(let r=o+(t>>1);o<r;o++)if(n[o]==e)return a;if(i)return-1}}hasAction(e,t){let r=this.data;for(let n=0;n<2;n++)for(let o,i=this.stateSlot(e,n?2:1);;i+=3){if(65535==(o=r[i])){if(1!=r[i+1]){if(2==r[i+1])return h_(r,i+2);break}o=r[i=h_(r,i+2)]}if(o==t||0==o)return h_(r,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,(e=>e==t||null))}allActions(e,t){let r=this.stateSlot(e,4),n=r?t(r):void 0;for(let r=this.stateSlot(e,1);null==n;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=h_(this.data,r+2)}n=t(h_(this.data,r+1))}return n}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(65535==this.data[r]){if(1!=this.data[r+1])break;r=h_(this.data,r+2)}if(0==(1&this.data[r+2])){let e=this.data[r+1];t.some(((t,r)=>1&r&&t==e))||t.push(this.data[r],e)}}return t}configure(e){let t=Object.assign(Object.create(p_.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map((t=>{let r=e.tokenizers.find((e=>e.from==t));return r?r.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((r,n)=>{let o=e.specializers.find((e=>e.from==r.external));if(!o)return r;let i=Object.assign(Object.assign({},r),{external:o.to});return t.specializers[n]=f_(i),i}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map((()=>!1));if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(r[e]=!0)}let n=null;for(let e=0;e<t.length;e++)if(!r[e])for(let r,o=this.dialects[t[e]];65535!=(r=this.data[o++]);)(n||(n=new Uint8Array(this.maxTerm+1)))[r]=1;return new c_(e,r,n)}static deserialize(e){return new p_(e)}}function h_(e,t){return e[t]|e[t+1]<<16}function f_(e){if(e.external){let t=e.extend?1:0;return(r,n)=>e.external(r,n)<<1|t}return e.get}let m_=0;class g_{constructor(e,t,r){this.set=e,this.base=t,this.modified=r,this.id=m_++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new g_([],null,[]);if(t.set.push(t),e)for(let r of e.set)t.set.push(r);return t}static defineModifier(){let e=new y_;return t=>t.modified.indexOf(e)>-1?t:y_.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let b_=0;class y_{constructor(){this.instances=[],this.id=b_++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find((r=>r.base==e&&function(e,t){return e.length==t.length&&e.every(((e,r)=>e==t[r]))}(t,r.modified)));if(r)return r;let n=[],o=new g_(n,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let r=0;r<e.length;r++)for(let n=0,o=t.length;n<o;n++)t.push(t[n].concat(e[r]));return t.sort(((e,t)=>t.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)n.push(y_.get(t,e));return o}}function v_(e){let t=Object.create(null);for(let r in e){let n=e[r];Array.isArray(n)||(n=[n]);for(let e of r.split(" "))if(e){let r=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!n)throw new RangeError("Invalid path: "+e);if(r.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){o=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=r.length-1,s=r[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new w_(n,o,a>0?r.slice(0,a):null);t[s]=l.sort(t[s])}}return O_.add(t)}const O_=new KC;class w_{constructor(e,t,r,n){this.tags=e,this.mode=t,this.context=r,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function A_(e,t){let r=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)r[e.id]=t.class;else r[t.tag.id]=t.class;let{scope:n,all:o=null}=t||{};return{style:e=>{let t=o;for(let n of e)for(let e of n.set){let n=r[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}function x_(e,t,r,n=0,o=e.length){let i=new k_(n,Array.isArray(t)?t:[t],r);i.highlightRange(e.cursor(),n,o,"",i.highlighters),i.flush(o)}w_.empty=new w_([],2,null);class k_{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,n,o){let{type:i,from:a,to:s}=e;if(a>=r||s<=t)return;i.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(i))));let l=n,c=function(e){let t=e.type.prop(O_);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||w_.empty,u=function(e,t){let r=null;for(let n of e){let e=n.style(t);e&&(r=r?r+" "+e:e)}return r}(o,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(n+=(n?" ":"")+u)),this.startSpan(Math.max(t,a),l),c.opaque)return;let d=e.tree&&e.tree.prop(KC.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+a,1),c=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),u=e.firstChild();for(let p=0,h=a;;p++){let f=p<d.overlay.length?d.overlay[p]:null,m=f?f.from+a:s,g=Math.max(t,h),b=Math.min(r,m);if(g<b&&u)for(;e.from<b&&(this.highlightRange(e,g,b,n,o),this.startSpan(Math.min(b,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!f||m>r)break;h=f.to+a,h>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+a),Math.min(r,h),"",c),this.startSpan(Math.min(r,h),l))}u&&e.parent()}else if(e.firstChild()){d&&(n="");do{if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,n,o),this.startSpan(Math.min(r,e.to),l)}}while(e.nextSibling());e.parent()}}}const C_=g_.define,S_=C_(),__=C_(),E_=C_(__),P_=C_(__),q_=C_(),T_=C_(q_),j_=C_(q_),R_=C_(),Z_=C_(R_),$_=C_(),M_=C_(),N_=C_(),D_=C_(N_),L_=C_(),I_={comment:S_,lineComment:C_(S_),blockComment:C_(S_),docComment:C_(S_),name:__,variableName:C_(__),typeName:E_,tagName:C_(E_),propertyName:P_,attributeName:C_(P_),className:C_(__),labelName:C_(__),namespace:C_(__),macroName:C_(__),literal:q_,string:T_,docString:C_(T_),character:C_(T_),attributeValue:C_(T_),number:j_,integer:C_(j_),float:C_(j_),bool:C_(q_),regexp:C_(q_),escape:C_(q_),color:C_(q_),url:C_(q_),keyword:$_,self:C_($_),null:C_($_),atom:C_($_),unit:C_($_),modifier:C_($_),operatorKeyword:C_($_),controlKeyword:C_($_),definitionKeyword:C_($_),moduleKeyword:C_($_),operator:M_,derefOperator:C_(M_),arithmeticOperator:C_(M_),logicOperator:C_(M_),bitwiseOperator:C_(M_),compareOperator:C_(M_),updateOperator:C_(M_),definitionOperator:C_(M_),typeOperator:C_(M_),controlOperator:C_(M_),punctuation:N_,separator:C_(N_),bracket:D_,angleBracket:C_(D_),squareBracket:C_(D_),paren:C_(D_),brace:C_(D_),content:R_,heading:Z_,heading1:C_(Z_),heading2:C_(Z_),heading3:C_(Z_),heading4:C_(Z_),heading5:C_(Z_),heading6:C_(Z_),contentSeparator:C_(R_),list:C_(R_),quote:C_(R_),emphasis:C_(R_),strong:C_(R_),link:C_(R_),monospace:C_(R_),strikethrough:C_(R_),inserted:C_(),deleted:C_(),changed:C_(),invalid:C_(),meta:L_,documentMeta:C_(L_),annotation:C_(L_),processingInstruction:C_(L_),definition:g_.defineModifier(),constant:g_.defineModifier(),function:g_.defineModifier(),standard:g_.defineModifier(),local:g_.defineModifier(),special:g_.defineModifier()},B_=(A_([{tag:I_.link,class:"tok-link"},{tag:I_.heading,class:"tok-heading"},{tag:I_.emphasis,class:"tok-emphasis"},{tag:I_.strong,class:"tok-strong"},{tag:I_.keyword,class:"tok-keyword"},{tag:I_.atom,class:"tok-atom"},{tag:I_.bool,class:"tok-bool"},{tag:I_.url,class:"tok-url"},{tag:I_.labelName,class:"tok-labelName"},{tag:I_.inserted,class:"tok-inserted"},{tag:I_.deleted,class:"tok-deleted"},{tag:I_.literal,class:"tok-literal"},{tag:I_.string,class:"tok-string"},{tag:I_.number,class:"tok-number"},{tag:[I_.regexp,I_.escape,I_.special(I_.string)],class:"tok-string2"},{tag:I_.variableName,class:"tok-variableName"},{tag:I_.local(I_.variableName),class:"tok-variableName tok-local"},{tag:I_.definition(I_.variableName),class:"tok-variableName tok-definition"},{tag:I_.special(I_.variableName),class:"tok-variableName2"},{tag:I_.definition(I_.propertyName),class:"tok-propertyName tok-definition"},{tag:I_.typeName,class:"tok-typeName"},{tag:I_.namespace,class:"tok-namespace"},{tag:I_.className,class:"tok-className"},{tag:I_.macroName,class:"tok-macroName"},{tag:I_.propertyName,class:"tok-propertyName"},{tag:I_.operator,class:"tok-operator"},{tag:I_.comment,class:"tok-comment"},{tag:I_.meta,class:"tok-meta"},{tag:I_.invalid,class:"tok-invalid"},{tag:I_.punctuation,class:"tok-punctuation"}]),20),Q_=22,z_=23,U_=24,F_=26,W_=27,Y_=28,V_=31,X_=34,H_=37,G_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},K_={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},J_={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function eE(e){return 9==e||10==e||13==e||32==e}let tE=null,rE=null,nE=0;function oE(e,t){let r=e.pos+t;if(nE==r&&rE==e)return tE;let n=e.peek(t);for(;eE(n);)n=e.peek(++t);let o="";for(;45==(i=n)||46==i||58==i||i>=65&&i<=90||95==i||i>=97&&i<=122||i>=161;)o+=String.fromCharCode(n),n=e.peek(++t);var i;return rE=e,nE=r,tE=o?o.toLowerCase():n==iE||n==aE?void 0:null}const iE=63,aE=33;function sE(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;t<e.length;t++)this.hash+=(this.hash<<4)+e.charCodeAt(t)+(e.charCodeAt(t)<<8)}const lE=[6,10,7,8,9],cE=new d_({start:null,shift:(e,t,r,n)=>lE.indexOf(t)>-1?new sE(oE(n,1)||"",e):e,reduce:(e,t)=>t==B_&&e?e.parent:e,reuse(e,t,r,n){let o=t.type.id;return 6==o||36==o?new sE(oE(n,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),uE=new KS(((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(57));e.advance();let r=47==e.next;r&&e.advance();let n=oE(e,0);if(void 0===n)return;if(!n)return e.acceptToken(r?14:6);let o=t.context?t.context.name:null;if(r){if(n==o)return e.acceptToken(11);if(o&&K_[o])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(13)}else{if("script"==n)return e.acceptToken(7);if("style"==n)return e.acceptToken(8);if("textarea"==n)return e.acceptToken(9);if(G_.hasOwnProperty(n))return e.acceptToken(10);o&&J_[o]&&J_[o][n]?e.acceptToken(57,-1):e.acceptToken(6)}}),{contextual:!0}),dE=new KS((e=>{for(let t=0,r=0;;r++){if(e.next<0){r&&e.acceptToken(58);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){r>=3&&e.acceptToken(58,-2);break}t=0}e.advance()}})),pE=new KS(((e,t)=>{if(47==e.next&&62==e.peek(1)){let r=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(r?5:4,2)}else 62==e.next&&e.acceptToken(4,1)}));function hE(e,t,r){let n=2+e.length;return new KS((o=>{for(let i=0,a=0,s=0;;s++){if(o.next<0){s&&o.acceptToken(t);break}if(0==i&&60==o.next||1==i&&47==o.next||i>=2&&i<n&&o.next==e.charCodeAt(i-2))i++,a++;else if(2!=i&&i!=n||!eE(o.next)){if(i==n&&62==o.next){s>a?o.acceptToken(t,-a):o.acceptToken(r,-(a-2));break}if((10==o.next||13==o.next)&&s){o.acceptToken(t,1);break}i=a=0}else a++;o.advance()}}))}const fE=hE("script",54,1),mE=hE("style",55,2),gE=hE("textarea",56,3),bE=v_({"Text RawText":I_.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":I_.angleBracket,TagName:I_.tagName,"MismatchedCloseTag/TagName":[I_.tagName,I_.invalid],AttributeName:I_.attributeName,"AttributeValue UnquotedAttributeValue":I_.attributeValue,Is:I_.definitionOperator,"EntityReference CharacterReference":I_.character,Comment:I_.blockComment,ProcessingInst:I_.processingInstruction,DoctypeDecl:I_.documentMeta}),yE=p_.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(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uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:cE,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[bE],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz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4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[fE,mE,gE,pE,uE,dE,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function vE(e,t){let r=Object.create(null);for(let n of e.getChildren(z_)){let e=n.getChild(U_),o=n.getChild(F_)||n.getChild(W_);e&&(r[t.read(e.from,e.to)]=o?o.type.id==F_?t.read(o.from+1,o.to-1):t.read(o.from,o.to):"")}return r}function OE(e,t){let r=e.getChild(Q_);return r?t.read(r.from,r.to):" "}function wE(e,t,r){let n;for(let o of r)if(!o.attrs||o.attrs(n||(n=vE(e.node.parent.firstChild,t))))return{parser:o.parser};return null}function AE(e=[],t=[]){let r=[],n=[],o=[],i=[];for(let t of e)("script"==t.tag?r:"style"==t.tag?n:"textarea"==t.tag?o:i).push(t);let a=t.length?Object.create(null):null;for(let e of t)(a[e.name]||(a[e.name]=[])).push(e);return ES(((e,t)=>{let s=e.type.id;if(s==Y_)return wE(e,t,r);if(s==V_)return wE(e,t,n);if(s==X_)return wE(e,t,o);if(s==B_&&i.length){let r,n=e.node,o=n.firstChild,a=o&&OE(o,t);if(a)for(let e of i)if(e.tag==a&&(!e.attrs||e.attrs(r||(r=vE(n,t))))){let t=n.lastChild,r=t.type.id==H_?t.from:n.to;if(r>o.to)return{parser:e.parser,overlay:[{from:o.to,to:r}]}}}if(a&&s==z_){let r,n=e.node;if(r=n.firstChild){let e=a[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=OE(n.parent,t))continue;let e=n.lastChild;if(e.type.id==F_){let t=e.from+1,n=e.lastChild,o=e.to-(n&&n.isError?0:1);if(o>t)return{parser:r.parser,overlay:[{from:t,to:o}]}}else if(e.type.id==W_)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null}))}const xE=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function kE(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}const CE=new KS(((e,t)=>{for(let n=!1,o=0,i=0;;i++){let{next:a}=e;if(kE(a)||45==a||95==a||n&&(r=a)>=48&&r<=57)!n&&(45!=a||i>0)&&(n=!0),o===i&&45==a&&o++,e.advance();else{if(92!=a||10==e.peek(1)){n&&e.acceptToken(40==a?97:2==o&&t.canShift(2)?2:98);break}e.advance(),e.next>-1&&e.advance(),n=!0}}var r})),SE=new KS((e=>{if(xE.includes(e.peek(-1))){let{next:t}=e;(kE(t)||95==t||35==t||46==t||91==t||58==t||45==t||38==t)&&e.acceptToken(96)}})),_E=new KS((e=>{if(!xE.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),kE(t)){do{e.advance()}while(kE(e.next));e.acceptToken(1)}}})),EE=v_({"AtKeyword import charset namespace keyframes media supports":I_.definitionKeyword,"from to selector":I_.keyword,NamespaceName:I_.namespace,KeyframeName:I_.labelName,KeyframeRangeName:I_.operatorKeyword,TagName:I_.tagName,ClassName:I_.className,PseudoClassName:I_.constant(I_.className),IdName:I_.labelName,"FeatureName PropertyName":I_.propertyName,AttributeName:I_.attributeName,NumberLiteral:I_.number,KeywordQuery:I_.keyword,UnaryQueryOp:I_.operatorKeyword,"CallTag ValueName":I_.atom,VariableName:I_.variableName,Callee:I_.operatorKeyword,Unit:I_.unit,"UniversalSelector NestingSelector":I_.definitionOperator,MatchOp:I_.compareOperator,"ChildOp SiblingOp, LogicOp":I_.logicOperator,BinOp:I_.arithmeticOperator,Important:I_.modifier,Comment:I_.blockComment,ColorLiteral:I_.color,"ParenthesizedContent StringLiteral":I_.string,":":I_.punctuation,"PseudoOp #":I_.derefOperator,"; ,":I_.separator,"( )":I_.paren,"[ ]":I_.squareBracket,"{ }":I_.brace}),PE={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},qE={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},TE={__proto__:null,not:128,only:128},jE=p_.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`OOQS'#Dx'#DxO,iQWO,5:bO,nQ[O,5:bOOQO'#D{'#D{O,vQWO,5:eO,{QWO,5:kO-TQWO,5:mOOQS-E8S-E8SO${Q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w!m#nkYOPdhotuvw!m#Q#c#nkSOPdhotuvw!m#Q#c#nQmTR!snQ{VR!wqQ!w}Q#Y!XR#s!yq!ZZ]!T!l#R#T#W#l#u#z$R$b$c$j$o${p!ZZ]!T!l#R#T#W#l#u#z$R$b$c$j$o${U$]#h$_$rR$q$[q!XZ]!T!l#R#T#W#l#u#z$R$b$c$j$o${p!ZZ]!T!l#R#T#W#l#u#z$R$b$c$j$o${Q!e^R#g!fQ|VR!xqQ!w|R#s!xQ!PWR!zrQ!RXR!{sQxUQ!vpQ#d!bQ#j!iQ#k!jQ$t$^R%Q$sSgPwQ!ohQ#m!mR$e#nZfPhw!m#na!a[`a!V!]!_#_#`R#]!]R!f^R!h_R#i!hS$^#h$_R%O$rV$[#h$_$rQ!qjR#q!qQdOShPwU!kdh#nR#n!mQ#z#RU$i#z$o${Q$o$RR${$jQ$k#zR$|$kQpUS!up$gR$g#wQ$c#lR$x$cQ!ngS#o!n#pR#p!oQ#a!^R$V#aQ$_#hR$u$_Q$s$^R%P$s_cOPdhw!m#n^UOPdhw!m#nQ!toQ!|tQ!}uQ#OvQ#w#QR$W#cR#{#RQ!VZQ!c]Q#U!TQ#l!l[#y#R#z$R$j$o${Q#|#TQ$O#WS$a#l$cQ$f#uR$w$bR#x#QQiPR#PwQ!b[Q!jaR#X!VU!^[a!VQ!i`Q#^!]Q#b!_Q$T#_R$U#`",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:114,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[EE],skippedNodes:[0,3,85],repeatNodeCount:10,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d#R#T$}#T#UGT#U#c$}#c#dHf#d#o$}#o#pH{#p#q6d#q#rI^#r#sIo#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`JW<%lO$}`%QSOy%^z;'S%^;'S;=`%o<%lO%^`%cSo`Oy%^z;'S%^;'S;=`%o<%lO%^`%rP;=`<%l%^~%zh#W~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#W~o`OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^l)[UOy%^z#]%^#]#^)n#^;'S%^;'S;=`%o<%lO%^l)s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b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[SE,_E,CE,1,2,3,4,new GS("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:e=>PE[e]||-1},{term:56,get:e=>qE[e]||-1},{term:98,get:e=>TE[e]||-1}],tokenPrec:1169});class RE{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=QE(this,e,t);let n=[];return this.decompose(0,e,n,2),r.length&&r.decompose(0,r.length,n,3),this.decompose(t,this.length,n,1),$E.from(n,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=QE(this,e,t);let r=[];return this.decompose(e,t,r,0),$E.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),n=new DE(this),o=new DE(e);for(let e=t,i=t;;){if(n.next(e),o.next(e),e=0,n.lineBreak!=o.lineBreak||n.done!=o.done||n.value!=o.value)return!1;if(i+=n.value.length,n.done||i>=r)return!0}}iter(e=1){return new DE(this,e)}iterRange(e,t=this.length){return new LE(this,e,t)}iterLines(e,t){let r;if(null==e)r=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;r=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new IE(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new ZE(e):$E.from(ZE.split(e,[])):RE.empty}}class ZE extends RE{constructor(e,t=function(e){let t=-1;for(let r of e)t+=r.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,n){for(let o=0;;o++){let i=this.text[o],a=n+i.length;if((t?r:a)>=e)return new BE(n,a,r,i);n=a+1,r++}}decompose(e,t,r,n){let o=e<=0&&t>=this.length?this:new ZE(NE(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=r.pop(),t=ME(o.text,e.text.slice(),0,o.length);if(t.length<=32)r.push(new ZE(t,e.length+o.length));else{let e=t.length>>1;r.push(new ZE(t.slice(0,e)),new ZE(t.slice(e)))}}else r.push(o)}replace(e,t,r){if(!(r instanceof ZE))return super.replace(e,t,r);[e,t]=QE(this,e,t);let n=ME(this.text,ME(r.text,NE(this.text,0,e)),t),o=this.length+r.length-(t-e);return n.length<=32?new ZE(n,o):$E.from(ZE.split(n,[]),o)}sliceString(e,t=this.length,r="\n"){[e,t]=QE(this,e,t);let n="";for(let o=0,i=0;o<=t&&i<this.text.length;i++){let a=this.text[i],s=o+a.length;o>e&&i&&(n+=r),e<s&&t>o&&(n+=a.slice(Math.max(0,e-o),t-o)),o=s+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],n=-1;for(let o of e)r.push(o),n+=o.length+1,32==r.length&&(t.push(new ZE(r,n)),r=[],n=-1);return n>-1&&t.push(new ZE(r,n)),t}}class $E extends RE{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,r,n){for(let o=0;;o++){let i=this.children[o],a=n+i.length,s=r+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,r,n);n=a+1,r=s+1}}decompose(e,t,r,n){for(let o=0,i=0;i<=t&&o<this.children.length;o++){let a=this.children[o],s=i+a.length;if(e<=s&&t>=i){let o=n&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!o?r.push(a):a.decompose(e-i,t-i,r,o)}i=s+1}}replace(e,t,r){if([e,t]=QE(this,e,t),r.lines<this.lines)for(let n=0,o=0;n<this.children.length;n++){let i=this.children[n],a=o+i.length;if(e>=o&&t<=a){let s=i.replace(e-o,t-o,r),l=this.lines-i.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let o=this.children.slice();return o[n]=s,new $E(o,this.length-(t-e)+r.length)}return super.replace(o,a,s)}o=a+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r="\n"){[e,t]=QE(this,e,t);let n="";for(let o=0,i=0;o<this.children.length&&i<=t;o++){let a=this.children[o],s=i+a.length;i>e&&o&&(n+=r),e<s&&t>i&&(n+=a.sliceString(e-i,t-i,r)),i=s+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof $E))return 0;let r=0,[n,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,o+=t){if(n==i||o==a)return r;let s=this.children[n],l=e.children[o];if(s!=l)return r+s.scanIdentical(l,t);r+=s.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let r=0;for(let t of e)r+=t.lines;if(r<32){let r=[];for(let t of e)t.flatten(r);return new ZE(r,t)}let n=Math.max(32,r>>5),o=n<<1,i=n>>1,a=[],s=0,l=-1,c=[];function u(e){let t;if(e.lines>o&&e instanceof $E)for(let t of e.children)u(t);else e.lines>i&&(s>i||!s)?(d(),a.push(e)):e instanceof ZE&&s&&(t=c[c.length-1])instanceof ZE&&e.lines+t.lines<=32?(s+=e.lines,l+=e.length+1,c[c.length-1]=new ZE(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>n&&d(),s+=e.lines,l+=e.length+1,c.push(e))}function d(){0!=s&&(a.push(1==c.length?c[0]:$E.from(c,l)),l=-1,s=c.length=0)}for(let t of e)u(t);return d(),1==a.length?a[0]:new $E(a,t)}}function ME(e,t,r=0,n=1e9){for(let o=0,i=0,a=!0;i<e.length&&o<=n;i++){let s=e[i],l=o+s.length;l>=r&&(l>n&&(s=s.slice(0,n-o)),o<r&&(s=s.slice(r-o)),a?(t[t.length-1]+=s,a=!1):t.push(s)),o=l+1}return t}function NE(e,t,r){return ME(e,[""],t,r)}RE.empty=new ZE([""],0);class DE{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ZE?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,n=this.nodes[r],o=this.offsets[r],i=o>>1,a=n instanceof ZE?n.text.length:n.children.length;if(i==(t>0?a:0)){if(0==r)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[r]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof ZE){let o=n.text[i+(t<0?-1:0)];if(this.offsets[r]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=n.children[i+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof ZE?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class LE{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new DE(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=r?n:t<0?n.slice(n.length-r):n.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class IE{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(RE.prototype[Symbol.iterator]=function(){return this.iter()},DE.prototype[Symbol.iterator]=LE.prototype[Symbol.iterator]=IE.prototype[Symbol.iterator]=function(){return this});class BE{constructor(e,t,r,n){this.from=e,this.to=t,this.number=r,this.text=n}get length(){return this.to-this.from}}function QE(e,t,r){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,r))]}let zE="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;e<zE.length;e++)zE[e]+=zE[e-1];function UE(e){for(let t=1;t<zE.length;t+=2)if(zE[t]>e)return zE[t-1]<=e;return!1}function FE(e){return e>=127462&&e<=127487}const WE=8205;function YE(e,t,r=!0,n=!0){return(r?VE:XE)(e,t,n)}function VE(e,t,r){if(t==e.length)return t;t&&HE(e.charCodeAt(t))&&GE(e.charCodeAt(t-1))&&t--;let n=KE(e,t);for(t+=eP(n);t<e.length;){let o=KE(e,t);if(n==WE||o==WE||r&&UE(o))t+=eP(o),n=o;else{if(!FE(o))break;{let r=0,n=t-2;for(;n>=0&&FE(KE(e,n));)r++,n-=2;if(r%2==0)break;t+=2}}}return t}function XE(e,t,r){for(;t>0;){let n=VE(e,t-2,r);if(n<t)return n;t--}return 0}function HE(e){return e>=56320&&e<57344}function GE(e){return e>=55296&&e<56320}function KE(e,t){let r=e.charCodeAt(t);if(!GE(r)||t+1==e.length)return r;let n=e.charCodeAt(t+1);return HE(n)?n-56320+(r-55296<<10)+65536:r}function JE(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function eP(e){return e<65536?1:2}const tP=/\r\n?|\n/;var rP=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(rP||(rP={}));class nP{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,n=0;t<this.sections.length;){let o=this.sections[t++],i=this.sections[t++];i<0?(e(r,n,o),n+=o):n+=i,r+=o}}iterChangedRanges(e,t=!1){sP(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],n=this.sections[t++];n<0?e.push(r,n):e.push(n,r)}return new nP(e)}composeDesc(e){return this.empty?e:e.empty?this:cP(this,e)}mapDesc(e,t=!1){return e.empty?this:lP(this,e,t)}mapPos(e,t=-1,r=rP.Simple){let n=0,o=0;for(let i=0;i<this.sections.length;){let a=this.sections[i++],s=this.sections[i++],l=n+a;if(s<0){if(l>e)return o+(e-n);o+=a}else{if(r!=rP.Simple&&l>=e&&(r==rP.TrackDel&&n<e&&l>e||r==rP.TrackBefore&&n<e||r==rP.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==n||t<0?o:o+s;o+=s}n=l}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return o}touchesRange(e,t=e){for(let r=0,n=0;r<this.sections.length&&n<=t;){let o=n+this.sections[r++];if(this.sections[r++]>=0&&n<=t&&o>=e)return!(n<e&&o>t)||"cover";n=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+r+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new nP(e)}static create(e){return new nP(e)}}class oP extends nP{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return sP(this,((t,r,n,o,i)=>e=e.replace(n,n+(r-t),i)),!1),e}mapDesc(e,t=!1){return lP(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let n=0,o=0;n<t.length;n+=2){let i=t[n],a=t[n+1];if(a>=0){t[n]=a,t[n+1]=i;let s=n>>1;for(;r.length<s;)r.push(RE.empty);r.push(i?e.slice(o,o+i):RE.empty)}o+=i}return new oP(t,r)}compose(e){return this.empty?e:e.empty?this:cP(this,e,!0)}map(e,t=!1){return e.empty?this:lP(this,e,t,!0)}iterChanges(e,t=!1){sP(this,e,t)}get desc(){return nP.create(this.sections)}filter(e){let t=[],r=[],n=[],o=new uP(this);e:for(let i=0,a=0;;){let s=i==e.length?1e9:e[i++];for(;a<s||a==s&&0==o.len;){if(o.done)break e;let e=Math.min(o.len,s-a);iP(n,e,-1);let i=-1==o.ins?-1:0==o.off?o.ins:0;iP(t,e,i),i>0&&aP(r,t,o.text),o.forward(e),a+=e}let l=e[i++];for(;a<l;){if(o.done)break e;let e=Math.min(o.len,l-a);iP(t,e,-1),iP(n,e,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(e),a+=e}}return{changes:new oP(t,r),filtered:nP.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],n=this.sections[t+1];n<0?e.push(r):0==n?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let n=[],o=[],i=0,a=null;function s(e=!1){if(!e&&!n.length)return;i<t&&iP(n,t-i,-1);let r=new oP(n,o);a=a?a.compose(r.map(a)):r,n=[],o=[],i=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof oP){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:e,to:a=e,insert:c}=l;if(e>a||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let u=c?"string"==typeof c?RE.of(c.split(r||tP)):c:RE.empty,d=u.length;if(e==a&&0==d)return;e<i&&s(),e>i&&iP(n,e-i,-1),iP(n,a-e,d),aP(o,n,u),i=a}}(e),s(!a),a}static empty(e){return new oP(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let n=0;n<e.length;n++){let o=e[n];if("number"==typeof o)t.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some(((e,t)=>t&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;r.length<n;)r.push(RE.empty);r[n]=RE.of(o.slice(1)),t.push(o[0],r[n].length)}}}return new oP(t,r)}static createSet(e,t){return new oP(e,t)}}function iP(e,t,r,n=!1){if(0==t&&r<=0)return;let o=e.length-2;o>=0&&r<=0&&r==e[o+1]?e[o]+=t:0==t&&0==e[o]?e[o+1]+=r:n?(e[o]+=t,e[o+1]+=r):e.push(t,r)}function aP(e,t,r){if(0==r.length)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(r);else{for(;e.length<n;)e.push(RE.empty);e.push(r)}}function sP(e,t,r){let n=e.inserted;for(let o=0,i=0,a=0;a<e.sections.length;){let s=e.sections[a++],l=e.sections[a++];if(l<0)o+=s,i+=s;else{let c=o,u=i,d=RE.empty;for(;c+=s,u+=l,l&&n&&(d=d.append(n[a-2>>1])),!(r||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(o,c,i,u,d),o=c,i=u}}}function lP(e,t,r,n=!1){let o=[],i=n?[]:null,a=new uP(e),s=new uP(t);for(let e=-1;;)if(-1==a.ins&&-1==s.ins){let e=Math.min(a.len,s.len);iP(o,e,-1),a.forward(e),s.forward(e)}else if(s.ins>=0&&(a.ins<0||e==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!r))){let t=s.len;for(iP(o,s.ins,-1);t;){let r=Math.min(a.len,t);a.ins>=0&&e<a.i&&a.len<=r&&(iP(o,0,a.ins),i&&aP(i,o,a.text),e=a.i),a.forward(r),t-=r}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return i?oP.createSet(o,i):nP.create(o);throw new Error("Mismatched change set lengths")}{let t=0,r=a.len;for(;r;)if(-1==s.ins){let e=Math.min(r,s.len);t+=e,r-=e,s.forward(e)}else{if(!(0==s.ins&&s.len<r))break;r-=s.len,s.next()}iP(o,t,e<a.i?a.ins:0),i&&e<a.i&&aP(i,o,a.text),e=a.i,a.forward(a.len-r)}}}function cP(e,t,r=!1){let n=[],o=r?[]:null,i=new uP(e),a=new uP(t);for(let e=!1;;){if(i.done&&a.done)return o?oP.createSet(n,o):nP.create(n);if(0==i.ins)iP(n,i.len,0,e),i.next();else if(0!=a.len||a.done){if(i.done||a.done)throw new Error("Mismatched change set lengths");{let t=Math.min(i.len2,a.len),r=n.length;if(-1==i.ins){let r=-1==a.ins?-1:a.off?0:a.ins;iP(n,t,r,e),o&&r&&aP(o,n,a.text)}else-1==a.ins?(iP(n,i.off?0:i.len,t,e),o&&aP(o,n,i.textBit(t))):(iP(n,i.off?0:i.len,a.off?0:a.ins,e),o&&!a.off&&aP(o,n,a.text));e=(i.ins>t||a.ins>=0&&a.len>t)&&(e||n.length>r),i.forward2(t),a.forward(t)}}else iP(n,0,a.ins,e),o&&aP(o,n,a.text),a.next()}}class uP{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?RE.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?RE.empty:t[r].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class dP{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let r,n;return this.empty?r=n=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),r==this.from&&n==this.to?this:new dP(r,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return pP.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return pP.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return pP.range(e.anchor,e.head)}static create(e,t,r){return new dP(e,t,r)}}class pP{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:pP.create(this.ranges.map((r=>r.map(e,t))),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new pP([this.main],0)}addRange(e,t=!0){return pP.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,pP.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e=>e.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new pP(e.ranges.map((e=>dP.fromJSON(e))),e.main)}static single(e,t=e){return new pP([pP.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let r=0,n=0;n<e.length;n++){let o=e[n];if(o.empty?o.from<=r:o.from<r)return pP.normalized(e.slice(),t);r=o.to}return new pP(e,t)}static cursor(e,t=0,r,n){return dP.create(e,e,(0==t?0:t<0?8:16)|(null==r?7:Math.min(6,r))|(null!=n?n:16777215)<<6)}static range(e,t,r,n){let o=(null!=r?r:16777215)<<6|(null==n?7:Math.min(6,n));return t<e?dP.create(t,e,48|o):dP.create(e,t,(t>e?8:0)|o)}static normalized(e,t=0){let r=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(r);for(let r=1;r<e.length;r++){let n=e[r],o=e[r-1];if(n.empty?n.from<=o.to:n.from<o.to){let i=o.from,a=Math.max(n.to,o.to);r<=t&&t--,e.splice(--r,2,n.anchor>n.head?pP.range(a,i):pP.range(i,a))}}return new pP(e,t)}}function hP(e,t){for(let r of e.ranges)if(r.to>t)throw new RangeError("Selection points outside of document")}let fP=0;class mP{constructor(e,t,r,n,o){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=n,this.id=fP++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}get reader(){return this}static define(e={}){return new mP(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:gP),!!e.static,e.enables)}of(e){return new bP([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bP(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new bP(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(r=>t(r.field(e))))}}function gP(e,t){return e==t||e.length==t.length&&e.every(((e,r)=>e===t[r]))}class bP{constructor(e,t,r,n){this.dependencies=e,this.facet=t,this.type=r,this.value=n,this.id=fP++}dynamicSlot(e){var t;let r=this.value,n=this.facet.compareInput,o=this.id,i=e[o]>>1,a=2==this.type,s=!1,l=!1,c=[];for(let r of this.dependencies)"doc"==r?s=!0:"selection"==r?l=!0:0==(1&(null!==(t=e[r.id])&&void 0!==t?t:1))&&c.push(e[r.id]);return{create:e=>(e.values[i]=r(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||vP(e,c)){let t=r(e);if(a?!yP(t,e.values[i],n):!n(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[o];if(null!=l){let o=qP(t,l);if(this.dependencies.every((r=>r instanceof mP?t.facet(r)===e.facet(r):!(r instanceof AP)||t.field(r,!1)==e.field(r,!1)))||(a?yP(s=r(e),o,n):n(s=r(e),o)))return e.values[i]=o,0}else s=r(e);return e.values[i]=s,1}}}}function yP(e,t,r){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}function vP(e,t){let r=!1;for(let n of t)1&PP(e,n)&&(r=!0);return r}function OP(e,t,r){let n=r.map((t=>e[t.id])),o=r.map((e=>e.type)),i=n.filter((e=>!(1&e))),a=e[t.id]>>1;function s(e){let r=[];for(let t=0;t<n.length;t++){let i=qP(e,n[t]);if(2==o[t])for(let e of i)r.push(e);else r.push(i)}return t.combine(r)}return{create(e){for(let t of n)PP(e,t);return e.values[a]=s(e),1},update(e,r){if(!vP(e,i))return 0;let n=s(e);return t.compare(n,e.values[a])?0:(e.values[a]=n,1)},reconfigure(e,o){let i=vP(e,n),l=o.config.facets[t.id],c=o.facet(t);if(l&&!i&&gP(r,l))return e.values[a]=c,0;let u=s(e);return t.compare(u,c)?(e.values[a]=c,0):(e.values[a]=u,1)}}}const wP=mP.define({static:!0});class AP{constructor(e,t,r,n,o){this.id=e,this.createF=t,this.updateF=r,this.compareF=n,this.spec=o,this.provides=void 0}static define(e){let t=new AP(fP++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(wP).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,r)=>{let n=e.values[t],o=this.updateF(n,r);return this.compareF(n,o)?0:(e.values[t]=o,1)},reconfigure:(e,r)=>null!=r.config.address[this.id]?(e.values[t]=r.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,wP.of({field:this,create:e})]}get extension(){return this}}function xP(e){return t=>new CP(t,e)}const kP={highest:xP(0),high:xP(1),default:xP(2),low:xP(3),lowest:xP(4)};class CP{constructor(e,t){this.inner=e,this.prec=t}}class SP{of(e){return new _P(this,e)}reconfigure(e){return SP.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class _P{constructor(e,t){this.compartment=e,this.inner=t}}class EP{constructor(e,t,r,n,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=n,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let n=[],o=Object.create(null),i=new Map;for(let r of function(e,t,r){let n=[[],[],[],[],[]],o=new Map;return function e(i,a){let s=o.get(i);if(null!=s){if(s<=a)return;let e=n[s].indexOf(i);e>-1&&n[s].splice(e,1),i instanceof _P&&r.delete(i.compartment)}if(o.set(i,a),Array.isArray(i))for(let t of i)e(t,a);else if(i instanceof _P){if(r.has(i.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=t.get(i.compartment)||i.inner;r.set(i.compartment,n),e(n,a)}else if(i instanceof CP)e(i.inner,i.prec);else if(i instanceof AP)n[a].push(i),i.provides&&e(i.provides,a);else if(i instanceof bP)n[a].push(i),i.facet.extensions&&e(i.facet.extensions,2);else{let t=i.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${i}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,a)}}(e,2),n.reduce(((e,t)=>e.concat(t)))}(e,t,i))r instanceof AP?n.push(r):(o[r.facet.id]||(o[r.facet.id]=[])).push(r);let a=Object.create(null),s=[],l=[];for(let e of n)a[e.id]=l.length<<1,l.push((t=>e.slot(t)));let c=null==r?void 0:r.config.facets;for(let e in o){let t=o[e],n=t[0].facet,i=c&&c[e]||[];if(t.every((e=>0==e.type)))if(a[n.id]=s.length<<1|1,gP(i,t))s.push(r.facet(n));else{let e=n.combine(t.map((e=>e.value)));s.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)0==e.type?(a[e.id]=s.length<<1|1,s.push(e.value)):(a[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));a[n.id]=l.length<<1,l.push((e=>OP(e,n,t)))}}let u=l.map((e=>e(a)));return new EP(e,i,u,a,s,o)}}function PP(e,t){if(1&t)return 2;let r=t>>1,n=e.status[r];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[r]=4;let o=e.computeSlot(e,e.config.dynamicSlots[r]);return e.status[r]=2|o}function qP(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const TP=mP.define(),jP=mP.define({combine:e=>e.some((e=>e)),static:!0}),RP=mP.define({combine:e=>e.length?e[0]:void 0,static:!0}),ZP=mP.define(),$P=mP.define(),MP=mP.define(),NP=mP.define({combine:e=>!!e.length&&e[0]});class DP{constructor(e,t){this.type=e,this.value=t}static define(){return new LP}}class LP{of(e){return new DP(this,e)}}class IP{constructor(e){this.map=e}of(e){return new BP(this,e)}}class BP{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new BP(this.type,t)}is(e){return this.type==e}static define(e={}){return new IP(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let n of e){let e=n.map(t);e&&r.push(e)}return r}}BP.reconfigure=BP.define(),BP.appendConfig=BP.define();class QP{constructor(e,t,r,n,o,i){this.startState=e,this.changes=t,this.selection=r,this.effects=n,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,r&&hP(r,t.newLength),o.some((e=>e.type==QP.time))||(this.annotations=o.concat(QP.time.of(Date.now())))}static create(e,t,r,n,o,i){return new QP(e,t,r,n,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(QP.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function zP(e,t){let r=[];for(let n=0,o=0;;){let i,a;if(n<e.length&&(o==t.length||t[o]>=e[n]))i=e[n++],a=e[n++];else{if(!(o<t.length))return r;i=t[o++],a=t[o++]}!r.length||r[r.length-1]<i?r.push(i,a):r[r.length-1]<a&&(r[r.length-1]=a)}}function UP(e,t,r){var n;let o,i,a;return r?(o=t.changes,i=oP.empty(t.changes.length),a=e.changes.compose(t.changes)):(o=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(o)),{changes:a,selection:t.selection?t.selection.map(i):null===(n=e.selection)||void 0===n?void 0:n.map(o),effects:BP.mapEffects(e.effects,o).concat(BP.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function FP(e,t,r){let n=t.selection,o=VP(t.annotations);return t.userEvent&&(o=o.concat(QP.userEvent.of(t.userEvent))),{changes:t.changes instanceof oP?t.changes:oP.of(t.changes||[],r,e.facet(RP)),selection:n&&(n instanceof pP?n:pP.single(n.anchor,n.head)),effects:VP(t.effects),annotations:o,scrollIntoView:!!t.scrollIntoView}}function WP(e,t,r){let n=FP(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(r=!1);for(let o=1;o<t.length;o++){!1===t[o].filter&&(r=!1);let i=!!t[o].sequential;n=UP(n,FP(e,t[o],i?n.changes.newLength:e.doc.length),i)}let o=QP.create(e,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return function(e){let t=e.startState,r=t.facet(MP),n=e;for(let o=r.length-1;o>=0;o--){let i=r[o](e);i&&Object.keys(i).length&&(n=UP(n,FP(t,i,e.changes.newLength),!0))}return n==e?e:QP.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(r?function(e){let t=e.startState,r=!0;for(let n of t.facet(ZP)){let t=n(e);if(!1===t){r=!1;break}Array.isArray(t)&&(r=!0===r?t:zP(r,t))}if(!0!==r){let n,o;if(!1===r)o=e.changes.invertedDesc,n=oP.empty(t.doc.length);else{let t=e.changes.filter(r);n=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=QP.create(t,n,e.selection&&e.selection.map(o),BP.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let n=t.facet($P);for(let r=n.length-1;r>=0;r--){let o=n[r](e);e=o instanceof QP?o:Array.isArray(o)&&1==o.length&&o[0]instanceof QP?o[0]:WP(t,VP(o),!1)}return e}(o):o)}QP.time=DP.define(),QP.userEvent=DP.define(),QP.addToHistory=DP.define(),QP.remote=DP.define();const YP=[];function VP(e){return null==e?YP:Array.isArray(e)?e:[e]}var XP=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(XP||(XP={}));const HP=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let GP;try{GP=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(De){}class KP{constructor(e,t,r,n,o,i){this.config=e,this.doc=t,this.selection=r,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)PP(this,e<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(null!=r)return PP(this,r),qP(this,r);if(t)throw new RangeError("Field is not present in this state")}update(...e){return WP(this,e,!0)}applyTransaction(e){let t,r=this.config,{base:n,compartments:o}=r;for(let t of e.effects)t.is(SP.reconfigure)?(r&&(o=new Map,r.compartments.forEach(((e,t)=>o.set(t,e))),r=null),o.set(t.value.compartment,t.value.extension)):t.is(BP.reconfigure)?(r=null,n=t.value):t.is(BP.appendConfig)&&(r=null,n=VP(n).concat(t.value));r?t=e.startState.values.slice():(r=EP.resolve(n,o,this),t=new KP(r,this.doc,this.selection,r.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values);let i=e.startState.facet(jP)?e.newSelection:e.newSelection.asSingle();new KP(r,e.newDoc,i,t,((t,r)=>r.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:pP.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),n=this.changes(r.changes),o=[r.range],i=VP(r.effects);for(let r=1;r<t.ranges.length;r++){let a=e(t.ranges[r]),s=this.changes(a.changes),l=s.map(n);for(let e=0;e<r;e++)o[e]=o[e].map(l);let c=n.mapDesc(s,!0);o.push(a.range.map(c)),n=n.compose(l),i=BP.mapEffects(i,l).concat(BP.mapEffects(VP(a.effects),c))}return{changes:n,selection:pP.create(o,t.mainIndex),effects:i}}changes(e=[]){return e instanceof oP?e:oP.of(e,this.doc.length,this.facet(KP.lineSeparator))}toText(e){return RE.of(e.split(this.facet(KP.lineSeparator)||tP))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(PP(this,t),qP(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let n=e[r];n instanceof AP&&null!=this.config.address[n.id]&&(t[r]=n.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(r)for(let t in r)if(Object.prototype.hasOwnProperty.call(e,t)){let o=r[t],i=e[t];n.push(o.init((e=>o.spec.fromJSON(i,e))))}return KP.create({doc:e.doc,selection:pP.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=EP.resolve(e.extensions||[],new Map),r=e.doc instanceof RE?e.doc:RE.of((e.doc||"").split(t.staticFacet(KP.lineSeparator)||tP)),n=e.selection?e.selection instanceof pP?e.selection:pP.single(e.selection.anchor,e.selection.head):pP.single(0);return hP(n,r.length),t.staticFacet(jP)||(n=n.asSingle()),new KP(t,r,n,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(KP.tabSize)}get lineBreak(){return this.facet(KP.lineSeparator)||"\n"}get readOnly(){return this.facet(NP)}phrase(e,...t){for(let t of this.facet(KP.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,r)=>{if("$"==r)return"$";let n=+(r||1);return!n||n>t.length?e:t[n-1]}))),e}languageDataAt(e,t,r=-1){let n=[];for(let o of this.facet(TP))for(let i of o(this,t,r))Object.prototype.hasOwnProperty.call(i,e)&&n.push(i[e]);return n}charCategorizer(e){return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return XP.Space;if(function(e){if(GP)return GP.test(e);for(let t=0;t<e.length;t++){let r=e[t];if(/\w/.test(r)||r>""&&(r.toUpperCase()!=r.toLowerCase()||HP.test(r)))return!0}return!1}(e))return XP.Word;for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return XP.Word;return XP.Other};var t}wordAt(e){let{text:t,from:r,length:n}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-r,a=e-r;for(;i>0;){let e=YE(t,i,!1);if(o(t.slice(e,i))!=XP.Word)break;i=e}for(;a<n;){let e=YE(t,a);if(o(t.slice(a,e))!=XP.Word)break;a=e}return i==a?null:pP.range(i+r,a+r)}}function JP(e,t,r={}){let n={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=n[e];if(void 0===i)n[e]=o;else if(i===o||void 0===o);else{if(!Object.hasOwnProperty.call(r,e))throw new Error("Config merge conflict for field "+e);n[e]=r[e](i,o)}}for(let e in t)void 0===n[e]&&(n[e]=t[e]);return n}KP.allowMultipleSelections=jP,KP.tabSize=mP.define({combine:e=>e.length?e[0]:4}),KP.lineSeparator=RP,KP.readOnly=NP,KP.phrases=mP.define({compare(e,t){let r=Object.keys(e),n=Object.keys(t);return r.length==n.length&&r.every((r=>e[r]==t[r]))}}),KP.languageData=TP,KP.changeFilter=ZP,KP.transactionFilter=$P,KP.transactionExtender=MP,SP.reconfigure=BP.define();class eq{eq(e){return this==e}range(e,t=e){return tq.create(e,t,this)}}eq.prototype.startSide=eq.prototype.endSide=0,eq.prototype.point=!1,eq.prototype.mapMode=rP.TrackDel;class tq{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new tq(e,t,r)}}function rq(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class nq{constructor(e,t,r,n){this.from=e,this.to=t,this.value=r,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,n=0){let o=r?this.to:this.from;for(let i=n,a=o.length;;){if(i==a)return i;let n=i+a>>1,s=o[n]-e||(r?this.value[n].endSide:this.value[n].startSide)-t;if(n==i)return s>=0?i:a;s>=0?a=n:i=n+1}}between(e,t,r,n){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(r,1e9,!1,o);o<i;o++)if(!1===n(this.from[o]+e,this.to[o]+e,this.value[o]))return!1}map(e,t){let r=[],n=[],o=[],i=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,c,u=this.value[s],d=this.from[s]+e,p=this.to[s]+e;if(d==p){let e=t.mapPos(d,u.startSide,u.mapMode);if(null==e)continue;if(l=c=e,u.startSide!=u.endSide&&(c=t.mapPos(d,u.endSide),c<l))continue}else if(l=t.mapPos(d,u.startSide),c=t.mapPos(p,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(i<0&&(i=l),u.point&&(a=Math.max(a,c-l)),r.push(u),n.push(l-i),o.push(c-i))}return{mapped:r.length?new nq(n,o,r,a):null,pos:i}}}class oq{constructor(e,t,r,n){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=n}static create(e,t,r,n){return new oq(e,t,r,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:n=0,filterTo:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(r&&(t=t.slice().sort(rq)),this.isEmpty)return t.length?oq.of(t):this;let a=new sq(this,null,-1).goto(0),s=0,l=[],c=new iq;for(;a.value||s<t.length;)if(s<t.length&&(a.from-t[s].from||a.startSide-t[s].value.startSide)>=0){let e=t[s++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==t.length||this.chunkEnd(a.chunkIndex)<t[s].from)&&(!i||n>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!i||n>a.to||o<a.from||i(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||l.push(tq.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?oq.empty:this.nextLayer.update({add:l,filter:i,filterFrom:n,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],n=-1;for(let o=0;o<this.chunk.length;o++){let i=this.chunkPos[o],a=this.chunk[o],s=e.touchesRange(i,i+a.length);if(!1===s)n=Math.max(n,a.maxPoint),t.push(a),r.push(e.mapPos(i));else if(!0===s){let{mapped:o,pos:s}=a.map(i,e);o&&(n=Math.max(n,o.maxPoint),t.push(o),r.push(s))}}let o=this.nextLayer.map(e);return 0==t.length?o:new oq(r,t,o||oq.empty,n)}between(e,t,r){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let o=this.chunkPos[n],i=this.chunk[n];if(t>=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,r))return}this.nextLayer.between(e,t,r)}}iter(e=0){return lq.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return lq.from(e).goto(t)}static compare(e,t,r,n,o=-1){let i=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),a=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),s=aq(i,a,r),l=new uq(i,s,o),c=new uq(a,s,o);r.iterGaps(((e,t,r)=>dq(l,e,c,t,r,n))),r.empty&&0==r.length&&dq(l,0,c,0,0,n)}static eq(e,t,r=0,n){null==n&&(n=999999999);let o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(o.length!=i.length)return!1;if(!o.length)return!0;let a=aq(o,i),s=new uq(o,a,0).goto(r),l=new uq(i,a,0).goto(r);for(;;){if(s.to!=l.to||!pq(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>n)return!0;s.next(),l.next()}}static spans(e,t,r,n,o=-1){let i=new uq(e,null,o).goto(t),a=t,s=i.openStart;for(;;){let e=Math.min(i.to,r);if(i.point){let r=i.activeForPoint(i.to),o=i.pointFrom<t?r.length+1:Math.min(r.length,s);n.point(a,e,i.point,r,o,i.pointRank),s=Math.min(i.openEnd(e),r.length)}else e>a&&(n.span(a,e,i.active,s),s=i.openEnd(e));if(i.to>r)return s+(i.point&&i.to>r?1:0);a=i.to,i.next()}}static of(e,t=!1){let r=new iq;for(let n of e instanceof tq?[e]:t?function(e){if(e.length>1)for(let t=e[0],r=1;r<e.length;r++){let n=e[r];if(rq(t,n)>0)return e.slice().sort(rq);t=n}return e}(e):e)r.add(n.from,n.to,n.value);return r.finish()}}oq.empty=new oq([],[],null,-1),oq.empty.nextLayer=oq.empty;class iq{finishChunk(e){this.chunks.push(new nq(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new iq)).add(e,t,r)}addInner(e,t,r){let n=e-this.lastTo||r.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(oq.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=oq.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function aq(e,t,r){let n=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&n.set(t.chunk[e],t.chunkPos[e]);let o=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let i=n.get(e.chunk[t]);null==i||(r?r.mapPos(i):i)!=e.chunkPos[t]||(null==r?void 0:r.touchesRange(i,i+e.chunk[t].length))||o.add(e.chunk[t])}return o}class sq{constructor(e,t,r,n=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class lq{constructor(e){this.heap=e}static from(e,t=null,r=-1){let n=[];for(let o=0;o<e.length;o++)for(let i=e[o];!i.isEmpty;i=i.nextLayer)i.maxPoint>=r&&n.push(new sq(i,t,r,o));return 1==n.length?n[0]:new lq(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)cq(this.heap,e);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)cq(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),cq(this.heap,0)}}}function cq(e,t){for(let r=e[t];;){let n=1+(t<<1);if(n>=e.length)break;let o=e[n];if(n+1<e.length&&o.compare(e[n+1])>=0&&(o=e[n+1],n++),r.compare(o)<0)break;e[n]=r,e[t]=o,t=n}}class uq{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=lq.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){hq(this.active,e),hq(this.activeTo,e),hq(this.activeRank,e),this.minActive=mq(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:n,rank:o}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=o;)t++;fq(this.active,t,r),fq(this.activeTo,t,n),fq(this.activeRank,t,o),e&&fq(e,t,this.cursor.from),this.minActive=mq(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),r&&hq(r,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(r),this.cursor.next()}}}if(r){this.openStart=0;for(let t=r.length-1;t>=0&&r[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function dq(e,t,r,n,o,i){e.goto(t),r.goto(n);let a=n+o,s=n,l=n-t;for(;;){let t=e.to+l-r.to||e.endSide-r.endSide,n=t<0?e.to+l:r.to,o=Math.min(n,a);if(e.point||r.point?e.point&&r.point&&(e.point==r.point||e.point.eq(r.point))&&pq(e.activeForPoint(e.to),r.activeForPoint(r.to))||i.comparePoint(s,o,e.point,r.point):o>s&&!pq(e.active,r.active)&&i.compareRange(s,o,e.active,r.active),n>a)break;s=n,t<=0&&e.next(),t>=0&&r.next()}}function pq(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r]&&!e[r].eq(t[r]))return!1;return!0}function hq(e,t){for(let r=t,n=e.length-1;r<n;r++)e[r]=e[r+1];e.pop()}function fq(e,t,r){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=r}function mq(e,t){let r=-1,n=1e9;for(let o=0;o<t.length;o++)(t[o]-n||e[o].endSide-e[r].endSide)<0&&(r=o,n=t[o]);return r}function gq(e,t,r=e.length){let n=0;for(let o=0;o<r;)9==e.charCodeAt(o)?(n+=t-n%t,o++):(n++,o=YE(e,o));return n}function bq(e,t,r,n){for(let n=0,o=0;;){if(o>=t)return n;if(n==e.length)break;o+=9==e.charCodeAt(n)?r-o%r:1,n=YE(e,n)}return!0===n?-1:e.length}const yq="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),vq="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Oq="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class wq{constructor(e,t){this.rules=[];let{finish:r}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,i,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let r in t){let a=t[r];if(/&/.test(r))o(r.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),a,i);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+r+") should be a primitive value.");o(n(r),a,s,c)}else null!=a&&s.push(r.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+a+";")}(s.length||c)&&i.push((!r||l||a?e:e.map(r)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)o(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Oq[yq]||1;return Oq[yq]=e+1,"ͼ"+e.toString(36)}static mount(e,t,r){let n=e[vq],o=r&&r.nonce;n?o&&n.setNonce(o):n=new xq(e,o),n.mount(Array.isArray(t)?t:[t])}}let Aq=new Map;class xq{constructor(e,t){let r=e.ownerDocument||e,n=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=Aq.get(r);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[vq]=t;this.sheet=new n.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Aq.set(r,this)}else{this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[vq]=this}mount(e){let t=this.sheet,r=0,n=0;for(let o=0;o<e.length;o++){let i=e[o],a=this.modules.indexOf(i);if(a<n&&a>-1&&(this.modules.splice(a,1),n--,a=-1),-1==a){if(this.modules.splice(n++,0,i),t)for(let e=0;e<i.rules.length;e++)t.insertRule(i.rules[e],r++)}else{for(;n<a;)r+=this.modules[n++].rules.length;r+=i.rules.length,n++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var kq={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Cq={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Sq="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),_q="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Eq=0;Eq<10;Eq++)kq[48+Eq]=kq[96+Eq]=String(Eq);for(Eq=1;Eq<=24;Eq++)kq[Eq+111]="F"+Eq;for(Eq=65;Eq<=90;Eq++)kq[Eq]=String.fromCharCode(Eq+32),Cq[Eq]=String.fromCharCode(Eq);for(var Pq in kq)Cq.hasOwnProperty(Pq)||(Cq[Pq]=kq[Pq]);function qq(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Tq(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function jq(e,t){if(!t.anchorNode)return!1;try{return Tq(e,t.anchorNode)}catch(e){return!1}}function Rq(e){return 3==e.nodeType?Uq(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Zq(e,t,r,n){return!!r&&(Mq(e,t,r,n,-1)||Mq(e,t,r,n,1))}function $q(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Mq(e,t,r,n,o){for(;;){if(e==r&&t==n)return!0;if(t==(o<0?0:Nq(e))){if("DIV"==e.nodeName)return!1;let r=e.parentNode;if(!r||1!=r.nodeType)return!1;t=$q(e)+(o<0?0:1),e=r}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?Nq(e):0}}}function Nq(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Dq(e,t){let r=t?e.left:e.right;return{left:r,right:r,top:e.top,bottom:e.bottom}}function Lq(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class Iq{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?Nq(t):0),r,Math.min(e.focusOffset,r?Nq(r):0))}set(e,t,r,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=n}}let Bq,Qq=null;function zq(e){if(e.setActive)return e.setActive();if(Qq)return e.focus(Qq);let t=[];for(let r=e;r&&(t.push(r,r.scrollTop,r.scrollLeft),r!=r.ownerDocument);r=r.parentNode);if(e.focus(null==Qq?{get preventScroll(){return Qq={preventScroll:!0},!0}}:void 0),!Qq){Qq=!1;for(let e=0;e<t.length;){let r=t[e++],n=t[e++],o=t[e++];r.scrollTop!=n&&(r.scrollTop=n),r.scrollLeft!=o&&(r.scrollLeft=o)}}}function Uq(e,t,r=t){let n=Bq||(Bq=document.createRange());return n.setEnd(e,r),n.setStart(e,t),n}function Fq(e,t,r){let n={key:t,code:t,keyCode:r,which:r,cancelable:!0},o=new KeyboardEvent("keydown",n);o.synthetic=!0,e.dispatchEvent(o);let i=new KeyboardEvent("keyup",n);return i.synthetic=!0,e.dispatchEvent(i),o.defaultPrevented||i.defaultPrevented}function Wq(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function Yq(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}class Vq{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new Vq(e.parentNode,$q(e),t)}static after(e,t){return new Vq(e.parentNode,$q(e)+1,t)}}const Xq=[];class Hq{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let r of this.children){if(r==e)return t;t+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let r,n=this.dom,o=null;for(let i of this.children){if(7&i.flags){if(!i.dom&&(r=o?o.nextSibling:n.firstChild)){let e=Hq.get(r);(!e||!e.parent&&e.canReuseDOM(i))&&i.reuseDOM(r)}i.sync(e,t),i.flags&=-8}if(r=o?o.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=i.dom&&(t.written=!0),i.dom.parentNode==n)for(;r&&r!=i.dom;)r=Gq(r);else n.insertBefore(i.dom,r);o=i.dom}for(r=o?o.nextSibling:n.firstChild,r&&t&&t.node==n&&(t.written=!0);r;)r=Gq(r)}else if(1&this.flags)for(let r of this.children)7&r.flags&&(r.sync(e,t),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let r;if(e==this.dom)r=this.dom.childNodes[t];else{let n=0==Nq(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}r=n<0?e:e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Hq.get(r);)r=r.nextSibling;if(!r)return this.length;for(let e=0,t=0;;e++){let n=this.children[e];if(n.dom==r)return t;t+=n.length+n.breakAfter}}domBoundsAround(e,t,r=0){let n=-1,o=-1,i=-1,a=-1;for(let s=0,l=r,c=r;s<this.children.length;s++){let r=this.children[s],u=l+r.length;if(l<e&&u>t)return r.domBoundsAround(e,t,l);if(u>=e&&-1==n&&(n=s,o=l),l>t&&r.dom.parentNode==this.dom){i=s,a=c;break}c=u,l=u+r.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i<this.children.length&&i>=0?this.children[i].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,r=Xq){this.markDirty();for(let n=e;n<t;n++){let e=this.children[n];e.parent==this&&r.indexOf(e)<0&&e.destroy()}this.children.splice(e,t-e,...r);for(let e=0;e<r.length;e++)r[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Kq(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,r,n,o,i){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.destroy();this.parent=null}}function Gq(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}Hq.prototype.breakAfter=0;class Kq{constructor(e,t,r){this.children=e,this.pos=t,this.i=r,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function Jq(e,t,r,n,o,i,a,s,l){let{children:c}=e,u=c.length?c[t]:null,d=i.length?i[i.length-1]:null,p=d?d.breakAfter:a;if(!(t==n&&u&&!a&&!p&&i.length<2&&u.merge(r,o,i.length?d:null,0==r,s,l))){if(n<c.length){let e=c[n];e&&(o<e.length||e.breakAfter&&(null==d?void 0:d.breakAfter))?(t==n&&(e=e.split(o),o=0),!p&&d&&e.merge(0,o,d,!0,0,l)?i[i.length-1]=e:((o||e.children.length&&!e.children[0].length)&&e.merge(0,o,null,!1,0,l),i.push(e))):(null==e?void 0:e.breakAfter)&&(d?d.breakAfter=1:a=1),n++}for(u&&(u.breakAfter=a,r>0&&(!a&&i.length&&u.merge(r,u.length,i[0],!1,s,0)?u.breakAfter=i.shift().breakAfter:(r<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(r,u.length,null,!1,s,0),t++));t<n&&i.length;)if(c[n-1].become(i[i.length-1]))n--,i.pop(),l=i.length?0:s;else{if(!c[t].become(i[0]))break;t++,i.shift(),s=i.length?0:l}!i.length&&t&&n<c.length&&!c[t-1].breakAfter&&c[n].merge(0,0,c[t-1],!1,s,l)&&t--,(t<n||i.length)&&e.replaceChildren(t,n,i)}}function eT(e,t,r,n,o,i){let a=e.childCursor(),{i:s,off:l}=a.findPos(r,1),{i:c,off:u}=a.findPos(t,-1),d=t-r;for(let e of n)d+=e.length;e.length+=d,Jq(e,c,u,s,l,n,0,o,i)}let tT="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},rT="undefined"!=typeof document?document:{documentElement:{style:{}}};const nT=/Edge\/(\d+)/.exec(tT.userAgent),oT=/MSIE \d/.test(tT.userAgent),iT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(tT.userAgent),aT=!!(oT||iT||nT),sT=!aT&&/gecko\/(\d+)/i.test(tT.userAgent),lT=!aT&&/Chrome\/(\d+)/.exec(tT.userAgent),cT="webkitFontSmoothing"in rT.documentElement.style,uT=!aT&&/Apple Computer/.test(tT.vendor),dT=uT&&(/Mobile\/\w+/.test(tT.userAgent)||tT.maxTouchPoints>2);var pT={mac:dT||/Mac/.test(tT.platform),windows:/Win/.test(tT.platform),linux:/Linux|X11/.test(tT.platform),ie:aT,ie_version:oT?rT.documentMode||6:iT?+iT[1]:nT?+nT[1]:0,gecko:sT,gecko_version:sT?+(/Firefox\/(\d+)/.exec(tT.userAgent)||[0,0])[1]:0,chrome:!!lT,chrome_version:lT?+lT[1]:0,ios:dT,android:/Android\b/.test(tT.userAgent),webkit:cT,safari:uT,webkit_version:cT?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=rT.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class hT extends Hq{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,r){return!(8&this.flags||r&&(!(r instanceof hT)||this.length-(t-e)+r.length>256||8&r.flags)||(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),0))}split(e){let t=new hT(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Vq(this.dom,e)}domBoundsAround(e,t,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,r){let n=e.nodeValue.length;t>n&&(t=n);let o=t,i=t,a=0;0==t&&r<0||t==n&&r>=0?pT.chrome||pT.gecko||(t?(o--,a=1):i<n&&(i++,a=-1)):r<0?o--:i<n&&i++;let s=Uq(e,o,i).getClientRects();if(!s.length)return null;let l=s[(a?a<0:r>=0)?0:s.length-1];return pT.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(e=>e.width))||l),a?Dq(l,a<0):l||null}(this.dom,e,t)}}class fT extends Hq{constructor(e,t=[],r=0){super(),this.mark=e,this.children=t,this.length=r;for(let e of t)e.setParent(this)}setAttrs(e){if(Wq(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,r,n,o,i){return!(r&&(!(r instanceof fT&&r.mark.eq(this.mark))||e&&o<=0||t<this.length&&i<=0)||(eT(this,e,t,r?r.children:[],o-1,i-1),this.markDirty(),0))}split(e){let t=[],r=0,n=-1,o=0;for(let i of this.children){let a=r+i.length;a>e&&t.push(r<e?i.split(e-r):i),n<0&&r>=e&&(n=o),r=a,o++}let i=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new fT(this.mark,t,i)}domAtPos(e){return bT(this,e)}coordsAt(e,t){return vT(this,e,t)}}class mT extends Hq{static create(e,t,r){return new mT(e,t,r)}constructor(e,t,r){super(),this.widget=e,this.length=t,this.side=r,this.prevWidget=null}split(e){let t=mT.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,r,n,o,i){return!(r&&(!(r instanceof mT&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(r?r.length:0)+(this.length-t),0))}become(e){return e instanceof mT&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return RE.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,r=t&&t.state.doc,n=this.posAtStart;return r?r.slice(n,n+this.length):RE.empty}domAtPos(e){return(this.length?0==e:this.side>0)?Vq.before(this.dom):Vq.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;let n=this.dom.getClientRects(),o=null;if(!n.length)return null;let i=this.side?this.side<0:e>0;for(let t=i?n.length-1:0;o=n[t],!(e>0?0==t:t==n.length-1||o.top<o.bottom);t+=i?-1:1);return Dq(o,!i)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class gT extends Hq{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof gT&&e.side==this.side}split(){return new gT(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Vq.before(this.dom):Vq.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return RE.empty}get isHidden(){return!0}}function bT(e,t){let r=e.dom,{children:n}=e,o=0;for(let e=0;o<n.length;o++){let i=n[o],a=e+i.length;if(!(a==e&&i.getSide()<=0)){if(t>e&&t<a&&i.dom.parentNode==r)return i.domAtPos(t-e);if(t<=e)break;e=a}}for(let e=o;e>0;e--){let t=n[e-1];if(t.dom.parentNode==r)return t.domAtPos(t.length)}for(let e=o;e<n.length;e++){let t=n[e];if(t.dom.parentNode==r)return t.domAtPos(0)}return new Vq(r,0)}function yT(e,t,r){let n,{children:o}=e;r>0&&t instanceof fT&&o.length&&(n=o[o.length-1])instanceof fT&&n.mark.eq(t.mark)?yT(n,t.children[0],r-1):(o.push(t),t.setParent(e)),e.length+=t.length}function vT(e,t,r){let n=null,o=-1,i=null,a=-1;!function e(t,s){for(let l=0,c=0;l<t.children.length&&c<=s;l++){let u=t.children[l],d=c+u.length;d>=s&&(u.children.length?e(u,s-c):(!i||i.isHidden&&r>0)&&(d>s||c==d&&u.getSide()>0)?(i=u,a=s-c):(c<s||c==d&&u.getSide()<0&&!u.isHidden)&&(n=u,o=s-c)),c=d}}(e,t);let s=(r<0?n:i)||n||i;return s?s.coordsAt(Math.max(0,s==n?o:a),r):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let r=Rq(t);return r[r.length-1]||null}(e)}function OT(e,t){for(let r in e)"class"==r&&t.class?t.class+=" "+e.class:"style"==r&&t.style?t.style+=";"+e.style:t[r]=e[r];return t}hT.prototype.children=mT.prototype.children=gT.prototype.children=Xq;const wT=Object.create(null);function AT(e,t,r){if(e==t)return!0;e||(e=wT),t||(t=wT);let n=Object.keys(e),o=Object.keys(t);if(n.length-(r&&n.indexOf(r)>-1?1:0)!=o.length-(r&&o.indexOf(r)>-1?1:0))return!1;for(let i of n)if(i!=r&&(-1==o.indexOf(i)||e[i]!==t[i]))return!1;return!0}function xT(e,t,r){let n=!1;if(t)for(let o in t)r&&o in r||(n=!0,"style"==o?e.style.cssText="":e.removeAttribute(o));if(r)for(let o in r)t&&t[o]==r[o]||(n=!0,"style"==o?e.style.cssText=r[o]:e.setAttribute(o,r[o]));return n}function kT(e){let t=Object.create(null);for(let r=0;r<e.attributes.length;r++){let n=e.attributes[r];t[n.name]=n.value}return t}class CT extends Hq{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,r,n,o,i){if(r){if(!(r instanceof CT))return!1;this.dom||r.transferDOM(this)}return n&&this.setDeco(r?r.attrs:null),eT(this,e,t,r?r.children:[],o,i),!0}split(e){let t=new CT;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:r,off:n}=this.childPos(e);n&&(t.append(this.children[r].split(n),0),this.children[r].merge(n,this.children[r].length,null,!1,0,0),r++);for(let e=r;e<this.children.length;e++)t.append(this.children[e],0);for(;r>0&&0==this.children[r-1].length;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){AT(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){yT(this,e,t)}addLineDeco(e){let t=e.spec.attributes,r=e.spec.class;t&&(this.attrs=OT(t,this.attrs||{})),r&&(this.attrs=OT({class:r},this.attrs||{}))}domAtPos(e){return bT(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var r;this.dom?4&this.flags&&(Wq(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(xT(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&Hq.get(n)instanceof fT;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(r=Hq.get(n))||void 0===r?void 0:r.isEditable)||pT.ios&&this.children.some((e=>e instanceof hT))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let r of this.children){if(!(r instanceof hT)||/[^ -~]/.test(r.text))return null;let n=Rq(r.dom);if(1!=n.length)return null;t+=n[0].width,e=n[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let r=vT(this,e,t);if(!this.children.length&&r&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=r.bottom-r.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let n=(t-e.textHeight)/2;return{top:r.top+n,bottom:r.bottom-n,left:r.left,right:r.left}}}return r}become(e){return!1}covers(){return!0}static find(e,t){for(let r=0,n=0;r<e.children.length;r++){let o=e.children[r],i=n+o.length;if(i>=t){if(o instanceof CT)return o;if(i>t)break}n=i+o.breakAfter}return null}}class ST extends Hq{constructor(e,t,r){super(),this.widget=e,this.length=t,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,t,r,n,o,i){return!(r&&(!(r instanceof ST&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(r?r.length:0)+(this.length-t),0))}domAtPos(e){return 0==e?Vq.before(this.dom):Vq.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let r=new ST(this.widget,t,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return Xq}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):RE.empty}domBoundsAround(){return null}become(e){return e instanceof ST&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:r}=this.deco;return t!=r&&(e<0?t<0:r>0)}}class _T{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}destroy(e){}}var ET=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(ET||(ET={}));class PT extends eq{constructor(e,t,r,n){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=n}get heightRelevant(){return!1}static mark(e){return new qT(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new jT(e,t,t,r,e.widget||null,!1)}static replace(e){let t,r,n=!!e.block;if(e.isBlockGap)t=-5e8,r=4e8;else{let{start:o,end:i}=RT(e,n);t=(o?n?-3e8:-1:5e8)-1,r=1+(i?n?2e8:1:-6e8)}return new jT(e,t,r,n,e.widget||null,!0)}static line(e){return new TT(e)}static set(e,t=!1){return oq.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}PT.none=oq.empty;class qT extends PT{constructor(e){let{start:t,end:r}=RT(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,r;return this==e||e instanceof qT&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(r=e.attrs)||void 0===r?void 0:r.class))&&AT(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}qT.prototype.point=!1;class TT extends PT{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof TT&&this.spec.class==e.spec.class&&AT(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}TT.prototype.mapMode=rP.TrackBefore,TT.prototype.point=!0;class jT extends PT{constructor(e,t,r,n,o,i){super(t,r,o,e),this.block=n,this.isReplace=i,this.mapMode=n?t<=0?rP.TrackBefore:rP.TrackAfter:rP.TrackDel}get type(){return this.startSide!=this.endSide?ET.WidgetRange:this.startSide<=0?ET.WidgetBefore:ET.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof jT&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function RT(e,t=!1){let{inclusiveStart:r,inclusiveEnd:n}=e;return null==r&&(r=e.inclusive),null==n&&(n=e.inclusive),{start:null!=r?r:t,end:null!=n?n:t}}function ZT(e,t,r,n=0){let o=r.length-1;o>=0&&r[o]+n>=e?r[o]=Math.max(r[o],t):r.push(e,t)}jT.prototype.point=!0;class $T{constructor(e,t,r,n){this.doc=e,this.pos=t,this.end=r,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ST&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new CT),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(MT(new gT(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof ST||this.getLine()}buildText(e,t,r){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:r,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(r){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-r)),this.getLine().append(MT(new hT(this.text.slice(this.textOff,this.textOff+n)),t),r),this.atCursorPos=!0,this.textOff+=n,e-=n,r=0}}span(e,t,r,n){this.buildText(t-e,r,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,r,n,o,i){if(this.disallowBlockEffectsFor[i]&&r instanceof jT){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(r instanceof jT)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ST(r.widget||new NT("div"),a,r));else{let i=mT.create(r.widget||new NT("span"),a,a?0:r.startSide),s=this.atCursorPos&&!i.isEditable&&o<=n.length&&(e<t||r.startSide>0),l=!i.isEditable&&(e<t||o>n.length||r.startSide<=0),c=this.getLine();2!=this.pendingBuffer||s||i.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),s&&(c.append(MT(new gT(1),n),o),o=n.length+Math.max(0,o-n.length)),c.append(MT(i,n),o),this.atCursorPos=l,this.pendingBuffer=l?e<t||o>n.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,r,n,o){let i=new $T(e,t,r,o);return i.openEnd=oq.spans(n,t,r,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function MT(e,t){for(let r of t)e=new fT(r,[e],e.length);return e}class NT extends _T{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const DT=mP.define(),LT=mP.define(),IT=mP.define(),BT=mP.define(),QT=mP.define(),zT=mP.define(),UT=mP.define(),FT=mP.define({combine:e=>e.some((e=>e))}),WT=mP.define({combine:e=>e.some((e=>e))});class YT{constructor(e,t="nearest",r="nearest",n=5,o=5,i=!1){this.range=e,this.y=t,this.x=r,this.yMargin=n,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new YT(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new YT(pP.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const VT=BP.define({map:(e,t)=>e.map(t)});function XT(e,t,r){let n=e.facet(BT);n.length?n[0](t):window.onerror?window.onerror(String(t),r,void 0,void 0,t):r?console.error(r+":",t):console.error(t)}const HT=mP.define({combine:e=>!e.length||e[0]});let GT=0;const KT=mP.define();class JT{constructor(e,t,r,n,o){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=n,this.extension=o(this)}static define(e,t){const{eventHandlers:r,eventObservers:n,provide:o,decorations:i}=t||{};return new JT(GT++,e,r,n,(e=>{let t=[KT.of(e)];return i&&t.push(nj.of((t=>{let r=t.plugin(e);return r?i(r):PT.none}))),o&&t.push(o(e)),t}))}static fromClass(e,t){return JT.define((t=>new e(t)),t)}}class ej{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(XT(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){XT(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){XT(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const tj=mP.define(),rj=mP.define(),nj=mP.define(),oj=mP.define(),ij=mP.define();function aj(e,t,r){let n=e.state.facet(ij);if(!n.length)return n;let o=n.map((t=>t instanceof Function?t(e):t)),i=[];return oq.spans(o,t,r,{point(){},span(e,t,r,n){let o=i;for(let i=r.length-1;i>=0;i--,n--){let a,s=r[i].spec.bidiIsolate;if(null!=s)if(n>0&&o.length&&(a=o[o.length-1]).to==e&&a.direction==s)a.to=t,o=a.inner;else{let r={from:e,to:t,direction:s,inner:[]};o.push(r),o=r.inner}}}}),i}const sj=mP.define();function lj(e){let t=0,r=0,n=0,o=0;for(let i of e.state.facet(sj)){let a=i(e);a&&(null!=a.left&&(t=Math.max(t,a.left)),null!=a.right&&(r=Math.max(r,a.right)),null!=a.top&&(n=Math.max(n,a.top)),null!=a.bottom&&(o=Math.max(o,a.bottom)))}return{left:t,right:r,top:n,bottom:o}}const cj=mP.define();class uj{constructor(e,t,r,n){this.fromA=e,this.toA=t,this.fromB=r,this.toB=n}join(e){return new uj(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>r.toA)){if(n.toA<r.fromA)break;r=r.join(n),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(0==t.length)return e;let r=[];for(let n=0,o=0,i=0,a=0;;n++){let s=n==e.length?null:e[n],l=i-a,c=s?s.fromB:1e9;for(;o<t.length&&t[o]<c;){let e=t[o],n=t[o+1],i=Math.max(a,e),s=Math.min(c,n);if(i<=s&&new uj(i+l,s+l,i,s).addToSet(r),n>c)break;o+=2}if(!s)return r;new uj(s.fromA,s.toA,s.fromB,s.toB).addToSet(r),i=s.toA,a=s.toB}}}class dj{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=oP.empty(this.startState.doc.length);for(let e of r)this.changes=this.changes.compose(e.changes);let n=[];this.changes.iterChangedRanges(((e,t,r,o)=>n.push(new uj(e,t,r,o)))),this.changedRanges=n}static create(e,t,r){return new dj(e,t,r)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var pj=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(pj||(pj={}));const hj=pj.LTR,fj=pj.RTL;function mj(e){let t=[];for(let r=0;r<e.length;r++)t.push(1<<+e[r]);return t}const gj=mj("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),bj=mj("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),yj=Object.create(null),vj=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),r=e.charCodeAt(1);yj[t]=r,yj[r]=-t}const Oj=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class wj{get dir(){return this.level%2?fj:hj}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,r,n){let o=-1;for(let i=0;i<e.length;i++){let a=e[i];if(a.from<=t&&a.to>=t){if(a.level==r)return i;(o<0||(0!=n?n<0?a.from<t:a.to>t:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}function Aj(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],o=t[r];if(n.from!=o.from||n.to!=o.to||n.direction!=o.direction||!Aj(n.inner,o.inner))return!1}return!0}const xj=[];function kj(e,t,r,n,o,i,a){let s=n%2?2:1;if(n%2==o%2)for(let l=t,c=0;l<r;){let t=!0,u=!1;if(c==i.length||l<i[c].from){let e=xj[l];e!=s&&(t=!1,u=16==e)}let d=t||1!=s?null:[],p=t?n:n+1,h=l;e:for(;;)if(c<i.length&&h==i[c].from){if(u)break e;let f=i[c];if(!t)for(let e=f.to,t=c+1;;){if(e==r)break e;if(!(t<i.length&&i[t].from==e)){if(xj[e]==s)break e;break}e=i[t++].to}c++,d?d.push(f):(f.from>l&&a.push(new wj(l,f.from,p)),Cj(e,f.direction==hj!=!(p%2)?n+1:n,o,f.inner,f.from,f.to,a),l=f.to),h=f.to}else{if(h==r||(t?xj[h]!=s:xj[h]==s))break;h++}d?kj(e,l,h,n+1,o,d,a):l<h&&a.push(new wj(l,h,p)),l=h}else for(let l=r,c=i.length;l>t;){let r=!0,u=!1;if(!c||l>i[c-1].to){let e=xj[l-1];e!=s&&(r=!1,u=16==e)}let d=r||1!=s?null:[],p=r?n:n+1,h=l;e:for(;;)if(c&&h==i[c-1].to){if(u)break e;let f=i[--c];if(!r)for(let e=f.from,r=c;;){if(e==t)break e;if(!r||i[r-1].to!=e){if(xj[e-1]==s)break e;break}e=i[--r].from}d?d.push(f):(f.to<l&&a.push(new wj(f.to,l,p)),Cj(e,f.direction==hj!=!(p%2)?n+1:n,o,f.inner,f.from,f.to,a),l=f.from),h=f.from}else{if(h==t||(r?xj[h-1]!=s:xj[h-1]==s))break;h--}d?kj(e,h,l,n+1,o,d,a):h<l&&a.push(new wj(h,l,p)),l=h}}function Cj(e,t,r,n,o,i,a){let s=t%2?2:1;!function(e,t,r,n,o){for(let a=0;a<=n.length;a++){let s=a?n[a-1].to:t,l=a<n.length?n[a].from:r,c=a?256:o;for(let t=s,r=c,n=c;t<l;t++){let o=(i=e.charCodeAt(t))<=247?gj[i]:1424<=i&&i<=1524?2:1536<=i&&i<=1785?bj[i-1536]:1774<=i&&i<=2220?4:8192<=i&&i<=8203?256:64336<=i&&i<=65023?4:8204==i?256:1;512==o?o=r:8==o&&4==n&&(o=16),xj[t]=4==o?2:o,7&o&&(n=o),r=o}for(let e=s,t=c,n=c;e<l;e++){let o=xj[e];if(128==o)e<l-1&&t==xj[e+1]&&24&t?o=xj[e]=t:xj[e]=256;else if(64==o){let o=e+1;for(;o<l&&64==xj[o];)o++;let i=e&&8==t||o<r&&8==xj[o]?1==n?1:8:256;for(let t=e;t<o;t++)xj[t]=i;e=o-1}else 8==o&&1==n&&(xj[e]=1);t=o,7&o&&(n=o)}}var i}(e,o,i,n,s),function(e,t,r,n,o){let i=1==o?2:1;for(let a=0,s=0,l=0;a<=n.length;a++){let c=a?n[a-1].to:t,u=a<n.length?n[a].from:r;for(let t,r,n,a=c;a<u;a++)if(r=yj[t=e.charCodeAt(a)])if(r<0){for(let e=s-3;e>=0;e-=3)if(vj[e+1]==-r){let t=vj[e+2],r=2&t?o:4&t?1&t?i:o:0;r&&(xj[a]=xj[vj[e]]=r),s=e;break}}else{if(189==vj.length)break;vj[s++]=a,vj[s++]=t,vj[s++]=l}else if(2==(n=xj[a])||1==n){let e=n==o;l=e?0:1;for(let t=s-3;t>=0;t-=3){let r=vj[t+2];if(2&r)break;if(e)vj[t+2]|=2;else{if(4&r)break;vj[t+2]|=4}}}}}(e,o,i,n,s),function(e,t,r,n){for(let o=0,i=n;o<=r.length;o++){let a=o?r[o-1].to:e,s=o<r.length?r[o].from:t;for(let l=a;l<s;){let a=xj[l];if(256==a){let a=l+1;for(;;)if(a==s){if(o==r.length)break;a=r[o++].to,s=o<r.length?r[o].from:t}else{if(256!=xj[a])break;a++}let c=1==i,u=c==(1==(a<t?xj[a]:n))?c?1:2:n;for(let t=a,n=o,i=n?r[n-1].to:e;t>l;)t==i&&(t=r[--n].from,i=n?r[n-1].to:e),xj[--t]=u;l=a}else i=a,l++}}}(o,i,n,s),kj(e,o,i,t,r,n,a)}function Sj(e){return[new wj(0,e,0)]}let _j="";function Ej(e,t,r,n,o){var i;let a=n.head-e.from,s=-1;if(0==a){if(!o||!e.length)return null;t[0].level!=r&&(a=t[0].side(!1,r),s=0)}else if(a==e.length){if(o)return null;let e=t[t.length-1];e.level!=r&&(a=e.side(!0,r),s=t.length-1)}s<0&&(s=wj.find(t,a,null!==(i=n.bidiLevel)&&void 0!==i?i:-1,n.assoc));let l=t[s];a==l.side(o,r)&&(l=t[s+=o?1:-1],a=l.side(!o,r));let c=o==(l.dir==r),u=YE(e.text,a,c);if(_j=e.text.slice(Math.min(a,u),Math.max(a,u)),u!=l.side(o,r))return pP.cursor(u+e.from,c?-1:1,l.level);let d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d||l.level==r?d&&d.level<l.level?pP.cursor(d.side(!o,r)+e.from,o?1:-1,d.level):pP.cursor(u+e.from,o?-1:1,l.level):pP.cursor(o?e.to:e.from,o?-1:1,r)}class Pj extends Hq{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new CT],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new uj(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every((({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let n=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?n=this.domChanged.newSel.head:function(e,t){let r=!1;return t&&e.iterChangedRanges(((e,n)=>{e<t.to&&n>t.from&&(r=!0)})),r}(e.changes,this.hasComposition)||e.selectionSet||(n=e.state.selection.main.head));let o=n>-1?function(e,t,r){let n=Tj(e,r);if(!n)return null;let{node:o,from:i,to:a}=n,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(n.from,n.to)!=s)return null;let l=t.invertedDesc,c=new uj(l.mapPos(i),l.mapPos(a),i,a),u=[];for(let t=o.parentNode;;t=t.parentNode){let r=Hq.get(t);if(r instanceof fT)u.push({node:t,deco:r.mark});else{if(r instanceof CT||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:o,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new qT({inclusive:!0,attributes:kT(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:n}=this.hasComposition;r=new uj(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(pT.ie||pT.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,r){let n=new Rj;return oq.compare(e,t,r,n),n.changes}(this.decorations,this.updateDeco(),e.changes);return r=uj.extendWithRanges(r,i),!!(7&this.flags||0!=r.length)&&(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,r);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=pT.chrome||pT.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||n.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((e=>e.flags&=-9));let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof ST&&e.widget instanceof qj&&o.push(e.dom);n.updateGaps(o)}updateChildren(e,t,r){let n=r?r.range.addToSet(e.slice()):e,o=this.childCursor(t);for(let e=n.length-1;;e--){let t=e>=0?n[e]:null;if(!t)break;let i,a,s,l,{fromA:c,toA:u,fromB:d,toB:p}=t;if(r&&r.range.fromB<p&&r.range.toB>d){let e=$T.build(this.view.state.doc,d,r.range.fromB,this.decorations,this.dynamicDecorationMap),t=$T.build(this.view.state.doc,r.range.toB,p,this.decorations,this.dynamicDecorationMap);a=e.breakAtStart,s=e.openStart,l=t.openEnd;let n=this.compositionView(r);t.breakAtStart?n.breakAfter=1:t.content.length&&n.merge(n.length,n.length,t.content[0],!1,t.openStart,0)&&(n.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&n.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),i=e.content.concat(n).concat(t.content)}else({content:i,breakAtStart:a,openStart:s,openEnd:l}=$T.build(this.view.state.doc,d,p,this.decorations,this.dynamicDecorationMap));let{i:h,off:f}=o.findPos(u,1),{i:m,off:g}=o.findPos(c,-1);Jq(this,m,g,h,f,i,a,s,l)}r&&this.fixCompositionDOM(r)}compositionView(e){let t=new hT(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new fT(r,[t],t.length);let r=new CT;return r.append(t,0),r}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let r=Hq.get(e);r&&r!=t&&(r.dom=null),t.setDOM(e)},r=this.childPos(e.range.fromB,1),n=this.children[r.i];t(e.line,n);for(let o=e.marks.length-1;o>=-1;o--)r=n.childPos(r.off,1),n=n.children[r.i],t(o>=0?e.marks[o].node:e.text,n)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let r=this.view.root.activeElement,n=r==this.dom,o=!n&&jq(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(n||t||o))return;let i=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(pT.gecko&&a.empty&&!this.hasComposition&&1==(c=s).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null))),s=l=new Vq(e,0),i=!0}var c;let u=this.view.observer.selectionRange;!i&&u.focusNode&&Zq(s.node,s.offset,u.anchorNode,u.anchorOffset)&&Zq(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore((()=>{pT.android&&pT.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let r=e;r&&r!=t;r=r.assignedSlot||r.parentNode)if(1==r.nodeType&&"false"==r.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=qq(this.view.root);if(e)if(a.empty){if(pT.gecko){let e=(t=s.node,n=s.offset,1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(n<t.childNodes.length&&"false"==t.childNodes[n].contentEditable?2:0));if(e&&3!=e){let t=jj(s.node,s.offset,1==e?1:-1);t&&(s=new Vq(t.node,t.offset))}}e.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=a.bidiLevel)}else if(e.extend){e.collapse(s.node,s.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),t.setEnd(l.node,l.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}var t,n;o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())})),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new Vq(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Vq(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=qq(e.root),{anchorNode:n,anchorOffset:o}=e.observer.selectionRange;if(!(r&&t.empty&&t.assoc&&r.modify))return;let i=CT.find(this,t.head);if(!i)return;let a=i.posAtStart;if(t.head==a||t.head==a+i.length)return;let s=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!s||!l||s.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);r.collapse(c.node,c.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&r.collapse(n,o)}moveToLine(e){let t,r=this.dom;if(e.node!=r)return e;for(let n=e.offset;!t&&n<r.childNodes.length;n++){let e=Hq.get(r.childNodes[n]);e instanceof CT&&(t=e.domAtPos(0))}for(let n=e.offset-1;!t&&n>=0;n--){let e=Hq.get(r.childNodes[n]);e instanceof CT&&(t=e.domAtPos(e.length))}return t?new Vq(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=Hq.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,t)+r.posAtStart}domAtPos(e){let{i:t,off:r}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(r<e.length||e instanceof CT)break;t++,r=0}return this.children[t].domAtPos(r)}coordsAt(e,t){let r=null,n=0;for(let o=this.length,i=this.children.length-1;i>=0;i--){let a=this.children[i],s=o-a.breakAfter,l=s-a.length;if(s<e)break;l<=e&&(l<e||a.covers(-1))&&(s>e||a.covers(1))&&(!r||a instanceof CT&&!(r instanceof CT&&t>=0))&&(r=a,n=l),o=l}return r?r.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:r}=this.childPos(e,1),n=this.children[t];if(!(n instanceof CT))return null;for(;n.children.length;){let{i:e,off:t}=n.childPos(r,1);for(;;e++){if(e==n.children.length)return null;if((n=n.children[e]).length)break}r=t}if(!(n instanceof hT))return null;let o=YE(n.text,r);if(o==r)return null;let i=Uq(n.dom,r,o).getClientRects();for(let e=0;e<i.length;e++){let t=i[e];if(e==i.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:r,to:n}=e,o=this.view.contentDOM.clientWidth,i=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==pj.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>n)break;if(e>=r){let r=c.dom.getBoundingClientRect();if(t.push(r.height),i){let t=c.dom.lastChild,n=t?Rq(t):[];if(n.length){let t=n[n.length-1],i=s?t.right-r.left:r.right-t.left;i>a&&(a=i,this.minWidth=o,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?pj.RTL:pj.LTR}measureTextSize(){for(let e of this.children)if(e instanceof CT){let t=e.measureTextSize();if(t)return t}let e,t,r,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let o=Rq(n.firstChild)[0];e=n.getBoundingClientRect().height,t=o?o.width/27:7,r=o?o.height:e,n.remove()})),{lineHeight:e,charWidth:t,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Kq(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,n=0;;n++){let o=n==t.viewports.length?null:t.viewports[n],i=o?o.from-1:this.length;if(i>r){let n=(t.lineBlockAt(i).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(PT.replace({widget:new qj(n),block:!0,inclusive:!0,isBlockGap:!0}).range(r,i))}if(!o)break;r=o.to+1}return PT.set(e)}updateDeco(){let e=this.view.state.facet(nj).map(((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e));for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}let t,{range:r}=e,n=this.coordsAt(r.head,r.empty?r.assoc:r.head>r.anchor?-1:1);if(!n)return;!r.empty&&(t=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(n={left:Math.min(n.left,t.left),top:Math.min(n.top,t.top),right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)});let o=lj(this.view),i={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,r,n,o,i,a,s){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,p=u==l.body,h=1,f=1;if(p)e=Lq(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();h=t.width/u.offsetWidth,f=t.height/u.offsetHeight,e={left:t.left,right:t.left+u.clientWidth*h,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==o)t.top<e.top?(g=-(e.top-t.top+a),r>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+a)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+a,r<0&&t.top-g<e.top&&(g=-(e.top+g-t.top+a)));else{let n=t.bottom-t.top,i=e.bottom-e.top;g=("center"==o&&n<=i?t.top+n/2-i/2:"start"==o||"center"==o&&r<0?t.top-a:t.bottom-i+a)-e.top}if("nearest"==n?t.left<e.left?(m=-(e.left-t.left+i),r>0&&t.right>e.right+m&&(m=t.right-e.right+m+i)):t.right>e.right&&(m=t.right-e.right+i,r<0&&t.left<e.left+m&&(m=-(e.left+m-t.left+i))):m=("center"==n?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==n==s?t.left-i:t.right-(e.right-e.left)+i)-e.left,m||g)if(p)c.scrollBy(m,g);else{let e=0,r=0;if(g){let e=u.scrollTop;u.scrollTop+=g/f,r=(u.scrollTop-e)*f}if(m){let t=u.scrollLeft;u.scrollLeft+=m/h,e=(u.scrollLeft-t)*h}t={left:t.left-e,top:t.top-r,right:t.right-e,bottom:t.bottom-r},e&&Math.abs(e-m)<1&&(n="nearest"),r&&Math.abs(r-g)<1&&(o="nearest")}if(p)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,i,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==pj.LTR)}}class qj extends _T{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function Tj(e,t){let r=e.observer.selectionRange,n=r.focusNode&&jj(r.focusNode,r.focusOffset,0);if(!n)return null;let o=t-n.offset;return{from:o,to:o+n.node.nodeValue.length,node:n.node}}function jj(e,t,r){if(r<=0)for(let r=e,n=t;;){if(3==r.nodeType)return{node:r,offset:n};if(!(1==r.nodeType&&n>0))break;r=r.childNodes[n-1],n=Nq(r)}if(r>=0)for(let n=e,o=t;;){if(3==n.nodeType)return{node:n,offset:o};if(!(1==n.nodeType&&o<n.childNodes.length&&r>=0))break;n=n.childNodes[o],o=0}return null}let Rj=class{constructor(){this.changes=[]}compareRange(e,t){ZT(e,t,this.changes)}comparePoint(e,t){ZT(e,t,this.changes)}};function Zj(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function $j(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function Mj(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function Nj(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Dj(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Lj(e,t,r){let n,o,i,a,s,l,c,u,d=!1;for(let p=e.firstChild;p;p=p.nextSibling){let e=Rq(p);for(let h=0;h<e.length;h++){let f=e[h];o&&Mj(o,f)&&(f=Nj(Dj(f,o.bottom),o.top));let m=Zj(t,f),g=$j(r,f);if(0==m&&0==g)return 3==p.nodeType?Ij(p,t,r):Lj(p,t,r);if(!n||a>g||a==g&&i>m){n=p,o=f,i=m,a=g;let s=g?r<f.top?-1:1:m?t<f.left?-1:1:0;d=!s||(s>0?h<e.length-1:h>0)}0==m?r>f.bottom&&(!c||c.bottom<f.bottom)?(s=p,c=f):r<f.top&&(!u||u.top>f.top)&&(l=p,u=f):c&&Mj(c,f)?c=Dj(c,f.bottom):u&&Mj(u,f)&&(u=Nj(u,f.top))}}if(c&&c.bottom>=r?(n=s,o=c):u&&u.top<=r&&(n=l,o=u),!n)return{node:e,offset:0};let p=Math.max(o.left,Math.min(o.right,t));return 3==n.nodeType?Ij(n,p,r):d&&"false"!=n.contentEditable?Lj(n,p,r):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,n)+(t>=(o.left+o.right)/2?1:0)}}function Ij(e,t,r){let n=e.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;s<n;s++){let n=Uq(e,s,s+1).getClientRects();for(let l=0;l<n.length;l++){let c=n[l];if(c.top==c.bottom)continue;a||(a=t-c.left);let u=(c.top>r?c.top-r:r-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<i){let r=t>=(c.left+c.right)/2,n=r;if((pT.chrome||pT.gecko)&&Uq(e,s).getBoundingClientRect().left==c.right&&(n=!r),u<=0)return{node:e,offset:s+(n?1:0)};o=s+(n?1:0),i=u}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function Bj(e,t,r,n=-1){var o,i;let a,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,p=d-l;if(p<0)return 0;if(p>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,o=!1;a=e.elementAtHeight(p),a.type!=ET.Text;)for(;p=n>0?a.bottom+t:a.top-t,!(p>=0&&p<=c);){if(o)return r?null:0;o=!0,n=-n}d=l+p;let h=a.from;if(h<e.viewport.from)return 0==e.viewport.from?0:r?null:Qj(e,s,a,u,d);if(h>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:r?null:Qj(e,s,a,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(s.left+1,Math.min(s.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,y=-1;if(g&&0!=(null===(o=e.docView.nearest(g))||void 0===o?void 0:o.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:y}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:y}=t),(!e.contentDOM.contains(b)||pT.safari&&function(e,t,r){let n;if(3!=e.nodeType||t!=(n=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return Uq(e,n-1,n).getBoundingClientRect().left>r}(b,y,u)||pT.chrome&&function(e,t,r){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return r-(1==e.nodeType?e.getBoundingClientRect():Uq(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(b,y,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=CT.find(e.docView,h);if(!t)return p>a.top+a.height/2?a.to:a.from;({node:b,offset:y}=Lj(t.dom,u,d))}let v=e.docView.nearest(b);if(!v)return null;if(v.isWidget&&1==(null===(i=v.dom)||void 0===i?void 0:i.nodeType)){let e=v.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?v.posAtStart:v.posAtEnd}return v.localPosFromDOM(b,y)+v.posAtStart}function Qj(e,t,r,n,o){let i=Math.round((n-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&r.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((o-r.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(r.from,r.to);return r.from+bq(a,i,e.state.tabSize)}function zj(e,t){let r=e.lineBlockAt(t);if(Array.isArray(r.type))for(let e of r.type)if(e.to>t||e.to==t&&(e.to==r.to||e.type==ET.Text))return e;return r}function Uj(e,t,r,n){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let s=t,l=null;;){let t=Ej(o,i,a,s,r),c=_j;if(!t){if(o.number==(r?e.state.doc.lines:1))return s;c="\n",o=e.state.doc.line(o.number+(r?1:-1)),i=e.bidiSpans(o),t=pP.cursor(r?o.from:o.to)}if(l){if(!l(c))return s}else{if(!n)return t;l=n(c)}s=t}}function Fj(e,t,r){for(;;){let n=0;for(let o of e)o.between(t-1,t+1,((e,o,i)=>{if(t>e&&t<o){let i=n||r||(t-e<o-t?-1:1);t=i<0?e:o,n=i}}));if(!n)return t}}function Wj(e,t,r){let n=Fj(e.state.facet(oj).map((t=>t(e))),r.from,t.head>r.from?-1:1);return n==r.from?r:pP.cursor(n,n<r.from?1:-1)}class Yj{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,pT.safari&&e.contentDOM.addEventListener("input",(()=>null)),pT.gecko&&function(e){OR.has(e)||(OR.add(e),e.addEventListener("copy",(()=>{})),e.addEventListener("cut",(()=>{})))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r,n=t.target;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(r=Hq.get(n))&&r.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let e of r.observers)e(this.view,t);for(let e of r.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Xj(e),r=this.handlers,n=this.view.contentDOM;for(let e in t)if("scroll"!=e){let o=!t[e].handlers.length,i=r[e];i&&o!=!i.handlers.length&&(n.removeEventListener(e,this.handleEvent),i=null),i||n.addEventListener(e,this.handleEvent,{passive:o})}for(let e in r)"scroll"==e||t[e]||n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(27!=e.keyCode&&Kj.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),pT.android&&pT.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!pT.ios||e.synthetic||e.altKey||e.metaKey||!((t=Hj.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||Gj.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,Fq(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(pT.safari&&!pT.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Vj(e,t){return(r,n)=>{try{return t.call(e,n,r)}catch(e){XT(r.state,e)}}}function Xj(e){let t=Object.create(null);function r(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let n in e.domEventHandlers){let o=e.domEventHandlers[n];o&&r(n).handlers.push(Vj(t.value,o))}if(e&&e.domEventObservers)for(let n in e.domEventObservers){let o=e.domEventObservers[n];o&&r(n).observers.push(Vj(t.value,o))}}for(let e in tR)r(e).handlers.push(tR[e]);for(let e in rR)r(e).observers.push(rR[e]);return t}const Hj=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Gj="dthko",Kj=[16,17,18,20,91,92,224,225];function Jj(e){return.7*Math.max(0,e)+8}class eR{constructor(e,t,r,n){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let r=e.parentNode;r&&r!=t.body;)if(1==r.nodeType){if(r.scrollHeight>r.clientHeight||r.scrollWidth>r.clientWidth)return r;r=r.assignedSlot||r.parentNode}else{if(11!=r.nodeType)break;r=r.host}return null}(e.contentDOM),this.atoms=e.state.facet(oj).map((t=>t(e)));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(KP.allowMultipleSelections)&&function(e,t){let r=e.state.facet(DT);return r.length?r[0](t):pT.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:r}=e.state.selection;if(r.empty)return!1;let n=qq(e.root);if(!n||0==n.rangeCount)return!0;let o=n.getRangeAt(0).getClientRects();for(let e=0;e<o.length;e++){let r=o[e];if(r.left<=t.clientX&&r.right>=t.clientX&&r.top<=t.clientY&&r.bottom>=t.clientY)return!0}return!1}(e,t)||1!=fR(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,n=0,o=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},i=lj(this.view);e.clientX-i.left<=o.left+6?r=-Jj(o.left-e.clientX):e.clientX+i.right>=o.right-6&&(r=Jj(e.clientX-o.right)),e.clientY-i.top<=o.top+6?n=-Jj(o.top-e.clientY):e.clientY+i.bottom>=o.bottom-6&&(n=Jj(e.clientY-o.bottom)),this.setScrollSpeed(r,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let r=0;r<e.ranges.length;r++){let n=e.ranges[r],o=null;if(n.empty){let e=Fj(this.atoms,n.from,0);e!=n.from&&(o=pP.cursor(e,-1))}else{let e=Fj(this.atoms,n.from,-1),t=Fj(this.atoms,n.to,1);e==n.from&&t==n.to||(o=pP.range(n.from==n.anchor?e:t,n.from==n.head?e:t))}o&&(t||(t=e.ranges.slice()),t[r]=o)}return t?pP.create(t,e.mainIndex):e}select(e){let{view:t}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection)||r.main.assoc!=t.state.selection.main.assoc&&!1===this.dragging)&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const tR=Object.create(null),rR=Object.create(null),nR=pT.ie&&pT.ie_version<15||pT.ios&&pT.webkit_version<604;function oR(e,t){let r,{state:n}=e,o=1,i=n.toText(t),a=i.lines==n.selection.ranges.length;if(null!=gR&&n.selection.ranges.every((e=>e.empty))&&gR==i.toString()){let e=-1;r=n.changeByRange((r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let l=n.toText((a?i.line(o++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:l},range:pP.cursor(r.from+l.length)}}))}else r=a?n.changeByRange((e=>{let t=i.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:pP.cursor(e.from+t.length)}})):n.replaceSelection(i);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}function iR(e,t,r,n){if(1==n)return pP.cursor(t,r);if(2==n)return function(e,t,r=1){let n=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return pP.cursor(t);0==i?r=1:i==o.length&&(r=-1);let a=i,s=i;r<0?a=YE(o.text,i,!1):s=YE(o.text,i);let l=n(o.text.slice(a,s));for(;a>0;){let e=YE(o.text,a,!1);if(n(o.text.slice(e,a))!=l)break;a=e}for(;s<o.length;){let e=YE(o.text,s);if(n(o.text.slice(s,e))!=l)break;s=e}return pP.range(a+o.from,s+o.from)}(e.state,t,r);{let r=CT.find(e.docView,t),n=e.state.doc.lineAt(r?r.posAtEnd:t),o=r?r.posAtStart:n.from,i=r?r.posAtEnd:n.to;return i<e.state.doc.length&&i==n.to&&i++,pP.range(o,i)}}rR.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},tR.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),rR.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},rR.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},tR.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let r=null;for(let n of e.state.facet(IT))if(r=n(e,t),r)break;if(r||0!=t.button||(r=function(e,t){let r=cR(e,t),n=fR(t),o=e.state.selection;return{update(e){e.docChanged&&(r.pos=e.changes.mapPos(r.pos),o=o.map(e.changes))},get(t,i,a){let s,l=cR(e,t),c=iR(e,l.pos,l.bias,n);if(r.pos!=l.pos&&!i){let t=iR(e,r.pos,r.bias,n),o=Math.min(t.from,c.from),i=Math.max(t.to,c.to);c=o<c.from?pP.range(o,i):pP.range(i,o)}return i?o.replaceRange(o.main.extend(c.from,c.to)):a&&1==n&&o.ranges.length>1&&(s=function(e,t){for(let r=0;r<e.ranges.length;r++){let{from:n,to:o}=e.ranges[r];if(n<=t&&o>=t)return pP.create(e.ranges.slice(0,r).concat(e.ranges.slice(r+1)),e.mainIndex==r?0:e.mainIndex-(e.mainIndex>r?1:0))}return null}(o,l.pos))?s:a?o.addRange(c):pP.create([c])}}}(e,t)),r){let n=!e.hasFocus;e.inputState.startMouseSelection(new eR(e,t,r,n)),n&&e.observer.ignore((()=>zq(e.contentDOM)));let o=e.inputState.mouseSelection;if(o)return o.start(t),!1===o.dragging}return!1};let aR=(e,t)=>e>=t.top&&e<=t.bottom,sR=(e,t,r)=>aR(t,r)&&e>=r.left&&e<=r.right;function lR(e,t,r,n){let o=CT.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&sR(r,n,a))return-1;let s=o.coordsAt(i,1);return s&&sR(r,n,s)?1:a&&aR(n,a)?-1:1}function cR(e,t){let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:r,bias:lR(e,r,t.clientX,t.clientY)}}const uR=pT.ie&&pT.ie_version<=11;let dR=null,pR=0,hR=0;function fR(e){if(!uR)return e.detail;let t=dR,r=hR;return dR=e,hR=Date.now(),pR=!t||r>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(pR+1)%3:1}function mR(e,t,r,n){if(!r)return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=n&&i&&function(e,t){let r=e.state.facet(LT);return r.length?r[0](t):pT.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:r},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}tR.dragstart=(e,t)=>{let{selection:{main:r}}=e.state;if(t.target.draggable){let n=e.docView.nearest(t.target);if(n&&n.isWidget){let e=n.posAtStart,t=e+n.length;(e>=r.to||t<=r.from)&&(r=pP.range(e,t))}}let{inputState:n}=e;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=r,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(r.from,r.to)),t.dataTransfer.effectAllowed="copyMove"),!1},tR.dragend=e=>(e.inputState.draggedContent=null,!1),tR.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let r=t.dataTransfer.files;if(r&&r.length){let n=Array(r.length),o=0,i=()=>{++o==r.length&&mR(e,t,n.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e<r.length;e++){let t=new FileReader;t.onerror=i,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),i()},t.readAsText(r[e])}return!0}{let r=t.dataTransfer.getData("Text");if(r)return mR(e,t,r,!0),!0}return!1},tR.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let r=nR?null:t.clipboardData;return r?(oR(e,r.getData("text/plain")||r.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.remove(),oR(e,r.value)}),50)}(e),!1)};let gR=null;tR.copy=tR.cut=(e,t)=>{let{text:r,ranges:n,linewise:o}=function(e){let t=[],r=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),r.push(n));if(!t.length){let o=-1;for(let{from:n}of e.selection.ranges){let i=e.doc.lineAt(n);i.number>o&&(t.push(i.text),r.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}n=!0}return{text:t.join(e.lineBreak),ranges:r,linewise:n}}(e.state);if(!r&&!o)return!1;gR=o?r:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let i=nR?null:t.clipboardData;return i?(i.clearData(),i.setData("text/plain",r),!0):(function(e,t){let r=e.dom.parentNode;if(!r)return;let n=r.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout((()=>{n.remove(),e.focus()}),50)}(e,r),!1)};const bR=DP.define();function yR(e,t){let r=[];for(let n of e.facet(UT)){let o=n(e,t);o&&r.push(o)}return r?e.update({effects:r,annotations:bR.of(!0)}):null}function vR(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let r=yR(e.state,t);r?e.dispatch(r):e.update([])}}),10)}rR.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),vR(e)},rR.blur=e=>{e.observer.clearSelectionRange(),vR(e)},rR.compositionstart=rR.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},rR.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,pT.chrome&&pT.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},rR.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},tR.beforeinput=(e,t)=>{var r;let n;if(pT.chrome&&pT.android&&(n=Hj.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var r;((null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return!1};const OR=new Set,wR=["pre-wrap","normal","pre-line","break-spaces"];class AR{constructor(e){this.lineWrapping=e,this.doc=RE.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return wR.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let n=e[r];n<0?r++:this.heightSamples[Math.floor(10*n)]||(t=!0,this.heightSamples[Math.floor(10*n)]=!0)}return t}refresh(e,t,r,n,o,i){let a=wR.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=r,this.textHeight=n,this.lineLength=o,s){this.heightSamples={};for(let e=0;e<i.length;e++){let t=i[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return s}}class xR{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class kR{constructor(e,t,r,n,o){this.from=e,this.length=t,this.top=r,this.height=n,this._content=o}get type(){return"number"==typeof this._content?ET.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof jT?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new kR(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var CR=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(CR||(CR={}));const SR=.001;class _R{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>SR&&(e.heightChanged=!0),this.height=t)}replace(e,t,r){return _R.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,n){let o=this,i=r.doc;for(let a=n.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:c,toB:u}=n[a],d=o.lineAt(s,CR.ByPosNoHeight,r.setDoc(t),0,0),p=d.to>=l?d:o.lineAt(l,CR.ByPosNoHeight,r,0,0);for(u+=p.to-l,l=p.to;a>0&&d.from<=n[a-1].toA;)s=n[a-1].fromA,c=n[a-1].fromB,a--,s<d.from&&(d=o.lineAt(s,CR.ByPosNoHeight,r,0,0));c+=d.from-s,s=d.from;let h=RR.build(r.setDoc(i),e,c,u);o=o.replace(s,l,h)}return o.updateHeight(r,0)}static empty(){return new PR(0,0)}static of(e){if(1==e.length)return e[0];let t=0,r=e.length,n=0,o=0;for(;;)if(t==r)if(n>2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),r+=1+o.break,n-=o.size}else{if(!(o>2*n))break;{let t=e[r];t.break?e.splice(r,1,t.left,null,t.right):e.splice(r,1,t.left,t.right),r+=2+t.break,o-=t.size}}else if(n<o){let r=e[t++];r&&(n+=r.size)}else{let t=e[--r];t&&(o+=t.size)}let i=0;return null==e[t-1]?(i=1,t--):null==e[t]&&(i=1,r++),new TR(_R.of(e.slice(0,t)),i,_R.of(e.slice(r)))}}_R.prototype.size=1;class ER extends _R{constructor(e,t,r){super(e,t),this.deco=r}blockAt(e,t,r,n){return new kR(n,this.length,r,this.height,this.deco||0)}lineAt(e,t,r,n,o){return this.blockAt(0,r,n,o)}forEachLine(e,t,r,n,o,i){e<=o+this.length&&t>=o&&i(this.blockAt(0,r,n,o))}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class PR extends ER{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,r,n){return new kR(n,this.length,r,this.height,this.breaks)}replace(e,t,r){let n=r[0];return 1==r.length&&(n instanceof PR||n instanceof qR&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof qR?n=new PR(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):_R.of(r)}updateHeight(e,t=0,r=!1,n){return n&&n.from<=t&&n.more?this.setHeight(e,n.heights[n.index++]):(r||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class qR extends _R{constructor(e){super(e,0)}heightMetrics(e,t){let r,n=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-n+1,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);r=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else r=this.height/i;return{firstLine:n,lastLine:o,perLine:r,perChar:a}}blockAt(e,t,r,n){let{firstLine:o,lastLine:i,perLine:a,perChar:s}=this.heightMetrics(t,n);if(t.lineWrapping){let o=n+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),i=t.doc.lineAt(o),l=a+i.length*s,c=Math.max(r,e-l/2);return new kR(i.from,i.length,c,l,0)}{let n=Math.max(0,Math.min(i-o,Math.floor((e-r)/a))),{from:s,length:l}=t.doc.line(o+n);return new kR(s,l,r+a*n,a,0)}}lineAt(e,t,r,n,o){if(t==CR.ByHeight)return this.blockAt(e,r,n,o);if(t==CR.ByPosNoHeight){let{from:t,to:n}=r.doc.lineAt(e);return new kR(t,n-t,0,0,0)}let{firstLine:i,perLine:a,perChar:s}=this.heightMetrics(r,o),l=r.doc.lineAt(e),c=a+l.length*s,u=l.number-i,d=n+a*u+s*(l.from-o-u);return new kR(l.from,l.length,Math.max(n,Math.min(d,n+this.height-c)),c,0)}forEachLine(e,t,r,n,o,i){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(r,o);for(let c=e,u=n;c<=t;){let t=r.doc.lineAt(c);if(c==e){let r=t.number-a;u+=s*r+l*(e-o-r)}let n=s+l*t.length;i(new kR(t.from,t.length,u,n,0)),u+=n,c=t.to+1}}replace(e,t,r){let n=this.length-t;if(n>0){let e=r[r.length-1];e instanceof qR?r[r.length-1]=new qR(e.length+n):r.push(null,new qR(n-1))}if(e>0){let t=r[0];t instanceof qR?r[0]=new qR(e+t.length):r.unshift(new qR(e-1),null)}return _R.of(r)}decomposeLeft(e,t){t.push(new qR(e-1),null)}decomposeRight(e,t){t.push(null,new qR(this.length-e-1))}updateHeight(e,t=0,r=!1,n){let o=t+this.length;if(n&&n.from<=t+this.length&&n.more){let r=[],i=Math.max(t,n.from),a=-1;for(n.from>t&&r.push(new qR(n.from-t-1).updateHeight(e,t));i<=o&&n.more;){let t=e.doc.lineAt(i).length;r.length&&r.push(null);let o=n.heights[n.index++];-1==a?a=o:Math.abs(o-a)>=SR&&(a=-2);let s=new PR(t,o);s.outdated=!1,r.push(s),i+=t+1}i<=o&&r.push(null,new qR(o-i).updateHeight(e,i));let s=_R.of(r);return(a<0||Math.abs(s.height-this.height)>=SR||Math.abs(a-this.heightMetrics(e,t).perLine)>=SR)&&(e.heightChanged=!0),s}return(r||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class TR extends _R{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return 1&this.flags}blockAt(e,t,r,n){let o=r+this.left.height;return e<o?this.left.blockAt(e,t,r,n):this.right.blockAt(e,t,o,n+this.left.length+this.break)}lineAt(e,t,r,n,o){let i=n+this.left.height,a=o+this.left.length+this.break,s=t==CR.ByHeight?e<i:e<a,l=s?this.left.lineAt(e,t,r,n,o):this.right.lineAt(e,t,r,i,a);if(this.break||(s?l.to<a:l.from>a))return l;let c=t==CR.ByPosNoHeight?CR.ByPosNoHeight:CR.ByPos;return s?l.join(this.right.lineAt(a,c,r,i,a)):this.left.lineAt(a,c,r,n,o).join(l)}forEachLine(e,t,r,n,o,i){let a=n+this.left.height,s=o+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,r,n,o,i),t>=s&&this.right.forEachLine(e,t,r,a,s,i);else{let l=this.lineAt(s,CR.ByPos,r,n,o);e<l.from&&this.left.forEachLine(e,l.from-1,r,n,o,i),l.to>=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,r,a,s,i)}}replace(e,t,r){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,r));let o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of r)o.push(e);if(e>0&&jR(o,i-1),t<this.length){let e=o.length;this.decomposeRight(t,o),jR(o,e)}return _R.of(o)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,n=r+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?_R.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,n){let{left:o,right:i}=this,a=t+o.length+this.break,s=null;return n&&n.from<=t+o.length&&n.more?s=o=o.updateHeight(e,t,r,n):o.updateHeight(e,t,r),n&&n.from<=a+i.length&&n.more?s=i=i.updateHeight(e,a,r,n):i.updateHeight(e,a,r),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function jR(e,t){let r,n;null==e[t]&&(r=e[t-1])instanceof qR&&(n=e[t+1])instanceof qR&&e.splice(t-1,3,new qR(r.length+1+n.length))}class RR{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof PR?r.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new PR(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let n=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let i=t-e;r.block?this.addBlock(new ER(i,n,r)):(i||o||n>=5)&&this.addLineDeco(n,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new PR(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let r=new qR(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof PR)return e;let t=new PR(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let n=this.ensureLine();n.length+=r,n.collapsed+=r,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof PR||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new PR(0,-1));let r=e;for(let e of this.nodes)e instanceof PR&&e.updateHeight(this.oracle,r),r+=e?e.length:1;return this.nodes}static build(e,t,r,n){let o=new RR(r,e);return oq.spans(t,r,n,o,0),o.finish(r)}}class ZR{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,n){(e<t||r&&r.heightRelevant||n&&n.heightRelevant)&&ZT(e,t,this.changes,5)}}function $R(e,t){let r=e.getBoundingClientRect(),n=e.ownerDocument,o=n.defaultView||window,i=Math.max(0,r.left),a=Math.min(o.innerWidth,r.right),s=Math.max(0,r.top),l=Math.min(o.innerHeight,r.bottom);for(let t=e.parentNode;t&&t!=n.body;)if(1==t.nodeType){let r=t,n=window.getComputedStyle(r);if((r.scrollHeight>r.clientHeight||r.scrollWidth>r.clientWidth)&&"visible"!=n.overflow){let n=r.getBoundingClientRect();i=Math.max(i,n.left),a=Math.min(a,n.right),s=Math.max(s,n.top),l=t==e.parentNode?n.bottom:Math.min(l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?r.offsetParent:r.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:i-r.left,right:Math.max(i,a)-r.left,top:s-(r.top+t),bottom:Math.max(s,l)-(r.top+t)}}function MR(e,t){let r=e.getBoundingClientRect();return{left:0,right:r.right-r.left,top:t,bottom:r.bottom-(r.top+t)}}class NR{constructor(e,t,r){this.from=e,this.to=t,this.size=r}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],o=t[r];if(n.from!=o.from||n.to!=o.to||n.size!=o.size)return!1}return!0}draw(e,t){return PT.replace({widget:new DR(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class DR extends _T{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class LR{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=UR,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=pj.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(rj).some((e=>"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new AR(t),this.stateDeco=e.facet(nj).filter((e=>"function"!=typeof e)),this.heightMap=_R.empty().applyChanges(this.stateDeco,RE.empty,this.heightOracle.setDoc(e.doc),[new uj(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=PT.set(this.lineGaps.map((e=>e.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let n=r?t.head:t.anchor;if(!e.some((({from:e,to:t})=>n>=e&&n<=t))){let{from:t,to:r}=this.lineBlockAt(n);e.push(new IR(t,r))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?UR:new FR(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:WR(e,this.scaler))}))}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(nj).filter((e=>"function"!=typeof e));let n=e.changedRanges,o=uj.extendWithRanges(n,function(e,t,r){let n=new ZR;return oq.compare(e,t,r,n,0),n.changes}(r,this.stateDeco,e?e.changes:oP.empty(this.state.doc.length))),i=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=i&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(WT)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),n=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection="rtl"==r.direction?pj.RTL:pj.LTR;let i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,c=0;if(a.width&&a.height){let e=a.width/t.offsetWidth,r=a.height/t.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(a.width-t.offsetWidth)<1)&&(e=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(a.height-t.offsetHeight)<1)&&(r=1),this.scaleX==e&&this.scaleY==r||(this.scaleX=e,this.scaleY=r,l|=8,i=s=!0)}let u=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=Yq(e.scrollDOM);let h=(this.printing?MR:$R)(t,this.paddingTop),f=h.top-this.pixelViewport.top,m=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget)return 0;let b=a.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(t)&&(i=!0),i||n.lineWrapping&&Math.abs(b-this.contentDOMWidth)>n.charWidth){let{lineHeight:r,charWidth:a,textHeight:s}=e.docView.measureTextSize();i=r>0&&n.refresh(o,r,a,s,b/a,t),i&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),n.heightChanged=!1;for(let r of this.viewports){let o=r.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(r);this.heightMap=(i?_R.empty().applyChanges(this.stateDeco,RE.empty,this.heightOracle,[new uj(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,i,new xR(r.from,o))}n.heightChanged&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,o=this.heightOracle,{visibleTop:i,visibleBottom:a}=this,s=new IR(n.lineAt(i-1e3*r,CR.ByHeight,o,0,0).from,n.lineAt(a+1e3*(1-r),CR.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let r,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=n.lineAt(e,CR.ByPos,o,0,0);r="center"==t.y?(a.top+a.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<s.from?a.top:a.bottom-i,s=new IR(n.lineAt(r-500,CR.ByHeight,o,0,0).from,n.lineAt(r+i+500,CR.ByHeight,o,0,0).to)}}return s}mapViewport(e,t){let r=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new IR(this.heightMap.lineAt(r,CR.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,CR.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,CR.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(t,CR.ByPos,this.heightOracle,0,0),{visibleTop:i,visibleBottom:a}=this;return(0==e||n<=i-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&n>i-2e3&&o<a+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let n of e)t.touchesRange(n.from,n.to)||r.push(new NR(t.mapPos(n.from),t.mapPos(n.to),n.size));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,n=r?1e4:2e3,o=n>>1,i=n<<1;if(this.defaultTextDirection!=pj.LTR&&!r)return[];let a=[],s=(n,i,l,c)=>{if(i-n<o)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>n&&e<i)return s(n,e-10,l,c),void s(e+10,i,l,c);let p=function(e,t){for(let r of e)if(t(r))return r}(e,(e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)<o&&Math.abs(e.to-i)<o&&!d.some((t=>e.from<t&&e.to>t))));if(!p){if(i<l.to&&t&&r&&t.visibleRanges.some((e=>e.from<=i&&e.to>=i))){let e=t.moveToLineBoundary(pP.cursor(i),!1,!0).head;e>n&&(i=e)}p=new NR(n,i,this.gapSize(l,n,i,c))}a.push(p)};for(let e of this.viewportLines){if(e.length<i)continue;let t=BR(e.from,e.to,this.stateDeco);if(t.total<i)continue;let o,a,l=this.scrollTarget?this.scrollTarget.range.head:null;if(r){let r,i,s=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let n=zR(t,l),o=((this.visibleBottom-this.visibleTop)/2+s)/e.height;r=n-o,i=n+o}else r=(this.visibleTop-e.top-s)/e.height,i=(this.visibleBottom-e.top+s)/e.height;o=QR(t,r),a=QR(t,i)}else{let e,r,i=t.total*this.heightOracle.charWidth,s=n*this.heightOracle.charWidth;if(null!=l){let n=zR(t,l),o=((this.pixelViewport.right-this.pixelViewport.left)/2+s)/i;e=n-o,r=n+o}else e=(this.pixelViewport.left-s)/i,r=(this.pixelViewport.right+s)/i;o=QR(t,e),a=QR(t,r)}o>e.from&&s(e.from,o,e,t),a<e.to&&s(a,e.to,e,t)}return a}gapSize(e,t,r,n){let o=zR(n,r)-zR(n,t);return this.heightOracle.lineWrapping?e.height*o:n.total*this.heightOracle.charWidth*o}updateLineGaps(e){NR.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=PT.set(e.map((e=>e.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];oq.spans(e,this.viewport.from,this.viewport.to,{span(e,r){t.push({from:e,to:r})},point(){}},20);let r=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,r)=>e.from!=t[r].from||e.to!=t[r].to));return this.visibleRanges=t,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||WR(this.heightMap.lineAt(e,CR.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return WR(this.heightMap.lineAt(this.scaler.fromDOM(e),CR.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return WR(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class IR{constructor(e,t){this.from=e,this.to=t}}function BR(e,t,r){let n=[],o=e,i=0;return oq.spans(r,e,t,{span(){},point(e,t){e>o&&(n.push({from:o,to:e}),i+=e-o),o=t}},20),o<t&&(n.push({from:o,to:t}),i+=t-o),{total:i,ranges:n}}function QR({total:e,ranges:t},r){if(r<=0)return t[0].from;if(r>=1)return t[t.length-1].to;let n=Math.floor(e*r);for(let e=0;;e++){let{from:r,to:o}=t[e],i=o-r;if(n<=i)return r+n;n-=i}}function zR(e,t){let r=0;for(let{from:n,to:o}of e.ranges){if(t<=o){r+=t-n;break}r+=o-n}return r/e.total}const UR={toDOM:e=>e,fromDOM:e=>e,scale:1};class FR{constructor(e,t,r){let n=0,o=0,i=0;this.viewports=r.map((({from:r,to:o})=>{let i=t.lineAt(r,CR.ByPos,e,0,0).top,a=t.lineAt(o,CR.ByPos,e,0,0).bottom;return n+=a-i,{from:r,to:o,top:i,bottom:a,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(t.height-n);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let t=0,r=0,n=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return n+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,n=o.domBottom}}fromDOM(e){for(let t=0,r=0,n=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return r+(e-n)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,n=o.domBottom}}}function WR(e,t){if(1==t.scale)return e;let r=t.toDOM(e.top),n=t.toDOM(e.bottom);return new kR(e.from,e.length,r,n-r,Array.isArray(e._content)?e._content.map((e=>WR(e,t))):e._content)}const YR=mP.define({combine:e=>e.join(" ")}),VR=mP.define({combine:e=>e.indexOf(!0)>-1}),XR=wq.newName(),HR=wq.newName(),GR=wq.newName(),KR={"&light":"."+HR,"&dark":"."+GR};function JR(e,t,r){return new wq(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!r||!r[t])throw new RangeError(`Unsupported selector: ${t}`);return r[t]})):e+" "+t})}const eZ=JR("."+XR,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},KR),tZ="";class rZ{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(KP.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=tZ}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let n=e;;){this.findPointBefore(r,n);let e=this.text.length;this.readNode(n);let o=n.nextSibling;if(o==t)break;let i=Hq.get(n),a=Hq.get(o);(i&&a?i.breakAfter:(i?i.breakAfter:oZ(n))||oZ(o)&&("BR"!=n.nodeName||n.cmIgnore)&&this.text.length>e)&&this.lineBreak(),n=o}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let o,i=-1,a=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(o=n.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(r,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);r=i+a}}readNode(e){if(e.cmIgnore)return;let t=Hq.get(e),r=t&&t.overrideDOMText;if(null!=r){this.findPointInside(e,r.length);for(let e=r.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(3==e.nodeType?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(nZ(e,r.node,r.offset)?t:0))}}function nZ(e,t,r){for(;;){if(!t||r<Nq(t))return!1;if(t==e)return!0;r=$q(t)+1,t=t.parentNode}}function oZ(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class iZ{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class aZ{constructor(e,t,r,n){this.typeOver=n,this.bounds=null,this.text="";let{impreciseHead:o,impreciseAnchor:i}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,r,0))){let t=o||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:r,anchorOffset:n,focusNode:o,focusOffset:i}=e.observer.selectionRange;return r&&(t.push(new iZ(r,n)),o==r&&i==n||t.push(new iZ(o,i))),t}(e),r=new rZ(t,e.state);r.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=r.text,this.newSel=function(e,t){if(0==e.length)return null;let r=e[0].pos,n=2==e.length?e[1].pos:r;return r>-1&&n>-1?pP.single(r+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,r=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!Tq(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!Tq(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=pP.single(n,r)}}}function sZ(e,t){let r,{newSel:n}=t,o=e.state.selection.main,i=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:n,to:a}=t.bounds,s=o.from,l=null;(8===i||pT.android&&t.text.length<a-n)&&(s=o.to,l="end");let c=function(e,t,r,n){let o=Math.min(e.length,t.length),i=0;for(;i<o&&e.charCodeAt(i)==t.charCodeAt(i);)i++;if(i==o&&e.length==t.length)return null;let a=e.length,s=t.length;for(;a>0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;return"end"==n&&(r-=a+Math.max(0,i-Math.min(a,s))-i),a<i&&e.length<t.length?(i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i):s<i&&(i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i),{from:i,toA:a,toB:s}}(e.state.doc.sliceString(n,a,tZ),t.text,s-n,l);c&&(pT.chrome&&13==i&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==tZ+tZ&&c.toB--,r={from:n+c.from,to:n+c.toA,insert:RE.of(t.text.slice(c.from,c.toB).split(tZ))})}else n&&(!e.hasFocus&&e.state.facet(HT)||n.main.eq(o))&&(n=null);if(!r&&!n)return!1;if(!r&&t.typeOver&&!o.empty&&n&&n.main.empty?r={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,o.to)}:r&&r.from>=o.from&&r.to<=o.to&&(r.from!=o.from||r.to!=o.to)&&o.to-o.from-(r.to-r.from)<=4?r={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,r.from).append(r.insert).append(e.state.doc.slice(r.to,o.to))}:(pT.mac||pT.android)&&r&&r.from==r.to&&r.from==o.head-1&&/^\. ?$/.test(r.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(n&&2==r.insert.length&&(n=pP.single(n.main.anchor-1,n.main.head-1)),r={from:o.from,to:o.to,insert:RE.of([" "])}):pT.chrome&&r&&r.from==r.to&&r.from==o.head&&"\n "==r.insert.toString()&&e.lineWrapping&&(n&&(n=pP.single(n.main.anchor-1,n.main.head-1)),r={from:o.from,to:o.to,insert:RE.of([" "])}),r){if(pT.ios&&e.inputState.flushIOSKey())return!0;if(pT.android&&(r.from==o.from&&r.to==o.to&&1==r.insert.length&&2==r.insert.lines&&Fq(e.contentDOM,"Enter",13)||(r.from==o.from-1&&r.to==o.to&&0==r.insert.length||8==i&&r.insert.length<r.to-r.from&&r.to>o.head)&&Fq(e.contentDOM,"Backspace",8)||r.from==o.from&&r.to==o.to+1&&0==r.insert.length&&Fq(e.contentDOM,"Delete",46)))return!0;let t,a=r.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>t||(t=function(e,t,r){let n,o=e.state,i=o.selection.main;if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let r=i.from<t.from?o.sliceDoc(i.from,t.from):"",a=i.to>t.to?o.sliceDoc(t.to,i.to):"";n=o.replaceSelection(e.state.toText(r+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=o.changes(t),s=r&&r.main.to<=a.newLength?r.main:void 0;if(o.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=i.to&&t.to>=i.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=r&&Tj(e,r.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(i.head);let d=i.to-t.to,p=i.to-i.from;n=o.changeByRange((r=>{if(r.from==i.from&&r.to==i.to)return{changes:a,range:s||r.map(a)};let n=r.to-d,u=n-c.length;if(r.to-r.from!=p||e.state.sliceDoc(u,n)!=c||r.to>=l.from&&r.from<=l.to)return{range:r};let h=o.changes({from:u,to:n,insert:t.insert}),f=r.to-i.to;return{changes:h,range:s?pP.range(Math.max(0,s.anchor+f),Math.max(0,s.head+f)):r.map(h)}}))}else n={changes:a,selection:s&&o.selection.replaceRange(s)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),o.update(n,{userEvent:a,scrollIntoView:!0})}(e,r,n));return e.state.facet(zT).some((t=>t(e,r.from,r.to,a,s)))||e.dispatch(s()),!0}if(n&&!n.main.eq(o)){let t=!1,r="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),r=e.inputState.lastSelectionOrigin),e.dispatch({selection:n,scrollIntoView:t,userEvent:r}),!0}return!1}const lZ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},cZ=pT.ie&&pT.ie_version<=11;class uZ{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Iq,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(pT.ie&&pT.ie_version<=11||pT.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),cZ&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,r)=>t!=e[r])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,n=this.selectionRange;if(r.state.facet(HT)?r.root.activeElement!=this.dom:!jq(r.dom,n))return;let o=n.anchorNode&&r.docView.nearest(n.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(pT.ie&&pT.ie_version<=11||pT.android&&pT.chrome)&&!r.state.selection.main.empty&&n.focusNode&&Zq(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=pT.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),!t)return null;let n=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);return Zq(s.node,s.offset,i,a)&&([n,o,i,a]=[i,a,n,o]),{anchorNode:n,anchorOffset:o,focusNode:i,focusOffset:a}}(this.view)||qq(e.root);if(!t||this.selectionRange.eq(t))return!1;let r=jq(this.dom,t);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let r=t.focusNode,n=t.focusOffset;if(!r||t.anchorNode!=r||t.anchorOffset!=n)return!1;for(n=Math.min(n,Nq(r));;)if(n){if(1!=r.nodeType)return!1;let e=r.childNodes[n-1];"false"==e.contentEditable?n--:(r=e,n=Nq(r))}else{if(r==e)return!0;n=$q(r),r=r.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(1==r.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else{if(11!=r.nodeType)break;r=r.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,lZ),cZ&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),cZ&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Fq(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(r=this.delayedAndroidKey)||void 0===r?void 0:r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,n=!1;for(let o of e){let e=this.readMutation(o);e&&(e.typeOver&&(n=!0),-1==t?({from:t,to:r}=e):(t=Math.min(e.from,t),r=Math.max(e.to,r)))}return{from:t,to:r,typeOver:n}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),n=this.selectionChanged&&jq(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new aZ(this.view,e,t,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,n=sZ(this.view,t);return this.view.state==r&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let r=dZ(t,e.previousSibling||e.target.previousSibling,-1),n=dZ(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(r=this.resizeScroll)||void 0===r||r.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function dZ(e,t,r){for(;t;){let n=Hq.get(t);if(n&&n.parent==e)return n;let o=t.parentNode;t=o!=e.dom?o:r>0?t.nextSibling:t.previousSibling}return null}class pZ{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach((e=>t(e,this))))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new LR(e.state||KP.create(e)),e.scrollTo&&e.scrollTo.is(VT)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(KT).map((e=>new ej(e)));for(let e of this.plugins)e.update(this);this.observer=new uZ(this),this.inputState=new Yj(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Pj(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof QP?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,r=!1,n=!1,o=this.state;for(let t of e){if(t.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=t.state}if(this.destroyed)return void(this.viewState.state=o);let i=this.hasFocus,a=0,s=null;e.some((e=>e.annotation(bR)))?(this.inputState.notifiedFocused=i,a=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,s=yR(o,i),s||(a=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(KP.phrases)!=this.state.facet(KP.phrases))return this.setState(o);t=dj.create(this,o,e),t.flags|=a;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new YT(e.empty?e:pP.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(VT)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=mZ.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),r=this.docView.update(t),this.state.facet(cj)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(r,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(YR)!=t.state.facet(YR)&&(this.viewState.mustMeasureContent=!0),(r||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(QT))try{e(t)}catch(e){XT(this.state,e,"update listener")}(s||c)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),c&&!sZ(this,c)&&l.force&&Fq(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new LR(e),this.plugins=e.facet(KT).map((e=>new ej(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Pj(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(KT),r=e.state.facet(KT);if(t!=r){let n=[];for(let o of r){let r=t.indexOf(o);if(r<0)n.push(new ej(o));else{let t=this.plugins[r];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,n=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:i}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(Yq(r))o=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(n);o=e.from,i=e.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map((e=>{try{return e.read(this)}catch(e){return XT(this.state,e),fZ}})),c=dj.create(this,this.state,[]),u=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let e=0;e<s.length;e++)if(l[e]!=fZ)try{let t=s[e];t.write&&t.write(l[e],this)}catch(e){XT(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}{let e=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-i;if(e>1||e<-1){n+=e,r.scrollTop=n/this.scaleY,i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(QT))e(t)}get themeClasses(){return XR+" "+(this.state.facet(VR)?GR:HR)+" "+this.state.facet(YR)}updateAttrs(){let e=gZ(this,tj,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(HT)?"true":"false",class:"cm-content",style:`${pT.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),gZ(this,rj,t);let r=this.observer.ignore((()=>{let r=xT(this.contentDOM,this.contentAttrs,t),n=xT(this.dom,this.editorAttrs,e);return r||n}));return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let e of r.effects)e.is(pZ.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(cj);let e=this.state.facet(pZ.cspNonce);wq.mount(this.root,this.styleModules.concat(eZ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((t=>t.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Wj(this,e,Uj(this,e,t,r))}moveByGroup(e,t){return Wj(this,e,Uj(this,e,t,(t=>function(e,t,r){let n=e.state.charCategorizer(t),o=n(r);return e=>{let t=n(e);return o==XP.Space&&(o=t),o==t}}(this,e.head,t))))}moveToLineBoundary(e,t,r=!0){return function(e,t,r,n){let o=zj(e,t.head),i=n&&o.type==ET.Text&&(e.lineWrapping||o.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(o.from),a=e.posAtCoords({x:r==(n==pj.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=a)return pP.cursor(a,r?-1:1)}return pP.cursor(r?o.to:o.from,r?-1:1)}(this,e,t,r)}moveVertically(e,t,r){return Wj(this,e,function(e,t,r,n){let o=t.head,i=r?1:-1;if(o==(r?e.state.doc.length:0))return pP.cursor(o,t.assoc);let a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(o,t.assoc||-1),u=e.documentTop;if(c)null==s&&(s=c.left-l.left),a=i<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-t.from))),a=(i<0?t.top:t.bottom)+u}let d=l.left+s,p=null!=n?n:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let r=a+(p+t)*i,n=Bj(e,{x:d,y:r},!1,i);if(r<l.top||r>l.bottom||(i<0?n<o:n>o)){let t=e.docView.coordsForChar(n),o=!t||r<t.top?-1:1;return pP.cursor(n,o,void 0,s)}}}(this,e,t,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Bj(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let n=this.state.doc.lineAt(e),o=this.bidiSpans(n);return Dq(r,o[wj.find(o,e-n.from,-1,t)].dir==pj.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(FT)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>hZ)return Sj(e.length);let t,r=this.textDirectionAt(e.from);for(let n of this.bidiCache)if(n.from==e.from&&n.dir==r&&(n.fresh||Aj(n.isolates,t=aj(this,e.from,e.to))))return n.order;t||(t=aj(this,e.from,e.to));let n=function(e,t,r){if(!e)return[new wj(0,0,t==fj?1:0)];if(t==hj&&!r.length&&!Oj.test(e))return Sj(e.length);if(r.length)for(;e.length>xj.length;)xj[xj.length]=256;let n=[],o=t==hj?0:1;return Cj(e,o,o,r,0,e.length,n),n}(e.text,r,t);return this.bidiCache.push(new mZ(e.from,e.to,r,t,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pT.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{zq(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return VT.of(new YT("number"==typeof e?pP.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return VT.of(new YT(pP.cursor(r.from),"start","start",r.top-e,t,!0))}static domEventHandlers(e){return JT.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return JT.define((()=>({})),{eventObservers:e})}static theme(e,t){let r=wq.newName(),n=[YR.of(r),cj.of(JR(`.${r}`,e))];return t&&t.dark&&n.push(VR.of(!0)),n}static baseTheme(e){return kP.lowest(cj.of(JR("."+XR,e,KR)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),n=r&&Hq.get(r)||Hq.get(e);return(null===(t=null==n?void 0:n.rootView)||void 0===t?void 0:t.view)||null}}pZ.styleModule=cj,pZ.inputHandler=zT,pZ.focusChangeEffect=UT,pZ.perLineTextDirection=FT,pZ.exceptionSink=BT,pZ.updateListener=QT,pZ.editable=HT,pZ.mouseSelectionStyle=IT,pZ.dragMovesSelection=LT,pZ.clickAddsSelectionRange=DT,pZ.decorations=nj,pZ.atomicRanges=oj,pZ.bidiIsolatedRanges=ij,pZ.scrollMargins=sj,pZ.darkTheme=VR,pZ.cspNonce=mP.define({combine:e=>e.length?e[0]:""}),pZ.contentAttributes=rj,pZ.editorAttributes=tj,pZ.lineWrapping=pZ.contentAttributes.of({class:"cm-lineWrapping"}),pZ.announce=BP.define();const hZ=4096,fZ={};class mZ{constructor(e,t,r,n,o,i){this.from=e,this.to=t,this.dir=r,this.isolates=n,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let r=[],n=e.length?e[e.length-1].dir:pj.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let i=e[o];i.dir!=n||t.touchesRange(i.from,i.to)||r.push(new mZ(t.mapPos(i.from,1),t.mapPos(i.to,-1),i.dir,i.isolates,!1,i.order))}return r}}function gZ(e,t,r){for(let n=e.state.facet(t),o=n.length-1;o>=0;o--){let t=n[o],i="function"==typeof t?t(e):t;i&&OT(i,r)}return r}const bZ=pT.mac?"mac":pT.windows?"win":pT.linux?"linux":"key";function yZ(e,t,r){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==r&&t.shiftKey&&(e="Shift-"+e),e}const vZ=kP.default(pZ.domEventHandlers({keydown:(e,t)=>CZ(AZ(t.state),e,t,"editor")})),OZ=mP.define({enables:vZ}),wZ=new WeakMap;function AZ(e){let t=e.facet(OZ),r=wZ.get(t);return r||wZ.set(t,r=function(e,t=bZ){let r=Object.create(null),n=Object.create(null),o=(e,t)=>{let r=n[e];if(null==r)n[e]=t;else if(r!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,n,i,a,s)=>{var l,c;let u=r[e]||(r[e]=Object.create(null)),d=n.split(/ (?!$)/).map((e=>function(e,t){const r=e.split(/-(?!$)/);let n,o,i,a,s=r[r.length-1];"Space"==s&&(s=" ");for(let e=0;e<r.length-1;++e){const s=r[e];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))o=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==t?a=!0:o=!0}}return n&&(s="Alt-"+s),o&&(s="Ctrl-"+s),a&&(s="Meta-"+s),i&&(s="Shift-"+s),s}(e,t)));for(let t=1;t<d.length;t++){let r=d.slice(0,t).join(" ");o(r,!0),u[r]||(u[r]={preventDefault:!0,stopPropagation:!1,run:[t=>{let n=xZ={view:t,prefix:r,scope:e};return setTimeout((()=>{xZ==n&&(xZ=null)}),kZ),!0}]})}let p=d.join(" ");o(p,!1);let h=u[p]||(u[p]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});i&&h.run.push(i),a&&(h.preventDefault=!0),s&&(h.stopPropagation=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=r[t]||(r[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(n.any)}let o=n[t]||n.key;if(o)for(let t of e)i(t,o,n.run,n.preventDefault,n.stopPropagation),n.shift&&i(t,"Shift-"+o,n.shift,n.preventDefault,n.stopPropagation)}return r}(t.reduce(((e,t)=>e.concat(t)),[]))),r}let xZ=null;const kZ=4e3;function CZ(e,t,r,n){let o=function(e){var t=!(Sq&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||_q&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Cq:kq)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=eP(KE(o,0))==o.length&&" "!=o,a="",s=!1,l=!1,c=!1;xZ&&xZ.view==r&&xZ.scope==n&&(a=xZ.prefix+" ",Kj.indexOf(t.keyCode)<0&&(l=!0,xZ=null));let u,d,p=new Set,h=e=>{if(e){for(let n of e.run)if(!p.has(n)&&(p.add(n),n(r,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[n];return f&&(h(f[a+yZ(o,t,!i)])?s=!0:i&&(t.altKey||t.metaKey||t.ctrlKey)&&!(pT.windows&&t.ctrlKey&&t.altKey)&&(u=kq[t.keyCode])&&u!=o?(h(f[a+yZ(u,t,!0)])||t.shiftKey&&(d=Cq[t.keyCode])!=o&&d!=u&&h(f[a+yZ(d,t,!1)]))&&(s=!0):i&&t.shiftKey&&h(f[a+yZ(o,t,!0)])&&(s=!0),!s&&h(f._any)&&(s=!0)),l&&(s=!0),s&&c&&t.stopPropagation(),s}class SZ{constructor(e,t,r,n,o){this.className=e,this.left=t,this.top=r,this.width=n,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let n=e.coordsAtPos(r.head,r.assoc||1);if(!n)return[];let o=_Z(e);return[new SZ(t,n.left-o.left,n.top-o.top,null,n.bottom-n.top)]}return function(e,t,r){if(r.to<=e.viewport.from||r.from>=e.viewport.to)return[];let n=Math.max(r.from,e.viewport.from),o=Math.min(r.to,e.viewport.to),i=e.textDirection==pj.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=_Z(e),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),p=s.right-(u?parseInt(u.paddingRight):0),h=zj(e,n),f=zj(e,o),m=h.type==ET.Text?h:null,g=f.type==ET.Text?f:null;if(m&&(e.lineWrapping||h.widgetLineBreaks)&&(m=EZ(e,n,m)),g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=EZ(e,o,g)),m&&g&&m.from==g.from)return y(v(r.from,r.to,m));{let t=m?v(r.from,null,m):O(h,!1),n=g?v(null,r.to,g):O(f,!0),o=[];return(m||h).to<(g||f).from-(m&&g?1:0)||h.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<n.top?o.push(b(d,t.bottom,p,n.top)):t.bottom<n.top&&e.elementAtHeight((t.bottom+n.top)/2).type==ET.Text&&(t.bottom=n.top=(t.bottom+n.top)/2),y(t).concat(o).concat(y(n))}function b(e,r,n,o){return new SZ(t,e-l.left,r-l.top-.01,n-e,o-r+.01)}function y({top:e,bottom:t,horizontal:r}){let n=[];for(let o=0;o<r.length;o+=2)n.push(b(r[o],e,r[o+1],t));return n}function v(t,r,n){let o=1e9,a=-1e9,s=[];function l(t,r,l,c,u){let h=e.coordsAtPos(t,t==n.to?-2:2),f=e.coordsAtPos(l,l==n.from?2:-2);h&&f&&(o=Math.min(h.top,f.top,o),a=Math.max(h.bottom,f.bottom,a),u==pj.LTR?s.push(i&&r?d:h.left,i&&c?p:f.right):s.push(!i&&c?d:f.left,!i&&r?p:h.right))}let c=null!=t?t:n.from,u=null!=r?r:n.to;for(let n of e.visibleRanges)if(n.to>c&&n.from<u)for(let o=Math.max(n.from,c),i=Math.min(n.to,u);;){let n=e.state.doc.lineAt(o);for(let a of e.bidiSpans(n)){let e=a.from+n.from,s=a.to+n.from;if(e>=i)break;s>o&&l(Math.max(e,o),null==t&&e<=c,Math.min(s,i),null==r&&s>=u,a.dir)}if(o=n.to+1,o>=i)break}return 0==s.length&&l(c,null==t,u,null==r,e.textDirection),{top:o,bottom:a,horizontal:s}}function O(e,t){let r=s.top+(t?e.top:e.bottom);return{top:r,bottom:r,horizontal:[]}}}(e,t,r)}}function _Z(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==pj.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function EZ(e,t,r){let n=pP.cursor(t);return{from:Math.max(r.from,e.moveToLineBoundary(n,!1,!0).from),to:Math.min(r.to,e.moveToLineBoundary(n,!0,!0).from),type:ET.Text}}class PZ{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(qZ)!=e.state.facet(qZ)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let t=0,r=e.facet(qZ);for(;t<r.length&&r[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;e==this.scaleX&&t==this.scaleY||(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some(((e,t)=>!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,r=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[r].constructor&&n.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const qZ=mP.define();function TZ(e){return[JT.define((t=>new PZ(t,e))),qZ.of(e)]}const jZ=!pT.ios,RZ=mP.define({combine:e=>JP(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function ZZ(e){return e.startState.facet(RZ)!=e.state.facet(RZ)}const $Z=TZ({above:!0,markers(e){let{state:t}=e,r=t.facet(RZ),n=[];for(let o of t.selection.ranges){let i=o==t.selection.main;if(o.empty?!i||jZ:r.drawRangeCursor){let t=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",r=o.empty?o:pP.cursor(o.head,o.head>o.anchor?-1:1);for(let o of SZ.forRange(e,t,r))n.push(o)}}return n},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let r=ZZ(e);return r&&MZ(e.state,t),e.docChanged||e.selectionSet||r},mount(e,t){MZ(t.state,e)},class:"cm-cursorLayer"});function MZ(e,t){t.style.animationDuration=e.facet(RZ).cursorBlinkRate+"ms"}const NZ=TZ({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:SZ.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||ZZ(e),class:"cm-selectionLayer"}),DZ={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};jZ&&(DZ[".cm-line"].caretColor="transparent !important",DZ[".cm-content"]={caretColor:"transparent !important"});const LZ=kP.highest(pZ.theme(DZ)),IZ=BP.define({map:(e,t)=>null==e?null:t.mapPos(e)}),BZ=AP.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(IZ)?t.value:e),e))}),QZ=JT.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let r=e.state.field(BZ);null==r?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(BZ)!=r||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(BZ),r=null!=t&&e.coordsAtPos(t);if(!r)return null;let n=e.scrollDOM.getBoundingClientRect();return{left:r.left-n.left+e.scrollDOM.scrollLeft*e.scaleX,top:r.top-n.top+e.scrollDOM.scrollTop*e.scaleY,height:r.bottom-r.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:r}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/r+"px",this.cursor.style.height=e.height/r+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(BZ)!=e&&this.view.dispatch({effects:IZ.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function zZ(e,t,r,n,o){t.lastIndex=0;for(let i,a=e.iterRange(r,n),s=r;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}class UZ{constructor(e){const{regexp:t,decoration:r,decorate:n,boundary:o,maxLength:i=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,n)this.addMatch=(e,t,r,o)=>n(o,r,r+e[0].length,e,t);else if("function"==typeof r)this.addMatch=(e,t,n,o)=>{let i=r(e,t,n);i&&o(n,n+e[0].length,i)};else{if(!r)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,n,o)=>o(n,n+e[0].length,r)}this.boundary=o,this.maxLength=i}createDeco(e){let t=new iq,r=t.add.bind(t);for(let{from:t,to:n}of function(e,t){let r=e.visibleRanges;if(1==r.length&&r[0].from==e.viewport.from&&r[0].to==e.viewport.to)return r;let n=[];for(let{from:o,to:i}of r)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),n.length&&n[n.length-1].to>=o?n[n.length-1].to=i:n.push({from:o,to:i});return n}(e,this.maxLength))zZ(e.state.doc,this.regexp,t,n,((t,n)=>this.addMatch(n,e,t,r)));return t.finish()}updateDeco(e,t){let r=1e9,n=-1;return e.docChanged&&e.changes.iterChanges(((t,o,i,a)=>{a>e.view.viewport.from&&i<e.view.viewport.to&&(r=Math.min(i,r),n=Math.max(a,n))})),e.viewportChanged||n-r>1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),r,n):t}updateRange(e,t,r,n){for(let o of e.visibleRanges){let i=Math.max(o.from,r),a=Math.min(o.to,n);if(a>i){let r=e.state.doc.lineAt(i),n=r.to<a?e.state.doc.lineAt(a):r,s=Math.max(o.from,r.from),l=Math.min(o.to,n.to);if(this.boundary){for(;i>r.from;i--)if(this.boundary.test(r.text[i-1-r.from])){s=i;break}for(;a<n.to;a++)if(this.boundary.test(n.text[a-n.from])){l=a;break}}let c,u=[],d=(e,t,r)=>u.push(r.range(e,t));if(r==n)for(this.regexp.lastIndex=s-r.from;(c=this.regexp.exec(r.text))&&c.index<l-r.from;)this.addMatch(c,e,c.index+r.from,d);else zZ(e.state.doc,this.regexp,s,l,((t,r)=>this.addMatch(r,e,t,d)));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>e<s||t>l,add:u})}}return t}}const FZ=null!=/x/.unicode?"gu":"g",WZ=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",FZ),YZ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let VZ=null;const XZ=mP.define({combine(e){let t=JP(e,{render:null,specialChars:WZ,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==VZ&&"undefined"!=typeof document&&document.body){let t=document.body.style;VZ=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return VZ||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,FZ)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,FZ)),t}});let HZ=null;class GZ extends _T{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"":String.fromCharCode(9216+e)}(this.code),r=e.state.phrase("Control character")+" "+(YZ[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,r,t);if(n)return n;let o=document.createElement("span");return o.textContent=t,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class KZ extends _T{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const JZ=PT.line({class:"cm-activeLine"}),e$=JT.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,r=[];for(let n of e.state.selection.ranges){let o=e.lineBlockAt(n.head);o.from>t&&(r.push(JZ.range(o.from)),t=o.from)}return PT.set(r)}},{decorations:e=>e.decorations});class t$ extends _T{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Rq(e.firstChild):[];if(!t.length)return null;let r=window.getComputedStyle(e.parentNode),n=Dq(t[0],"rtl"!=r.direction),o=parseInt(r.lineHeight);return n.bottom-n.top>1.5*o?{left:n.left,right:n.right,top:n.top,bottom:n.top+o}:n}ignoreEvent(){return!1}}const r$=2e3;function n$(e,t){let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(r),o=r-n.from,i=o>r$?-1:o==n.length?function(e,t){let r=e.coordsAtPos(e.viewport.from);return r?Math.round(Math.abs((r.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):gq(n.text,e.state.tabSize,r-n.from);return{line:n.number,col:i,off:o}}const o$={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},i$={style:"cursor: crosshair"},a$="-10000px";class s${constructor(e,t,r){this.facet=t,this.createTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e)),this.tooltipViews=this.tooltips.map(r)}update(e,t){var r;let n=e.state.facet(this.facet),o=n.filter((e=>e));if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],a=t?[]:null;for(let r=0;r<o.length;r++){let n=o[r],s=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(s=e)}if(s<0)i[r]=this.createTooltipView(n),a&&(a[r]=!!n.above);else{let n=i[r]=this.tooltipViews[s];a&&(a[r]=t[s]),n.update&&n.update(e)}}}for(let e of this.tooltipViews)i.indexOf(e)<0&&(e.dom.remove(),null===(r=e.destroy)||void 0===r||r.call(e));return t&&(a.forEach(((e,r)=>t[r]=e)),t.length=a.length),this.input=n,this.tooltips=o,this.tooltipViews=i,!0}}function l$(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const c$=mP.define({combine:e=>{var t,r,n;return{position:pT.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(r=e.find((e=>e.parent)))||void 0===r?void 0:r.parent)||null,tooltipSpace:(null===(n=e.find((e=>e.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||l$}}}),u$=new WeakMap,d$=JT.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(c$);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new s$(e,f$,(e=>this.createTooltip(e))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let r=t||e.geometryChanged,n=e.state.facet(c$);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;r=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);r=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);r&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top=a$,t.dom.style.left="0px",this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect(),t=1,r=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(pT.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(1!=this.view.scaleX||1!=this.view.scaleY)n=!0;else if(e.style.top==a$&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position)if(this.parent){let e=this.parent.getBoundingClientRect();e.width&&e.height&&(t=e.width/this.parent.offsetWidth,r=e.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:r}=this.view.viewState);return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let r=this.manager.tooltipViews[t];return r.getCoords?r.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(c$).tooltipSpace(this.view),scaleX:t,scaleY:r,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{editor:r,space:n,scaleX:o,scaleY:i}=e,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],c=this.manager.tooltipViews[s],{dom:u}=c,d=e.pos[s],p=e.size[s];if(!d||d.bottom<=Math.max(r.top,n.top)||d.top>=Math.min(r.bottom,n.bottom)||d.right<Math.max(r.left,n.left)-.1||d.left>Math.min(r.right,n.right)+.1){u.style.top=a$;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,m=p.right-p.left,g=null!==(t=u$.get(c))&&void 0!==t?t:p.bottom-p.top,b=c.offset||h$,y=this.view.textDirection==pj.LTR,v=p.width>n.right-n.left?y?n.left:n.right-p.width:y?Math.min(d.left-(h?14:0)+b.x,n.right-m):Math.max(n.left,d.left-m+(h?14:0)-b.x),O=this.above[s];!l.strictSide&&(O?d.top-(p.bottom-p.top)-b.y<n.top:d.bottom+(p.bottom-p.top)+b.y>n.bottom)&&O==n.bottom-d.bottom>d.top-n.top&&(O=this.above[s]=!O);let w=(O?d.top-n.top:n.bottom-d.bottom)-f;if(w<g&&!1!==c.resize){if(w<this.view.defaultLineHeight){u.style.top=a$;continue}u$.set(c,g),u.style.height=(g=w)/i+"px"}else u.style.height&&(u.style.height="");let A=O?d.top-g-f-b.y:d.bottom+f+b.y,x=v+m;if(!0!==c.overlap)for(let e of a)e.left<x&&e.right>v&&e.top<A+g&&e.bottom>A&&(A=O?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(u.style.top=(A-e.parent.top)/i+"px",u.style.left=(v-e.parent.left)/o+"px"):(u.style.top=A/i+"px",u.style.left=v/o+"px"),h){let e=d.left+(y?b.x:-b.x)-(v+14-7);h.style.left=e/o+"px"}!0!==c.overlap&&a.push({left:v,top:A,right:x,bottom:A+g}),u.classList.toggle("cm-tooltip-above",O),u.classList.toggle("cm-tooltip-below",!O),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=a$}},{eventObservers:{scroll(){this.maybeMeasure()}}}),p$=pZ.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),h$={x:0,y:0},f$=mP.define({enables:[d$,p$]}),m$=mP.define();class g${static create(e){return new g$(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new s$(e,m$,(e=>this.createHostedView(e)))}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let n=r[e];if(void 0!==n)if(void 0===t)t=n;else if(t!==n)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const b$=f$.compute([m$],(e=>{let t=e.facet(m$).filter((e=>e));return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.map((e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos}))),create:g$.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class y${constructor(e,t,r,n,o){this.view=e,this.source=t,this.field=r,this.setHover=n,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,r=e.docView.nearest(t.target);if(!r)return;let n,o=1;if(r instanceof mT)n=r.posAtStart;else{if(n=e.posAtCoords(t),null==n)return;let r=e.coordsAtPos(n);if(!r||t.y<r.top||t.y>r.bottom||t.x<r.left-e.defaultCharacterWidth||t.x>r.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(n)).find((e=>e.from<=n&&e.to>=n)),a=i&&i.dir==pj.RTL?-1:1;o=t.x<r.left?-a:a}let i=this.source(e,n,o);if(null==i?void 0:i.then){let t=this.pending={pos:n};i.then((r=>{this.pending==t&&(this.pending=null,r&&e.dispatch({effects:this.setHover.of(r)}))}),(t=>XT(e.state,t,"hover tooltip")))}else i&&e.dispatch({effects:this.setHover.of(i)})}get tooltip(){let e=this.view.plugin(d$),t=e?e.manager.tooltips.findIndex((e=>e.create==g$.create)):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:n}=this;if(r&&n&&!function(e,t){let r=e.getBoundingClientRect();return t.clientX>=r.left-v$&&t.clientX<=r.right+v$&&t.clientY>=r.top-v$&&t.clientY<=r.bottom+v$}(n.dom,e)||this.pending){let{pos:n}=r||this.pending,o=null!==(t=null==r?void 0:r.end)&&void 0!==t?t:n;(n==o?this.view.posAtCoords(this.lastMove)==n:function(e,t,r,n,o,i){let a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>n||a.right<n||a.top>o||Math.min(a.bottom,s)<o)return!1;let l=e.posAtCoords({x:n,y:o},!1);return l>=t&&l<=r}(this.view,n,o,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of(null)})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const v$=4;function O$(e,t={}){let r=BP.define(),n=AP.define({create:()=>null,update(e,n){if(e&&(t.hideOnChange&&(n.docChanged||n.selection)||t.hideOn&&t.hideOn(n,e)))return null;if(e&&n.docChanged){let t=n.changes.mapPos(e.pos,-1,rP.TrackDel);if(null==t)return null;let r=Object.assign(Object.create(null),e);r.pos=t,null!=e.end&&(r.end=n.changes.mapPos(e.end)),e=r}for(let t of n.effects)t.is(r)&&(e=t.value),t.is(A$)&&(e=null);return e},provide:e=>m$.from(e)});return[n,JT.define((o=>new y$(o,e,n,r,t.hoverTime||300))),b$]}function w$(e,t){let r=e.plugin(d$);if(!r)return null;let n=r.manager.tooltips.indexOf(t);return n<0?null:r.manager.tooltipViews[n]}const A$=BP.define(),x$=mP.define({combine(e){let t,r;for(let n of e)t=t||n.topContainer,r=r||n.bottomContainer;return{topContainer:t,bottomContainer:r}}});function k$(e,t){let r=e.plugin(C$),n=r?r.specs.indexOf(t):-1;return n>-1?r.panels[n]:null}const C$=JT.fromClass(class{constructor(e){this.input=e.state.facet(E$),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(x$);this.top=new S$(e,!0,t.topContainer),this.bottom=new S$(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(x$);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new S$(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new S$(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let r=e.state.facet(E$);if(r!=this.input){let t=r.filter((e=>e)),n=[],o=[],i=[],a=[];for(let r of t){let t,s=this.specs.indexOf(r);s<0?(t=r(e.view),a.push(t)):(t=this.panels[s],t.update&&t.update(e)),n.push(t),(t.top?o:i).push(t)}this.specs=t,this.panels=n,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>pZ.scrollMargins.of((t=>{let r=t.plugin(e);return r&&{top:r.top.scrollMargin(),bottom:r.bottom.scrollMargin()}}))});class S${constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=_$(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=_$(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function _$(e){let t=e.nextSibling;return e.remove(),t}const E$=mP.define({enables:C$});class P$ extends eq{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}P$.prototype.elementClass="",P$.prototype.toDOM=void 0,P$.prototype.mapMode=rP.TrackBefore,P$.prototype.startSide=P$.prototype.endSide=-1,P$.prototype.point=!0;const q$=mP.define(),T$={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>oq.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},j$=mP.define();function R$(e){return[$$(),j$.of(Object.assign(Object.assign({},T$),e))]}const Z$=mP.define({combine:e=>e.some((e=>e))});function $$(e){let t=[M$];return e&&!1===e.fixed&&t.push(Z$.of(!0)),t}const M$=JT.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(j$).map((t=>new I$(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(Z$),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,r=e.view.viewport,n=Math.min(t.to,r.to)-Math.max(t.from,r.from);this.syncGutters(n<.8*(r.to-r.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Z$)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let r=oq.iter(this.view.state.facet(q$),this.view.viewport.from),n=[],o=this.gutters.map((e=>new L$(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(e.type)){let t=!0;for(let i of e.type)if(i.type==ET.Text&&t){D$(r,n,i.from);for(let e of o)e.line(this.view,i,n);t=!1}else if(i.widget)for(let e of o)e.widget(this.view,i)}else if(e.type==ET.Text){D$(r,n,e.from);for(let t of o)t.line(this.view,e,n)}else if(e.widget)for(let t of o)t.widget(this.view,e);for(let e of o)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(j$),r=e.state.facet(j$),n=e.docChanged||e.heightChanged||e.viewportChanged||!oq.eq(e.startState.facet(q$),e.state.facet(q$),e.view.viewport.from,e.view.viewport.to);if(t==r)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let o=[];for(let n of r){let r=t.indexOf(n);r<0?o.push(new I$(this.view,n)):(this.gutters[r].update(e),o.push(this.gutters[r]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)this.dom.appendChild(e.dom);this.gutters=o}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>pZ.scrollMargins.of((t=>{let r=t.plugin(e);return r&&0!=r.gutters.length&&r.fixed?t.textDirection==pj.LTR?{left:r.dom.offsetWidth*t.scaleX}:{right:r.dom.offsetWidth*t.scaleX}:null}))});function N$(e){return Array.isArray(e)?e:[e]}function D$(e,t,r){for(;e.value&&e.from<=r;)e.from==r&&t.push(e.value),e.next()}class L${constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=oq.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:n}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==n.elements.length){let t=new B$(e,i,o,r);n.elements.push(t),n.dom.appendChild(t.dom)}else n.elements[this.i].update(e,i,o,r);this.height=t.bottom,this.i++}line(e,t,r){let n=[];D$(this.cursor,n,t.from),r.length&&(n=n.concat(r));let o=this.gutter.config.lineMarker(e,t,n);o&&n.unshift(o);let i=this.gutter;(0!=n.length||i.config.renderEmptyElements)&&this.addElement(e,t,n)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t);r&&this.addElement(e,t,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class I${constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,(n=>{let o,i=n.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=n.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,a,n)&&n.preventDefault()}));this.markers=N$(t.markers(e)),t.initialSpacer&&(this.spacer=new B$(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=N$(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let r=e.view.viewport;return!oq.eq(this.markers,t,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class B${constructor(e,t,r,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,n)}update(e,t,r,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].compare(t[r]))return!1;return!0}(this.markers,n)||this.setMarkers(e,n)}setMarkers(e,t){let r="cm-gutterElement",n=this.dom.firstChild;for(let o=0,i=0;;){let a=i,s=o<t.length?t[o++]:null,l=!1;if(s){let e=s.elementClass;e&&(r+=" "+e);for(let e=i;e<this.markers.length;e++)if(this.markers[e].compare(s)){a=e,l=!0;break}}else a=this.markers.length;for(;i<a;){let e=this.markers[i++];if(e.toDOM){e.destroy(n);let t=n.nextSibling;n.remove(),n=t}}if(!s)break;s.toDOM&&(l?n=n.nextSibling:this.dom.insertBefore(s.toDOM(e),n)),l&&i++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}const Q$=mP.define(),z$=mP.define({combine:e=>JP(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let e in t){let n=r[e],o=t[e];r[e]=n?(e,t,r)=>n(e,t,r)||o(e,t,r):o}return r}})});class U$ extends P${constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function F$(e,t){return e.state.facet(z$).formatNumber(t,e.state)}const W$=j$.compute([z$],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(Q$),lineMarker:(e,t,r)=>r.some((e=>e.toDOM))?null:new U$(F$(e,e.state.doc.lineAt(t.from).number)),widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(z$)!=e.state.facet(z$),initialSpacer:e=>new U$(F$(e,Y$(e.state.doc.lines))),updateSpacer(e,t){let r=F$(t.view,Y$(t.view.state.doc.lines));return r==e.number?e:new U$(r)},domEventHandlers:e.facet(z$).domEventHandlers})));function Y$(e){let t=9;for(;t<e;)t=10*t+9;return t}const V$=new class extends P${constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},X$=q$.compute(["selection"],(e=>{let t=[],r=-1;for(let n of e.selection.ranges){let o=e.doc.lineAt(n.head).from;o>r&&(r=o,t.push(V$.range(o)))}return oq.of(t)}));var H$;const G$=new KC;function K$(e){return mP.define({combine:e?t=>t.concat(e):void 0})}const J$=new KC;class eM{constructor(e,t,r=[],n=""){this.data=e,this.name=n,KP.prototype.hasOwnProperty("tree")||Object.defineProperty(KP.prototype,"tree",{get(){return nM(this)}}),this.parser=t,this.extension=[pM.of(this),KP.languageData.of(((e,t,r)=>{let n=tM(e,t,r),o=n.type.prop(G$);if(!o)return[];let i=e.facet(o),a=n.type.prop(J$);if(a){let o=n.resolve(t-n.from,r);for(let t of a)if(t.test(o,e)){let r=e.facet(t.facet);return"replace"==t.type?r:r.concat(i)}}return i}))].concat(r)}isActiveAt(e,t,r=-1){return tM(e,t,r).type.prop(G$)==this.data}findRegions(e){let t=e.facet(pM);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],n=(e,t)=>{if(e.prop(G$)==this.data)return void r.push({from:t,to:t+e.length});let o=e.prop(KC.mounted);if(o){if(o.tree.prop(G$)==this.data){if(o.overlay)for(let e of o.overlay)r.push({from:e.from+t,to:e.to+t});else r.push({from:t,to:t+e.length});return}if(o.overlay){let e=r.length;if(n(o.tree,o.overlay[0].from+t),r.length>e)return}}for(let r=0;r<e.children.length;r++){let o=e.children[r];o instanceof aS&&n(o,e.positions[r]+t)}};return n(nM(e),0),r}get allowsNesting(){return!0}}function tM(e,t,r){let n=e.facet(pM),o=nM(e).topNode;if(!n||n.allowsNesting)for(let e=o;e;e=e.enter(t,r,iS.ExcludeBuffers))e.type.isTop&&(o=e);return o}eM.setState=BP.define();class rM extends eM{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=K$(e.languageData);return new rM(t,e.parser.configure({props:[G$.add((e=>e.isTop?t:void 0))]}),e.name)}configure(e,t){return new rM(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function nM(e){let t=e.field(eM.state,!1);return t?t.tree:aS.empty}class oM{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let iM=null;class aM{constructor(e,t,r=[],n,o,i,a,s){this.parser=e,this.state=t,this.fragments=r,this.tree=n,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new aM(e,t,[],aS.empty,0,r,[],null)}startParse(){return this.parser.startParse(new oM(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=aS.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var r;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(CS.addTree(n,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(r=this.parse.stoppedAt)&&void 0!==r?r:this.state.doc.length,this.tree=n,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}}))}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(CS.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=iM;iM=this;try{return e()}finally{iM=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=sM(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:n,treeLen:o,viewport:i,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,r,n,o)=>t.push({fromA:e,toA:r,fromB:n,toB:o}))),r=CS.applyChanges(r,t),n=aS.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){a=[];for(let t of this.skipped){let r=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);r<n&&a.push({from:r,to:n})}}}return new aM(this.parser,t,r,n,o,i,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:r,to:n}=this.skipped[t];r<e.to&&n>e.from&&(this.fragments=sM(this.fragments,r,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends SS{createParse(t,r,n){let o=n[0].from,i=n[n.length-1].to;return{parsedPos:o,advance(){let t=iM;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new aS(tS.none,[],[],i-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return iM}}function sM(e,t,r){return CS.applyChanges(e,[{fromA:t,toA:r,fromB:t,toB:r}])}class lM{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new lM(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=aM.create(e.facet(pM).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new lM(r)}}eM.state=AP.define({create:lM.init,update(e,t){for(let e of t.effects)if(e.is(eM.setState))return e.value;return t.startState.facet(pM)!=t.state.facet(pM)?lM.init(t.state):e.apply(t)}});let cM=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(cM=e=>{let t=-1,r=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(r):cancelIdleCallback(t)});const uM="undefined"!=typeof navigator&&(null===(H$=navigator.scheduling)||void 0===H$?void 0:H$.isInputPending)?()=>navigator.scheduling.isInputPending():null,dM=JT.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(eM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(eM.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=cM(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:n}}=this.view,o=r.field(eM.state);if(o.tree==o.context.tree&&o.context.isDone(n+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!uM?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<n&&r.doc.length>n+1e3,s=o.context.work((()=>uM&&uM()||Date.now()>i),n+(a?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:eM.setState.of(new lM(o.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>XT(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),pM=mP.define({combine:e=>e.length?e[0]:null,enables:e=>[eM.state,dM,pZ.contentAttributes.compute([e],(t=>{let r=t.facet(e);return r&&r.name?{"data-language":r.name}:{}}))]});class hM{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class fM{constructor(e,t,r,n,o,i=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=n,this.loadFunc=o,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((e=>this.support=e),(e=>{throw this.loading=null,e})))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new fM(e.name,(e.alias||[]).concat(e.name).map((e=>e.toLowerCase())),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let r of e)if(r.filename&&r.filename.test(t))return r;let r=/\.([^.]+)$/.exec(t);if(r)for(let t of e)if(t.extensions.indexOf(r[1])>-1)return t;return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let r of e)if(r.alias.some((e=>e==t)))return r;if(r)for(let r of e)for(let e of r.alias){let n=t.indexOf(e);if(n>-1&&(e.length>2||!/\w/.test(t[n-1])&&!/\w/.test(t[n+e.length])))return r}return null}}const mM=mP.define(),gM=mP.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function bM(e){let t=e.facet(gM);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function yM(e,t){let r="",n=e.tabSize,o=e.facet(gM)[0];if("\t"==o){for(;t>=n;)r+="\t",t-=n;o=" "}for(let e=0;e<t;e++)r+=o;return r}function vM(e,t){e instanceof KP&&(e=new OM(e));for(let r of e.state.facet(mM)){let n=r(e,t);if(void 0!==n)return n}let r=nM(e.state);return r.length>=t?function(e,t,r){let n=t.resolveStack(r),o=n.node.enterUnfinishedNodesBefore(r);if(o!=n.node){let e=[];for(let t=o;t!=n.node;t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)n={node:e[t],next:n}}return AM(n,e,r)}(e,r,t):null}class OM{constructor(e,t={}){this.state=e,this.options=t,this.unit=bM(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:o}=this.options;return null!=n&&n>=r.from&&n<=r.to?o&&n==e?{text:"",from:e}:(t<0?n<e:n<=e)?{text:r.text.slice(n-r.from),from:n}:{text:r.text.slice(0,n-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:n}=this.lineAt(e,t);return r.slice(e-n,Math.min(r.length,e+100-n))}column(e,t=1){let{text:r,from:n}=this.lineAt(e,t),o=this.countColumn(r,e-n),i=this.options.overrideIndentation?this.options.overrideIndentation(n):-1;return i>-1&&(o+=i-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,t=e.length){return gq(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:n}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let e=o(n);if(e>-1)return e}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const wM=new KC;function AM(e,t,r){for(let n=e;n;n=n.next){let e=xM(n.node);if(e)return e(CM.create(t,r,n))}return 0}function xM(e){let t=e.type.prop(wM);if(t)return t;let r,n=e.firstChild;if(n&&(r=n.type.prop(KC.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>EM(e,!0,1,void 0,n&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?kM:null}function kM(){return 0}class CM extends OM{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new CM(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(SM(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return AM(this.context.next,this.base,this.pos)}}function SM(e,t){for(let r=t;r;r=r.parent)if(e==r)return!0;return!1}function _M({closing:e,align:t=!0,units:r=1}){return n=>EM(n,t,r,e)}function EM(e,t,r,n,o){let i=e.textAfter,a=i.match(/^\s*/)[0].length,s=n&&i.slice(a,a+n.length)==n||o==e.pos+a,l=t?function(e){let t=e.node,r=t.childAfter(t.from),n=t.lastChild;if(!r)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(r.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=r.to;;){let o=t.childAfter(e);if(!o||o==n)return null;if(!o.type.isSkipped)return o.from<a?r:null;e=o.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*r)}function PM({except:e,units:t=1}={}){return r=>{let n=e&&e.test(r.textAfter);return r.baseIndent+(n?0:t*r.unit)}}const qM=mP.define(),TM=new KC;function jM(e){let t=e.firstChild,r=e.lastChild;return t&&t.to<r.from?{from:t.to,to:r.type.isError?e.to:r.from}:null}function RM(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function ZM(e,t,r){for(let n of e.facet(qM)){let o=n(e,t,r);if(o)return o}return function(e,t,r){let n=nM(e);if(n.length<r)return null;let o=null;for(let i=n.resolveStack(r,1);i;i=i.next){let a=i.node;if(a.to<=r||a.from>r)continue;if(o&&a.from<t)break;let s=a.type.prop(TM);if(s&&(a.to<n.length-50||n.length==e.doc.length||!RM(a))){let n=s(a,e);n&&n.from<=r&&n.from>=t&&n.to>r&&(o=n)}}return o}(e,t,r)}function $M(e,t){let r=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return r>=n?void 0:{from:r,to:n}}const MM=BP.define({map:$M}),NM=BP.define({map:$M});function DM(e){let t=[];for(let{head:r}of e.state.selection.ranges)t.some((e=>e.from<=r&&e.to>=r))||t.push(e.lineBlockAt(r));return t}const LM=AP.define({create:()=>PT.none,update(e,t){e=e.map(t.changes);for(let r of t.effects)if(r.is(MM)&&!BM(e,r.value.from,r.value.to)){let{preparePlaceholder:n}=t.state.facet(WM),o=n?PT.replace({widget:new HM(n(t.state,r.value))}):XM;e=e.update({add:[o.range(r.value.from,r.value.to)]})}else r.is(NM)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(t.selection){let r=!1,{head:n}=t.selection.main;e.between(n,n,((e,t)=>{e<n&&t>n&&(r=!0)})),r&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>pZ.decorations.from(e),toJSON(e,t){let r=[];return e.between(0,t.doc.length,((e,t)=>{r.push(e,t)})),r},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let r=0;r<e.length;){let n=e[r++],o=e[r++];if("number"!=typeof n||"number"!=typeof o)throw new RangeError("Invalid JSON for fold state");t.push(XM.range(n,o))}return PT.set(t,!0)}});function IM(e,t,r){var n;let o=null;return null===(n=e.field(LM,!1))||void 0===n||n.between(t,r,((e,t)=>{(!o||o.from>e)&&(o={from:e,to:t})})),o}function BM(e,t,r){let n=!1;return e.between(t,t,((e,o)=>{e==t&&o==r&&(n=!0)})),n}function QM(e,t){return e.field(LM,!1)?t:t.concat(BP.appendConfig.of(YM()))}function zM(e,t,r=!0){let n=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return pZ.announce.of(`${e.state.phrase(r?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${o}.`)}const UM=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of DM(e)){let r=ZM(e.state,t.from,t.to);if(r)return e.dispatch({effects:QM(e.state,[MM.of(r),zM(e,r)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(LM,!1))return!1;let t=[];for(let r of DM(e)){let n=IM(e.state,r.from,r.to);n&&t.push(NM.of(n),zM(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,r=[];for(let n=0;n<t.doc.length;){let o=e.lineBlockAt(n),i=ZM(t,o.from,o.to);i&&r.push(MM.of(i)),n=(i?e.lineBlockAt(i.to):o).to+1}return r.length&&e.dispatch({effects:QM(e.state,r)}),!!r.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(LM,!1);if(!t||!t.size)return!1;let r=[];return t.between(0,e.state.doc.length,((e,t)=>{r.push(NM.of({from:e,to:t}))})),e.dispatch({effects:r}),!0}}],FM={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},WM=mP.define({combine:e=>JP(e,FM)});function YM(e){let t=[LM,JM];return e&&t.push(WM.of(e)),t}function VM(e,t){let{state:r}=e,n=r.facet(WM),o=t=>{let r=e.lineBlockAt(e.posAtDOM(t.target)),n=IM(e.state,r.from,r.to);n&&e.dispatch({effects:NM.of(n)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,o,t);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",r.phrase("folded code")),i.title=r.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const XM=PT.replace({widget:new class extends _T{toDOM(e){return VM(e,null)}}});class HM extends _T{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return VM(e,this.value)}}const GM={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class KM extends P${constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}const JM=pZ.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class eN{constructor(e,t){let r;function n(e){let t=wq.newName();return(r||(r=Object.create(null)))["."+t]=e,t}this.specs=e;const o="string"==typeof t.all?t.all:t.all?n(t.all):void 0,i=t.scope;this.scope=i instanceof eM?e=>e.prop(G$)==i.data:i?e=>e==i:void 0,this.style=A_(e.map((e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))}))),{all:o}).style,this.module=r?new wq(r):null,this.themeType=t.themeType}static define(e,t){return new eN(e,t||{})}}const tN=mP.define(),rN=mP.define({combine:e=>e.length?[e[0]]:null});function nN(e){let t=e.facet(tN);return t.length?t:e.facet(rN)}function oN(e,t){let r,n=[aN];return e instanceof eN&&(e.module&&n.push(pZ.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(rN.of(e)):r?n.push(tN.computeN([pZ.darkTheme],(t=>t.facet(pZ.darkTheme)==("dark"==r)?[e]:[]))):n.push(tN.of(e)),n}class iN{constructor(e){this.markCache=Object.create(null),this.tree=nM(e.state),this.decorations=this.buildDeco(e,nN(e.state))}update(e){let t=nM(e.state),r=nN(e.state),n=r!=nN(e.startState);t.length<e.view.viewport.to&&!n&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r))}buildDeco(e,t){if(!t||!this.tree.length)return PT.none;let r=new iq;for(let{from:n,to:o}of e.visibleRanges)x_(this.tree,t,((e,t,n)=>{r.add(e,t,this.markCache[n]||(this.markCache[n]=PT.mark({class:n})))}),n,o);return r.finish()}}const aN=kP.high(JT.fromClass(iN,{decorations:e=>e.decorations})),sN=eN.define([{tag:I_.meta,color:"#404740"},{tag:I_.link,textDecoration:"underline"},{tag:I_.heading,textDecoration:"underline",fontWeight:"bold"},{tag:I_.emphasis,fontStyle:"italic"},{tag:I_.strong,fontWeight:"bold"},{tag:I_.strikethrough,textDecoration:"line-through"},{tag:I_.keyword,color:"#708"},{tag:[I_.atom,I_.bool,I_.url,I_.contentSeparator,I_.labelName],color:"#219"},{tag:[I_.literal,I_.inserted],color:"#164"},{tag:[I_.string,I_.deleted],color:"#a11"},{tag:[I_.regexp,I_.escape,I_.special(I_.string)],color:"#e40"},{tag:I_.definition(I_.variableName),color:"#00f"},{tag:I_.local(I_.variableName),color:"#30a"},{tag:[I_.typeName,I_.namespace],color:"#085"},{tag:I_.className,color:"#167"},{tag:[I_.special(I_.variableName),I_.macroName],color:"#256"},{tag:I_.definition(I_.propertyName),color:"#00c"},{tag:I_.comment,color:"#940"},{tag:I_.invalid,color:"#f00"}]),lN=pZ.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),cN=1e4,uN="()[]{}",dN=mP.define({combine:e=>JP(e,{afterCursor:!0,brackets:uN,maxScanDistance:cN,renderMatch:fN})}),pN=PT.mark({class:"cm-matchingBracket"}),hN=PT.mark({class:"cm-nonmatchingBracket"});function fN(e){let t=[],r=e.matched?pN:hN;return t.push(r.range(e.start.from,e.start.to)),e.end&&t.push(r.range(e.end.from,e.end.to)),t}const mN=AP.define({create:()=>PT.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let r=[],n=t.state.facet(dN);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=ON(t.state,e.head,-1,n)||e.head>0&&ON(t.state,e.head-1,1,n)||n.afterCursor&&(ON(t.state,e.head,1,n)||e.head<t.state.doc.length&&ON(t.state,e.head+1,-1,n));o&&(r=r.concat(n.renderMatch(o,t.state)))}return PT.set(r,!0)},provide:e=>pZ.decorations.from(e)}),gN=[mN,lN],bN=new KC;function yN(e,t,r){let n=e.prop(t<0?KC.openedBy:KC.closedBy);if(n)return n;if(1==e.name.length){let n=r.indexOf(e.name);if(n>-1&&n%2==(t<0?1:0))return[r[n+t]]}return null}function vN(e){let t=e.type.prop(bN);return t?t(e.node):e}function ON(e,t,r,n={}){let o=n.maxScanDistance||cN,i=n.brackets||uN,a=nM(e),s=a.resolveInner(t,r);for(let e=s;e;e=e.parent){let n=yN(e.type,r,i);if(n&&e.from<e.to){let o=vN(e);if(o&&(r>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return wN(0,0,r,e,o,n,i)}}return function(e,t,r,n,o,i,a){let s=r<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=r>0)return null;let c={from:r<0?t-1:t,to:r>0?t+1:t},u=e.doc.iterRange(t,r>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=i;){let i=u.value;r<0&&(e+=i.length);let s=t+e*r;for(let e=r>0?0:i.length-1,t=r>0?i.length:-1;e!=t;e+=r){let t=a.indexOf(i[e]);if(!(t<0||n.resolveInner(s+e,1).type!=o))if(t%2==0==r>0)d++;else{if(1==d)return{start:c,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};d--}}r>0&&(e+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,r,a,s.type,o,i)}function wN(e,t,r,n,o,i,a){let s=n.parent,l={from:o.from,to:o.to},c=0,u=null==s?void 0:s.cursor();if(u&&(r<0?u.childBefore(n.from):u.childAfter(n.to)))do{if(r<0?u.to<=n.from:u.from>=n.to){if(0==c&&i.indexOf(u.type.name)>-1&&u.from<u.to){let e=vN(u);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(yN(u.type,r,a))c++;else if(yN(u.type,-r,a)){if(0==c){let e=vN(u);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(r<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const AN=Object.create(null),xN=[tS.none],kN=[],CN=Object.create(null),SN=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])SN[e]=EN(AN,t);function _N(e,t){kN.indexOf(e)>-1||(kN.push(e),console.warn(t))}function EN(e,t){let r=[];for(let n of t.split(" ")){let t=[];for(let r of n.split(".")){let n=e[r]||I_[r];n?"function"==typeof n?t.length?t=t.map(n):_N(r,`Modifier ${r} used at start of tag`):t.length?_N(r,`Tag ${r} used as modifier`):t=Array.isArray(n)?n:[n]:_N(r,`Unknown highlighting tag ${r}`)}for(let e of t)r.push(e)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),o=n+" "+r.map((e=>e.id)),i=CN[o];if(i)return i.id;let a=CN[o]=tS.define({id:xN.length,name:n,props:[v_({[n]:r})]});return xN.push(a),a.id}let PN=null;function qN(){if(!PN&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],r=new Set;for(let n in e)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof e[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))),r.has(n)||(t.push(n),r.add(n)));PN=t.sort().map((e=>({type:"property",label:e})))}return PN||[]}const TN=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((e=>({type:"class",label:e}))),jN=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((e=>({type:"keyword",label:e}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((e=>({type:"constant",label:e})))),RN=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((e=>({type:"type",label:e}))),ZN=/^(\w[\w-]*|-\w[\w-]*|)$/,$N=/^-(-[\w-]*)?$/,MN=new kS,NN=["Declaration"];function DN(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function LN(e,t,r){if(t.to-t.from>4096){let n=MN.get(t);if(n)return n;let o=[],i=new Set,a=t.cursor(iS.IncludeAnonymous);if(a.firstChild())do{for(let t of LN(e,a.node,r))i.has(t.label)||(i.add(t.label),o.push(t))}while(a.nextSibling());return MN.set(t,o),o}{let n=[],o=new Set;return t.cursor().iterate((t=>{var i;if(r(t)&&t.matchContext(NN)&&":"==(null===(i=t.node.nextSibling)||void 0===i?void 0:i.name)){let r=e.sliceString(t.from,t.to);o.has(r)||(o.add(r),n.push({label:r,type:"variable"}))}})),n}}const IN=e=>t=>{let{state:r,pos:n}=t,o=nM(r).resolveInner(n,-1),i=o.type.isError&&o.from==o.to-1&&"-"==r.doc.sliceString(o.from,o.to);if("PropertyName"==o.name||(i||"TagName"==o.name)&&/^(Block|Styles)$/.test(o.resolve(o.to).name))return{from:o.from,options:qN(),validFor:ZN};if("ValueName"==o.name)return{from:o.from,options:jN,validFor:ZN};if("PseudoClassName"==o.name)return{from:o.from,options:TN,validFor:ZN};if(e(o)||(t.explicit||i)&&function(e,t){var r;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let n=null===(r=e.parent)||void 0===r?void 0:r.firstChild;return"Callee"==(null==n?void 0:n.name)&&"var"==t.sliceString(n.from,n.to)}(o,r.doc))return{from:e(o)||i?o.from:n,options:LN(r.doc,DN(o),e),validFor:$N};if("TagName"==o.name){for(let{parent:e}=o;e;e=e.parent)if("Block"==e.name)return{from:o.from,options:qN(),validFor:ZN};return{from:o.from,options:RN,validFor:ZN}}if(!t.explicit)return null;let a=o.resolve(n),s=a.childBefore(n);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:n,options:TN,validFor:ZN}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:n,options:jN,validFor:ZN}:"Block"==a.name||"Styles"==a.name?{from:n,options:qN(),validFor:ZN}:null},BN=IN((e=>"VariableName"==e.name)),QN=rM.define({name:"css",parser:jE.configure({props:[wM.add({Declaration:PM()}),TM.add({"Block KeyframeList":jM})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),zN=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],UN=new d_({start:!1,shift:(e,t)=>3==t||4==t||311==t?e:312==t,strict:!1}),FN=new KS(((e,t)=>{let{next:r}=e;(125==r||-1==r||t.context)&&e.acceptToken(309)}),{contextual:!0,fallback:!0}),WN=new KS(((e,t)=>{let r,{next:n}=e;zN.indexOf(n)>-1||(47!=n||47!=(r=e.peek(1))&&42!=r)&&(125==n||59==n||-1==n||t.context||e.acceptToken(308))}),{contextual:!0}),YN=new KS(((e,t)=>{let{next:r}=e;if((43==r||45==r)&&(e.advance(),r==e.next)){e.advance();let r=!t.context&&t.canShift(1);e.acceptToken(r?1:2)}}),{contextual:!0}),VN=v_({"get set async static":I_.modifier,"for while do if else switch try catch finally return throw break continue default case":I_.controlKeyword,"in of await yield void typeof delete instanceof":I_.operatorKeyword,"let var const using function class extends":I_.definitionKeyword,"import export from":I_.moduleKeyword,"with debugger as new":I_.keyword,TemplateString:I_.special(I_.string),super:I_.atom,BooleanLiteral:I_.bool,this:I_.self,null:I_.null,Star:I_.modifier,VariableName:I_.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":I_.function(I_.variableName),VariableDefinition:I_.definition(I_.variableName),Label:I_.labelName,PropertyName:I_.propertyName,PrivatePropertyName:I_.special(I_.propertyName),"CallExpression/MemberExpression/PropertyName":I_.function(I_.propertyName),"FunctionDeclaration/VariableDefinition":I_.function(I_.definition(I_.variableName)),"ClassDeclaration/VariableDefinition":I_.definition(I_.className),PropertyDefinition:I_.definition(I_.propertyName),PrivatePropertyDefinition:I_.definition(I_.special(I_.propertyName)),UpdateOp:I_.updateOperator,"LineComment Hashbang":I_.lineComment,BlockComment:I_.blockComment,Number:I_.number,String:I_.string,Escape:I_.escape,ArithOp:I_.arithmeticOperator,LogicOp:I_.logicOperator,BitOp:I_.bitwiseOperator,CompareOp:I_.compareOperator,RegExp:I_.regexp,Equals:I_.definitionOperator,Arrow:I_.function(I_.punctuation),": Spread":I_.punctuation,"( )":I_.paren,"[ ]":I_.squareBracket,"{ }":I_.brace,"InterpolationStart InterpolationEnd":I_.special(I_.brace),".":I_.derefOperator,", ;":I_.separator,"@":I_.meta,TypeName:I_.typeName,TypeDefinition:I_.definition(I_.typeName),"type enum interface implements namespace module declare":I_.definitionKeyword,"abstract global Privacy readonly override":I_.modifier,"is keyof unique infer":I_.operatorKeyword,JSXAttributeValue:I_.attributeValue,JSXText:I_.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":I_.angleBracket,"JSXIdentifier JSXNameSpacedName":I_.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":I_.attributeName,"JSXBuiltin/JSXIdentifier":I_.standard(I_.tagName)}),XN={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},HN={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},GN={__proto__:null,"<":139},KN=p_.deserialize({version:14,states:"$<UO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[QUO'#DwO0fQUO'#EPOOQ(CY'#EX'#EXO1PQSO'#EUOOQO'#Ej'#EjOOQO'#Id'#IdO1XQSO'#GlO1dQSO'#EiO1iQSO'#EiO3kQ(CjO'#JiO6[Q(CjO'#JjO6xQSO'#FXO6}Q#tO'#FpOOQ(CY'#Fa'#FaO7YO&jO'#FaO7hQ,UO'#FwO9UQSO'#FvOOQ(CY'#Jj'#JjOOQ(CW'#Ji'#Ji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:_:WnqOXst!Z#c%j&m&o&p&r,h,m1w1zQ&g!VR,]&dtmOXst!U!V!Z#c%j&d&m&o&p&r,h,m1w1zR,d&jT%im,dR1W+|R,[&bQ&Q|R+t&RR+j%{T&k!W&nT&l!W&nT1y,m1z",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:371,context:UN,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,"(",144,"JSXStartTag",156,"JSXStartTag JSXStartCloseTag"],["closedBy",34,"InterpolationEnd",45,"]",56,"}",71,")",145,"JSXSelfCloseEndTag JSXEndTag",161,"JSXEndTag"]],propSources:[VN],skippedNodes:[0,3,4,270],repeatNodeCount:37,tokenData:"$Fl(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Nu!`!a$#a!a!b$(n!b!c$,m!c!}Er!}#O$-w#O#P$/R#P#Q$4j#Q#R$5t#R#SEr#S#T$7R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#BZ$AZ#BZ$ISEr$IS$I_$AZ$I_$JTEr$JT$JU$AZ$JU$KVEr$KV$KW$AZ$KW&FUEr&FU&FV$AZ&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AZ?HUOEr(CS$Dwk$e&j'}p(Q!b't(;d([!LY'z&;d$X#tOY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[WN,YN,2,3,4,5,6,7,8,9,10,11,12,13,FN,new GS("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOr~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!P~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(Z~~",141,332),new GS("j~RQYZXz{^~^O'w~~aP!P!Qd~iO'x~~",25,314)],topRules:{Script:[0,5],SingleExpression:[1,268],SingleClassItem:[2,269]},dialects:{jsx:14548,ts:14550},dynamicPrecedences:{67:1,77:1,79:1,164:1,192:1},specialized:[{term:318,get:e=>XN[e]||-1},{term:334,get:e=>HN[e]||-1},{term:68,get:e=>GN[e]||-1}],tokenPrec:14574});class JN{constructor(e,t,r){this.state=e,this.pos=t,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let t=nM(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),n=t.text.slice(r-t.from,this.pos-t.from),o=n.search(oD(e,!1));return o<0?null:{from:r+o,to:this.pos,text:n.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function eD(e){let t=Object.keys(e).join(""),r=/\w/.test(t);return r&&(t=t.replace(/\w/g,"")),`[${r?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function tD(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[r,n]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),r=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e<n.length;e++)r[n[e]]=!0}let n=eD(t)+eD(r)+"*$";return[new RegExp("^"+n),new RegExp(n)]}(t);return e=>{let o=e.matchBefore(n);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:r}:null}}class rD{constructor(e,t,r,n){this.completion=e,this.source=t,this.match=r,this.score=n}}function nD(e){return e.selection.main.from}function oD(e,t){var r;let{source:n}=e,o=t&&"^"!=n[0],i="$"!=n[n.length-1];return o||i?new RegExp(`${o?"^":""}(?:${n})${i?"$":""}`,null!==(r=e.flags)&&void 0!==r?r:e.ignoreCase?"i":""):e}const iD=DP.define(),aD=new WeakMap;function sD(e){if(!Array.isArray(e))return e;let t=aD.get(e);return t||aD.set(e,t=tD(e)),t}const lD=BP.define(),cD=BP.define();class uD{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=KE(e,t),n=eP(r);this.chars.push(r);let o=e.slice(t,t+n),i=o.toUpperCase();this.folded.push(KE(i==o?o.toLowerCase():i,0)),t+=n}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,!0}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;let{chars:t,folded:r,any:n,precise:o,byWord:i}=this;if(1==t.length){let n=KE(e,0),o=eP(n),i=o==e.length?0:-100;if(n==t[0]);else{if(n!=r[0])return!1;i+=-200}return this.ret(i,[0,o])}let a=e.indexOf(this.pattern);if(0==a)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,l=0;if(a<0){for(let o=0,i=Math.min(e.length,200);o<i&&l<s;){let i=KE(e,o);i!=t[l]&&i!=r[l]||(n[l++]=o),o+=eP(i)}if(l<s)return!1}let c=0,u=0,d=!1,p=0,h=-1,f=-1,m=/[a-z]/.test(e),g=!0;for(let n=0,l=Math.min(e.length,200),b=0;n<l&&u<s;){let l=KE(e,n);a<0&&(c<s&&l==t[c]&&(o[c++]=n),p<s&&(l==t[p]||l==r[p]?(0==p&&(h=n),f=n+1,p++):p=0));let y,v=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=JE(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!n||1==v&&m||0==b&&0!=v)&&(t[u]==l||r[u]==l&&(d=!0)?i[u++]=n:i.length&&(g=!1)),b=v,n+=eP(l)}return u==s&&0==i[0]&&g?this.result((d?-200:0)-100,i,e):p==s&&0==h?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==s?this.ret(-900-e.length,[h,f]):u==s?this.result((d?-200:0)-100-700+(g?0:-1100),i,e):2!=t.length&&this.result((n[0]?-700:0)-200-1100,n,e)}result(e,t,r){let n=[],o=0;for(let e of t){let t=e+(this.astral?eP(KE(r,e)):1);o&&n[o-1]==e?n[o-1]=t:(n[o++]=e,n[o++]=t)}return this.ret(e-r.length,n)}}const dD=mP.define({combine:e=>JP(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:hD,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>pD(e(r),t(r)),optionClass:(e,t)=>r=>pD(e(r),t(r)),addToOptions:(e,t)=>e.concat(t)})});function pD(e,t){return e?t?e+" "+t:e:t}function hD(e,t,r,n,o,i){let a,s,l=e.textDirection==pj.RTL,c=l,u=!1,d="top",p=t.left-o.left,h=o.right-t.right,f=n.right-n.left,m=n.bottom-n.top;if(c&&p<Math.min(f,h)?c=!1:!c&&h<Math.min(f,p)&&(c=!0),f<=(c?p:h))a=Math.max(o.top,Math.min(r.top,o.bottom-m))-t.top,s=Math.min(400,c?p:h);else{u=!0,s=Math.min(400,(l?t.right:o.right-t.left)-30);let e=o.bottom-t.bottom;e>=m||e>t.top?a=r.bottom-t.top:(d="bottom",a=t.bottom-r.top)}return{style:`${d}: ${a/((t.bottom-t.top)/i.offsetHeight)}px; max-width: ${s/((t.right-t.left)/i.offsetWidth)}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":c?"left":"right")}}function fD(e,t,r){if(e<=r)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/r);return{from:e*r,to:(e+1)*r}}let n=Math.floor((e-t)/r);return{from:e-(n+1)*r,to:e-n*r}}class mD{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:o,selected:i}=n.open,a=e.state.facet(dD);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,r,n){let o=document.createElement("span");o.className="cm-completionLabel";let i=e.displayLabel||e.label,a=0;for(let e=0;e<n.length;){let t=n[e++],r=n[e++];t>a&&o.appendChild(document.createTextNode(i.slice(a,t)));let s=o.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(i.slice(t,r))),s.className="cm-completionMatchedText",a=r}return a<i.length&&o.appendChild(document.createTextNode(i.slice(a))),o},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort(((e,t)=>e.position-t.position)).map((e=>e.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=fD(o.length,i,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(r=>{let{options:n}=e.state.field(t).open;for(let t,o=r.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(t=/-(\d+)$/.exec(o.id))&&+t[1]<n.length)return this.applyCompletion(e,n[+t[1]]),void r.preventDefault()})),this.dom.addEventListener("focusout",(t=>{let r=e.state.field(this.stateField,!1);r&&r.tooltip&&e.state.facet(dD).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:cD.of(null)})})),this.showOptions(o,n.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let r=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=n){let{options:o,selected:i,disabled:a}=r.open;n.open&&n.open.options==o||(this.range=fD(o.length,i,e.state.facet(dD).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=(null===(t=n.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=fD(t.options.length,t.selected,this.view.state.facet(dD).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:n}=r;if(!n)return;let o="string"==typeof n?document.createTextNode(n):n(r);if(!o)return;"then"in o?o.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)})).catch((e=>XT(this.view.state,e,"completion info"))):this.addInfoPane(o,r)}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",null!=e.nodeType)r.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:n}=e;r.appendChild(t),this.infoDestroy=n||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,n=this.range.from;r;r=r.nextSibling,n++)"LI"==r.nodeName&&r.id?n==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected"):n--;return t&&function(e,t){let r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o=r.height/e.offsetHeight;n.top<r.top?e.scrollTop-=(r.top-n.top)/o:n.bottom>r.bottom&&(e.scrollTop+=(n.bottom-r.bottom)/o)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),o=this.space;if(!o){let e=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return n.top>Math.min(o.bottom,t.bottom)-10||n.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(dD).positionInfo(this.view,t,n,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,r){const n=document.createElement("ul");n.id=t,n.setAttribute("role","listbox"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let i=r.from;i<r.to;i++){let{completion:a,match:s}=e[i],{section:l}=a;if(l){let e="string"==typeof l?l:l.name;e!=o&&(i>r.from||0==r.from)&&(o=e,"string"!=typeof l&&l.header?n.appendChild(l.header(l)):n.appendChild(document.createElement("completion-section")).textContent=e)}const c=n.appendChild(document.createElement("li"));c.id=t+"-"+i,c.setAttribute("role","option");let u=this.optionClass(a);u&&(c.className=u);for(let e of this.optionContent){let t=e(a,this.view.state,this.view,s);t&&c.appendChild(t)}}return r.from&&n.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&n.classList.add("cm-completionListIncompleteBottom"),n}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function gD(e,t){return r=>new mD(r,e,t)}function bD(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class yD{constructor(e,t,r,n,o,i){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=n,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new yD(this.options,wD(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,n,o){let i=function(e,t){let r=[],n=null,o=e=>{r.push(e);let{section:t}=e.completion;if(t){n||(n=[]);let e="string"==typeof t?t:t.name;n.some((t=>t.name==e))||n.push("string"==typeof t?{name:e}:t)}};for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(!1===n.result.filter)for(let t of n.result.options)o(new rD(t,n.source,e?e(t):[],1e9-r.length));else{let r=new uD(t.sliceDoc(n.from,n.to));for(let t of n.result.options)if(r.match(t.label)){let i=t.displayLabel?e?e(t,r.matched):[]:r.matched;o(new rD(t,n.source,i,r.score+(t.boost||0)))}}}if(n){let e=Object.create(null),t=0,o=(e,t)=>{var r,n;return(null!==(r=e.rank)&&void 0!==r?r:1e9)-(null!==(n=t.rank)&&void 0!==n?n:1e9)||(e.name<t.name?-1:1)};for(let r of n.sort(o))t-=1e5,e[r.name]=t;for(let t of r){let{section:r}=t.completion;r&&(t.score+=e["string"==typeof r?r:r.name])}}let i=[],a=null,s=t.facet(dD).compareCompletions;for(let e of r.sort(((e,t)=>t.score-e.score||s(e.completion,t.completion)))){let t=e.completion;!a||a.label!=t.label||a.detail!=t.detail||null!=a.type&&null!=t.type&&a.type!=t.type||a.apply!=t.apply||a.boost!=t.boost?i.push(e):bD(e.completion)>bD(a)&&(i[i.length-1]=e),a=e.completion}return i}(e,t);if(!i.length)return n&&e.some((e=>1==e.state))?new yD(n.options,n.attrs,n.tooltip,n.timestamp,n.selected,!0):null;let a=t.facet(dD).selectOnOpen?0:-1;if(n&&n.selected!=a&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;t<i.length;t++)if(i[t].completion==e){a=t;break}}return new yD(i,wD(r,a),{pos:e.reduce(((e,t)=>t.hasResult()?Math.min(e,t.from):e),1e8),create:qD,above:o.aboveCursor},n?n.timestamp:Date.now(),a,!1)}map(e){return new yD(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class vD{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new vD(AD,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,r=t.facet(dD),n=(r.override||t.languageDataAt("autocomplete",nD(t)).map(sD)).map((t=>(this.active.find((e=>e.source==t))||new kD(t,this.active.some((e=>0!=e.state))?1:0)).update(e,r)));n.length==this.active.length&&n.every(((e,t)=>e==this.active[t]))&&(n=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||n.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let r=0,n=0;;){for(;r<e.length&&!e[r].hasResult;)r++;for(;n<t.length&&!t[n].hasResult;)n++;let o=r==e.length,i=n==t.length;if(o||i)return o==i;if(e[r++].result!=t[n++].result)return!1}}(n,this.active)?o=yD.build(n,t,this.id,o,r):o&&o.disabled&&!n.some((e=>1==e.state))&&(o=null),!o&&n.every((e=>1!=e.state))&&n.some((e=>e.hasResult()))&&(n=n.map((e=>e.hasResult()?new kD(e.source,0):e)));for(let t of e.effects)t.is(_D)&&(o=o&&o.setSelected(t.value,this.id));return n==this.active&&o==this.open?this:new vD(n,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:OD}}const OD={"aria-autocomplete":"list"};function wD(e,t){let r={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(r["aria-activedescendant"]=e+"-"+t),r}const AD=[];function xD(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class kD{constructor(e,t,r=-1){this.source=e,this.state=t,this.explicitPos=r}hasResult(){return!1}update(e,t){let r=xD(e),n=this;r?n=n.handleUserEvent(e,r,t):e.docChanged?n=n.handleChange(e):e.selection&&0!=n.state&&(n=new kD(n.source,0));for(let t of e.effects)if(t.is(lD))n=new kD(n.source,1,t.value?nD(e.state):-1);else if(t.is(cD))n=new kD(n.source,0);else if(t.is(SD))for(let e of t.value)e.source==n.source&&(n=e);return n}handleUserEvent(e,t,r){return"delete"!=t&&r.activateOnTyping?new kD(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(nD(e.startState))?new kD(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new kD(this.source,this.state,e.mapPos(this.explicitPos))}}class CD extends kD{constructor(e,t,r,n,o){super(e,2,t),this.result=r,this.from=n,this.to=o}hasResult(){return!0}handleUserEvent(e,t,r){var n;let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),a=nD(e.state);if((this.explicitPos<0?a<=o:a<this.from)||a>i||"delete"==t&&nD(e.startState)==this.from)return new kD(this.source,"input"==t&&r.activateOnTyping?1:0);let s,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,r,n){if(!e)return!1;let o=t.sliceDoc(r,n);return"function"==typeof e?e(o,r,n,t):oD(e,!0).test(o)}(this.result.validFor,e.state,o,i)?new CD(this.source,l,this.result,o,i):this.result.update&&(s=this.result.update(this.result,o,i,new JN(e.state,a,l>=0)))?new CD(this.source,l,s,s.from,null!==(n=s.to)&&void 0!==n?n:nD(e.state)):new kD(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new kD(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new CD(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const SD=BP.define({map:(e,t)=>e.map((e=>e.map(t)))}),_D=BP.define(),ED=AP.define({create:()=>vD.start(),update:(e,t)=>e.update(t),provide:e=>[f$.from(e,(e=>e.tooltip)),pZ.contentAttributes.from(e,(e=>e.attrs))]});function PD(e,t){const r=t.completion.apply||t.completion.label;let n=e.state.field(ED).active.find((e=>e.source==t.source));return n instanceof CD&&("string"==typeof r?e.dispatch(Object.assign(Object.assign({},function(e,t,r,n){let{main:o}=e.selection,i=r-o.from,a=n-o.from;return Object.assign(Object.assign({},e.changeByRange((s=>s!=o&&r!=n&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(r,n)?{range:s}:{changes:{from:s.from+i,to:n==o.from?s.to:s.from+a,insert:t},range:pP.cursor(s.from+i+t.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,r,n.from,n.to)),{annotations:iD.of(t.completion)})):r(e,t.completion,n.from,n.to),!0)}const qD=gD(ED,PD);function TD(e,t="option"){return r=>{let n=r.state.field(ED,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<r.state.facet(dD).interactionDelay)return!1;let o,i=1;"page"==t&&(o=w$(r,n.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=n.open.options,s=n.open.selected>-1?n.open.selected+i*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),r.dispatch({effects:_D.of(s)}),!0}}class jD{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const RD=JT.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(ED).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(ED);if(!e.selectionSet&&!e.docChanged&&e.startState.field(ED)==t)return;let r=e.transactions.some((e=>(e.selection||e.docChanged)&&!xD(e)));for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){XT(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==xD(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(ED);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,r=nD(t),n=new JN(t,r,e.explicitPos==r),o=new jD(e,n);this.running.push(o),Promise.resolve(e.source(n)).then((e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:cD.of(null)}),XT(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(dD).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],r=this.view.state.facet(dD);for(let n=0;n<this.running.length;n++){let o=this.running[n];if(void 0===o.done)continue;if(this.running.splice(n--,1),o.done){let n=new CD(o.active.source,o.active.explicitPos,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:nD(o.updates.length?o.updates[0].startState:this.view.state));for(let e of o.updates)n=n.update(e,r);if(n.hasResult()){t.push(n);continue}}let i=this.view.state.field(ED).active.find((e=>e.source==o.active.source));if(i&&1==i.state)if(null==o.done){let e=new kD(o.active.source,0);for(let t of o.updates)e=e.update(t,r);1!=e.state&&t.push(e)}else this.startQuery(i)}t.length&&this.view.dispatch({effects:SD.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(ED,!1);if(t&&t.tooltip&&this.view.state.facet(dD).closeOnBlur){let r=t.open&&w$(this.view,t.open.tooltip);r&&r.dom.contains(e.relatedTarget)||this.view.dispatch({effects:cD.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:lD.of(!1)})),20),this.composing=0}}}),ZD=pZ.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class $D{constructor(e,t,r,n){this.field=e,this.line=t,this.from=r,this.to=n}}class MD{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,rP.TrackDel),r=e.mapPos(this.to,1,rP.TrackDel);return null==t||null==r?null:new MD(this.field,t,r)}}class ND{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],n=[t],o=e.doc.lineAt(t),i=/^\s*/.exec(o.text)[0];for(let o of this.lines){if(r.length){let r=i,a=/^\t*/.exec(o)[0].length;for(let t=0;t<a;t++)r+=e.facet(gM);n.push(t+r.length-a),o=r+o.slice(a)}r.push(o),t+=o.length+1}let a=this.fieldPositions.map((e=>new MD(e.field,n[e.line]+e.from,n[e.line]+e.to)));return{text:r,ranges:a}}static parse(e){let t,r=[],n=[],o=[];for(let i of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(i);){let e=t[1]?+t[1]:null,a=t[2]||t[3]||"",s=-1;for(let t=0;t<r.length;t++)(null!=e?r[t].seq==e:a&&r[t].name==a)&&(s=t);if(s<0){let t=0;for(;t<r.length&&(null==e||null!=r[t].seq&&r[t].seq<e);)t++;r.splice(t,0,{seq:e,name:a}),s=t;for(let e of o)e.field>=s&&e.field++}o.push(new $D(s,n.length,t.index,t.index+a.length)),i=i.slice(0,t.index)+a+i.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(i);){i=i.slice(0,e.index)+e[1]+i.slice(e.index+e[0].length);for(let t of o)t.line==n.length&&t.from>e.index&&(t.from--,t.to--)}n.push(i)}return new ND(n,o)}}let DD=PT.widget({widget:new class extends _T{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),LD=PT.mark({class:"cm-snippetField"});class ID{constructor(e,t){this.ranges=e,this.active=t,this.deco=PT.set(e.map((e=>(e.from==e.to?DD:LD).range(e.from,e.to))))}map(e){let t=[];for(let r of this.ranges){let n=r.map(e);if(!n)return null;t.push(n)}return new ID(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const BD=BP.define({map:(e,t)=>e&&e.map(t)}),QD=BP.define(),zD=AP.define({create:()=>null,update(e,t){for(let r of t.effects){if(r.is(BD))return r.value;if(r.is(QD)&&e)return new ID(e.ranges,r.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>pZ.decorations.from(e,(e=>e?e.deco:PT.none))});function UD(e,t){return pP.create(e.filter((e=>e.field==t)).map((e=>pP.range(e.from,e.to))))}function FD(e){let t=ND.parse(e);return(e,r,n,o)=>{let{text:i,ranges:a}=t.instantiate(e.state,n),s={changes:{from:n,to:o,insert:RE.of(i)},scrollIntoView:!0,annotations:r?iD.of(r):void 0};if(a.length&&(s.selection=UD(a,0)),a.length>1){let t=new ID(a,0),r=s.effects=[BD.of(t)];void 0===e.state.field(zD,!1)&&r.push(BP.appendConfig.of([zD,XD,GD,ZD]))}e.dispatch(e.state.update(s))}}function WD(e){return({state:t,dispatch:r})=>{let n=t.field(zD,!1);if(!n||e<0&&0==n.active)return!1;let o=n.active+e,i=e>0&&!n.ranges.some((t=>t.field==o+e));return r(t.update({selection:UD(n.ranges,o),effects:BD.of(i?null:new ID(n.ranges,o)),scrollIntoView:!0})),!0}}const YD=[{key:"Tab",run:WD(1),shift:WD(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(zD,!1)&&(t(e.update({effects:BD.of(null)})),!0)}],VD=mP.define({combine:e=>e.length?e[0]:YD}),XD=kP.highest(OZ.compute([VD],(e=>e.facet(VD))));function HD(e,t){return Object.assign(Object.assign({},t),{apply:FD(e)})}const GD=pZ.domEventHandlers({mousedown(e,t){let r,n=t.state.field(zD,!1);if(!n||null==(r=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let o=n.ranges.find((e=>e.from<=r&&e.to>=r));return!(!o||o.field==n.active||(t.dispatch({selection:UD(n.ranges,o.field),effects:BD.of(n.ranges.some((e=>e.field>o.field))?new ID(n.ranges,o.field):null),scrollIntoView:!0}),0))}}),KD={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},JD=BP.define({map(e,t){let r=t.mapPos(e,-1,rP.TrackAfter);return null==r?void 0:r}}),eL=new class extends eq{};eL.startSide=1,eL.endSide=-1;const tL=AP.define({create:()=>oq.empty,update(e,t){if(e=e.map(t.changes),t.selection){let r=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=r.from&&e<=r.to})}for(let r of t.effects)r.is(JD)&&(e=e.update({add:[eL.range(r.value,r.value+1)]}));return e}}),rL="()[]{}<>";function nL(e){for(let t=0;t<8;t+=2)if(rL.charCodeAt(t)==e)return rL.charAt(t+1);return JE(e<128?e:e+1)}function oL(e,t){return e.languageDataAt("closeBrackets",t)[0]||KD}const iL="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),aL=pZ.inputHandler.of(((e,t,r,n)=>{if((iL?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(n.length>2||2==n.length&&1==eP(KE(n,0))||t!=o.from||r!=o.to)return!1;let i=function(e,t){let r=oL(e,e.selection.main.head),n=r.brackets||KD.brackets;for(let o of n){let i=nL(KE(o,0));if(t==o)return i==o?pL(e,o,n.indexOf(o+o+o)>-1,r):uL(e,o,i,r.before||KD.before);if(t==i&&lL(e,e.selection.main.from))return dL(e,0,i)}return null}(e.state,n);return!!i&&(e.dispatch(i),!0)})),sL=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=oL(e,e.selection.main.head).brackets||KD.brackets,n=null,o=e.changeByRange((t=>{if(t.empty){let n=function(e,t){let r=e.sliceString(t-2,t);return eP(KE(r,0))==r.length?r:r.slice(1)}(e.doc,t.head);for(let o of r)if(o==n&&cL(e.doc,t.head)==nL(KE(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:pP.cursor(t.head-o.length)}}return{range:n=t}}));return n||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!n}}];function lL(e,t){let r=!1;return e.field(tL).between(0,e.doc.length,(e=>{e==t&&(r=!0)})),r}function cL(e,t){let r=e.sliceString(t,t+2);return r.slice(0,eP(KE(r,0)))}function uL(e,t,r,n){let o=null,i=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:r,from:i.to}],effects:JD.of(i.to+t.length),range:pP.range(i.anchor+t.length,i.head+t.length)};let a=cL(e.doc,i.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:t+r,from:i.head},effects:JD.of(i.head+t.length),range:pP.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function dL(e,t,r){let n=null,o=e.changeByRange((t=>t.empty&&cL(e.doc,t.head)==r?{changes:{from:t.head,to:t.head+r.length,insert:r},range:pP.cursor(t.head+r.length)}:n={range:t}));return n?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function pL(e,t,r,n){let o=n.stringPrefixes||KD.stringPrefixes,i=null,a=e.changeByRange((n=>{if(!n.empty)return{changes:[{insert:t,from:n.from},{insert:t,from:n.to}],effects:JD.of(n.to+t.length),range:pP.range(n.anchor+t.length,n.head+t.length)};let a,s=n.head,l=cL(e.doc,s);if(l==t){if(hL(e,s))return{changes:{insert:t+t,from:s},effects:JD.of(s+t.length),range:pP.cursor(s+t.length)};if(lL(e,s)){let n=r&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+n.length,insert:n},range:pP.cursor(s+n.length)}}}else{if(r&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=fL(e,s-2*t.length,o))>-1&&hL(e,a))return{changes:{insert:t+t+t+t,from:s},effects:JD.of(s+t.length),range:pP.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=XP.Word&&fL(e,s,o)>-1&&!function(e,t,r,n){let o=nM(e).resolveInner(t,-1),i=n.reduce(((e,t)=>Math.max(e,t.length)),0);for(let a=0;a<5;a++){let a=e.sliceDoc(o.from,Math.min(o.to,o.from+r.length+i)),s=a.indexOf(r);if(!s||s>-1&&n.indexOf(a.slice(0,s))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>r.length+s;){if(e.sliceDoc(t.to-r.length,t.to)==r)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:JD.of(s+t.length),range:pP.cursor(s+t.length)}}return{range:i=n}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function hL(e,t){let r=nM(e).resolveInner(t+1);return r.parent&&r.from==t}function fL(e,t,r){let n=e.charCategorizer(t);if(n(e.sliceDoc(t-1,t))!=XP.Word)return t;for(let o of r){let r=t-o.length;if(e.sliceDoc(r,t)==o&&n(e.sliceDoc(r-1,r))!=XP.Word)return r}return-1}const mL=[{key:"Ctrl-Space",run:e=>!!e.state.field(ED,!1)&&(e.dispatch({effects:lD.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(ED,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:cD.of(null)}),0))}},{key:"ArrowDown",run:TD(!0)},{key:"ArrowUp",run:TD(!1)},{key:"PageDown",run:TD(!0,"page")},{key:"PageUp",run:TD(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(ED,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(dD).interactionDelay)&&PD(e,t.open.options[t.open.selected])}}],gL=kP.highest(OZ.computeN([dD],(e=>e.facet(dD).defaultKeymap?[mL]:[]))),bL=[HD("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),HD("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),HD("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),HD("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),HD("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),HD("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),HD("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),HD("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),HD("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),HD('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),HD('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],yL=bL.concat([HD("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),HD("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),HD("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),vL=new kS,OL=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wL(e){return(t,r)=>{let n=t.node.getChild("VariableDefinition");return n&&r(n,e),!0}}const AL=["FunctionDeclaration"],xL={FunctionDeclaration:wL("function"),ClassDeclaration:wL("class"),ClassExpression:()=>!0,EnumDeclaration:wL("constant"),TypeAliasDeclaration:wL("type"),NamespaceDeclaration:wL("namespace"),VariableDefinition(e,t){e.matchContext(AL)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function kL(e,t){let r=vL.get(t);if(r)return r;let n=[],o=!0;function i(t,r){let o=e.sliceString(t.from,t.to);n.push({label:o,type:r})}return t.cursor(iS.IncludeAnonymous).iterate((t=>{if(o)o=!1;else if(t.name){let e=xL[t.name];if(e&&e(t,i)||OL.has(t.name))return!1}else if(t.to-t.from>8192){for(let r of kL(e,t.node))n.push(r);return!1}})),vL.set(t,n),n}const CL=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,SL=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function _L(e){let t=nM(e.state).resolveInner(e.pos,-1);if(SL.indexOf(t.name)>-1)return null;let r="VariableName"==t.name||t.to-t.from<20&&CL.test(e.state.sliceDoc(t.from,t.to));if(!r&&!e.explicit)return null;let n=[];for(let r=t;r;r=r.parent)OL.has(r.name)&&(n=n.concat(kL(e.state.doc,r)));return{options:n,from:r?t.from:e.pos,validFor:CL}}const EL=rM.define({name:"javascript",parser:KN.configure({props:[wM.add({IfStatement:PM({except:/^\s*({|else\b)/}),TryStatement:PM({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,r=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(r?0:n?1:2)*e.unit},Block:_M({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":PM({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),TM.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":jM,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),PL={test:e=>/^JSX/.test(e.name),facet:K$({commentTokens:{block:{open:"{/*",close:"*/}"}}})},qL=EL.configure({dialect:"ts"},"typescript"),TL=EL.configure({dialect:"jsx",props:[J$.add((e=>e.isTop?[PL]:void 0))]}),jL=EL.configure({dialect:"jsx ts",props:[J$.add((e=>e.isTop?[PL]:void 0))]},"typescript");let RL=e=>({label:e,type:"keyword"});const ZL="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(RL),$L=ZL.concat(["declare","implements","private","protected","public"].map(RL));function ML(e={}){let t=e.jsx?e.typescript?jL:TL:e.typescript?qL:EL,r=e.typescript?yL.concat($L):bL.concat(ZL);return new hM(t,[EL.data.of({autocomplete:(n=SL,o=tD(r),e=>{for(let t=nM(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(n.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return o(e)})}),EL.data.of({autocomplete:_L}),e.jsx?LL:[]]);var n,o}function NL(e,t,r=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,r));return""}const DL="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),LL=pZ.inputHandler.of(((e,t,r,n,o)=>{if((DL?e.composing:e.compositionStarted)||e.state.readOnly||t!=r||">"!=n&&"/"!=n||!EL.isActiveAt(e.state,t,-1))return!1;let i=o(),{state:a}=i,s=a.changeByRange((e=>{var t;let r,{head:o}=e,i=nM(a).resolveInner(o-1,-1);if("JSXStartTag"==i.name&&(i=i.parent),a.doc.sliceString(o-1,o)!=n||"JSXAttributeValue"==i.name&&i.to>o);else{if(">"==n&&"JSXFragmentTag"==i.name)return{range:e,changes:{from:o,insert:"</>"}};if("/"==n&&"JSXStartCloseTag"==i.name){let e=i.parent,n=e.parent;if(n&&e.from==o-2&&((r=NL(a.doc,n.firstChild,o))||"JSXFragmentTag"==(null===(t=n.firstChild)||void 0===t?void 0:t.name))){let e=`${r}>`;return{range:pP.cursor(o+e.length,-1),changes:{from:o,insert:e}}}}else if(">"==n){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(i);if(t&&!/^\/?>|^<\//.test(a.doc.sliceString(o,o+2))&&(r=NL(a.doc,t,o)))return{range:e,changes:{from:o,insert:`</${r}>`}}}}return{range:e}}));return!s.changes.empty&&(e.dispatch([i,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),IL=["_blank","_self","_top","_parent"],BL=["ascii","utf-8","utf-16","latin1","latin1"],QL=["get","post","put","delete"],zL=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],UL=["true","false"],FL={},WL={a:{attrs:{href:null,ping:null,type:null,media:null,target:IL,hreflang:null}},abbr:FL,address:FL,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:FL,aside:FL,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:FL,base:{attrs:{href:null,target:IL}},bdi:FL,bdo:FL,blockquote:{attrs:{cite:null}},body:FL,br:FL,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:zL,formmethod:QL,formnovalidate:["novalidate"],formtarget:IL,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:FL,center:FL,cite:FL,code:FL,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:FL,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:FL,div:FL,dl:FL,dt:FL,em:FL,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:FL,figure:FL,footer:FL,form:{attrs:{action:null,name:null,"accept-charset":BL,autocomplete:["on","off"],enctype:zL,method:QL,novalidate:["novalidate"],target:IL}},h1:FL,h2:FL,h3:FL,h4:FL,h5:FL,h6:FL,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:FL,hgroup:FL,hr:FL,html:{attrs:{manifest:null}},i:FL,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:zL,formmethod:QL,formnovalidate:["novalidate"],formtarget:IL,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:FL,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:FL,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:FL,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:BL,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:FL,noscript:FL,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:FL,param:{attrs:{name:null,value:null}},pre:FL,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:FL,rt:FL,ruby:FL,samp:FL,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:BL}},section:FL,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:FL,source:{attrs:{src:null,type:null,media:null}},span:FL,strong:FL,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:FL,summary:FL,sup:FL,table:FL,tbody:FL,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:FL,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:FL,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:FL,time:{attrs:{datetime:null}},title:FL,tr:FL,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:FL,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:FL},YL={accesskey:null,class:null,contenteditable:UL,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:UL,autocorrect:UL,autocapitalize:UL,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":UL,"aria-autocomplete":["inline","list","both","none"],"aria-busy":UL,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":UL,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":UL,"aria-hidden":UL,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":UL,"aria-multiselectable":UL,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":UL,"aria-relevant":null,"aria-required":UL,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},VL="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((e=>"on"+e));for(let e of VL)YL[e]=null;class XL{constructor(e,t){this.tags=Object.assign(Object.assign({},WL),e),this.globalAttrs=Object.assign(Object.assign({},YL),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function HL(e,t,r=e.length){if(!t)return"";let n=t.firstChild,o=n&&n.getChild("TagName");return o?e.sliceString(o.from,Math.min(o.to,r)):""}function GL(e,t=!1){for(;e;e=e.parent)if("Element"==e.name){if(!t)return e;t=!1}return null}function KL(e,t,r){let n=r.tags[HL(e,GL(t))];return(null==n?void 0:n.children)||r.allTags}function JL(e,t){let r=[];for(let n=GL(t);n&&!n.type.isTop;n=GL(n.parent)){let o=HL(e,n);if(o&&"CloseTag"==n.lastChild.name)break;o&&r.indexOf(o)<0&&("EndTag"==t.name||t.from>=n.firstChild.to)&&r.push(o)}return r}XL.default=new XL;const eI=/^[:\-\.\w\u00b7-\uffff]*$/;function tI(e,t,r,n,o){let i=/\s*>/.test(e.sliceDoc(o,o+5))?"":">",a=GL(r,!0);return{from:n,to:o,options:KL(e.doc,a,t).map((e=>({label:e,type:"type"}))).concat(JL(e.doc,r).map(((e,t)=>({label:"/"+e,apply:"/"+e+i,type:"type",boost:99-t})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function rI(e,t,r,n){let o=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:JL(e.doc,t).map(((e,t)=>({label:e,apply:e+o,type:"type",boost:99-t}))),validFor:eI}}function nI(e,t){let{state:r,pos:n}=t,o=nM(r).resolveInner(n,-1),i=o.resolve(n);for(let e,t=n;i==o&&(e=o.childBefore(t));){let r=e.lastChild;if(!r||!r.type.isError||r.from<r.to)break;i=o=e,t=r.from}return"TagName"==o.name?o.parent&&/CloseTag$/.test(o.parent.name)?rI(r,o,o.from,n):tI(r,e,o,o.from,n):"StartTag"==o.name?tI(r,e,o,n,n):"StartCloseTag"==o.name||"IncompleteCloseTag"==o.name?rI(r,o,n,n):t.explicit&&("OpenTag"==o.name||"SelfClosingTag"==o.name)||"AttributeName"==o.name?function(e,t,r,n,o){let i=GL(r),a=i?t.tags[HL(e.doc,i)]:null,s=a&&a.attrs?Object.keys(a.attrs):[];return{from:n,to:o,options:(a&&!1===a.globalAttrs?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map((e=>({label:e,type:"property"}))),validFor:eI}}(r,e,o,"AttributeName"==o.name?o.from:n,n):"Is"==o.name||"AttributeValue"==o.name||"UnquotedAttributeValue"==o.name?function(e,t,r,n,o){var i;let a,s=null===(i=r.parent)||void 0===i?void 0:i.getChild("AttributeName"),l=[];if(s){let i=e.sliceDoc(s.from,s.to),c=t.globalAttrs[i];if(!c){let n=GL(r),o=n?t.tags[HL(e.doc,n)]:null;c=(null==o?void 0:o.attrs)&&o.attrs[i]}if(c){let t=e.sliceDoc(n,o).toLowerCase(),r='"',i='"';/^['"]/.test(t)?(a='"'==t[0]?/^[^"]*$/:/^[^']*$/,r="",i=e.sliceDoc(o,o+1)==t[0]?"":t[0],t=t.slice(1),n++):a=/^[^\s<>='"]*$/;for(let e of c)l.push({label:e,apply:r+e+i,type:"constant"})}}return{from:n,to:o,options:l,validFor:a}}(r,e,o,"Is"==o.name?n:o.from,n):!t.explicit||"Element"!=i.name&&"Text"!=i.name&&"Document"!=i.name?null:function(e,t,r,n){let o=[],i=0;for(let n of KL(e.doc,r,t))o.push({label:"<"+n,type:"type"});for(let t of JL(e.doc,r))o.push({label:"</"+t+">",type:"type",boost:99-i++});return{from:n,to:n,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(r,e,o,n)}function oI(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new XL(t,r):XL.default;return e=>nI(n,e)}const iI=EL.parser.configure({top:"SingleExpression"}),aI=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:qL.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:TL.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:jL.parser},{tag:"script",attrs:e=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type),parser:iI},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:EL.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:QN.parser}],sI=[{name:"style",parser:QN.parser.configure({top:"Styles"})}].concat(VL.map((e=>({name:e,parser:EL.parser})))),lI=rM.define({name:"html",parser:yE.configure({props:[wM.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t,r=null;for(let t=e.node;;){let e=t.lastChild;if(!e||"Element"!=e.name||e.to!=t.to)break;r=t=e}return r&&(!(t=r.lastChild)||"CloseTag"!=t.name&&"SelfClosingTag"!=t.name)?e.lineIndent(r.from)+e.unit:null}}),TM.add({Element(e){let t=e.firstChild,r=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==r.name?r.from:e.to}:null}}),bN.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),cI=lI.configure({wrap:AE(aI,sI)});function uI(e={}){let t,r="";!1===e.matchClosingTags&&(r="noMatch"),!0===e.selfClosingTags&&(r=(r?r+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=AE((e.nestedLanguages||[]).concat(aI),(e.nestedAttributes||[]).concat(sI)));let n=t?lI.configure({wrap:t,dialect:r}):r?cI.configure({dialect:r}):cI;return new hM(n,[cI.data.of({autocomplete:oI(e)}),!1!==e.autoCloseTags?pI:[],ML().support,new hM(QN,QN.data.of({autocomplete:BN})).support])}const dI=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),pI=pZ.inputHandler.of(((e,t,r,n,o)=>{if(e.composing||e.state.readOnly||t!=r||">"!=n&&"/"!=n||!cI.isActiveAt(e.state,t,-1))return!1;let i=o(),{state:a}=i,s=a.changeByRange((e=>{var t,r,o;let i,s=a.doc.sliceString(e.from-1,e.to)==n,{head:l}=e,c=nM(a).resolveInner(l-1,-1);if("TagName"!=c.name&&"StartTag"!=c.name||(c=c.parent),s&&">"==n&&"OpenTag"==c.name){if("CloseTag"!=(null===(r=null===(t=c.parent)||void 0===t?void 0:t.lastChild)||void 0===r?void 0:r.name)&&(i=HL(a.doc,c.parent,l))&&!dI.has(i))return{range:e,changes:{from:l,to:l+(">"===a.doc.sliceString(l,l+1)?1:0),insert:`</${i}>`}}}else if(s&&"/"==n&&"IncompleteCloseTag"==c.name){let e=c.parent;if(c.from==l-2&&"CloseTag"!=(null===(o=e.lastChild)||void 0===o?void 0:o.name)&&(i=HL(a.doc,e,l))&&!dI.has(i)){let e=l+(">"===a.doc.sliceString(l,l+1)?1:0),t=`${i}>`;return{range:pP.cursor(l+t.length,-1),changes:{from:l,to:e,insert:t}}}}return{range:e}}));return!s.changes.empty&&(e.dispatch([i,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function hI(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let o=e(t,r);return!!o&&(n(r.update(o)),!0)}}const fI=hI(OI,0),mI=hI(vI,0),gI=hI(((e,t)=>vI(e,t,function(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),o=r.to<=n.to?n:e.doc.lineAt(r.to),i=t.length-1;i>=0&&t[i].to>n.from?t[i].to=o.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:o.to})}return t}(t))),0);function bI(e,t){let r=e.languageDataAt("commentTokens",t);return r.length?r[0]:{}}const yI=50;function vI(e,t,r=t.selection.ranges){let n=r.map((e=>bI(t,e.from).block));if(!n.every((e=>e)))return null;let o=r.map(((e,r)=>function(e,{open:t,close:r},n,o){let i,a,s=e.sliceDoc(n-yI,n),l=e.sliceDoc(o,o+yI),c=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(l)[0].length,d=s.length-c;if(s.slice(d-t.length,d)==t&&l.slice(u,u+r.length)==r)return{open:{pos:n-c,margin:c&&1},close:{pos:o+u,margin:u&&1}};o-n<=2*yI?i=a=e.sliceDoc(n,o):(i=e.sliceDoc(n,n+yI),a=e.sliceDoc(o-yI,o));let p=/^\s*/.exec(i)[0].length,h=/\s*$/.exec(a)[0].length,f=a.length-h-r.length;return i.slice(p,p+t.length)==t&&a.slice(f,f+r.length)==r?{open:{pos:n+p+t.length,margin:/\s/.test(i.charAt(p+t.length))?1:0},close:{pos:o-h-r.length,margin:/\s/.test(a.charAt(f-1))?1:0}}:null}(t,n[r],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(r.map(((e,t)=>o[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,r=0;r<o.length;r++)if(t=o[r]){let o=n[r],{open:i,close:a}=t;e.push({from:i.pos-o.open.length,to:i.pos+i.margin},{from:a.pos-a.margin,to:a.pos+o.close.length})}return{changes:e}}return null}function OI(e,t,r=t.selection.ranges){let n=[],o=-1;for(let{from:e,to:i}of r){let r=n.length,a=1e9,s=bI(t,e).line;if(s){for(let r=e;r<=i;){let l=t.doc.lineAt(r);if(l.from>o&&(e==i||i>l.from)){o=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,r=l.text.slice(e,e+s.length)==s?e:-1;e<l.text.length&&e<a&&(a=e),n.push({line:l,comment:r,token:s,indent:e,empty:t,single:!1})}r=l.to+1}if(a<1e9)for(let e=r;e<n.length;e++)n[e].indent<n[e].line.text.length&&(n[e].indent=a);n.length==r+1&&(n[r].single=!0)}}if(2!=e&&n.some((e=>e.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:r,indent:o,empty:i,single:a}of n)!a&&i||e.push({from:t.from+o,insert:r+" "});let r=t.changes(e);return{changes:r,selection:t.selection.map(r,1)}}if(1!=e&&n.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:r,token:o}of n)if(r>=0){let n=t.from+r,i=n+o.length;" "==t.text[i-t.from]&&i++,e.push({from:n,to:i})}return{changes:e}}return null}const wI=DP.define(),AI=DP.define(),xI=mP.define(),kI=mP.define({combine:e=>JP(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,n)=>e(r,n)||t(r,n)})}),CI=AP.define({create:()=>BI.empty,update(e,t){let r=t.state.facet(kI),n=t.annotation(wI);if(n){let o=TI.fromTransaction(t,n.selection),i=n.side,a=0==i?e.undone:e.done;return a=o?jI(a,a.length,r.minDepth,o):MI(a,t.startState.selection),new BI(0==i?n.rest:a,0==i?a:n.rest)}let o=t.annotation(AI);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(QP.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=TI.fromTransaction(t),a=t.annotation(QP.time),s=t.annotation(QP.userEvent);return i?e=e.addChanges(i,a,s,r,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,r.newGroupDelay)),"full"!=o&&"after"!=o||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new BI(e.done.map(TI.fromJSON),e.undone.map(TI.fromJSON))});function SI(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let o=r.field(CI,!1);if(!o)return!1;let i=o.pop(e,r,t);return!!i&&(n(i),!0)}}const _I=SI(0,!1),EI=SI(1,!1),PI=SI(0,!0),qI=SI(1,!0);class TI{constructor(e,t,r,n,o){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=n,this.selectionsAfter=o}setSelAfter(e){return new TI(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(r=this.startSelection)||void 0===r?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new TI(e.changes&&oP.fromJSON(e.changes),[],e.mapped&&nP.fromJSON(e.mapped),e.startSelection&&pP.fromJSON(e.startSelection),e.selectionsAfter.map(pP.fromJSON))}static fromTransaction(e,t){let r=ZI;for(let t of e.startState.facet(xI)){let n=t(e);n.length&&(r=r.concat(n))}return!r.length&&e.changes.empty?null:new TI(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,ZI)}static selection(e){return new TI(void 0,ZI,void 0,void 0,e)}}function jI(e,t,r,n){let o=t+1>r+20?t-r-1:0,i=e.slice(o,t);return i.push(n),i}function RI(e,t){return e.length?t.length?e.concat(t):e:t}const ZI=[],$I=200;function MI(e,t){if(e.length){let r=e[e.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-$I));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),jI(e,e.length-1,1e9,r.setSelAfter(n)))}return[TI.selection([t])]}function NI(e){let t=e[e.length-1],r=e.slice();return r[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),r}function DI(e,t){if(!e.length)return e;let r=e.length,n=ZI;for(;r;){let o=LI(e[r-1],t,n);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,r);return t[r-1]=o,t}t=o.mapped,r--,n=o.selectionsAfter}return n.length?[TI.selection(n)]:ZI}function LI(e,t,r){let n=RI(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):ZI,r);if(!e.changes)return TI.selection(n);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new TI(o,BP.mapEffects(e.effects,t),a,e.startSelection.map(i),n)}const II=/^(input\.type|delete)($|\.)/;class BI{constructor(e,t,r=0,n=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=n}isolate(){return this.prevTime?new BI(this.done,this.undone):this}addChanges(e,t,r,n,o){let i=this.done,a=i[i.length-1];return i=a&&a.changes&&!a.changes.empty&&e.changes&&(!r||II.test(r))&&(!a.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(o,function(e,t){let r=[],n=!1;return e.iterChangedRanges(((e,t)=>r.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e<r.length;){let t=r[e++],a=r[e++];i>=t&&o<=a&&(n=!0)}})),n}(a.changes,e.changes))||"input.type.compose"==r)?jI(i,i.length-1,n.minDepth,new TI(e.changes.compose(a.changes),RI(e.effects,a.effects),a.mapped,a.startSelection,ZI)):jI(i,i.length,n.minDepth,e),new BI(i,ZI,t,r)}addSelection(e,t,r,n){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:ZI;return o.length>0&&t-this.prevTime<n&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&function(e,t){return e.ranges.length==t.ranges.length&&0===e.ranges.filter(((e,r)=>e.empty!=t.ranges[r].empty)).length}(o[o.length-1],e)?this:new BI(MI(this.done,e),this.undone,t,r)}addMapping(e){return new BI(DI(this.done,e),DI(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let n=0==e?this.done:this.undone;if(0==n.length)return null;let o=n[n.length-1],i=o.selectionsAfter[0]||t.selection;if(r&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:wI.of({side:e,rest:NI(n),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let r=1==n.length?ZI:n.slice(0,n.length-1);return o.mapped&&(r=DI(r,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:wI.of({side:e,rest:r,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}BI.empty=new BI(ZI,ZI);const QI=[{key:"Mod-z",run:_I,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:EI,preventDefault:!0},{linux:"Ctrl-Shift-z",run:EI,preventDefault:!0},{key:"Mod-u",run:PI,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:qI,preventDefault:!0}];function zI(e,t){return pP.create(e.ranges.map(t),e.mainIndex)}function UI(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function FI({state:e,dispatch:t},r){let n=zI(e.selection,r);return!n.eq(e.selection)&&(t(UI(e,n)),!0)}function WI(e,t){return pP.cursor(t?e.to:e.from)}function YI(e,t){return FI(e,(r=>r.empty?e.moveByChar(r,t):WI(r,t)))}function VI(e){return e.textDirectionAt(e.state.selection.main.head)==pj.LTR}const XI=e=>YI(e,!VI(e)),HI=e=>YI(e,VI(e));function GI(e,t){return FI(e,(r=>r.empty?e.moveByGroup(r,t):WI(r,t)))}function KI(e,t,r){if(t.type.prop(r))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function JI(e,t,r){let n,o,i=nM(e).resolveInner(t.head),a=r?KC.closedBy:KC.openedBy;for(let n=t.head;;){let t=r?i.childAfter(n):i.childBefore(n);if(!t)break;KI(e,t,a)?i=t:n=r?t.to:t.from}return o=i.type.prop(a)&&(n=r?ON(e,i.from,1):ON(e,i.to,-1))&&n.matched?r?n.end.to:n.end.from:r?i.to:i.from,pP.cursor(o,r?-1:1)}function eB(e,t){return FI(e,(r=>{if(!r.empty)return WI(r,t);let n=e.moveVertically(r,t);return n.head!=r.head?n:e.moveToLineBoundary(r,t)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const tB=e=>eB(e,!1),rB=e=>eB(e,!0);function nB(e){let t,r=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,o=0;if(r){for(let t of e.state.facet(pZ.scrollMargins)){let r=t(e);(null==r?void 0:r.top)&&(n=Math.max(null==r?void 0:r.top,n)),(null==r?void 0:r.bottom)&&(o=Math.max(null==r?void 0:r.bottom,o))}t=e.scrollDOM.clientHeight-n-o}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:o,selfScroll:r,height:Math.max(e.defaultLineHeight,t-5)}}function oB(e,t){let r,n=nB(e),{state:o}=e,i=zI(o.selection,(r=>r.empty?e.moveVertically(r,t,n.height):WI(r,t)));if(i.eq(o.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(o.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+n.marginTop,l=a.bottom-n.marginBottom;t&&t.top>s&&t.bottom<l&&(r=pZ.scrollIntoView(i.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(UI(o,i),{effects:r}),!0}const iB=e=>oB(e,!1),aB=e=>oB(e,!0);function sB(e,t,r){let n=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,r);if(o.head==t.head&&o.head!=(r?n.to:n.from)&&(o=e.moveToLineBoundary(t,r,!1)),!r&&o.head==n.from&&n.length){let r=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;r&&t.head!=n.from+r&&(o=pP.cursor(n.from+r))}return o}function lB(e,t){let r=zI(e.state.selection,(e=>{let r=t(e);return pP.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)}));return!r.eq(e.state.selection)&&(e.dispatch(UI(e.state,r)),!0)}function cB(e,t){return lB(e,(r=>e.moveByChar(r,t)))}const uB=e=>cB(e,!VI(e)),dB=e=>cB(e,VI(e));function pB(e,t){return lB(e,(r=>e.moveByGroup(r,t)))}function hB(e,t){return lB(e,(r=>e.moveVertically(r,t)))}const fB=e=>hB(e,!1),mB=e=>hB(e,!0);function gB(e,t){return lB(e,(r=>e.moveVertically(r,t,nB(e).height)))}const bB=e=>gB(e,!1),yB=e=>gB(e,!0),vB=({state:e,dispatch:t})=>(t(UI(e,{anchor:0})),!0),OB=({state:e,dispatch:t})=>(t(UI(e,{anchor:e.doc.length})),!0),wB=({state:e,dispatch:t})=>(t(UI(e,{anchor:e.selection.main.anchor,head:0})),!0),AB=({state:e,dispatch:t})=>(t(UI(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function xB(e,t){if(e.state.readOnly)return!1;let r="delete.selection",{state:n}=e,o=n.changeByRange((n=>{let{from:o,to:i}=n;if(o==i){let a=t(n);a<o?(r="delete.backward",a=kB(e,a,!1)):a>o&&(r="delete.forward",a=kB(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=kB(e,o,!1),i=kB(e,i,!0);return o==i?{range:n}:{changes:{from:o,to:i},range:pP.cursor(o,o<n.head?-1:1)}}));return!o.changes.empty&&(e.dispatch(n.update(o,{scrollIntoView:!0,userEvent:r,effects:"delete.selection"==r?pZ.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function kB(e,t,r){if(e instanceof pZ)for(let n of e.state.facet(pZ.atomicRanges).map((t=>t(e))))n.between(t,t,((e,n)=>{e<t&&n>t&&(t=r?n:e)}));return t}const CB=(e,t)=>xB(e,(r=>{let n,o,i=r.from,{state:a}=e,s=a.doc.lineAt(i);if(!t&&i>s.from&&i<s.from+200&&!/[^ \t]/.test(n=s.text.slice(0,i-s.from))){if("\t"==n[n.length-1])return i-1;let e=gq(n,a.tabSize)%bM(a)||bM(a);for(let t=0;t<e&&" "==n[n.length-1-t];t++)i--;o=i}else o=YE(s.text,i-s.from,t,t)+s.from,o==i&&s.number!=(t?a.doc.lines:1)?o+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(s.text.slice(o-s.from,i-s.from))&&(o=YE(s.text,o-s.from,!1,!1)+s.from);return o})),SB=e=>CB(e,!1),_B=e=>CB(e,!0),EB=(e,t)=>xB(e,(r=>{let n=r.head,{state:o}=e,i=o.doc.lineAt(n),a=o.charCategorizer(n);for(let e=null;;){if(n==(t?i.to:i.from)){n==r.head&&i.number!=(t?o.doc.lines:1)&&(n+=t?1:-1);break}let s=YE(i.text,n-i.from,t)+i.from,l=i.text.slice(Math.min(n,s)-i.from,Math.max(n,s)-i.from),c=a(l);if(null!=e&&c!=e)break;" "==l&&n==r.head||(e=c),n=s}return n})),PB=e=>EB(e,!1);function qB(e){let t=[],r=-1;for(let n of e.selection.ranges){let o=e.doc.lineAt(n.from),i=e.doc.lineAt(n.to);if(n.empty||n.to!=i.from||(i=e.doc.lineAt(n.to-1)),r>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(n)}else t.push({from:o.from,to:i.to,ranges:[n]});r=i.number+1}return t}function TB(e,t,r){if(e.readOnly)return!1;let n=[],o=[];for(let t of qB(e)){if(r?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(r?t.to+1:t.from-1),a=i.length+1;if(r){n.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let r of t.ranges)o.push(pP.range(Math.min(e.doc.length,r.anchor+a),Math.min(e.doc.length,r.head+a)))}else{n.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(pP.range(e.anchor-a,e.head-a))}}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:pP.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function jB(e,t,r){if(e.readOnly)return!1;let n=[];for(let t of qB(e))r?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const RB=$B(!1),ZB=$B(!0);function $B(e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let n=t.changeByRange((r=>{let{from:n,to:o}=r,i=t.doc.lineAt(n),a=!e&&n==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let r,n=nM(e).resolveInner(t),o=n.childBefore(t),i=n.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(r=o.type.prop(KC.closedBy))&&r.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(t,n);e&&(n=o=(o<=i.to?i:t.doc.lineAt(o)).to);let s=new OM(t,{simulateBreak:n,simulateDoubleBreak:!!a}),l=vM(s,n);for(null==l&&(l=gq(/^\s*/.exec(t.doc.lineAt(n).text)[0],t.tabSize));o<i.to&&/\s/.test(i.text[o-i.from]);)o++;a?({from:n,to:o}=a):n>i.from&&n<i.from+100&&!/\S/.test(i.text.slice(0,n))&&(n=i.from);let c=["",yM(t,l)];return a&&c.push(yM(t,s.lineIndent(i.from,-1))),{changes:{from:n,to:o,insert:RE.of(c)},range:pP.cursor(n+1+c[1].length)}}));return r(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function MB(e,t){let r=-1;return e.changeByRange((n=>{let o=[];for(let i=n.from;i<=n.to;){let a=e.doc.lineAt(i);a.number>r&&(n.empty||n.to>a.from)&&(t(a,o,n),r=a.number),i=a.to+1}let i=e.changes(o);return{changes:o,range:pP.range(i.mapPos(n.anchor,1),i.mapPos(n.head,1))}}))}const NB=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(MB(e,((t,r)=>{r.push({from:t.from,insert:e.facet(gM)})})),{userEvent:"input.indent"})),!0),DB=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(MB(e,((t,r)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let o=gq(n,e.tabSize),i=0,a=yM(e,Math.max(0,o-bM(e)));for(;i<n.length&&i<a.length&&n.charCodeAt(i)==a.charCodeAt(i);)i++;r.push({from:t.from+i,to:t.from+n.length,insert:a.slice(i)})})),{userEvent:"delete.dedent"})),!0),LB=[{key:"Ctrl-b",run:XI,shift:uB,preventDefault:!0},{key:"Ctrl-f",run:HI,shift:dB},{key:"Ctrl-p",run:tB,shift:fB},{key:"Ctrl-n",run:rB,shift:mB},{key:"Ctrl-a",run:e=>FI(e,(t=>pP.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>lB(e,(t=>pP.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>FI(e,(t=>pP.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>lB(e,(t=>pP.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:_B},{key:"Ctrl-h",run:SB},{key:"Ctrl-k",run:e=>xB(e,(t=>{let r=e.lineBlockAt(t.head).to;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}))},{key:"Ctrl-Alt-h",run:PB},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:RE.of(["",""])},range:pP.cursor(e.from)})));return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let r=t.from,n=e.doc.lineAt(r),o=r==n.from?r-1:YE(n.text,r-n.from,!1)+n.from,i=r==n.to?r+1:YE(n.text,r-n.from,!0)+n.from;return{changes:{from:o,to:i,insert:e.doc.slice(r,i).append(e.doc.slice(o,r))},range:pP.cursor(i)}}));return!r.changes.empty&&(t(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:aB}],IB=[{key:"ArrowLeft",run:XI,shift:uB,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>GI(e,!VI(e)),shift:e=>pB(e,!VI(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>FI(e,(t=>sB(e,t,!VI(e)))),shift:e=>lB(e,(t=>sB(e,t,!VI(e)))),preventDefault:!0},{key:"ArrowRight",run:HI,shift:dB,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>GI(e,VI(e)),shift:e=>pB(e,VI(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>FI(e,(t=>sB(e,t,VI(e)))),shift:e=>lB(e,(t=>sB(e,t,VI(e)))),preventDefault:!0},{key:"ArrowUp",run:tB,shift:fB,preventDefault:!0},{mac:"Cmd-ArrowUp",run:vB,shift:wB},{mac:"Ctrl-ArrowUp",run:iB,shift:bB},{key:"ArrowDown",run:rB,shift:mB,preventDefault:!0},{mac:"Cmd-ArrowDown",run:OB,shift:AB},{mac:"Ctrl-ArrowDown",run:aB,shift:yB},{key:"PageUp",run:iB,shift:bB},{key:"PageDown",run:aB,shift:yB},{key:"Home",run:e=>FI(e,(t=>sB(e,t,!1))),shift:e=>lB(e,(t=>sB(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:vB,shift:wB},{key:"End",run:e=>FI(e,(t=>sB(e,t,!0))),shift:e=>lB(e,(t=>sB(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:OB,shift:AB},{key:"Enter",run:RB},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:SB,shift:SB},{key:"Delete",run:_B},{key:"Mod-Backspace",mac:"Alt-Backspace",run:PB},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>EB(e,!0)},{mac:"Mod-Backspace",run:e=>xB(e,(t=>{let r=e.moveToLineBoundary(t,!1).head;return t.head>r?r:Math.max(0,t.head-1)}))},{mac:"Mod-Delete",run:e=>xB(e,(t=>{let r=e.moveToLineBoundary(t,!0).head;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}))}].concat(LB.map((e=>({mac:e.key,run:e.run,shift:e.shift})))),BB=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>FI(e,(t=>JI(e.state,t,!VI(e)))),shift:e=>lB(e,(t=>JI(e.state,t,!VI(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>FI(e,(t=>JI(e.state,t,VI(e)))),shift:e=>lB(e,(t=>JI(e.state,t,VI(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>TB(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>jB(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>TB(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>jB(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let r=e.selection,n=null;return r.ranges.length>1?n=pP.create([r.main]):r.main.empty||(n=pP.create([pP.cursor(r.main.head)])),!!n&&(t(UI(e,n)),!0)}},{key:"Mod-Enter",run:ZB},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let r=qB(e).map((({from:t,to:r})=>pP.range(t,Math.min(r+1,e.doc.length))));return t(e.update({selection:pP.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let r=zI(e.selection,(t=>{var r;for(let n=nM(e).resolveStack(t.from,1);n;n=n.next){let{node:e}=n;if((e.from<t.from&&e.to>=t.to||e.to>t.to&&e.from<=t.from)&&(null===(r=e.parent)||void 0===r?void 0:r.parent))return pP.range(e.to,e.from)}return t}));return t(UI(e,r)),!0},preventDefault:!0},{key:"Mod-[",run:DB},{key:"Mod-]",run:NB},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Object.create(null),n=new OM(e,{overrideIndentation:e=>{let t=r[e];return null==t?-1:t}}),o=MB(e,((t,o,i)=>{let a=vM(n,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=yM(e,a);(s!=l||i.from<t.from+s.length)&&(r[t.from]=a,o.push({from:t.from,to:t.from+s.length,insert:l}))}));return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,r=t.changes(qB(t).map((({from:e,to:r})=>(e>0?e--:r<t.doc.length&&r++,{from:e,to:r})))),n=zI(t.selection,(t=>e.moveVertically(t,!0))).map(r);return e.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,r){let n=!1,o=zI(e.selection,(t=>{let o=ON(e,t.head,-1)||ON(e,t.head,1)||t.head>0&&ON(e,t.head-1,1)||t.head<e.doc.length&&ON(e,t.head+1,-1);if(!o||!o.end)return t;n=!0;let i=o.start.from==t.head?o.end.to:o.end.from;return r?pP.range(t.anchor,i):pP.cursor(i)}));return!!n&&(t(UI(e,o)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=bI(e.state,r.from);return n.line?fI(e):!!n.block&&gI(e)}},{key:"Alt-A",run:mI}].concat(IB),QB={key:"Tab",run:NB,shift:DB};function zB(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,r=arguments[1];if(r&&"object"==typeof r&&null==r.nodeType&&!Array.isArray(r)){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var o=r[n];"string"==typeof o?e.setAttribute(n,o):null!=o&&(e[n]=o)}t++}for(;t<arguments.length;t++)UB(e,arguments[t]);return e}function UB(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var r=0;r<t.length;r++)UB(e,t[r])}}const FB="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class WB{constructor(e,t,r=0,n=e.length,o,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,n),this.bufferStart=r,this.normalize=o?e=>o(FB(e)):FB,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return KE(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=JE(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=eP(e);let n=this.normalize(t);for(let e=0,o=r;;e++){let i=n.charCodeAt(e),a=this.match(i,o);if(e==n.length-1){if(a)return this.value=a,this;break}o==r&&e<t.length&&t.charCodeAt(e)==i&&o++}}}match(e,t){let r=null;for(let n=0;n<this.matches.length;n+=2){let o=this.matches[n],i=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[n+1],to:t+1}:(this.matches[n]++,i=!0)),i||(this.matches.splice(n,2),n-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?r={from:t,to:t+1}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(WB.prototype[Symbol.iterator]=function(){return this});const YB={from:-1,to:-1,match:/.*/.exec("")},VB="gm"+(null==/x/.unicode?"":"u");class XB{constructor(e,t,r,n=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=YB,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new KB(e,t,r,n,o);this.re=new RegExp(t,VB+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.iter=e.iter();let i=e.lineAt(n);this.curLineStart=i.from,this.matchPos=JB(e,n),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,n=r+t[0].length;if(this.matchPos=JB(this.text,n+(r==n?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<n||r>this.value.to)&&(!this.test||this.test(r,n,t)))return this.value={from:r,to:n,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const HB=new WeakMap;class GB{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let n=HB.get(e);if(!n||n.from>=r||n.to<=t){let n=new GB(t,e.sliceString(t,r));return HB.set(e,n),n}if(n.from==t&&n.to==r)return n;let{text:o,from:i}=n;return i>t&&(o=e.sliceString(t,i)+o,i=t),n.to<r&&(o+=e.sliceString(n.to,r)),HB.set(e,new GB(i,o)),new GB(t,o.slice(t-i,r-i))}}class KB{constructor(e,t,r,n,o){this.text=e,this.to=o,this.done=!1,this.value=YB,this.matchPos=JB(e,n),this.re=new RegExp(t,VB+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.flat=GB.get(e,n,this.chunkEnd(n+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,r=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,r,t)))return this.value={from:e,to:r,match:t},this.matchPos=JB(this.text,r+(e==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=GB.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function JB(e,t){if(t>=e.length)return t;let r,n=e.lineAt(t);for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function eQ(e){let t=zB("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function r(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:n}=e,o=n.doc.lineAt(n.selection.main.head),[,i,a,s,l]=r,c=s?+s.slice(1):0,u=a?+a:o.number;if(a&&l){let e=u/100;i&&(e=e*("-"==i?-1:1)+o.number/n.doc.lines),u=Math.round(n.doc.lines*e)}else a&&i&&(u=u*("-"==i?-1:1)+o.number);let d=n.doc.line(Math.max(1,Math.min(n.doc.lines,u))),p=pP.cursor(d.from+Math.max(0,Math.min(c,d.length)));e.dispatch({effects:[tQ.of(!1),pZ.scrollIntoView(p.from,{y:"center"})],selection:p}),e.focus()}return{dom:zB("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:tQ.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},zB("label",e.state.phrase("Go to line"),": ",t)," ",zB("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(XB.prototype[Symbol.iterator]=KB.prototype[Symbol.iterator]=function(){return this});const tQ=BP.define(),rQ=AP.define({create:()=>!0,update(e,t){for(let r of t.effects)r.is(tQ)&&(e=r.value);return e},provide:e=>E$.from(e,(e=>e?eQ:null))}),nQ=pZ.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),oQ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},iQ=mP.define({combine:e=>JP(e,oQ,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),aQ=PT.mark({class:"cm-selectionMatch"}),sQ=PT.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lQ(e,t,r,n){return!(0!=r&&e(t.sliceDoc(r-1,r))==XP.Word||n!=t.doc.length&&e(t.sliceDoc(n,n+1))==XP.Word)}const cQ=JT.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(iQ),{state:r}=e,n=r.selection;if(n.ranges.length>1)return PT.none;let o,i=n.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return PT.none;let e=r.wordAt(i.head);if(!e)return PT.none;a=r.charCategorizer(i.head),o=r.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return PT.none;if(t.wholeWords){if(o=r.sliceDoc(i.from,i.to),a=r.charCategorizer(i.head),!lQ(a,r,i.from,i.to)||!function(e,t,r,n){return e(t.sliceDoc(r,r+1))==XP.Word&&e(t.sliceDoc(n-1,n))==XP.Word}(a,r,i.from,i.to))return PT.none}else if(o=r.sliceDoc(i.from,i.to).trim(),!o)return PT.none}let s=[];for(let n of e.visibleRanges){let e=new WB(r.doc,o,n.from,n.to);for(;!e.next().done;){let{from:n,to:o}=e.value;if((!a||lQ(a,r,n,o))&&(i.empty&&n<=i.from&&o>=i.to?s.push(sQ.range(n,o)):(n>=i.to||o<=i.from)&&s.push(aQ.range(n,o)),s.length>t.maxMatches))return PT.none}}return PT.set(s)}},{decorations:e=>e.decorations}),uQ=pZ.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),dQ=mP.define({combine:e=>JP(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new IQ(e),scrollToMatch:e=>pZ.scrollIntoView(e)})});class pQ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,VB),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new vQ(this):new mQ(this)}getCursor(e,t=0,r){let n=e.doc?e:KP.create({doc:e});return null==r&&(r=n.doc.length),this.regexp?gQ(this,n,t,r):fQ(this,n,t,r)}}class hQ{constructor(e){this.spec=e}}function fQ(e,t,r,n){return new WB(t.doc,e.unquoted,r,n,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(r,n,o,i)=>((i>r||i+o.length<n)&&(i=Math.max(0,r-2),o=e.sliceString(i,Math.min(e.length,n+2))),!(t(bQ(o,r-i))==XP.Word&&t(yQ(o,r-i))==XP.Word||t(yQ(o,n-i))==XP.Word&&t(bQ(o,n-i))==XP.Word))}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}class mQ extends hQ{constructor(e){super(e)}nextMatch(e,t,r){let n=fQ(this.spec,e,r,e.doc.length).nextOverlapping();return n.done&&(n=fQ(this.spec,e,0,t).nextOverlapping()),n.done?null:n.value}prevMatchInRange(e,t,r){for(let n=r;;){let r=Math.max(t,n-1e4-this.spec.unquoted.length),o=fQ(this.spec,e,r,n),i=null;for(;!o.nextOverlapping().done;)i=o.value;if(i)return i;if(r==t)return null;n-=1e4}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=fQ(this.spec,e,0,e.doc.length),n=[];for(;!r.next().done;){if(n.length>=t)return null;n.push(r.value)}return n}highlight(e,t,r,n){let o=fQ(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)n(o.value.from,o.value.to)}}function gQ(e,t,r,n){return new XB(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,r)=>!r[0].length||(o(bQ(r.input,r.index))!=XP.Word||o(yQ(r.input,r.index))!=XP.Word)&&(o(yQ(r.input,r.index+r[0].length))!=XP.Word||o(bQ(r.input,r.index+r[0].length))!=XP.Word)):void 0},r,n);var o}function bQ(e,t){return e.slice(YE(e,t,!1),t)}function yQ(e,t){return e.slice(t,YE(e,t))}class vQ extends hQ{nextMatch(e,t,r){let n=gQ(this.spec,e,r,e.doc.length).next();return n.done&&(n=gQ(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,r){for(let n=1;;n++){let o=Math.max(t,r-1e4*n),i=gQ(this.spec,e,o,r),a=null;for(;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((t,r)=>"$"==r?"$":"&"==r?e.match[0]:"0"!=r&&+r<e.match.length?e.match[r]:t))}matchAll(e,t){let r=gQ(this.spec,e,0,e.doc.length),n=[];for(;!r.next().done;){if(n.length>=t)return null;n.push(r.value)}return n}highlight(e,t,r,n){let o=gQ(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)n(o.value.from,o.value.to)}}const OQ=BP.define(),wQ=BP.define(),AQ=AP.define({create:e=>new xQ(ZQ(e).create(),null),update(e,t){for(let r of t.effects)r.is(OQ)?e=new xQ(r.value.create(),e.panel):r.is(wQ)&&(e=new xQ(e.query,r.value?RQ:null));return e},provide:e=>E$.from(e,(e=>e.panel))});class xQ{constructor(e,t){this.query=e,this.panel=t}}const kQ=PT.mark({class:"cm-searchMatch"}),CQ=PT.mark({class:"cm-searchMatch cm-searchMatch-selected"}),SQ=JT.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(AQ))}update(e){let t=e.state.field(AQ);(t!=e.startState.field(AQ)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return PT.none;let{view:r}=this,n=new iq;for(let t=0,o=r.visibleRanges,i=o.length;t<i;t++){let{from:a,to:s}=o[t];for(;t<i-1&&s>o[t+1].from-500;)s=o[++t].to;e.highlight(r.state,a,s,((e,t)=>{let o=r.state.selection.ranges.some((r=>r.from==e&&r.to==t));n.add(e,t,o?CQ:kQ)}))}return n.finish()}},{decorations:e=>e.decorations});function _Q(e){return t=>{let r=t.state.field(AQ,!1);return r&&r.query.spec.valid?e(t,r):NQ(t)}}const EQ=_Q(((e,{query:t})=>{let{to:r}=e.state.selection.main,n=t.nextMatch(e.state,r,r);if(!n)return!1;let o=pP.single(n.from,n.to),i=e.state.facet(dQ);return e.dispatch({selection:o,effects:[UQ(e,n),i.scrollToMatch(o.main,e)],userEvent:"select.search"}),MQ(e),!0})),PQ=_Q(((e,{query:t})=>{let{state:r}=e,{from:n}=r.selection.main,o=t.prevMatch(r,n,n);if(!o)return!1;let i=pP.single(o.from,o.to),a=e.state.facet(dQ);return e.dispatch({selection:i,effects:[UQ(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),MQ(e),!0})),qQ=_Q(((e,{query:t})=>{let r=t.matchAll(e.state,1e3);return!(!r||!r.length||(e.dispatch({selection:pP.create(r.map((e=>pP.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),TQ=_Q(((e,{query:t})=>{let{state:r}=e,{from:n,to:o}=r.selection.main;if(r.readOnly)return!1;let i=t.nextMatch(r,n,n);if(!i)return!1;let a,s,l=[],c=[];if(i.from==n&&i.to==o&&(s=r.toText(t.getReplacement(i)),l.push({from:i.from,to:i.to,insert:s}),i=t.nextMatch(r,i.from,i.to),c.push(pZ.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(n).number)+"."))),i){let t=0==l.length||l[0].from>=i.to?0:i.to-i.from-s.length;a=pP.single(i.from-t,i.to-t),c.push(UQ(e,i)),c.push(r.facet(dQ).scrollToMatch(a.main,e))}return e.dispatch({changes:l,selection:a,effects:c,userEvent:"input.replace"}),!0})),jQ=_Q(((e,{query:t})=>{if(e.state.readOnly)return!1;let r=t.matchAll(e.state,1e9).map((e=>{let{from:r,to:n}=e;return{from:r,to:n,insert:t.getReplacement(e)}}));if(!r.length)return!1;let n=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:pZ.announce.of(n),userEvent:"input.replace.all"}),!0}));function RQ(e){return e.state.facet(dQ).createPanel(e)}function ZQ(e,t){var r,n,o,i,a;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let c=e.facet(dQ);return new pQ({search:(null!==(r=null==t?void 0:t.literal)&&void 0!==r?r:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==t?void 0:t.caseSensitive)&&void 0!==n?n:c.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:c.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:c.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:c.wholeWord})}function $Q(e){let t=k$(e,RQ);return t&&t.dom.querySelector("[main-field]")}function MQ(e){let t=$Q(e);t&&t==e.root.activeElement&&t.select()}const NQ=e=>{let t=e.state.field(AQ,!1);if(t&&t.panel){let r=$Q(e);if(r&&r!=e.root.activeElement){let n=ZQ(e.state,t.query.spec);n.valid&&e.dispatch({effects:OQ.of(n)}),r.focus(),r.select()}}else e.dispatch({effects:[wQ.of(!0),t?OQ.of(ZQ(e.state,t.query.spec)):BP.appendConfig.of(WQ)]});return!0},DQ=e=>{let t=e.state.field(AQ,!1);if(!t||!t.panel)return!1;let r=k$(e,RQ);return r&&r.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:wQ.of(!1)}),!0},LQ=[{key:"Mod-f",run:NQ,scope:"editor search-panel"},{key:"F3",run:EQ,shift:PQ,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:EQ,shift:PQ,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:DQ,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:n,to:o}=r.main,i=[],a=0;for(let t=new WB(e.doc,e.sliceDoc(n,o));!t.next().done;){if(i.length>1e3)return!1;t.value.from==n&&(a=i.length),i.push(pP.range(t.value.from,t.value.to))}return t(e.update({selection:pP.create(i,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=k$(e,eQ);if(!t){let r=[tQ.of(!0)];null==e.state.field(rQ,!1)&&r.push(BP.appendConfig.of([rQ,nQ])),e.dispatch({effects:r}),t=k$(e,eQ)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:r}=e,n=pP.create(r.ranges.map((t=>e.wordAt(t.head)||pP.cursor(t.head))),r.mainIndex);return!n.eq(r)&&(t(e.update({selection:n})),!0)})({state:e,dispatch:t});let n=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=n)))return!1;let o=function(e,t){let{main:r,ranges:n}=e.selection,o=e.wordAt(r.head),i=o&&o.from==r.from&&o.to==r.to;for(let r=!1,o=new WB(e.doc,t,n[n.length-1].to);;){if(o.next(),!o.done){if(r&&n.some((e=>e.from==o.value.from)))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(r)return null;o=new WB(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),r=!0}}(e,n);return!!o&&(t(e.update({selection:e.selection.addRange(pP.range(o.from,o.to),!1),effects:pZ.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class IQ{constructor(e){this.view=e;let t=this.query=e.state.field(AQ).query.spec;function r(e,t,r){return zB("button",{class:"cm-button",name:e,onclick:t,type:"button"},r)}this.commit=this.commit.bind(this),this.searchField=zB("input",{value:t.search,placeholder:BQ(e,"Find"),"aria-label":BQ(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=zB("input",{value:t.replace,placeholder:BQ(e,"Replace"),"aria-label":BQ(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=zB("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=zB("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=zB("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=zB("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,r("next",(()=>EQ(e)),[BQ(e,"next")]),r("prev",(()=>PQ(e)),[BQ(e,"previous")]),r("select",(()=>qQ(e)),[BQ(e,"all")]),zB("label",null,[this.caseField,BQ(e,"match case")]),zB("label",null,[this.reField,BQ(e,"regexp")]),zB("label",null,[this.wordField,BQ(e,"by word")]),...e.state.readOnly?[]:[zB("br"),this.replaceField,r("replace",(()=>TQ(e)),[BQ(e,"replace")]),r("replaceAll",(()=>jQ(e)),[BQ(e,"replace all")])],zB("button",{name:"close",onclick:()=>DQ(e),"aria-label":BQ(e,"close"),type:"button"},["×"])])}commit(){let e=new pQ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:OQ.of(e)}))}keydown(e){var t,r;r=e,CZ(AZ((t=this.view).state),r,t,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?PQ:EQ)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),TQ(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(OQ)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(dQ).top}}function BQ(e,t){return e.state.phrase(t)}const QQ=30,zQ=/[\s\.,:;?!]/;function UQ(e,{from:t,to:r}){let n=e.state.doc.lineAt(t),o=e.state.doc.lineAt(r).to,i=Math.max(n.from,t-QQ),a=Math.min(o,r+QQ),s=e.state.sliceDoc(i,a);if(i!=n.from)for(let e=0;e<QQ;e++)if(!zQ.test(s[e+1])&&zQ.test(s[e])){s=s.slice(e);break}if(a!=o)for(let e=s.length-1;e>s.length-QQ;e--)if(!zQ.test(s[e-1])&&zQ.test(s[e])){s=s.slice(0,e);break}return pZ.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${n.number}.`)}const FQ=pZ.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),WQ=[AQ,kP.low(SQ),FQ];class YQ{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class VQ{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let n=e,o=r.facet(iz).markerFilter;o&&(n=o(n));let i=PT.set(n.map((e=>e.from==e.to||e.from==e.to-1&&r.doc.lineAt(e.from).to==e.from?PT.widget({widget:new lz(e),diagnostic:e}).range(e.from):PT.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to))),!0);return new VQ(i,t,XQ(i))}}function XQ(e,t=null,r=0){let n=null;return e.between(r,1e9,((e,r,{spec:o})=>{if(!t||o.diagnostic==t)return n=new YQ(e,r,o.diagnostic),!1})),n}const HQ=BP.define(),GQ=BP.define(),KQ=BP.define(),JQ=AP.define({create:()=>new VQ(PT.none,null,null),update(e,t){if(t.docChanged){let r=e.diagnostics.map(t.changes),n=null;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);n=XQ(r,e.selected.diagnostic,o)||XQ(r,null,o)}e=new VQ(r,e.panel,n)}for(let r of t.effects)r.is(HQ)?e=VQ.init(r.value,e.panel,t.state):r.is(GQ)?e=new VQ(e.diagnostics,r.value?uz.open:null,e.selected):r.is(KQ)&&(e=new VQ(e.diagnostics,e.panel,r.value));return e},provide:e=>[E$.from(e,(e=>e.panel)),pZ.decorations.from(e,(e=>e.diagnostics))]}),ez=PT.mark({class:"cm-lintRange cm-lintRange-active"});function tz(e,t,r){let{diagnostics:n}=e.state.field(JQ),o=[],i=2e8,a=0;n.between(t-(r<0?1:0),t+(r>0?1:0),((e,n,{spec:s})=>{t>=e&&t<=n&&(e==n||(t>e||r>0)&&(t<n||r<0))&&(o.push(s.diagnostic),i=Math.min(e,i),a=Math.max(n,a))}));let s=e.state.facet(iz).tooltipFilter;return s&&(o=s(o)),o.length?{pos:i,end:a,above:e.state.doc.lineAt(i).to<a,create:()=>({dom:rz(e,o)})}:null}function rz(e,t){return zB("ul",{class:"cm-tooltip-lint"},t.map((t=>sz(e,t,!1))))}const nz=e=>{let t=e.state.field(JQ,!1);return!(!t||!t.panel||(e.dispatch({effects:GQ.of(!1)}),0))},oz=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(JQ,!1);var r,n;t&&t.panel||e.dispatch({effects:(r=e.state,n=[GQ.of(!0)],r.field(JQ,!1)?n:n.concat(BP.appendConfig.of(hz)))});let o=k$(e,uz.open);return o&&o.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(JQ,!1);if(!t)return!1;let r=e.state.selection.main,n=t.diagnostics.iter(r.to+1);return!(!n.value&&(n=t.diagnostics.iter(0),!n.value||n.from==r.from&&n.to==r.to)||(e.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),0))}}],iz=mP.define({combine:e=>Object.assign({sources:e.map((e=>e.source))},JP(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))});function az(e){let t=[];if(e)e:for(let{name:r}of e){for(let e=0;e<r.length;e++){let n=r[e];if(/[a-zA-Z]/.test(n)&&!t.some((e=>e.toLowerCase()==n.toLowerCase()))){t.push(n);continue e}}t.push("")}return t}function sz(e,t,r){var n;let o=r?az(t.actions):[];return zB("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},zB("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(n=t.actions)||void 0===n?void 0:n.map(((r,n)=>{let i=!1,a=n=>{if(n.preventDefault(),i)return;i=!0;let o=XQ(e.state.field(JQ).diagnostics,t);o&&r.apply(e,o.from,o.to)},{name:s}=r,l=o[n]?s.indexOf(o[n]):-1,c=l<0?s:[s.slice(0,l),zB("u",s.slice(l,l+1)),s.slice(l+1)];return zB("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${o[n]})"`}.`},c)})),t.source&&zB("div",{class:"cm-diagnosticSource"},t.source))}class lz extends _T{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return zB("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class cz{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=sz(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class uz{constructor(e){this.view=e,this.items=[],this.list=zB("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)nz(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:r}=this.items[this.selectedIndex],n=az(r.actions);for(let o=0;o<n.length;o++)if(n[o].toUpperCase().charCodeAt(0)==t.keyCode){let t=XQ(this.view.state.field(JQ).diagnostics,r);t&&r.actions[o].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=zB("div",{class:"cm-panel-lint"},this.list,zB("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>nz(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(JQ).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(JQ),r=0,n=!1,o=null;for(e.between(0,this.view.state.doc.length,((e,i,{spec:a})=>{let s,l=-1;for(let e=r;e<this.items.length;e++)if(this.items[e].diagnostic==a.diagnostic){l=e;break}l<0?(s=new cz(this.view,a.diagnostic),this.items.splice(r,0,s),n=!0):(s=this.items[l],l>r&&(this.items.splice(r,l-r),n=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),o=s):s.dom.hasAttribute("aria-selected")&&s.dom.removeAttribute("aria-selected"),r++}));r<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)n=!0,this.items.pop();0==this.items.length&&(this.items.push(new cz(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),n=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let r=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/r:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/r)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=XQ(this.view.state.field(JQ).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:KQ.of(t)})}static open(e){return new uz(e)}}function dz(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const pz=pZ.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:dz("#d11")},".cm-lintRange-warning":{backgroundImage:dz("orange")},".cm-lintRange-info":{backgroundImage:dz("#999")},".cm-lintRange-hint":{backgroundImage:dz("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),hz=[JQ,pZ.decorations.compute([JQ],(e=>{let{selected:t,panel:r}=e.field(JQ);return t&&r&&t.from!=t.to?PT.set([ez.range(t.from,t.to)]):PT.none})),O$(tz,{hideOn:function(e,t){let r=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(HQ)))&&!e.changes.touchesRange(r.from,r.to))}}),pz];var fz=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,r=[];!1!==e.closeBracketsKeymap&&(r=r.concat(sL)),!1!==e.defaultKeymap&&(r=r.concat(BB)),!1!==e.searchKeymap&&(r=r.concat(LQ)),!1!==e.historyKeymap&&(r=r.concat(QI)),!1!==e.foldKeymap&&(r=r.concat(UM)),!1!==e.completionKeymap&&(r=r.concat(mL)),!1!==e.lintKeymap&&(r=r.concat(oz));var n=[];return!1!==e.lineNumbers&&n.push(function(e={}){return[z$.of(e),$$(),W$]}()),!1!==e.highlightActiveLineGutter&&n.push(X$),!1!==e.highlightSpecialChars&&n.push(function(e={}){return[XZ.of(e),HZ||(HZ=JT.fromClass(class{constructor(e){this.view=e,this.decorations=PT.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(XZ)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new UZ({regexp:e.specialChars,decoration:(t,r,n)=>{let{doc:o}=r.state,i=KE(t[0],0);if(9==i){let e=o.lineAt(n),t=r.state.tabSize,i=gq(e.text,t,n-e.from);return PT.replace({widget:new KZ((t-i%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=PT.replace({widget:new GZ(e,i)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(XZ);e.startState.facet(XZ)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&n.push(function(e={}){return[CI,kI.of(e),pZ.domEventHandlers({beforeinput(e,t){let r="historyUndo"==e.inputType?_I:"historyRedo"==e.inputType?EI:null;return!!r&&(e.preventDefault(),r(t))}})]}()),!1!==e.foldGutter&&n.push(function(e={}){let t=Object.assign(Object.assign({},GM),e),r=new KM(t,!0),n=new KM(t,!1),o=JT.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(pM)!=e.state.facet(pM)||e.startState.field(LM,!1)!=e.state.field(LM,!1)||nM(e.startState)!=nM(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new iq;for(let o of e.viewportLineBlocks){let i=IM(e.state,o.from,o.to)?n:ZM(e.state,o.from,o.to)?r:null;i&&t.add(o.from,o.from,i)}return t.finish()}}),{domEventHandlers:i}=t;return[o,R$({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||oq.empty},initialSpacer:()=>new KM(t,!1),domEventHandlers:Object.assign(Object.assign({},i),{click:(e,t,r)=>{if(i.click&&i.click(e,t,r))return!0;let n=IM(e.state,t.from,t.to);if(n)return e.dispatch({effects:NM.of(n)}),!0;let o=ZM(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:MM.of(o)}),!0)}})}),YM()]}()),!1!==e.drawSelection&&n.push(function(e={}){return[RZ.of(e),$Z,NZ,LZ,WT.of(!0)]}()),!1!==e.dropCursor&&n.push([BZ,QZ]),!1!==e.allowMultipleSelections&&n.push(KP.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&n.push(KP.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let r=e.newDoc,{head:n}=e.newSelection.main,o=r.lineAt(n);if(n>o.from+200)return e;let i=r.sliceString(o.from,n);if(!t.some((e=>e.test(i))))return e;let{state:a}=e,s=-1,l=[];for(let{head:e}of a.selection.ranges){let t=a.doc.lineAt(e);if(t.from==s)continue;s=t.from;let r=vM(a,t.from);if(null==r)continue;let n=/^\s*/.exec(t.text)[0],o=yM(a,r);n!=o&&l.push({from:t.from,to:t.from+n.length,insert:o})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&n.push(oN(sN,{fallback:!0})),!1!==e.bracketMatching&&n.push(function(e={}){return[dN.of(e),gN]}()),!1!==e.closeBrackets&&n.push([aL,tL]),!1!==e.autocompletion&&n.push(function(e={}){return[ED,dD.of(e),RD,gL,ZD]}()),!1!==e.rectangularSelection&&n.push(function(e){let t=e=>e.altKey&&0==e.button;return pZ.mouseSelectionStyle.of(((e,r)=>t(r)?function(e,t){let r=n$(e,t),n=e.state.selection;return r?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(r.line).from),o=e.state.doc.lineAt(t);r={line:o.number,col:r.col,off:Math.min(r.off,o.length)},n=n.map(e.changes)}},get(t,o,i){let a=n$(e,t);if(!a)return n;let s=function(e,t,r){let n=Math.min(t.line,r.line),o=Math.max(t.line,r.line),i=[];if(t.off>r$||r.off>r$||t.col<0||r.col<0){let a=Math.min(t.off,r.off),s=Math.max(t.off,r.off);for(let t=n;t<=o;t++){let r=e.doc.line(t);r.length<=s&&i.push(pP.range(r.from+a,r.to+s))}}else{let a=Math.min(t.col,r.col),s=Math.max(t.col,r.col);for(let t=n;t<=o;t++){let r=e.doc.line(t),n=bq(r.text,a,e.tabSize,!0);if(n<0)i.push(pP.cursor(r.to));else{let t=bq(r.text,s,e.tabSize);i.push(pP.range(r.from+n,r.from+t))}}}return i}(e.state,r,a);return s.length?i?pP.create(s.concat(n.ranges)):pP.create(s):n}}:null}(e,r):null))}()),!1!==t&&n.push(function(e={}){let[t,r]=o$[e.key||"Alt"],n=JT.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||r(e))},keyup(e){e.keyCode!=t&&r(e)||this.set(!1)},mousemove(e){this.set(r(e))}}});return[n,pZ.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(n))||void 0===t?void 0:t.isDown)?i$:null}))]}()),!1!==e.highlightActiveLine&&n.push(e$),!1!==e.highlightSelectionMatches&&n.push(function(e){let t=[uQ,cQ];return t}()),e.tabSize&&"number"==typeof e.tabSize&&n.push(gM.of(" ".repeat(e.tabSize))),n.concat([OZ.of(r.flat())]).filter(Boolean)};const mz="#e06c75",gz="#abb2bf",bz="#7d8799",yz="#d19a66",vz="#2c313a",Oz="#282c34",wz="#353a42",Az="#528bff",xz=[pZ.theme({"&":{color:gz,backgroundColor:Oz},".cm-content":{caretColor:Az},".cm-cursor, .cm-dropCursor":{borderLeftColor:Az},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:gz},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Oz,color:bz,border:"none"},".cm-activeLineGutter":{backgroundColor:vz},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:wz},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:wz,borderBottomColor:wz},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:vz,color:gz}}},{dark:!0}),oN(eN.define([{tag:I_.keyword,color:"#c678dd"},{tag:[I_.name,I_.deleted,I_.character,I_.propertyName,I_.macroName],color:mz},{tag:[I_.function(I_.variableName),I_.labelName],color:"#61afef"},{tag:[I_.color,I_.constant(I_.name),I_.standard(I_.name)],color:yz},{tag:[I_.definition(I_.name),I_.separator],color:gz},{tag:[I_.typeName,I_.className,I_.number,I_.changed,I_.annotation,I_.modifier,I_.self,I_.namespace],color:"#e5c07b"},{tag:[I_.operator,I_.operatorKeyword,I_.url,I_.escape,I_.regexp,I_.link,I_.special(I_.string)],color:"#56b6c2"},{tag:[I_.meta,I_.comment],color:bz},{tag:I_.strong,fontWeight:"bold"},{tag:I_.emphasis,fontStyle:"italic"},{tag:I_.strikethrough,textDecoration:"line-through"},{tag:I_.link,color:bz,textDecoration:"underline"},{tag:I_.heading,fontWeight:"bold",color:mz},{tag:[I_.atom,I_.bool,I_.special(I_.variableName)],color:yz},{tag:[I_.processingInstruction,I_.string,I_.inserted],color:"#98c379"},{tag:I_.invalid,color:"#ffffff"}]))];var kz=pZ.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Cz=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:r=!0,readOnly:n=!1,theme:o="light",placeholder:i="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(OZ.of([QB])),a&&("boolean"==typeof a?s.unshift(fz()):s.unshift(fz(a))),i&&s.unshift(function(e){return JT.fromClass(class{constructor(t){this.view=t,this.placeholder=e?PT.set([PT.widget({widget:new t$(e),side:1}).range(0)]):PT.none}get decorations(){return this.view.state.doc.length?PT.none:this.placeholder}},{decorations:e=>e.decorations})}(i)),o){case"light":s.push(kz);break;case"dark":s.push(xz);break;case"none":break;default:s.push(o)}return!1===r&&s.push(pZ.editable.of(!1)),n&&s.push(KP.readOnly.of(!0)),[...s]},Sz=DP.define(),_z=[],Ez=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Pz=(0,r.forwardRef)(((n,o)=>{var{className:i,value:a="",selection:l,extensions:c=[],onChange:u,onStatistics:d,onCreateEditor:p,onUpdate:h,autoFocus:f,theme:m="light",height:g,minHeight:b,maxHeight:y,width:v,minWidth:O,maxWidth:w,basicSetup:A,placeholder:x,indentWithTab:k,editable:C,readOnly:S,root:_,initialState:E}=n,P=(0,t.Z)(n,Ez),q=(0,r.useRef)(null),{state:T,view:j,container:R}=function(e){var{value:t,selection:n,onChange:o,onStatistics:i,onCreateEditor:a,onUpdate:s,extensions:l=_z,autoFocus:c,theme:u="light",height:d=null,minHeight:p=null,maxHeight:h=null,width:f=null,minWidth:m=null,maxWidth:g=null,placeholder:b="",editable:y=!0,readOnly:v=!1,indentWithTab:O=!0,basicSetup:w=!0,root:A,initialState:x}=e,[k,C]=(0,r.useState)(),[S,_]=(0,r.useState)(),[E,P]=(0,r.useState)(),q=pZ.theme({"&":{height:d,minHeight:p,maxHeight:h,width:f,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),T=pZ.updateListener.of((e=>{if(e.docChanged&&"function"==typeof o&&!e.transactions.some((e=>e.annotation(Sz)))){var t=e.state.doc.toString();o(t,e)}i&&i((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map((t=>e.state.sliceDoc(t.from,t.to))),selectedText:e.state.selection.ranges.some((e=>!e.empty))}))(e))})),j=[T,q,...Cz({theme:u,editable:y,readOnly:v,placeholder:b,indentWithTab:O,basicSetup:w})];return s&&"function"==typeof s&&j.push(pZ.updateListener.of(s)),j=j.concat(l),(0,r.useEffect)((()=>{if(k&&!E){var e={doc:t,selection:n,extensions:j},r=x?KP.fromJSON(x.json,e,x.fields):KP.create(e);if(P(r),!S){var o=new pZ({state:r,parent:k,root:A});_(o),a&&a(o,r)}}return()=>{S&&(P(void 0),_(void 0))}}),[k,E]),(0,r.useEffect)((()=>C(e.container)),[e.container]),(0,r.useEffect)((()=>()=>{S&&(S.destroy(),_(void 0))}),[S]),(0,r.useEffect)((()=>{c&&S&&S.focus()}),[c,S]),(0,r.useEffect)((()=>{S&&S.dispatch({effects:BP.reconfigure.of(j)})}),[u,l,d,p,h,f,m,g,b,y,v,O,w,o,s]),(0,r.useEffect)((()=>{if(void 0!==t){var e=S?S.state.doc.toString():"";S&&t!==e&&S.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[Sz.of(!0)]})}}),[t,S]),{state:E,setState:P,view:S,setView:_,container:k,setContainer:C}}({container:q.current,root:_,value:a,autoFocus:f,theme:m,height:g,minHeight:b,maxHeight:y,width:v,minWidth:O,maxWidth:w,basicSetup:A,placeholder:x,indentWithTab:k,editable:C,readOnly:S,selection:l,onChange:u,onStatistics:d,onCreateEditor:p,onUpdate:h,extensions:c,initialState:E});if((0,r.useImperativeHandle)(o,(()=>({editor:q.current,state:T,view:j})),[q,R,T,j]),"string"!=typeof a)throw new Error("value must be typeof string but got "+typeof a);var Z="string"==typeof m?"cm-theme-"+m:"cm-theme";return(0,s.jsx)("div",(0,e.Z)({ref:q,className:Z+(i?" "+i:"")},P))}));Pz.displayName="CodeMirror";const qz=Pz,Tz=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement(qz,{readOnly:o,value:e,extensions:[uI(),pZ.lineWrapping],onChange:e=>t?.({value:e}),id:r,role:"textbox","data-testid":"code-editor",height:"300px",width:"100%"}),jz=v_({String:I_.string,Number:I_.number,"True False":I_.bool,PropertyName:I_.propertyName,Null:I_.null,",":I_.separator,"[ ]":I_.squareBracket,"{ }":I_.brace}),Rz=p_.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[jz],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Zz=rM.define({name:"json",parser:Rz.configure({props:[wM.add({Object:PM({except:/^\s*\}/}),Array:PM({except:/^\s*\]/})}),TM.add({"Object Array":jM})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}}),$z=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement(qz,{readOnly:o,value:e,extensions:[new hM(Zz),pZ.lineWrapping],onChange:e=>t?.({value:e}),id:r,role:"textbox","data-testid":"code-editor",height:"300px",width:"100%"});class Mz{static create(e,t,r,n,o){return new Mz(e,t,r,n+(n<<8)+e+(t<<4)|0,o,[],[])}constructor(e,t,r,n,o,i,a){this.type=e,this.value=t,this.from=r,this.hash=n,this.end=o,this.children=i,this.positions=a,this.hashProp=[[KC.contextHash,n]]}addChild(e,t){e.prop(KC.contextHash)!=this.hash&&(e=new aS(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new aS(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,r)=>new aS(tS.none,e,t,r,this.hashProp)})}}var Nz;!function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.URL=33]="URL",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel"}(Nz||(Nz={}));class Dz{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class Lz{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return zz(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let n=t;n<e;n++)r+=9==this.text.charCodeAt(n)?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=9==this.text.charCodeAt(t)?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function Iz(e,t,r){if(r.pos==r.text.length||e!=t.block&&r.indent>=t.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(e.type==Nz.OrderedList?Hz:Xz)(r,t,!1);return n>0&&(e.type!=Nz.BulletList||Yz(r,t,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==e.value}const Bz={[Nz.Blockquote]:(e,t,r)=>62==r.next&&(r.markers.push(kU(Nz.QuoteMark,t.lineStart+r.pos,t.lineStart+r.pos+1)),r.moveBase(r.pos+(Qz(r.text.charCodeAt(r.pos+1))?2:1)),e.end=t.lineStart+r.text.length,!0),[Nz.ListItem]:(e,t,r)=>!(r.indent<r.baseIndent+e.value&&r.next>-1||(r.moveBaseColumn(r.baseIndent+e.value),0)),[Nz.OrderedList]:Iz,[Nz.BulletList]:Iz,[Nz.Document]:()=>!0};function Qz(e){return 32==e||9==e||10==e||13==e}function zz(e,t=0){for(;t<e.length&&Qz(e.charCodeAt(t));)t++;return t}function Uz(e,t,r){for(;t>r&&Qz(e.charCodeAt(t-1));)t--;return t}function Fz(e){if(96!=e.next&&126!=e.next)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(96==e.next)for(let r=t;r<e.text.length;r++)if(96==e.text.charCodeAt(r))return-1;return t}function Wz(e){return 62!=e.next?-1:32==e.text.charCodeAt(e.pos+1)?2:1}function Yz(e,t,r){if(42!=e.next&&45!=e.next&&95!=e.next)return-1;let n=1;for(let t=e.pos+1;t<e.text.length;t++){let r=e.text.charCodeAt(t);if(r==e.next)n++;else if(!Qz(r))return-1}return r&&45==e.next&&Kz(e)>-1&&e.depth==t.stack.length||n<3?-1:1}function Vz(e,t){for(let r=e.stack.length-1;r>=0;r--)if(e.stack[r].type==t)return!0;return!1}function Xz(e,t,r){return 45!=e.next&&43!=e.next&&42!=e.next||e.pos!=e.text.length-1&&!Qz(e.text.charCodeAt(e.pos+1))||!(!r||Vz(t,Nz.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?-1:1}function Hz(e,t,r){let n=e.pos,o=e.next;for(;o>=48&&o<=57;){if(n++,n==e.text.length)return-1;o=e.text.charCodeAt(n)}return n==e.pos||n>e.pos+9||46!=o&&41!=o||n<e.text.length-1&&!Qz(e.text.charCodeAt(n+1))||r&&!Vz(t,Nz.OrderedList)&&(e.skipSpace(n+1)==e.text.length||n>e.pos+1||49!=e.next)?-1:n+1-e.pos}function Gz(e){if(35!=e.next)return-1;let t=e.pos+1;for(;t<e.text.length&&35==e.text.charCodeAt(t);)t++;if(t<e.text.length&&32!=e.text.charCodeAt(t))return-1;let r=t-e.pos;return r>6?-1:r}function Kz(e){if(45!=e.next&&61!=e.next||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let r=t;for(;t<e.text.length&&Qz(e.text.charCodeAt(t));)t++;return t==e.text.length?r:-1}const Jz=/^[ \t]*$/,eU=/-->/,tU=/\?>/,rU=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,eU],[/^\s*<\?/,tU],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Jz],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Jz]];function nU(e,t,r){if(60!=e.next)return-1;let n=e.text.slice(e.pos);for(let e=0,t=rU.length-(r?1:0);e<t;e++)if(rU[e][0].test(n))return e;return-1}function oU(e,t){let r=e.countIndent(t,e.pos,e.indent),n=e.countIndent(e.skipSpace(t),t,r);return n>=r+5?r+1:n}function iU(e,t,r){let n=e.length-1;n>=0&&e[n].to==t&&e[n].type==Nz.CodeText?e[n].to=r:e.push(kU(Nz.CodeText,t,r))}const aU={LinkReference:void 0,IndentedCode(e,t){let r=t.baseIndent+4;if(t.indent<r)return!1;let n=t.findColumn(r),o=e.lineStart+n,i=e.lineStart+t.text.length,a=[],s=[];for(iU(a,o,i);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){iU(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else{if(t.indent<r)break;{if(s.length){for(let e of s)e.type==Nz.CodeText?iU(a,e.from,e.to):a.push(e);s=[]}iU(a,e.lineStart-1,e.lineStart);for(let e of t.markers)a.push(e);i=e.lineStart+t.text.length;let r=e.lineStart+t.findColumn(t.baseIndent+4);r<i&&iU(a,r,i)}}return s.length&&(s=s.filter((e=>e.type!=Nz.CodeText)),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(a,-o).finish(Nz.CodeBlock,i-o),o),!0},FencedCode(e,t){let r=Fz(t);if(r<0)return!1;let n=e.lineStart+t.pos,o=t.next,i=r-t.pos,a=t.skipSpace(r),s=Uz(t.text,t.text.length,a),l=[kU(Nz.CodeMark,n,n+i)];a<s&&l.push(kU(Nz.CodeInfo,e.lineStart+a,e.lineStart+s));for(let r=!0;e.nextLine()&&t.depth>=e.stack.length;r=!1){let n=t.pos;if(t.indent-t.baseIndent<4)for(;n<t.text.length&&t.text.charCodeAt(n)==o;)n++;if(n-t.pos>=i&&t.skipSpace(n)==t.text.length){for(let e of t.markers)l.push(e);l.push(kU(Nz.CodeMark,e.lineStart+t.pos,e.lineStart+n)),e.nextLine();break}{r||iU(l,e.lineStart-1,e.lineStart);for(let e of t.markers)l.push(e);let n=e.lineStart+t.basePos,o=e.lineStart+t.text.length;n<o&&iU(l,n,o)}}return e.addNode(e.buffer.writeElements(l,-n).finish(Nz.FencedCode,e.prevLineEnd()-n),n),!0},Blockquote(e,t){let r=Wz(t);return!(r<0)&&(e.startContext(Nz.Blockquote,t.pos),e.addNode(Nz.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+r),null)},HorizontalRule(e,t){if(Yz(t,e,!1)<0)return!1;let r=e.lineStart+t.pos;return e.nextLine(),e.addNode(Nz.HorizontalRule,r),!0},BulletList(e,t){let r=Xz(t,e,!1);if(r<0)return!1;e.block.type!=Nz.BulletList&&e.startContext(Nz.BulletList,t.basePos,t.next);let n=oU(t,t.pos+1);return e.startContext(Nz.ListItem,t.basePos,n-t.baseIndent),e.addNode(Nz.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+r),t.moveBaseColumn(n),null},OrderedList(e,t){let r=Hz(t,e,!1);if(r<0)return!1;e.block.type!=Nz.OrderedList&&e.startContext(Nz.OrderedList,t.basePos,t.text.charCodeAt(t.pos+r-1));let n=oU(t,t.pos+r);return e.startContext(Nz.ListItem,t.basePos,n-t.baseIndent),e.addNode(Nz.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+r),t.moveBaseColumn(n),null},ATXHeading(e,t){let r=Gz(t);if(r<0)return!1;let n=t.pos,o=e.lineStart+n,i=Uz(t.text,t.text.length,n),a=i;for(;a>n&&t.text.charCodeAt(a-1)==t.next;)a--;a!=i&&a!=n&&Qz(t.text.charCodeAt(a-1))||(a=t.text.length);let s=e.buffer.write(Nz.HeaderMark,0,r).writeElements(e.parser.parseInline(t.text.slice(n+r+1,a),o+r+1),-o);a<t.text.length&&s.write(Nz.HeaderMark,a-n,i-n);let l=s.finish(Nz.ATXHeading1-1+r,t.text.length-n);return e.nextLine(),e.addNode(l,o),!0},HTMLBlock(e,t){let r=nU(t,0,!1);if(r<0)return!1;let n=e.lineStart+t.pos,o=rU[r][1],i=[],a=o!=Jz;for(;!o.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){a=!1;break}for(let e of t.markers)i.push(e)}a&&e.nextLine();let s=o==eU?Nz.CommentBlock:o==tU?Nz.ProcessingInstructionBlock:Nz.HTMLBlock,l=e.prevLineEnd();return e.addNode(e.buffer.writeElements(i,-n).finish(s,l-n),n),!0},SetextHeading:void 0};class sU{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(-1==this.stage)return!1;let n=r.content+"\n"+t.scrub(),o=this.advance(n);return o>-1&&o<n.length&&this.complete(e,r,o)}finish(e,t){return(2==this.stage||3==this.stage)&&zz(t.content,this.pos)==t.content.length&&this.complete(e,t,t.content.length)}complete(e,t,r){return e.addLeafElement(t,kU(Nz.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(!1===e&&(this.stage=-1),!1)}advance(e){for(;;){if(-1==this.stage)return-1;if(0==this.stage){if(!this.nextStage($U(e,this.pos,this.start,!0)))return-1;if(58!=e.charCodeAt(this.pos))return this.stage=-1;this.elts.push(kU(Nz.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else{if(1!=this.stage){if(2==this.stage){let t=zz(e,this.pos),r=0;if(t>this.pos){let n=ZU(e,t,this.start);if(n){let t=lU(e,n.to-this.start);t>0&&(this.nextStage(n),r=t)}}return r||(r=lU(e,this.pos)),r>0&&r<e.length?r:-1}return lU(e,this.pos)}if(!this.nextStage(RU(e,zz(e,this.pos),this.start)))return-1}}}}function lU(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(10==r)break;if(!Qz(r))return-1}return t}class cU{nextLine(e,t,r){let n=t.depth<e.stack.length?-1:Kz(t),o=t.next;if(n<0)return!1;let i=kU(Nz.HeaderMark,e.lineStart+t.pos,e.lineStart+n);return e.nextLine(),e.addLeafElement(r,kU(61==o?Nz.SetextHeading1:Nz.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),i])),!0}finish(){return!1}}const uU={LinkReference:(e,t)=>91==t.content.charCodeAt(0)?new sU(t):null,SetextHeading:()=>new cU},dU=[(e,t)=>Gz(t)>=0,(e,t)=>Fz(t)>=0,(e,t)=>Wz(t)>=0,(e,t)=>Xz(t,e,!0)>=0,(e,t)=>Hz(t,e,!0)>=0,(e,t)=>Yz(t,e,!0)>=0,(e,t)=>nU(t,0,!0)>=0],pU={text:"",end:0};class hU{constructor(e,t,r,n){this.parser=e,this.input=t,this.ranges=n,this.line=new Lz,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=n[n.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=n[0].from,this.block=Mz.create(Nz.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new LU(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(null!=this.stoppedAt&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(;e.depth<this.stack.length;)this.finishContext();for(let t of e.markers)this.addNode(t.type,t.from,t.to);if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let t of this.parser.blockParsers)if(t){let r=t(this,e);if(0!=r){if(1==r)return null;e.forward();continue e}}break}let t=new Dz(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let r=e(this,t);r&&t.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4)for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e;for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+="\n"+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return!!t&&(this.absoluteLineStart+=t,this.lineStart=IU(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0)}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=pU;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<t.end;){r++;let n=this.ranges[r].from,o=this.lineChunkAt(n);t.end=n+o.length,t.text=t.text.slice(0,this.ranges[r-1].to-e)+o,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],r=this.parser.skipContextMarkup[t.type];if(!r)throw new Error("Unhandled block context "+Nz[t.type]);if(!r(t,this,e))break;e.forward()}}lineChunkAt(e){let t,r=this.input.chunk(e);if(this.input.lineChunks)t="\n"==r?"":r;else{let e=r.indexOf("\n");t=e<0?r:r.slice(0,e)}return e+t.length>this.to?t.slice(0,this.to-e):t}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=Mz.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){"number"==typeof e&&(e=new aS(this.parser.nodeSet.types[e],OU,OU,(null!=r?r:this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(NU(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?fU(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=NU(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Nz.Paragraph,e.content.length),e.start)}elt(e,t,r,n){return"string"==typeof e?kU(this.parser.getNodeType(e),t,r,n):new xU(e,t)}get buffer(){return new wU(this.parser.nodeSet)}}function fU(e,t,r,n,o){let i=e[t].to,a=[],s=[],l=r.from+n;function c(r,o){for(;o?r>=i:r>i;){let o=e[t+1].from-i;n+=o,r+=o,t++,i=e[t].to}}for(let u=r.firstChild;u;u=u.nextSibling){c(u.from+n,!0);let r,d=u.from+n,p=o.get(u.tree);p?r=p:u.to+n>i?(r=fU(e,t,u,n,o),c(u.to+n,!1)):r=u.toTree(),a.push(r),s.push(d-l)}return c(r.to+n,!1),new aS(r.type,a,s,r.to+n-l,r.tree?r.tree.propValues:void 0)}class mU extends SS{constructor(e,t,r,n,o,i,a,s,l){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=n,this.endLeafBlock=o,this.skipContextMarkup=i,this.inlineParsers=a,this.inlineNames=s,this.wrappers=l,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,r){let n=new hU(this,e,t,r);for(let o of this.wrappers)n=o(n,e,t,r);return n}configure(e){let t=bU(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:n}=this,o=this.blockParsers.slice(),i=this.leafBlockParsers.slice(),a=this.blockNames.slice(),s=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),u=this.wrappers;if(gU(t.defineNodes)){n=Object.assign({},n);let e,o=r.types.slice();for(let r of t.defineNodes){let{name:t,block:i,composite:a,style:s}="string"==typeof r?{name:r}:r;if(o.some((e=>e.name==t)))continue;a&&(n[o.length]=(e,t,r)=>a(t,r,e.value));let l=o.length,c=a?["Block","BlockContext"]:i?l>=Nz.ATXHeading1&&l<=Nz.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;o.push(tS.define({id:l,name:t,props:c&&[[KC.group,c]]})),s&&(e||(e={}),Array.isArray(s)||s instanceof g_?e[t]=s:Object.assign(e,s))}r=new rS(o),e&&(r=r.extend(v_(e)))}if(gU(t.props)&&(r=r.extend(...t.props)),gU(t.remove))for(let e of t.remove){let t=this.blockNames.indexOf(e),r=this.inlineNames.indexOf(e);t>-1&&(o[t]=i[t]=void 0),r>-1&&(s[r]=void 0)}if(gU(t.parseBlock))for(let e of t.parseBlock){let t=a.indexOf(e.name);if(t>-1)o[t]=e.parse,i[t]=e.leaf;else{let t=e.before?yU(a,e.before):e.after?yU(a,e.after)+1:a.length-1;o.splice(t,0,e.parse),i.splice(t,0,e.leaf),a.splice(t,0,e.name)}e.endLeaf&&c.push(e.endLeaf)}if(gU(t.parseInline))for(let e of t.parseInline){let t=l.indexOf(e.name);if(t>-1)s[t]=e.parse;else{let t=e.before?yU(l,e.before):e.after?yU(l,e.after)+1:l.length-1;s.splice(t,0,e.parse),l.splice(t,0,e.name)}}return t.wrap&&(u=u.concat(t.wrap)),new mU(r,o,i,a,c,n,s,l,u)}getNodeType(e){let t=this.nodeTypes[e];if(null==t)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new MU(this,e,t);e:for(let e=t;e<r.end;){let t=r.char(e);for(let n of this.inlineParsers)if(n){let o=n(r,t,e);if(o>=0){e=o;continue e}}e++}return r.resolveMarkers(0)}}function gU(e){return null!=e&&e.length>0}function bU(e){if(!Array.isArray(e))return e;if(0==e.length)return null;let t=bU(e[0]);if(1==e.length)return t;let r=bU(e.slice(1));if(!r||!t)return t||r;let n=(e,t)=>(e||OU).concat(t||OU),o=t.wrap,i=r.wrap;return{props:n(t.props,r.props),defineNodes:n(t.defineNodes,r.defineNodes),parseBlock:n(t.parseBlock,r.parseBlock),parseInline:n(t.parseInline,r.parseInline),remove:n(t.remove,r.remove),wrap:o?i?(e,t,r,n)=>o(i(e,t,r,n),t,r,n):o:i}}function yU(e,t){let r=e.indexOf(t);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return r}let vU=[tS.none];for(let e,t=1;e=Nz[t];t++)vU[t]=tS.define({id:t,name:e,props:t>=Nz.Escape?[]:[[KC.group,t in Bz?["Block","BlockContext"]:["Block","LeafBlock"]]],top:"Document"==e});const OU=[];class wU{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,n=0){return this.content.push(e,t,r,4+4*n),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return aS.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}class AU{constructor(e,t,r,n=OU){this.type=e,this.from=t,this.to=r,this.children=n}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new wU(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class xU{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return OU}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function kU(e,t,r,n){return new AU(e,t,r,n)}const CU={resolve:"Emphasis",mark:"EmphasisMark"},SU={resolve:"Emphasis",mark:"EmphasisMark"},_U={},EU={};class PU{constructor(e,t,r,n){this.type=e,this.from=t,this.to=r,this.side=n}}let qU=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{qU=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch(De){}const TU={Escape(e,t,r){if(92!=t||r==e.end-1)return-1;let n=e.char(r+1);for(let t=0;t<32;t++)if("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".charCodeAt(t)==n)return e.append(kU(Nz.Escape,r,r+2));return-1},Entity(e,t,r){if(38!=t)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(r+1,r+31));return n?e.append(kU(Nz.Entity,r,r+1+n[0].length)):-1},InlineCode(e,t,r){if(96!=t||r&&96==e.char(r-1))return-1;let n=r+1;for(;n<e.end&&96==e.char(n);)n++;let o=n-r,i=0;for(;n<e.end;n++)if(96==e.char(n)){if(i++,i==o&&96!=e.char(n+1))return e.append(kU(Nz.InlineCode,r,n+1,[kU(Nz.CodeMark,r,r+o),kU(Nz.CodeMark,n+1-o,n+1)]))}else i=0;return-1},HTMLTag(e,t,r){if(60!=t||r==e.end-1)return-1;let n=e.slice(r+1,e.end),o=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(n);if(o)return e.append(kU(Nz.URL,r,r+1+o[0].length));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(n);if(i)return e.append(kU(Nz.Comment,r,r+1+i[0].length));let a=/^\?[^]*?\?>/.exec(n);if(a)return e.append(kU(Nz.ProcessingInstruction,r,r+1+a[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return s?e.append(kU(Nz.HTMLTag,r,r+1+s[0].length)):-1},Emphasis(e,t,r){if(95!=t&&42!=t)return-1;let n=r+1;for(;e.char(n)==t;)n++;let o=e.slice(r-1,r),i=e.slice(n,n+1),a=qU.test(o),s=qU.test(i),l=/\s|^$/.test(o),c=/\s|^$/.test(i),u=!c&&(!s||l||a),d=!l&&(!a||c||s),p=u&&(42==t||!d||a),h=d&&(42==t||!u||s);return e.append(new PU(95==t?CU:SU,r,n,(p?1:0)|(h?2:0)))},HardBreak(e,t,r){if(92==t&&10==e.char(r+1))return e.append(kU(Nz.HardBreak,r,r+2));if(32==t){let t=r+1;for(;32==e.char(t);)t++;if(10==e.char(t)&&t>=r+2)return e.append(kU(Nz.HardBreak,r,t+1))}return-1},Link:(e,t,r)=>91==t?e.append(new PU(_U,r,r+1,1)):-1,Image:(e,t,r)=>33==t&&91==e.char(r+1)?e.append(new PU(EU,r,r+2,1)):-1,LinkEnd(e,t,r){if(93!=t)return-1;for(let t=e.parts.length-1;t>=0;t--){let n=e.parts[t];if(n instanceof PU&&(n.type==_U||n.type==EU)){if(!n.side||e.skipSpace(n.to)==r&&!/[(\[]/.test(e.slice(r+1,r+2)))return e.parts[t]=null,-1;let o=e.takeContent(t),i=e.parts[t]=jU(e,o,n.type==_U?Nz.Link:Nz.Image,n.from,r+1);if(n.type==_U)for(let r=0;r<t;r++){let t=e.parts[r];t instanceof PU&&t.type==_U&&(t.side=0)}return i.to}}return-1}};function jU(e,t,r,n,o){let{text:i}=e,a=e.char(o),s=o;if(t.unshift(kU(Nz.LinkMark,n,n+(r==Nz.Image?2:1))),t.push(kU(Nz.LinkMark,o-1,o)),40==a){let r,n=e.skipSpace(o+1),a=RU(i,n-e.offset,e.offset);a&&(n=e.skipSpace(a.to),r=ZU(i,n-e.offset,e.offset),r&&(n=e.skipSpace(r.to))),41==e.char(n)&&(t.push(kU(Nz.LinkMark,o,o+1)),s=n+1,a&&t.push(a),r&&t.push(r),t.push(kU(Nz.LinkMark,n,s)))}else if(91==a){let r=$U(i,o-e.offset,e.offset,!1);r&&(t.push(r),s=r.to)}return kU(r,n,s,t)}function RU(e,t,r){if(60==e.charCodeAt(t)){for(let n=t+1;n<e.length;n++){let o=e.charCodeAt(n);if(62==o)return kU(Nz.URL,t+r,n+1+r);if(60==o||10==o)return!1}return null}{let n=0,o=t;for(let t=!1;o<e.length;o++){let r=e.charCodeAt(o);if(Qz(r))break;if(t)t=!1;else if(40==r)n++;else if(41==r){if(!n)break;n--}else 92==r&&(t=!0)}return o>t?kU(Nz.URL,t+r,o+r):o==e.length&&null}}function ZU(e,t,r){let n=e.charCodeAt(t);if(39!=n&&34!=n&&40!=n)return!1;let o=40==n?41:n;for(let n=t+1,i=!1;n<e.length;n++){let a=e.charCodeAt(n);if(i)i=!1;else{if(a==o)return kU(Nz.LinkTitle,t+r,n+1+r);92==a&&(i=!0)}}return null}function $U(e,t,r,n){for(let o=!1,i=t+1,a=Math.min(e.length,i+999);i<a;i++){let a=e.charCodeAt(i);if(o)o=!1;else{if(93==a)return!n&&kU(Nz.LinkLabel,t+r,i+1+r);if(n&&!Qz(a)&&(n=!1),91==a)return!1;92==a&&(o=!0)}}return null}class MU{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,n,o){return this.append(new PU(e,t,r,(n?1:0)|(o?2:0)))}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let r=this.parts[t];if(!(r instanceof PU&&r.type.resolve&&2&r.side))continue;let n,o=r.type==CU||r.type==SU,i=r.to-r.from,a=t-1;for(;a>=e;a--){let e=this.parts[a];if(e instanceof PU&&1&e.side&&e.type==r.type&&!(o&&(1&r.side||2&e.side)&&(e.to-e.from+i)%3==0&&((e.to-e.from)%3||i%3))){n=e;break}}if(!n)continue;let s=r.type.resolve,l=[],c=n.from,u=r.to;if(o){let e=Math.min(2,n.to-n.from,i);c=n.to-e,u=r.from+e,s=1==e?"Emphasis":"StrongEmphasis"}n.type.mark&&l.push(this.elt(n.type.mark,c,n.to));for(let e=a+1;e<t;e++)this.parts[e]instanceof AU&&l.push(this.parts[e]),this.parts[e]=null;r.type.mark&&l.push(this.elt(r.type.mark,r.from,u));let d=this.elt(s,c,u,l);this.parts[a]=o&&n.from!=c?new PU(n.type,n.from,c,n.side):null,(this.parts[t]=o&&r.to!=u?new PU(r.type,u,r.to,r.side):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let r=e;r<this.parts.length;r++){let e=this.parts[r];e instanceof AU&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof PU&&r.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return zz(this.text,e-this.offset)+this.offset}elt(e,t,r,n){return"string"==typeof e?kU(this.parser.getNodeType(e),t,r,n):new xU(e,t)}}function NU(e,t){if(!t.length)return e;if(!e.length)return t;let r=e.slice(),n=0;for(let e of t){for(;n<r.length&&r[n].to<e.to;)n++;if(n<r.length&&r[n].from<e.from){let t=r[n];t instanceof AU&&(r[n]=new AU(t.type,t.from,t.to,NU(t.children,[e])))}else r.splice(n++,0,e)}return r}const DU=[Nz.CodeBlock,Nz.ListItem,Nz.OrderedList,Nz.BulletList];class LU{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&"\n"!=this.input.read(e-1,e);)e--;this.fragmentEnd=e?e-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let n=e+this.fragment.offset;for(;r.to<=n;)if(!r.parent())return!1;for(;;){if(r.from>=n)return this.fragment.from<=t;if(!r.childAfter(n))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(KC.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,i=o,a=e.block.children.length,s=i,l=a;for(;;){if(t.to-r>n){if(t.type.isAnonymous&&t.firstChild())continue;break}let o=IU(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,o);else{let r=new aS(e.parser.nodeSet.types[Nz.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(r,t.tree),e.addNode(r,o)}if(t.type.is("Block")&&(DU.indexOf(t.type.id)<0?(i=t.to-r,a=e.block.children.length):(i=s,a=l,s=t.to-r,l=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return i-o}}function IU(e,t){let r=e;for(let n=1;n<t.length;n++){let o=t[n-1].to,i=t[n].from;o<e&&(r-=i-o)}return r}const BU=v_({"Blockquote/...":I_.quote,HorizontalRule:I_.contentSeparator,"ATXHeading1/... SetextHeading1/...":I_.heading1,"ATXHeading2/... SetextHeading2/...":I_.heading2,"ATXHeading3/...":I_.heading3,"ATXHeading4/...":I_.heading4,"ATXHeading5/...":I_.heading5,"ATXHeading6/...":I_.heading6,"Comment CommentBlock":I_.comment,Escape:I_.escape,Entity:I_.character,"Emphasis/...":I_.emphasis,"StrongEmphasis/...":I_.strong,"Link/... Image/...":I_.link,"OrderedList/... BulletList/...":I_.list,"BlockQuote/...":I_.quote,"InlineCode CodeText":I_.monospace,URL:I_.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":I_.processingInstruction,"CodeInfo LinkLabel":I_.labelName,LinkTitle:I_.string,Paragraph:I_.content}),QU=new mU(new rS(vU).extend(BU),Object.keys(aU).map((e=>aU[e])),Object.keys(aU).map((e=>uU[e])),Object.keys(aU),dU,Bz,Object.keys(TU).map((e=>TU[e])),Object.keys(TU),[]);function zU(e,t,r){let n=[];for(let o=e.firstChild,i=t;;o=o.nextSibling){let e=o?o.from:r;if(e>i&&n.push({from:i,to:e}),!o)break;i=o.to}return n}const UU={resolve:"Strikethrough",mark:"StrikethroughMark"},FU={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":I_.strikethrough}},{name:"StrikethroughMark",style:I_.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,r){if(126!=t||126!=e.char(r+1)||126==e.char(r+2))return-1;let n=e.slice(r-1,r),o=e.slice(r+2,r+3),i=/\s|^$/.test(n),a=/\s|^$/.test(o),s=qU.test(n),l=qU.test(o);return e.addDelimiter(UU,r,r+2,!a&&(!l||i||s),!i&&(!s||a||l))},after:"Emphasis"}]};function WU(e,t,r=0,n,o=0){let i=0,a=!0,s=-1,l=-1,c=!1,u=()=>{n.push(e.elt("TableCell",o+s,o+l,e.parser.parseInline(t.slice(s,l),o+s)))};for(let d=r;d<t.length;d++){let r=t.charCodeAt(d);124!=r||c?(c||32!=r&&9!=r)&&(s<0&&(s=d),l=d+1):((!a||s>-1)&&i++,a=!1,n&&(s>-1&&u(),n.push(e.elt("TableDelimiter",d+o,d+o+1))),s=l=-1),c=!c&&92==r}return s>-1&&(i++,n&&u()),i}function YU(e,t){for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);if(124==t)return!0;92==t&&r++}return!1}const VU=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class XU{constructor(){this.rows=null}nextLine(e,t,r){if(null==this.rows){let n;if(this.rows=!1,(45==t.next||58==t.next||124==t.next)&&VU.test(n=t.text.slice(t.pos))){let o=[];WU(e,r.content,0,o,r.start)==WU(e,n,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,o),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];WU(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return!!this.rows&&(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0)}}const HU={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":I_.heading}},"TableRow",{name:"TableCell",style:I_.content},{name:"TableDelimiter",style:I_.processingInstruction}],parseBlock:[{name:"Table",leaf:(e,t)=>YU(t.content,0)?new XU:null,endLeaf(e,t,r){if(r.parsers.some((e=>e instanceof XU))||!YU(t.text,t.basePos))return!1;let n=e.scanLine(e.absoluteLineEnd+1).text;return VU.test(n)&&WU(e,t.text,t.basePos)==WU(e,n,t.basePos)},before:"SetextHeading"}]};class GU{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const KU={defineNodes:[{name:"Task",block:!0,style:I_.list},{name:"TaskMarker",style:I_.atom}],parseBlock:[{name:"TaskList",leaf:(e,t)=>/^\[[ xX]\][ \t]/.test(t.content)&&"ListItem"==e.parentType().name?new GU:null,after:"SetextHeading"}]},JU=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,eF=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,tF=/[\w-]+\.[\w-]+($|\/)/,rF=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,nF=/\/[a-zA-Z\d@.]+/gy;function oF(e,t,r,n){let o=0;for(let i=t;i<r;i++)e[i]==n&&o++;return o}function iF(e,t){rF.lastIndex=t;let r=rF.exec(e);if(!r)return-1;let n=r[0][r[0].length-1];return"_"==n||"-"==n?-1:t+r[0].length-("."==n?1:0)}const aF={parseInline:[{name:"Autolink",parse(e,t,r){let n=r-e.offset;JU.lastIndex=n;let o=JU.exec(e.text),i=-1;return o?(o[1]||o[2]?i=function(e,t){eF.lastIndex=t;let r=eF.exec(e);if(!r||tF.exec(r[0])[0].indexOf("_")>-1)return-1;let n=t+r[0].length;for(;;){let r,o=e[n-1];if(/[?!.,:*_~]/.test(o)||")"==o&&oF(e,t,n,")")>oF(e,t,n,"("))n--;else{if(";"!=o||!(r=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,n))))break;n=t+r.index}}return n}(e.text,n+o[0].length):o[3]?i=iF(e.text,n):(i=iF(e.text,n+o[0].length),i>-1&&"xmpp:"==o[0]&&(nF.lastIndex=i,o=nF.exec(e.text),o&&(i=o.index+o[0].length))),i<0?-1:(e.addElement(e.elt("URL",r,i+e.offset)),i+e.offset)):-1}}]},sF=[HU,KU,FU,aF];function lF(e,t,r){return(n,o,i)=>{if(o!=e||n.char(i+1)==e)return-1;let a=[n.elt(r,i,i+1)];for(let o=i+1;o<n.end;o++){let s=n.char(o);if(s==e)return n.addElement(n.elt(t,i,o+1,a.concat(n.elt(r,o,o+1))));if(92==s&&a.push(n.elt("Escape",o,2+o++)),Qz(s))break}return-1}}const cF={defineNodes:[{name:"Superscript",style:I_.special(I_.content)},{name:"SuperscriptMark",style:I_.processingInstruction}],parseInline:[{name:"Superscript",parse:lF(94,"Superscript","SuperscriptMark")}]},uF={defineNodes:[{name:"Subscript",style:I_.special(I_.content)},{name:"SubscriptMark",style:I_.processingInstruction}],parseInline:[{name:"Subscript",parse:lF(126,"Subscript","SubscriptMark")}]},dF={defineNodes:[{name:"Emoji",style:I_.character}],parseInline:[{name:"Emoji",parse(e,t,r){let n;return 58==t&&(n=/^[a-zA-Z_0-9]+:/.exec(e.slice(r+1,e.end)))?e.addElement(e.elt("Emoji",r,r+1+n[0].length)):-1}}]},pF=K$({commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}}}),hF=new KC,fF=QU.configure({props:[TM.add((e=>!e.is("Block")||e.is("Document")||null!=mF(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to}))),hF.add(mF),wM.add({Document:()=>null}),G$.add({Document:pF})]});function mF(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function gF(e,t){let r=e;for(;;){let e,n=r.nextSibling;if(!n||null!=(e=mF(n.type))&&e<=t)break;r=n}return r.to}const bF=qM.of(((e,t,r)=>{for(let n=nM(e).resolveInner(r,-1);n&&!(n.from<t);n=n.parent){let e=n.type.prop(hF);if(null==e)continue;let t=gF(n,e);if(t>r)return{from:r,to:t}}return null}));function yF(e){return new eM(pF,e,[bF],"markdown")}const vF=yF(fF),OF=yF(fF.configure([sF,uF,cF,dF,{props:[TM.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));class wF{constructor(e,t,r,n,o,i,a){this.node=e,this.from=t,this.to=r,this.spaceBefore=n,this.spaceAfter=o,this.type=i,this.item=a}blank(e,t=!0){let r=this.spaceBefore+("Blockquote"==this.node.name?">":"");if(null!=e){for(;r.length<e;)r+=" ";return r}for(let e=this.to-this.from-r.length-this.spaceAfter.length;e>0;e--)r+=" ";return r+(t?this.spaceAfter:"")}marker(e,t){let r="OrderedList"==this.node.name?String(+xF(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function AF(e,t){let r=[];for(let t=e;t&&"Document"!=t.name;t=t.parent)"ListItem"!=t.name&&"Blockquote"!=t.name&&"FencedCode"!=t.name||r.push(t);let n=[];for(let e=r.length-1;e>=0;e--){let o,i=r[e],a=t.lineAt(i.from),s=i.from-a.from;if("FencedCode"==i.name)n.push(new wF(i,s,s,"","","",null));else if("Blockquote"==i.name&&(o=/^ *>( ?)/.exec(a.text.slice(s))))n.push(new wF(i,s,s+o[0].length,"",o[1],">",null));else if("ListItem"==i.name&&"OrderedList"==i.parent.name&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(s)))){let e=o[3],t=o[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),n.push(new wF(i.parent,s,s+t,o[1],e,o[2],i))}else if("ListItem"==i.name&&"BulletList"==i.parent.name&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(s)))){let e=o[4],t=o[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let r=o[2];o[3]&&(r+=o[3].replace(/[xX]/," ")),n.push(new wF(i.parent,s,s+t,o[1],e,r,i))}}return n}function xF(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function kF(e,t,r,n=0){for(let o=-1,i=e;;){if("ListItem"==i.name){let e=xF(i,t),a=+e[2];if(o>=0){if(a!=o+1)return;r.push({from:i.from+e[1].length,to:i.from+e[0].length,insert:String(o+2+n)})}o=a}let e=i.nextSibling;if(!e)break;i=e}}function CF(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||"\t"!=t.facet(gM))return e;let n="";for(let t=gq(e,4,r);t>0;)t>=4?(n+="\t",t-=4):(n+=" ",t--);return n+e.slice(r)}function SF(e){return"QuoteMark"==e.name||"ListMark"==e.name}const _F=[{key:"Enter",run:({state:e,dispatch:t})=>{let r=nM(e),{doc:n}=e,o=null,i=e.changeByRange((t=>{if(!t.empty||!OF.isActiveAt(e,t.from))return o={range:t};let i=t.from,a=n.lineAt(i),s=AF(r.resolveInner(i,-1),n);for(;s.length&&s[s.length-1].from>i-a.from;)s.pop();if(!s.length)return o={range:t};let l=s[s.length-1];if(l.to-l.spaceAfter.length>i-a.from)return o={range:t};let c=i>=l.to-l.spaceAfter.length&&!/\S/.test(a.text.slice(l.to));if(l.item&&c){if(l.node.firstChild.to>=i||a.from>0&&!/[^\s>]/.test(n.lineAt(a.from-1).text)){let e,t=s.length>1?s[s.length-2]:null,r="";t&&t.item?(e=a.from+t.from,r=t.marker(n,1)):e=a.from+(t?t.to:0);let o=[{from:e,to:i,insert:r}];return"OrderedList"==l.node.name&&kF(l.item,n,o,-2),t&&"OrderedList"==t.node.name&&kF(t.item,n,o),{range:pP.cursor(e+r.length),changes:o}}{let t="";for(let e=0,r=s.length-2;e<=r;e++)t+=s[e].blank(e<r?gq(a.text,4,s[e+1].from)-t.length:null,e<r);return t=CF(t,e),{range:pP.cursor(i+t.length+1),changes:{from:a.from,insert:t+e.lineBreak}}}}if("Blockquote"==l.node.name&&c&&a.from){let r=n.lineAt(a.from-1),o=/>\s*$/.exec(r.text);if(o&&o.index==l.from){let n=e.changes([{from:r.from+o.index,to:r.to},{from:a.from+l.from,to:a.to}]);return{range:t.map(n),changes:n}}}let u=[];"OrderedList"==l.node.name&&kF(l.item,n,u);let d=l.item&&l.item.from<a.from,p="";if(!d||/^[\s\d.)\-+*>]*/.exec(a.text)[0].length>=l.to)for(let e=0,t=s.length-1;e<=t;e++)p+=e!=t||d?s[e].blank(e<t?gq(a.text,4,s[e+1].from)-p.length:null):s[e].marker(n,1);let h=i;for(;h>a.from&&/\s/.test(a.text.charAt(h-a.from-1));)h--;return p=CF(p,e),u.push({from:h,to:i,insert:e.lineBreak+p}),{range:pP.cursor(h+p.length+1),changes:u}}));return!o&&(t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0)}},{key:"Backspace",run:({state:e,dispatch:t})=>{let r=nM(e),n=null,o=e.changeByRange((t=>{let o=t.from,{doc:i}=e;if(t.empty&&OF.isActiveAt(e,t.from)){let t=i.lineAt(o),n=AF(function(e,t){let r=e.resolveInner(t,-1),n=t;SF(r)&&(n=r.from,r=r.parent);for(let e;e=r.childBefore(n);)if(SF(e))n=e.from;else{if("OrderedList"!=e.name&&"BulletList"!=e.name)break;r=e.lastChild,n=r.to}return r}(r,o),i);if(n.length){let r=n[n.length-1],i=r.to-r.spaceAfter.length+(r.spaceAfter?1:0);if(o-t.from>i&&!/\S/.test(t.text.slice(i,o-t.from)))return{range:pP.cursor(t.from+i),changes:{from:t.from+i,to:o}};if(o-t.from==i&&(!r.item||t.from<=r.item.from||!/\S/.test(t.text.slice(0,r.to)))){let n=t.from+r.from;if(r.item&&r.node.from<r.item.from&&/\S/.test(t.text.slice(r.from,r.to))){let o=r.blank(gq(t.text,4,r.to)-gq(t.text,4,r.from));return n==t.from&&(o=CF(o,e)),{range:pP.cursor(n+o.length),changes:{from:n,to:t.from+r.to,insert:o}}}if(n<o)return{range:pP.cursor(n),changes:{from:n,to:o}}}}}return n={range:t}}));return!n&&(t(e.update(o,{scrollIntoView:!0,userEvent:"delete"})),!0)}}],EF=uI({matchClosingTags:!1});function PF(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:o}=vF,completeHTMLTags:i=!0}=e;if(!(o instanceof mU))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let a,s=e.extensions?[e.extensions]:[],l=[EF.support];r instanceof hM?(l.push(r.support),a=r.language):r&&(a=r);let c=t||a?(u=t,d=a,e=>{if(e&&u){let t=null;if(e=/\S*/.exec(e)[0],t="function"==typeof u?u(e):fM.matchLanguageName(u,e,!0),t instanceof fM)return t.support?t.support.language.parser:aM.getSkippingParser(t.load());if(t)return t.parser}return d?d.parser:null}):void 0;var u,d;s.push(function(e){let{codeParser:t,htmlParser:r}=e,n=ES(((e,n)=>{let o=e.type.id;if(!t||o!=Nz.CodeBlock&&o!=Nz.FencedCode){if(r&&(o==Nz.HTMLBlock||o==Nz.HTMLTag))return{parser:r,overlay:zU(e.node,e.from,e.to)}}else{let r="";if(o==Nz.FencedCode){let t=e.node.getChild(Nz.CodeInfo);t&&(r=n.read(t.from,t.to))}let i=t(r);if(i)return{parser:i,overlay:e=>e.type.id==Nz.CodeText}}return null}));return{wrap:n}}({codeParser:c,htmlParser:EF.language.parser})),n&&l.push(kP.high(OZ.of(_F)));let p=yF(o.configure(s));return i&&l.push(p.data.of({autocomplete:qF})),new hM(p,l)}function qF(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let o=nM(t).resolveInner(r,-1);for(;o&&!o.type.isTop;){if("CodeBlock"==o.name||"FencedCode"==o.name||"ProcessingInstructionBlock"==o.name||"CommentBlock"==o.name||"Link"==o.name||"Image"==o.name)return null;o=o.parent}return{from:r-n[0].length,to:r,options:jF(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let TF=null;function jF(){if(TF)return TF;let e=(t=new JN(KP.create({extensions:EF}),0,!0),nI(XL.default,t));var t;return TF=e?e.options:[]}const RF=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement(qz,{readOnly:o,value:e,onChange:e=>t?.({value:e}),extensions:[PF({base:OF}),oN(sN),oN(eN.define([{tag:I_.heading1,fontSize:"24px"},{tag:I_.heading2,fontSize:"20px"},{tag:I_.heading3,fontSize:"16px"}])),pZ.lineWrapping],id:r,role:"textbox","data-testid":"markdown-editor",height:"300px",width:"100%"});var ZF=__webpack_require__(4290),$F=__webpack_require__.n(ZF),MF=__webpack_require__(202),NF={};NF.styleTagTransform=j(),NF.setAttributes=E(),NF.insert=S().bind(null,"head"),NF.domAPI=k(),NF.insertStyleElement=q(),A()(MF.Z,NF),MF.Z&&MF.Z.locals&&MF.Z.locals;var DF=__webpack_require__(6013),LF={};LF.styleTagTransform=j(),LF.setAttributes=E(),LF.insert=S().bind(null,"head"),LF.domAPI=k(),LF.insertStyleElement=q(),A()(DF.Z,LF),DF.Z&&DF.Z.locals&&DF.Z.locals;const IF=({value:e,onChange:t,id:r,readOnly:o})=>n().createElement($F(),{readOnly:o,theme:"snow",value:e,onChange:e=>t?.({value:e}),style:{height:"300px",paddingBottom:"41px",width:"100%"},id:r,modules:{clipboard:{matchVisual:!1}},"data-testid":"richtext-editor"});var BF=__webpack_require__(9391);var QF=__webpack_require__(2806),zF={};zF.styleTagTransform=j(),zF.setAttributes=E(),zF.insert=S().bind(null,"head"),zF.domAPI=k(),zF.insertStyleElement=q(),A()(QF.Z,zF);const UF=QF.Z&&QF.Z.locals?QF.Z.locals:void 0,FF=[{value:"",text:"",phone:""},{value:"DE",text:"Germany",phone:"49"},{value:"AF",text:"Afghanistan",phone:"93"},{value:"AL",text:"Albania",phone:"355"},{value:"DZ",text:"Algeria",phone:"213"},{value:"AX",text:"Alland Islands",phone:"358"},{value:"AS",text:"American Samoa",phone:"1-684"},{value:"AD",text:"Andorra",phone:"376"},{value:"AO",text:"Angola",phone:"244"},{value:"AI",text:"Anguilla",phone:"1-264"},{value:"AQ",text:"Antarctica",phone:"672"},{value:"AG",text:"Antigua and Barbuda",phone:"1-268"},{value:"AR",text:"Argentina",phone:"54"},{value:"AM",text:"Armenia",phone:"374"},{value:"AW",text:"Aruba",phone:"297"},{value:"AU",text:"Australia",phone:"61"},{value:"AT",text:"Austria",phone:"43"},{value:"AZ",text:"Azerbaijan",phone:"994"},{value:"BS",text:"Bahamas",phone:"1-242"},{value:"BH",text:"Bahrain",phone:"973"},{value:"BD",text:"Bangladesh",phone:"880"},{value:"BB",text:"Barbados",phone:"1-246"},{value:"BY",text:"Belarus",phone:"375"},{value:"BE",text:"Belgium",phone:"32"},{value:"BZ",text:"Belize",phone:"501"},{value:"BJ",text:"Benin",phone:"229"},{value:"BM",text:"Bermuda",phone:"1-441"},{value:"BT",text:"Bhutan",phone:"975"},{value:"BO",text:"Bolivia",phone:"591"},{value:"BA",text:"Bosnia and Herzegovina",phone:"387"},{value:"BW",text:"Botswana",phone:"267"},{value:"BV",text:"Bouvet Island",phone:"47"},{value:"BR",text:"Brazil",phone:"55"},{value:"IO",text:"British Indian Ocean Territory",phone:"246"},{value:"VG",text:"British Virgin Islands",phone:"1-284"},{value:"BN",text:"Brunei Darussalam",phone:"673"},{value:"BG",text:"Bulgaria",phone:"359"},{value:"BF",text:"Burkina Faso",phone:"226"},{value:"BI",text:"Burundi",phone:"257"},{value:"KH",text:"Cambodia",phone:"855"},{value:"CM",text:"Cameroon",phone:"237"},{value:"CA",text:"Canada",phone:"1"},{value:"CV",text:"Cape Verde",phone:"238"},{value:"KY",text:"Cayman Islands",phone:"1-345"},{value:"CF",text:"Central African Republic",phone:"236"},{value:"TD",text:"Chad",phone:"235"},{value:"CL",text:"Chile",phone:"56"},{value:"CN",text:"China",phone:"86"},{value:"CX",text:"Christmas Island",phone:"61"},{value:"CC",text:"Cocos (Keeling) Islands",phone:"61"},{value:"CO",text:"Colombia",phone:"57"},{value:"KM",text:"Comoros",phone:"269"},{value:"CD",text:"Congo, Democratic Republic of the",phone:"243"},{value:"CG",text:"Congo, Republic of the",phone:"242"},{value:"CK",text:"Cook Islands",phone:"682"},{value:"CR",text:"Costa Rica",phone:"506"},{value:"CI",text:"Cote d'Ivoire",phone:"225"},{value:"HR",text:"Croatia",phone:"385"},{value:"CU",text:"Cuba",phone:"53"},{value:"CW",text:"Curacao",phone:"599"},{value:"CY",text:"Cyprus",phone:"357"},{value:"CZ",text:"Czech Republic",phone:"420"},{value:"DK",text:"Denmark",phone:"45"},{value:"DJ",text:"Djibouti",phone:"253"},{value:"DM",text:"Dominica",phone:"1-767"},{value:"DO",text:"Dominican Republic",phone:"1-809"},{value:"EC",text:"Ecuador",phone:"593"},{value:"EG",text:"Egypt",phone:"20"},{value:"SV",text:"El Salvador",phone:"503"},{value:"GQ",text:"Equatorial Guinea",phone:"240"},{value:"ER",text:"Eritrea",phone:"291"},{value:"EE",text:"Estonia",phone:"372"},{value:"ET",text:"Ethiopia",phone:"251"},{value:"FK",text:"Falkland Islands (Malvinas)",phone:"500"},{value:"FO",text:"Faroe Islands",phone:"298"},{value:"FJ",text:"Fiji",phone:"679"},{value:"FI",text:"Finland",phone:"358"},{value:"FR",text:"France",phone:"33"},{value:"GF",text:"French Guiana",phone:"594"},{value:"PF",text:"French Polynesia",phone:"689"},{value:"TF",text:"French Southern Territories",phone:"262"},{value:"GA",text:"Gabon",phone:"241"},{value:"GM",text:"Gambia",phone:"220"},{value:"GE",text:"Georgia",phone:"995"},{value:"GH",text:"Ghana",phone:"233"},{value:"GI",text:"Gibraltar",phone:"350"},{value:"GR",text:"Greece",phone:"30"},{value:"GL",text:"Greenland",phone:"299"},{value:"GD",text:"Grenada",phone:"1-473"},{value:"GP",text:"Guadeloupe",phone:"590"},{value:"GU",text:"Guam",phone:"1-671"},{value:"GT",text:"Guatemala",phone:"502"},{value:"GG",text:"Guernsey",phone:"44"},{value:"GN",text:"Guinea",phone:"224"},{value:"GW",text:"Guinea-Bissau",phone:"245"},{value:"GY",text:"Guyana",phone:"592"},{value:"HT",text:"Haiti",phone:"509"},{value:"HM",text:"Heard Island and McDonald Islands",phone:"672"},{value:"VA",text:"Holy See (Vatican City State)",phone:"379"},{value:"HN",text:"Honduras",phone:"504"},{value:"HK",text:"Hong Kong",phone:"852"},{value:"HU",text:"Hungary",phone:"36"},{value:"IS",text:"Iceland",phone:"354"},{value:"IN",text:"India",phone:"91"},{value:"ID",text:"Indonesia",phone:"62"},{value:"IR",text:"Iran, Islamic Republic of",phone:"98"},{value:"IQ",text:"Iraq",phone:"964"},{value:"IE",text:"Ireland",phone:"353"},{value:"IM",text:"Isle of Man",phone:"44"},{value:"IL",text:"Israel",phone:"972"},{value:"IT",text:"Italy",phone:"39"},{value:"JM",text:"Jamaica",phone:"1-876"},{value:"JP",text:"Japan",phone:"81"},{value:"JE",text:"Jersey",phone:"44"},{value:"JO",text:"Jordan",phone:"962"},{value:"KZ",text:"Kazakhstan",phone:"7"},{value:"KE",text:"Kenya",phone:"254"},{value:"KI",text:"Kiribati",phone:"686"},{value:"KP",text:"Korea, Democratic People's Republic of",phone:"850"},{value:"KR",text:"Korea, Republic of",phone:"82"},{value:"XK",text:"Kosovo",phone:"383"},{value:"KW",text:"Kuwait",phone:"965"},{value:"KG",text:"Kyrgyzstan",phone:"996"},{value:"LA",text:"Lao People's Democratic Republic",phone:"856"},{value:"LV",text:"Latvia",phone:"371"},{value:"LB",text:"Lebanon",phone:"961"},{value:"LS",text:"Lesotho",phone:"266"},{value:"LR",text:"Liberia",phone:"231"},{value:"LY",text:"Libya",phone:"218"},{value:"LI",text:"Liechtenstein",phone:"423"},{value:"LT",text:"Lithuania",phone:"370"},{value:"LU",text:"Luxembourg",phone:"352"},{value:"MO",text:"Macao",phone:"853"},{value:"MK",text:"Macedonia, the Former Yugoslav Republic of",phone:"389"},{value:"MG",text:"Madagascar",phone:"261"},{value:"MW",text:"Malawi",phone:"265"},{value:"MY",text:"Malaysia",phone:"60"},{value:"MV",text:"Maldives",phone:"960"},{value:"ML",text:"Mali",phone:"223"},{value:"MT",text:"Malta",phone:"356"},{value:"MH",text:"Marshall Islands",phone:"692"},{value:"MQ",text:"Martinique",phone:"596"},{value:"MR",text:"Mauritania",phone:"222"},{value:"MU",text:"Mauritius",phone:"230"},{value:"YT",text:"Mayotte",phone:"262"},{value:"MX",text:"Mexico",phone:"52"},{value:"FM",text:"Micronesia, Federated States of",phone:"691"},{value:"MD",text:"Moldova, Republic of",phone:"373"},{value:"MC",text:"Monaco",phone:"377"},{value:"MN",text:"Mongolia",phone:"976"},{value:"ME",text:"Montenegro",phone:"382"},{value:"MS",text:"Montserrat",phone:"1-664"},{value:"MA",text:"Morocco",phone:"212"},{value:"MZ",text:"Mozambique",phone:"258"},{value:"MM",text:"Myanmar",phone:"95"},{value:"NA",text:"Namibia",phone:"264"},{value:"NR",text:"Nauru",phone:"674"},{value:"NP",text:"Nepal",phone:"977"},{value:"NL",text:"Netherlands",phone:"31"},{value:"NC",text:"New Caledonia",phone:"687"},{value:"NZ",text:"New Zealand",phone:"64"},{value:"NI",text:"Nicaragua",phone:"505"},{value:"NE",text:"Niger",phone:"227"},{value:"NG",text:"Nigeria",phone:"234"},{value:"NU",text:"Niue",phone:"683"},{value:"NF",text:"Norfolk Island",phone:"672"},{value:"MP",text:"Northern Mariana Islands",phone:"1-670"},{value:"NO",text:"Norway",phone:"47"},{value:"OM",text:"Oman",phone:"968"},{value:"PK",text:"Pakistan",phone:"92"},{value:"PW",text:"Palau",phone:"680"},{value:"PS",text:"Palestine, State of",phone:"970"},{value:"PA",text:"Panama",phone:"507"},{value:"PG",text:"Papua New Guinea",phone:"675"},{value:"PY",text:"Paraguay",phone:"595"},{value:"PE",text:"Peru",phone:"51"},{value:"PH",text:"Philippines",phone:"63"},{value:"PN",text:"Pitcairn",phone:"870"},{value:"PL",text:"Poland",phone:"48"},{value:"PT",text:"Portugal",phone:"351"},{value:"PR",text:"Puerto Rico",phone:"1"},{value:"QA",text:"Qatar",phone:"974"},{value:"RE",text:"Reunion",phone:"262"},{value:"RO",text:"Romania",phone:"40"},{value:"RU",text:"Russian Federation",phone:"7"},{value:"RW",text:"Rwanda",phone:"250"},{value:"BL",text:"Saint Barthelemy",phone:"590"},{value:"SH",text:"Saint Helena",phone:"290"},{value:"KN",text:"Saint Kitts and Nevis",phone:"1-869"},{value:"LC",text:"Saint Lucia",phone:"1-758"},{value:"MF",text:"Saint Martin (French part)",phone:"590"},{value:"PM",text:"Saint Pierre and Miquelon",phone:"508"},{value:"VC",text:"Saint Vincent and the Grenadines",phone:"1-784"},{value:"WS",text:"Samoa",phone:"685"},{value:"SM",text:"San Marino",phone:"378"},{value:"ST",text:"Sao Tome and Principe",phone:"239"},{value:"SA",text:"Saudi Arabia",phone:"966"},{value:"SN",text:"Senegal",phone:"221"},{value:"RS",text:"Serbia",phone:"381"},{value:"SC",text:"Seychelles",phone:"248"},{value:"SL",text:"Sierra Leone",phone:"232"},{value:"SG",text:"Singapore",phone:"65"},{value:"SX",text:"Sint Maarten (Dutch part)",phone:"1-721"},{value:"SK",text:"Slovakia",phone:"421"},{value:"SI",text:"Slovenia",phone:"386"},{value:"SB",text:"Solomon Islands",phone:"677"},{value:"SO",text:"Somalia",phone:"252"},{value:"ZA",text:"South Africa",phone:"27"},{value:"GS",text:"South Georgia and the South Sandwich Islands",phone:"500"},{value:"SS",text:"South Sudan",phone:"211"},{value:"ES",text:"Spain",phone:"34"},{value:"LK",text:"Sri Lanka",phone:"94"},{value:"SD",text:"Sudan",phone:"249"},{value:"SR",text:"Suriname",phone:"597"},{value:"SJ",text:"Svalbard and Jan Mayen",phone:"47"},{value:"SZ",text:"Swaziland",phone:"268"},{value:"SE",text:"Sweden",phone:"46"},{value:"CH",text:"Switzerland",phone:"41"},{value:"SY",text:"Syrian Arab Republic",phone:"963"},{value:"TW",text:"Taiwan, Province of China",phone:"886"},{value:"TJ",text:"Tajikistan",phone:"992"},{value:"TH",text:"Thailand",phone:"66"},{value:"TL",text:"Timor-Leste",phone:"670"},{value:"TG",text:"Togo",phone:"228"},{value:"TK",text:"Tokelau",phone:"690"},{value:"TO",text:"Tonga",phone:"676"},{value:"TT",text:"Trinidad and Tobago",phone:"1-868"},{value:"TN",text:"Tunisia",phone:"216"},{value:"TR",text:"Turkey",phone:"90"},{value:"TM",text:"Turkmenistan",phone:"993"},{value:"TC",text:"Turks and Caicos Islands",phone:"1-649"},{value:"TV",text:"Tuvalu",phone:"688"},{value:"VI",text:"US Virgin Islands",phone:"1-340"},{value:"UG",text:"Uganda",phone:"256"},{value:"UA",text:"Ukraine",phone:"380"},{value:"AE",text:"United Arab Emirates",phone:"971"},{value:"GB",text:"United Kingdom",phone:"44"},{value:"TZ",text:"United Republic of Tanzania",phone:"255"},{value:"US",text:"United States",phone:"1"},{value:"UY",text:"Uruguay",phone:"598"},{value:"UZ",text:"Uzbekistan",phone:"998"},{value:"VU",text:"Vanuatu",phone:"678"},{value:"VE",text:"Venezuela",phone:"58"},{value:"VN",text:"Vietnam",phone:"84"},{value:"WF",text:"Wallis and Futuna",phone:"681"},{value:"EH",text:"Western Sahara",phone:"212"},{value:"YE",text:"Yemen",phone:"967"},{value:"ZM",text:"Zambia",phone:"260"},{value:"ZW",text:"Zimbabwe",phone:"263"}],WF=[{control:Do,query:e=>"input"===e.control,matchCount:1},{control:({...e})=>{const{id:t,control:r,onChangeValue:o,objectPathId:i}=e,{value:a="","custom-attributes":s,error:l,hasEdited:c,...u}=r,{options:d}=s,p=l?"error":"",h=d.map((e=>({label:e.text||e.value,value:e.value}))),f=h.find((e=>e.value===a))||{label:a,value:a},m="number"===u.type||"date"===u.type,g=i||t,b=s?.defaultValue,{textColor:y}=an({onChangeValue:o,query:b,objectPathId:g,value:a,hasEdited:c}),v=e=>{const t=e.target;"number"===t.type&&t.blur()};return n().createElement(JO,{className:`${xk["form-control"]}`,freeSolo:!0,id:t,value:f,inputValue:a,options:h,readOnly:s?.readOnly,size:"small",onInputChange:(e,t)=>(e=>{o({value:e,hasEdited:"edited"})})(t),getOptionLabel:e=>e.value||"",renderOption:(e,t)=>n().createElement(Fb,{component:"li",...e},t.label),renderInput:e=>n().createElement(Ok,{...e,className:xk[p],variant:"outlined",...Hr()(u,["displayName","control","error","defaultValue"]),...Hr()(s,["defaultValue"]),inputProps:{...e.inputProps},onWheel:v,sx:{"& input":{color:y,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0}},"& .MuiAutocomplete-endAdornment":{right:m?"35px !important":"9px"}}})})},query:e=>"input"===e.control&&!!e?.["custom-attributes"]?.options,matchCount:2},{control:({onChangeValue:e,...t})=>{const{control:o,id:i,objectPathId:a}=t,{value:s="","custom-attributes":l,error:c,hasEdited:u}=o,d=a||i,p=c?"error":"",h=l?.defaultValue,{textColor:f}=an({onChangeValue:e,query:h,objectPathId:a,value:s,hasEdited:u}),m=l?.genAiPrompts,{toggleRerendered:g}=(0,r.useContext)(O.L8),b=o.type,y=l?.editor,v=l?.subType,w=l?.readOnly;(0,r.useEffect)((()=>{const t=(0,BF.K)(s,v,y,"initial");e({value:t||""})}),[g]);const A=(()=>{switch(y){case"richtext":return IF;case"markdown":return RF;default:return"html"===b?Tz:"json"===b?$z:VC}})();return n().createElement("div",{className:`${cC.textarea} textarea-control`,"data-testid":`textarea-${d}`},n().createElement("div",{className:cC.textareaWithBorder},n().createElement(YC,{aiActions:m,inputControl:n().createElement(A,{control:o,errorClass:p,textColor:f,value:s,onChangeValue:e,onChange:e,id:d,readOnly:w}),AiResponseControl:A,onAcceptAiResponse:e,objectPathId:d})))},query:e=>"textarea"===e.control,matchCount:1},{control:Fk,query:e=>"select"===e.control&&!e.multiple,matchCount:2},{control:({onChangeValue:e,controlProps:t,id:o,control:i})=>{const[a,s]=(0,r.useState)([]),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(""),{options:p,error:h,"custom-attributes":f}=i,m=h?"error":"";(0,r.useEffect)((()=>{const t=p.map((e=>({label:e.text,value:e.value}))),r=p.filter((e=>e.selected)).map((e=>({label:e.text,value:e.value})));s(t),g(r);const n=(e=>e.map((e=>e.selected?e.value:null)).filter((e=>!!e)))(p);e({value:n})}),[]);const g=t=>{(t=>{const{optionValues:r,updatedOptions:n}=((e,t)=>{if(!e||!t)return{optionValues:[],updatedOptions:[]};const r=e.map((e=>({...e,selected:t.some((t=>t.value===e.value))}))),n=r.filter((e=>e.selected)).map((e=>e.value));return{optionValues:1===n?.length?n[0]:n,updatedOptions:r}})(p,t);e({options:n,value:r},((e,t)=>Array.isArray(t)?t:void 0))})(t),c(t)};return n().createElement(JO,{multiple:!0,className:tC["multi-select-container"],id:o,readOnly:f?.readOnly,"data-testid":"multiselect__container",size:"small",sx:t?.selectProps?.sx,value:l,onChange:(e,t)=>g(t),isOptionEqualToValue:(e,t)=>e.value===t.value,inputValue:u,onInputChange:(e,t)=>d(t),options:a,getOptionLabel:e=>e.label,ListboxProps:{sx:{"& .MuiAutocomplete-option":{minHeight:"40px"}}},renderInput:e=>n().createElement(Ok,{...e,className:tC[m],variant:"outlined",sx:{"& .MuiInputBase-root":{minHeight:"40px","& .MuiChip-root":{maxWidth:"calc(100% - 50px)"}},...t?.selectProps?.textField?.sx}})})},query:e=>"select"===e.control&&e.multiple,matchCount:2},{control:({onChangeValue:e,...t})=>{const{control:o,id:i,objectPathId:a}=t,{selected:s=!1}=o,l=o.value||"on",c=a||i;(0,r.useEffect)((()=>{e({value:o.selected?l:""})}),[]);const u=Object.assign(Hr()(t,["objectPathId","checked","control","displayName","error"]),{name:c,value:l,type:o.control,role:o.control});return n().createElement(Vr,{className:`${Jr["form-control"]} ${rn["checkbox-container"]}`,id:c,color:"default",checked:s,readOnly:o["custom-attributes"]?.readOnly,onClick:()=>{e({selected:!o.selected,value:o.selected?"":l})},inputProps:u,sx:{marginLeft:"-11px",color:"rgba(0,0,0,0.54)","&:checked":{color:"rgba(0,0,0,0.54)"}}})},query:e=>"checkbox"===e.control,matchCount:1},{control:({onChangeValue:e,controlProps:t,...o})=>{const{control:i,id:a,objectPathId:s,...l}=o,{value:c="","custom-attributes":u,error:d,...p}=i,h=d?"error":"",[f,m]=(0,r.useState)(!1),g=s||a,b=()=>m((e=>!e));return n().createElement("div",{className:aC["password-container"]},n().createElement("input",{role:"textbox",className:`${Jr["form-control"]} ${aC["password-input"]} ${aC[h]}`,id:g,"data-testid":"password-input__input",name:g,value:c,onChange:t=>{e({value:t.target.value})},...u,...Hr()(p,["displayName","control","error"]),...Hr()(l),type:f?"text":"password",style:t?.inputProps?.style}),n().createElement("button",{className:aC["toggle-icon"],type:"button"},f?n().createElement(nC.Z,{"data-testid":"password-input__visibility-off-icon",onClick:b}):n().createElement(rC.Z,{"data-testid":"password-input__visibility-icon",onClick:b})))},query:e=>"input"===e.control&&"password"===e.type,matchCount:2},{control:Kk,query:e=>"input"===e.control&&!!e?.["custom-attributes"]?.["mrn-ref"]&&!e?.["custom-attributes"]?.mrnPreview,matchCount:3},{control:Kk,query:e=>"input"===e.control&&!!e?.["custom-attributes"]?.mrnSources&&!e?.["custom-attributes"]?.mrnPreview,matchCount:3},{control:({...e})=>{const{control:t,onChangeValue:o}=e,{"custom-attributes":i,error:a,value:s}=t,{fileUploaderConfig:l}=(0,r.useContext)(O.L8);if(!l)throw new Error("fileUploaderConfig Prop is not defined");const{info:c,endpoints:u,language:d,previewUrl:p,authorizationHeader:h}=l,f={value:s,info:c,error:a?.message,tags:i?.tags,type:i?.media,readOnly:i?.readonly,mode:"stateful",endpoints:u,language:d,onUploadSuccess:e=>o({value:e,error:""}),previewUrl:p,authorizationHeader:h};return n().createElement("div",{"data-testid":"fileuploader__widget"},n().createElement(Mb,{...f}))},query:e=>"input"===e.control&&"url"===e.type&&!!e?.["custom-attributes"]?.media,matchCount:3},{control:({...e})=>{const{id:t,control:o,objectPathId:i,groupIsRequired:a,isInGroup:s,controlProps:l}=e,{"custom-attributes":c,displayName:u,controls:d,required:p}=o,h=Object.entries(d)?.length??0,f=Number(c?.defaultCollapseThreshold),m=0===h||f<=h,[g,b]=(0,r.useState)(!m),y=i||t,v=s?p||a:p||ey({controls:d}),O=l?.groupProps?.style??{},w=l?.groupProps?.label?.style??{},A=g?{}:{display:"none",visibility:"hidden"};return n().createElement("div",{className:ny["form-group-container"],id:t,"data-testid":t,style:O},n().createElement("div",{className:ny["group-header"]},n().createElement("h3",{className:`${ny["control-label-group"]} ${_r["control-label-group"]}`,style:w},u),n().createElement(Hb,{isOpen:g,onClick:()=>b((e=>!e))})),n().createElement("div",{role:"group",style:A},d&&Object.entries(d).map((([e,r])=>{const o=`${y}.controls.${e}`;return n().createElement(n().Fragment,{key:o},n().createElement(KF,{key:t,formControl:r,id:t,objectPathId:o,groupIsRequired:v,isInGroup:!0,controlProps:l}))}))))},query:e=>"group"===e.control,matchCount:1},{control:({...e})=>{const{id:t,control:o,objectPathId:i}=e,{displayName:a,controls:s}=o,[l,c]=(0,r.useState)(!0),u=(0,r.useRef)(null),d=i||t,{from:p,to:h}=s,{updateControl:f}=(0,r.useContext)(O.L8),m=e=>e.toLocaleString("default",{year:"numeric"})+"-"+e.toLocaleString("default",{month:"2-digit"})+"-"+e.toLocaleString("default",{day:"2-digit"}),g={id:t,objectPathId:`${d}.controls.from`,control:p,hasClearButton:!0},b=(e,r)=>{f(g.objectPathId||t,kr()({},g.control,e,r))},y={id:t,objectPathId:`${d}.controls.to`,control:h,hasClearButton:!0},v=g.control?.required||y.control?.required,w=(e,r)=>{f(y.objectPathId||t,kr()({},y.control,e,r))},A=e=>{e.preventDefault(),c(!1),u.current.scrollIntoView({behavior:"smooth"})};D(u,(()=>{c(!0)}));const x={handleDateChange:(e,t)=>{b({value:m(e.startDate)}),w({value:m(e.endDate)}),!t&&c(!0)},setHidden:c,hidden:l,from:g.control.value,to:y.control.value};return n().createElement(Lo,{ref:u,"data-testid":"dateRangeGroup__Container"},n().createElement(Io,{"data-testid":"dateRangeGroup__displayName"},a,v&&" *"),n().createElement(Bo,{hidden:l},n().createElement(Do,{"data-testid":"dateRangeGroup__inputFrom",onClearCallback:()=>{b({value:""})},onClick:e=>A(e),onChangeValue:b,...g}),n().createElement(Do,{"data-testid":"dateRangeGroup__inputTo",onClearCallback:()=>{w({value:""})},onClick:e=>A(e),onChangeValue:w,...y}),n().createElement(Xo,{...x})))},query:e=>"group"===e.control&&"dateRange"===e?.["custom-attributes"]?.type,matchCount:2},{control:({...e})=>{const{id:t,control:r,objectPathId:o,groupIsRequired:i,isInGroup:a,controlProps:s}=e,{displayName:l,controls:c,required:u}=r,d="string"==typeof c.country?.value&&c.country?.value.toLowerCase(),p=`${ny["form-group-container"]} ${UF["address-group-container"]}`;let h=`${UF.address} ${_r.address}`;h=d&&UF[d]?`${h} ${UF[d]}`:`${h} ${UF["address-default"]}`;const f=o||t,m=a?u||i:u||ey({controls:c}),g=(e,r)=>{const o=`${f}.controls.${e}`;return r.placeholder=r.placeholder||r.displayName,"country"===e&&r&&(r.control="select",r.options=FF),n().createElement(n().Fragment,{key:o},n().createElement(KF,{key:t,formControl:r,hideLabel:!0,id:t,objectPathId:o,groupIsRequired:m,isInGroup:!0,controlProps:s}))},b=s?.addressProps?.style??{},y=s?.addressProps?.label?.style??{},v=s?.addressProps?.container?.style??{};return n().createElement("div",{className:p,id:t,"data-testid":t,style:b},n().createElement("h3",{className:`${UF["control-label-group"]} ${_r["control-label-group"]}`,style:y},l),n().createElement("div",{className:h,style:v},g("streetName",c.streetName),g("houseNumber",c.houseNumber),g("postalCode",c.postalCode),g("locality",c.locality),g("country",c.country)))},query:e=>"group"===e.control&&"address"===e?.["custom-attributes"]?.type,matchCount:2},{control:({...e})=>{const{id:t,control:o,objectPathId:i,groupIsRequired:a,controlProps:s}=e,{addListItem:l,removeListItem:c,moveListItemUp:u,moveListItemDown:d}=(0,r.useContext)(O.L8),{"custom-attributes":p,displayName:h,items:f,template:m,required:g}=o,b=f?.length??0,y=Number(p?.defaultCollapseThreshold),w=0===b||y<=b,[A,x]=(0,r.useState)(!w),k=i||t,C=m&&Object.entries(m).length>1,S=g?h+" *":h,_=C?"form-list-multiple-items":"form-list-single-item",E=!C&&m&&Object.values(m)?.[0]?.displayName||S||"",P=s?.listProps?.style??{},q=s?.listProps?.label?.style??{},T=s?.listProps?.container?.style??{},j=s?.listProps?.addButton?.sx??{},R=A?{}:{display:"none",visibility:"hidden"};return n().createElement("div",{className:_r["list-container"],"data-testid":"form-list",key:t,style:P},n().createElement("div",{className:_r["list-header"]},n().createElement("div",{className:_r["list-header-label-button"]},n().createElement("label",{"data-testid":"list-control-label",className:_r["list-label"],style:q},S),n().createElement(Fb,{"data-testid":E,className:v()("formbuilder_add-button",Jb["xhtml-form-button"]),role:"alert",onClick:()=>{l(k),x(!0)},sx:j},n().createElement(te.Z,{sx:{fontSize:20},"data-testid":"form-list__add-icon"})," ",E)),n().createElement(Hb,{itemsCount:b,isOpen:A,onClick:()=>x((e=>!e))})),n().createElement("div",{id:_,"data-testid":"form-list-children",role:"list",className:v()(_r[_],_r["list-children-container"]),"data-title":E,style:{...R,...T}},f?.map(((e,t)=>{if(!e)return null;const r=t===f.length-1,o=0===t,l=f.length>1;return n().createElement("div",{className:_r["form-list"],"data-testid":"form-list-child-element",role:"listitem","data-is-filled":!0,key:`${i}-${t}`},e&&Object.entries(e)?.map((([e,r])=>((e,t,r)=>{const o=`${k}.items.[${r||0}].${e}`;return n().createElement(KF,{key:o,formControl:t,id:e,objectPathId:o,hideLabel:!C,groupIsRequired:a,controlProps:s})})(e,r,t))),n().createElement("button",{type:"button",className:v()(Jb["xhtml-form-button"],Jb["remove-item"],_r["remove-item"]),"data-testid":"form-list__remove-list-item-button",onClick:()=>c(k,t)},n().createElement(Wb.A,null)),n().createElement("div",{className:_r["sort-buttons"]},n().createElement("button",{type:"button",className:v()([_r.sortBtn,_r.sortUp]),onClick:()=>u(k,t),disabled:o||!l},n().createElement(Yt.s,{"data-testid":"form-list__sort-up-button"})),n().createElement("button",{type:"button",className:v()([_r.sortBtn,_r.sortDown]),onClick:()=>d(k,t),disabled:r||!l},n().createElement(Wt.R,{"data-testid":"form-list__sort-down-button"}))))}))))},query:e=>"list"===e.control,matchCount:1}],YF=WF,VF=Ro.div`
|
679
679
|
${e=>e.isHidden&&Oo`
|
680
680
|
display: none !important;
|
681
681
|
`}
|